[CMake] Having problems getting started
Arlen Cox
arlencox at gmail.com
Fri Feb 29 13:47:17 EST 2008
Thanks Mike.
That was exactly what I was looking for.
-Arlen
On Fri, Feb 29, 2008 at 11:20 AM, Mike Jackson <imikejackson at gmail.com>
wrote:
> 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/34a591bd/attachment.html
More information about the CMake
mailing list