-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to target-oriented dependencies. Use imported targets for dependencies (openssl, boost). Localize FindBoost to remove cmake version dependence for latest boost support. Logically separate "ripple-libpp" core sources and add install targets. Add ninja build for msvc. Add two clang sanitizer builds. Misc script changes to work with latest modernized cmake.
- Loading branch information
1 parent
381a1b9
commit 1708d89
Showing
35 changed files
with
4,533 additions
and
1,836 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
include (CMakeFindDependencyMacro) | ||
# need to represent system dependencies of the lib here | ||
#[=========================================================[ | ||
Boost | ||
#]=========================================================] | ||
if (static OR APPLE OR MSVC) | ||
set (Boost_USE_STATIC_LIBS ON) | ||
endif () | ||
set (Boost_USE_MULTITHREADED ON) | ||
if (static OR MSVC) | ||
set (Boost_USE_STATIC_RUNTIME ON) | ||
else () | ||
set (Boost_USE_STATIC_RUNTIME OFF) | ||
endif () | ||
find_dependency (Boost 1.67 | ||
COMPONENTS | ||
chrono | ||
context | ||
coroutine | ||
date_time | ||
filesystem | ||
program_options | ||
regex | ||
serialization | ||
system | ||
thread) | ||
#[=========================================================[ | ||
OpenSSL | ||
#]=========================================================] | ||
if (APPLE AND NOT DEFINED ENV{OPENSSL_ROOT_DIR}) | ||
find_program (HOMEBREW brew) | ||
if (NOT HOMEBREW STREQUAL "HOMEBREW-NOTFOUND") | ||
execute_process (COMMAND ${HOMEBREW} --prefix openssl | ||
OUTPUT_VARIABLE OPENSSL_ROOT_DIR | ||
OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
endif () | ||
endif () | ||
|
||
if ((NOT DEFINED OPENSSL_ROOT) AND (DEFINED ENV{OPENSSL_ROOT})) | ||
set (OPENSSL_ROOT $ENV{OPENSSL_ROOT}) | ||
endif () | ||
file (TO_CMAKE_PATH "${OPENSSL_ROOT}" OPENSSL_ROOT) | ||
|
||
if (static OR APPLE OR MSVC) | ||
set (OPENSSL_USE_STATIC_LIBS ON) | ||
endif () | ||
set (OPENSSL_MSVC_STATIC_RT ON) | ||
find_dependency (OpenSSL 1.0.2 REQUIRED) | ||
find_dependency (ZLIB) | ||
if (TARGET ZLIB::ZLIB) | ||
set_target_properties(OpenSSL::Crypto PROPERTIES | ||
INTERFACE_LINK_LIBRARIES ZLIB::ZLIB) | ||
endif () | ||
|
||
include ("${CMAKE_CURRENT_LIST_DIR}/RippleTargets.cmake") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.