[CMake] Problems with LIBRARY_OUTPUT_PATH
Filipe Sousa
natros at gmail.com
Mon Jan 10 05:08:51 EST 2005
Hi!
When I set LIBRARY_OUTPUT_PATH in sub directories, cmake is always building
the libraries. To a better understanding of my problem I show you my
CMakeLists.txt files
In my project root I have this CMakeList.txt
PROJECT(gal)
SUBDIRS(mylib modules)
CMakeLists.txt to build "mylib". I want to put all libraries in the same
directory
ADD_LIBRARY(mylib mylib.cc)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
CMakeLists.txt to build a simple plug-in that links with "mylib". All plugins
should go ${PROJECT_BINARY_DIR}/plugin
ADD_LIBRARY(mod MODULE m.cc)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/plugin)
LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lib)
TARGET_LINK_LIBRARIES(mod mylib)
Everytime I run make, the plugin is always built as you can see by the output:
fsousa at localhost ~/tmp/cmakebug/Build $ make
cmake.depends is up-to-date
/home/fsousa/tmp/cmakebug/Build/mylib: building default_target
cmake.depends is up-to-date
/home/fsousa/tmp/cmakebug/Build/modules: building default_target
cmake.depends is up-to-date
cmake.depends is up-to-date
Building shared module /home/fsousa/tmp/cmakebug/Build/plugin/libmod.so...
fsousa at localhost ~/tmp/cmakebug/Build $ make
cmake.depends is up-to-date
/home/fsousa/tmp/cmakebug/Build/mylib: building default_target
cmake.depends is up-to-date
/home/fsousa/tmp/cmakebug/Build/modules: building default_target
cmake.depends is up-to-date
cmake.depends is up-to-date
Building shared module /home/fsousa/tmp/cmakebug/Build/plugin/libmod.so...
Is this a bug or am I doing something wrong?
--
Filipe Sousa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20050110/56e88e6d/attachment.pgp
More information about the CMake
mailing list