[CMake] Having problems getting started
Mike Jackson
imikejackson at gmail.com
Fri Feb 29 13:20:32 EST 2008
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20080229/e504b037/attachment.htm
More information about the CMake
mailing list