You may want to look at the

file(GLOB variable [RELATIVE path] [globbing expressions]...)

or

  file(GLOB_RECURSE variable [RELATIVE path]
       [globbing expressions]...)

if you do a cmake --help-command file a print out of the documentation for that command will be listed.

Also,
  Some projects use the following as the way to get source files:

SET (MyProject_SRCS SomeFile.cpp SomeOtherFile.cxx lib/ SomeLibFile.cpp )

ADD_LIBRARY(VSEngine ${MyProject_SRCS})

That will default to a static library. If you want a shared library:

ADD_LIBRARY(VSEngine SHARED ${MyProject_SRCS})


--
Mike Jackson


On Feb 29, 2008, at 11:37 AM, Arlen Cox wrote:

1. Is there some way to use wildcards when specifying files for a library? Something like this:
add_library(VSEngine *.cpp)

That particular line doesn't work. I tried, but there must be a way that I can add a file to a project without having to modify the makefil

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to