Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Build: allow options to use Boost + OpenSSL static libs#722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
deanberris merged 1 commit intocpp-netlib:0.13-releasefromanonimal:0.13-release
Jan 9, 2017
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletionsCMakeLists.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,8 @@ option( CPP-NETLIB_BUILD_TESTS "Build the cpp-netlib project tests." ON)
# option( CPP-NETLIB_BUILD_EXPERIMENTS "Build the cpp-netlib project experiments." ON)
option( CPP-NETLIB_BUILD_EXAMPLES "Build the cpp-netlib project examples." ON)
option( CPP-NETLIB_ENABLE_HTTPS "Build cpp-netlib with support for https if OpenSSL is found." ON)
option( CPP-NETLIB_STATIC_OPENSSL "Build cpp-netlib using static OpenSSL" OFF)
option( CPP-NETLIB_STATIC_BOOST "Build cpp-netlib using static Boost" OFF)

include(GNUInstallDirs)

Expand All@@ -37,8 +39,10 @@ else()
set(BUILD_SHARED_LIBS OFF)
endif()

# Always use Boost's shared libraries.
set(Boost_USE_STATIC_LIBS OFF)
# Use Boost's static libraries
if (CPP-NETLIB_STATIC_BOOST)
set(Boost_USE_STATIC_LIBS ON)
endif()

# We need this for all tests to use the dynamic version.
add_definitions(-DBOOST_TEST_DYN_LINK)
Expand All@@ -65,6 +69,9 @@ if (CPP-NETLIB_ENABLE_HTTPS)
endif()
endif()
endif()
if (CPP-NETLIB_STATIC_OPENSSL)
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
endif()
find_package(OpenSSL)
endif()

Expand Down
5 changes: 5 additions & 0 deletionslibs/network/src/CMakeLists.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -45,6 +45,11 @@ set_target_properties(cppnetlib-client-connections
target_link_libraries(cppnetlib-client-connections ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
if (OPENSSL_FOUND)
target_link_libraries(cppnetlib-client-connections ${OPENSSL_LIBRARIES})
if (CPP-NETLIB_STATIC_OPENSSL)
if (NOT MSVC AND NOT MINGW AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") # dynlinker functions are built into libc on FreeBSD
target_link_libraries(cppnetlib-client-connections "-ldl")
endif()
endif()
endif ()
if (MINGW)
target_link_libraries(cppnetlib-client-connections ws2_32)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp