[Cmake] Collecting files from subdirs
Emmanuel Idi
eman at openrdb.org
Sun Mar 30 17:36:08 EST 2003
See: AUX_SOURCE_DIRECTORY()
Nils H. Busch wrote:
> Hi,
>
> probably something very easy, but I can't get it to work.
> I want to add source files from several subdirs in one cmake var to use
> it in a call to
> ADD_LIBRARY(somelib ${SRCS}).
> This is to collect source files from several subdirs and make one
> library out of it.
> I have tried a few things, but my list is always empty.
> Something like in a top-level CmakeLists.txt
> SET(SRCS "")
> SUBDIRS(dir1 dir 2)
> and then in subdir CMakeLists.txt
> SET(SRCS "${SRCS} foo")
> does not work.
>
> I'd like to retain the structure of those subdirs to organize code, but
> combine it into one library.
> Any hints?
>
More information about the CMake
mailing list