Skip to content

Commit 86b5a30

Browse files
committed
Merge pull request #515 from povilasb/0.11-devel-export-dependecy-libs
Export dependency libraries.
2 parents fba104c + f51205f commit 86b5a30

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,12 @@ export(PACKAGE cppnetlib)
119119
file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}"
120120
"${CMAKE_INSTALL_FULL_INCLUDEDIR}")
121121
# ... for the build tree
122-
set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}")
122+
set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}" ${Boost_INCLUDE_DIRS})
123123
configure_file(cppnetlibConfig.cmake.in
124124
"${PROJECT_BINARY_DIR}/cppnetlibConfig.cmake" @ONLY)
125125
# ... for the install tree
126126
set(CONF_INCLUDE_DIRS "\${CPPNETLIB_CMAKE_DIR}/${REL_INCLUDE_DIR}")
127+
set(CONF_INCLUDE_DIRS ${CONF_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
127128
configure_file(cppnetlibConfig.cmake.in
128129
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/cppnetlibConfig.cmake" @ONLY)
129130
# ... for both

cppnetlibConfig.cmake.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
# CPPNETLIB_INCLUDE_DIRS - include directories for cppnetlib
44
# CPPNETLIB_LIBRARIES - libraries to link against
55
# CPPNETLIB_EXECUTABLE - the bar executable
6-
6+
77
# Compute paths
88
get_filename_component(CPPNETLIB_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
99
set(CPPNETLIB_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@")
10-
10+
1111
# Our library dependencies (contains definitions for IMPORTED targets)
1212
if( NOT TARGET cppnetlib-client-connections
1313
AND NOT TARGET cppnetlib-server-parsers
1414
AND NOT TARGET cppnetlib-uri
1515
AND NOT CPPNETLIB_BINARY_DIR)
1616
include("${CPPNETLIB_CMAKE_DIR}/cppnetlibTargets.cmake")
1717
endif()
18-
18+
1919
# These are IMPORTED targets created by cppnetlibTargets.cmake
20-
set(CPPNETLIB_LIBRARIES
20+
set(CPPNETLIB_LIBRARIES
2121
cppnetlib-client-connections
2222
cppnetlib-server-parsers
2323
cppnetlib-uri)

libs/network/src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
include_directories(${CPP-NETLIB_SOURCE_DIR})
1010

11-
file(GLOB_RECURSE CPP-NETLIB_HEADERS
11+
file(GLOB_RECURSE CPP-NETLIB_HEADERS
1212
"${CPP-NETLIB_SOURCE_DIR}/boost/" "*.hpp")
1313

1414
set(CPP-NETLIB_URI_SRCS uri/uri.cpp uri/schemes.cpp)
@@ -45,7 +45,7 @@ if (OPENSSL_FOUND)
4545
target_link_libraries(cppnetlib-client-connections ${OPENSSL_LIBRARIES})
4646
endif ()
4747
if (Boost_FOUND)
48-
target_link_libraries(cppnetlib-client-connections ${Boost_System_LIBRARY})
48+
target_link_libraries(cppnetlib-client-connections ${Boost_LIBRARIES})
4949
endif ()
5050
install(TARGETS cppnetlib-client-connections
5151
EXPORT cppnetlibTargets

0 commit comments

Comments
 (0)