On Jun 3, 2009, at 2:53 PM, e...@cs.bgu.ac.il wrote:
TARGET_LINK_LIBRARIES(AgathaHud libAgathaUtils libAgathaEngine
libAgathaThreads)
the error output is: /usr/lib/gcc/x86_64-pc-linux-gnu/
4.3.3/../../../../x86_64-pc-linux-gnu/bin/ld:
cannot find -llibAgathaUtils
like I've said before, the libs are generated into the bin/libs
folder and the actual program binary
is created at bin
Subtle..
You need something like:
link_directories (${PROJECT_BINARY_DIR}/bin/lib )
Assuming you only have one call to "project()"
If you are dumping libraries into bin/libs then I would set the
following variables near the top of the top most cmakelists.txt file,
just after the first call to "project"
# ---------- Setup output Directories -------------------------
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/bin/libs
CACHE PATH
"Single Directory for all Libraries"
)
# --------- Setup the Executable output Directory -------------
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/bin
CACHE PATH
"Single Directory for all Executables."
)
# --------- Setup the Executable output Directory -------------
SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/bin/libs
CACHE PATH
"Single Directory for all static libraries."
)
then you can use those variables in your other sub projects if needed:
link_libraries(${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
HTH.
_________________________________________________________
Mike Jackson mike.jack...@bluequartz.net
BlueQuartz Software www.bluequartz.net
Principal Software Engineer Dayton, Ohio
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake