From 93cecf95c1dddaab006f9f4a6c304d124ff0bb08 Mon Sep 17 00:00:00 2001 From: David <88651540+davidhjp01@users.noreply.github.com> Date: Wed, 8 Feb 2023 13:55:24 +0100 Subject: [PATCH] Rollback thrift to 0.13.0 (#87) * Rollback thrift to 0.13.0 * Added an option to build shared library for proxyfmu-client (default: shared) --- CMakeLists.txt | 2 +- conanfile.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 54e7be4..e6739a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ message("Current ${PROJECT_NAME} version: ${CMAKE_PROJECT_VERSION}\n") # Build settings # ============================================================================== -set(BUILD_SHARED_LIBS OFF) +option(BUILD_SHARED_LIBS "Build shared libraries instead of static libraries" ON) option(PROXYFMU_BUILD_TESTS "Build tests" OFF) option(PROXYFMU_BUILD_EXAMPLES "Build examples" OFF) diff --git a/conanfile.py b/conanfile.py index 9ca888f..eb81026 100644 --- a/conanfile.py +++ b/conanfile.py @@ -17,7 +17,13 @@ class ProxyFmuConan(ConanFile): requires = ( "cli11/2.3.1", "fmilibrary/2.3", - "thrift/0.17.0" + "thrift/0.13.0" + ) + options = { + "shared": [True, False] + } + default_options = ( + "shared=True" ) def set_version(self): @@ -25,6 +31,7 @@ def set_version(self): def configure_cmake(self): cmake = CMake(self) + cmake.definitions["BUILD_SHARED_LIBS"] = self.options.shared cmake.configure() return cmake