Hi, I am new to Cmake and at present exploring its features for migrating our projects build system to use it.
I have main source folder inside that another folder contains the source for our custom library. I understand that the problem is with my cmake file. Through that the generated project cannot locate the location of my library build location. What is the right way to solve this kind of problem? Thanks, Lloyd As a sample I am including my Cmake code #Cmake file of library source code #Path-> Myproject/src/lib/reverse cmake_minimum_required (VERSION 2.6) if(WIN32) SET (REV_SRC reverse.cpp reverse.h) else(WIN32) SET (REV_SRC reverse.cpp) endif(WIN32) ADD_DEFINITIONS(-DREVERSE_EXPORTS) ADD_LIBRARY(Reverse SHARED ${REV_SRC}) This is my CMake file inside the Src folder #Cmake file of main source code #Path-> Myproject/src/ cmake_minimum_required (VERSION 2.6) FIND_PACKAGE(Qt4 REQUIRED) INCLUDE(${QT_USE_FILE}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/lib/reverse) ADD_SUBDIRECTORY(lib/reverse) ADD_EXECUTABLE(Tutorial main.cpp) TARGET_LINK_LIBRARIES(Tutorial ${QT_LIBRARIES}) ############################################################# #I understand that the problem is here, because it cant locate my library. TARGET_LINK_LIBRARIES(Tutorial reverse) #############################################################
-- 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