Skip to content

Commit 9724323

Browse files
deanberrisjellevdd
authored andcommitted
Fix dependencies for openssl.
1 parent 98328f3 commit 9724323

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

libs/network/example/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ if (UNIX)
130130
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
131131
target_link_libraries(fileserver rt)
132132
endif()
133+
if (OPENSSL_FOUND)
134+
target_link_libraries(fileserver ${OPENSSL_LIBRARIES})
135+
endif(OPENSSL_FOUND)
133136
endif (UNIX)
134137

135138
set_target_properties(http_client PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR}/example)

libs/network/test/http/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ if (Boost_FOUND)
7474
add_executable(cpp-netlib-http-${test} ${test}.cpp)
7575
add_dependencies(cpp-netlib-http-${test} cppnetlib-server-parsers)
7676
target_link_libraries(cpp-netlib-http-${test} ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} cppnetlib-server-parsers)
77+
if (OPENSSL_FOUND)
78+
target_link_libraries(cpp-netlib-http-${test} ${OPENSSL_LIBRARIES})
79+
endif()
7780
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU AND ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
7881
target_link_libraries(cpp-netlib-http-${test} ws2_32 wsock32)
7982
endif()

0 commit comments

Comments
 (0)