From 64ec4b8cde357e337d16257ca4883b23d070f794 Mon Sep 17 00:00:00 2001 From: Kaloyan Dobrev Date: Sun, 10 Dec 2023 14:59:59 +0100 Subject: [PATCH 1/3] added find_package(ZLIB REQUIRED "1.0") to cmakelists --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 874e56b..0e0aa37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,8 @@ project(LibBGCode VERSION ${LibBGCode_VERSION}) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) +find_package(ZLIB REQUIRED "1.0") + set(_libname ${PROJECT_NAME}) string(TOLOWER ${_libname} _libname) string(REPLACE "lib" "" _libname ${_libname}) @@ -104,6 +106,8 @@ if(${PROJECT_NAME}_BUILD_TESTS) add_subdirectory(tests) endif() +find_package(ZLIB REQUIRED "1.0") + # Create and install the CMake config script include(CMakePackageConfigHelpers) include(GNUInstallDirs) From 31e3d30b4b4364ab06bb5187ffc4d0594afb2752 Mon Sep 17 00:00:00 2001 From: Kaloyan Dobrev Date: Sun, 10 Dec 2023 15:01:42 +0100 Subject: [PATCH 2/3] fix find package zlib --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e0aa37..825c695 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,8 +106,6 @@ if(${PROJECT_NAME}_BUILD_TESTS) add_subdirectory(tests) endif() -find_package(ZLIB REQUIRED "1.0") - # Create and install the CMake config script include(CMakePackageConfigHelpers) include(GNUInstallDirs) @@ -121,6 +119,8 @@ install(TARGETS ${_libname} INCLUDES DESTINATION include/${PROJECT_NAME} ) +find_package(ZLIB REQUIRED "1.0") + foreach(_comp ${_selected_components}) # Install targets and headers string(TOLOWER ${_comp} _comp_lower) From 00ca79f1c7657e31e24b57468e5328ce4b39c3ad Mon Sep 17 00:00:00 2001 From: Kaloyan Dobrev Date: Sun, 10 Dec 2023 15:15:47 +0100 Subject: [PATCH 3/3] octo4a fix --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 825c695..0c62cb1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,8 +8,6 @@ project(LibBGCode VERSION ${LibBGCode_VERSION}) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -find_package(ZLIB REQUIRED "1.0") - set(_libname ${PROJECT_NAME}) string(TOLOWER ${_libname} _libname) string(REPLACE "lib" "" _libname ${_libname})