From d3692dd990bdfdb908c5c792e48739a0c001936a Mon Sep 17 00:00:00 2001 From: Guilherme Maciel Ferreira Date: Wed, 23 Mar 2011 13:48:53 +0100 Subject: [PATCH] Linking against libi2ncommon --- src/CMakeLists.txt | 20 ++++++++------------ 1 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dd72446..aadb2a3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,17 +3,19 @@ set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) find_package(Boost COMPONENTS filesystem program_options REQUIRED) +include_directories(${Boost_INCLUDE_DIRS}) +link_directories(${Boost_LIBRARY_DIRS}) # package: find external packages include(FindPkgConfig) + +# package: libi2ncommon pkg_check_modules(I2NCOMMON REQUIRED libi2ncommon) +include_directories(${I2NCOMMON_INCLUDE_DIRS}) +link_directories(${I2NCOMMON_LIBRARY_DIRS}) # compiler: include directories where the source code is located -include_directories( - ${Boost_INCLUDE_DIRS} - ${I2NCOMMON_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR} -) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) # compiler: source code files set(SOURCES @@ -35,17 +37,11 @@ set(SOURCES # compiler: creates the binary add_executable(${TARGET} ${SOURCES}) -# linker: libraries search path -link_directories( - ${Boost_LIBRARY_DIRS} -# ${I2NCOMMON_LIBRARY_DIRS} -) - # linker: link the program against the libraries target_link_libraries( ${TARGET} ${Boost_LIBRARIES} -# ${I2NCOMMON_LIBRARIES} + ${I2NCOMMON_LIBRARIES} ) # creates the install rule for the binary -- 1.7.1