From 95faedd3d0e44b99e5177abfaa5146de87aded24 Mon Sep 17 00:00:00 2001 From: Stas Date: Tue, 16 Nov 2021 16:15:51 +0100 Subject: [PATCH] b2 and ZLIB libs from conan for CentOS7 --- .cproject | 10 +++++++++- CMakeLists.txt | 20 +++++++++++++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.cproject b/.cproject index e2f7de7..95e64ad 100644 --- a/.cproject +++ b/.cproject @@ -58,6 +58,7 @@ + @@ -283,12 +284,19 @@ make - VERBOSE=1 true false true + + CMAKE_BUILD_TOOL + $<cmake4eclipse_dyn> + clean + true + true + true + \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a7a315..16659c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,6 +77,21 @@ endif() ## get conan packages ########################################################## include(ConanInline) +conan_check() +conan_add_remote(NAME minres URL https://artifactory.minres.com/artifactory/api/conan/oss) + +# Boost on CentOS 7 quirks: the b2 of conan-center is build against a newer libstdc++ and therefore does not run +# with the oooooold libs on CentOS 7. Therefore we build our own version of b2 if it is not there +set(B2_META $ENV{HOME}/.conan/data/b2/4.5.0/_/_/metadata.json) +if(DEFINED ENV{CONAN_USER_HOME}) + set(B2_META $ENV{CONAN_USER_HOME}/.conan/data/b2/4.5.0/_/_/metadata.json) +endif() +if(NOT EXISTS ${B2_META}) + conan_cmake_configure(REQUIRES b2/4.5.0) + conan_cmake_autodetect(settings) + conan_cmake_install(PATH_OR_REFERENCE . BUILD b2 SETTINGS ${settings}) +endif() +# Boost on CentOS 7 quirks end set(CONAN_BOOST_OPTIONS boost:fPIC=True @@ -104,14 +119,12 @@ boost:without_timer=True boost:without_type_erasure=True boost:without_wave=True ) -set(CONAN_PACKAGE_LIST fmt/6.1.2 boost/1.75.0 gsl-lite/0.37.0) +set(CONAN_PACKAGE_LIST fmt/6.1.2 zlib/1.2.11 boost/1.75.0 gsl-lite/0.37.0) set(CONAN_PACKAGE_OPTIONS fmt:header_only=True ${CONAN_BOOST_OPTIONS}) if(NOT DEFINED ENV{SYSTEMC_HOME}) set(CONAN_PACKAGE_LIST ${CONAN_PACKAGE_LIST} systemc/2.3.3 systemc-cci/1.0.0) set(CONAN_PACKAGE_OPTIONS ${CONAN_PACKAGE_OPTIONS} systemc-cci:shared=False) endif() -conan_check() -conan_add_remote(NAME minres URL https://artifactory.minres.com/artifactory/api/conan/oss) conan_cmake_configure(REQUIRES ${CONAN_PACKAGE_LIST} GENERATORS cmake_find_package OPTIONS ${CONAN_PACKAGE_OPTIONS} @@ -119,6 +132,7 @@ conan_cmake_configure(REQUIRES ${CONAN_PACKAGE_LIST} conan_install() find_package(fmt) +find_package(ZLIB) find_package(gsl-lite) find_package(SystemCLanguage) find_package(systemc-cci)