From: Guilherme Maciel Ferreira Date: Wed, 23 Mar 2011 12:48:53 +0000 (+0100) Subject: Linking against libi2ncommon X-Git-Tag: v1.0~120 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=d3692dd990bdfdb908c5c792e48739a0c001936a;p=pingcheck Linking against libi2ncommon --- 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