On Monday 03 March 2008, packadal wrote: > Hi > I am trying to build a shared library from many static libs, so I can > divide my compilation in subdirectories.
Don't do that, just use directly the source files from the subdirectories. > But I don't get how i should do this. > I tried to use TARGET_LINK_LIBRARY( first_lib, second_lib, ...) > But cmake says : " Attempt to add link library "first_lib", to target > "second_lib", which is not built by this project." > Is there a better way to di this ? Did you use SUBDIRS() ? Use ADD_SUBDIRECTORY() instead, then the dirs will be processed at the time of the call, with SUBDIRS the dirs are processed at the end of the CMakeLists.txt Alex _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake