Chih-pin Wu wrote:
Hi Bill:
Thanks, it's exactly what you mentioned, and I got some mistake on my
CMakeList.txt.
Originally I have some syntax like:
SET(LIB_DIRS ${LIB_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/../../../lib)
SET(LIBS ${LIBS} "libMyLibA.a")
TARGET_LINK_LIBRARIES(${PROGNAME} ${LIBS})
If MyLibA is being built by CMake, this is still wrong. It should be:
add_library(MyLibA STATIC ...)
TARGET_LINK_LIBRARIES(${PROGNAME} MyLibA)
For things that CMake builds, you should not try to find them or
construct paths to them, it is unportable and extra work.
-Bill
_______________________________________________
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