Steve Johns wrote:
ProjDir
src
incl
lib
into which directory's CMakelists.txt file should I put the
SOURCE_FILES( "Include Files" FILES x.hpp y.hpp )
command, and could this:
ADD_LIBRARY( MyLibProj x.cpp y.cpp x.hpp y.hpp )
The source and header files will not magically be found in other
directories. You have to tell CMake where to find them. Try this in
the top-level CMakeLists.txt file:
ADD_LIBRARY(mylib src/x.cpp incl/x.hpp)
SOURCE_GROUP("Include Files" FILES incl/x.hpp)
Basically source files have to be named with a relative path to the
location of the CMakeLists.txt file. This may also work from
lib/CMakeLists.txt:
ADD_LIBRARY(mylib ../src/x.cpp ../incl/x.hpp)
SOURCE_GROUP("Include Files" FILES ../incl/x.hpp)
-Brad
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake