[CMake] Include *.cpp files from external directory

Hendrik Sattler post at hendrik-sattler.de
Wed Jan 20 06:25:48 EST 2010

Zitat von Marc Kammer <mkammer at techfak.uni-bielefeld.de>:
> ADD_LIBRARY(ObjectManager STATIC /homes/myNameprogram2/src/theOtherProg.cpp)
> to CMakeLists.txt in the "first dir".
> If I now try to compile theProg.cpp I get the following error message:
> -- Build files have been written to: /homes/myName/program1/src/make
> [ 50%] Built target theOtherProg
> Scanning dependencies of target yarpy
> Linking CXX executable yarpy

Do you actually called
   target_link_libraries(yarpy ObjectManager)


More information about the CMake mailing list