From 95929daceb0498883588c81558d07a8be1d904bb Mon Sep 17 00:00:00 2001 From: "Lars T. Kyllingstad" Date: Mon, 9 Oct 2023 16:09:21 +0200 Subject: [PATCH] Update after review --- conanfile.py | 6 ++++-- test_package/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/conanfile.py b/conanfile.py index 4583aa8..599ad77 100644 --- a/conanfile.py +++ b/conanfile.py @@ -17,6 +17,7 @@ class FMILibraryConan(ConanFile): options = {"shared": [True, False]} default_options = {"shared": False} + tool_requires = "cmake/[>=3.15]" generators = "CMakeDeps" exports_sources = "build-static-c99snprintf.patch" @@ -31,9 +32,10 @@ def layout(self): def generate(self): tc = CMakeToolchain(self) - tc.cache_variables["FMILIB_BUILD_STATIC_LIB"] = False if self.options.shared else True - tc.cache_variables["FMILIB_BUILD_SHARED_LIB"] = True if self.options.shared else False + tc.cache_variables["FMILIB_BUILD_STATIC_LIB"] = not self.options.shared + tc.cache_variables["FMILIB_BUILD_SHARED_LIB"] = not not self.options.shared tc.cache_variables["FMILIB_BUILD_TESTS"] = False + tc.cache_variables["FMILIB_GENERATE_DOXYGEN_DOC"] = False tc.cache_variables["FMILIB_INSTALL_PREFIX"] = pathlib.Path(os.path.join(self.build_folder, "install")).as_posix() tc.generate() diff --git a/test_package/CMakeLists.txt b/test_package/CMakeLists.txt index dfd68e8..61e39fb 100644 --- a/test_package/CMakeLists.txt +++ b/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 3.15) project(PackageTest CXX) find_package(fmilibrary CONFIG REQUIRED)