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)