From 0caf50fde8380cde21ecb39e8f4e3c06ed6d62ae Mon Sep 17 00:00:00 2001 From: sowle Date: Tue, 5 Dec 2023 21:06:14 +0100 Subject: [PATCH] build: an attempt to make Boost searching process be more error proof (2) --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e4c7d668..880aa5d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.19) +cmake_minimum_required(VERSION 3.1) PROJECT(Zano) @@ -186,7 +186,7 @@ endif() # always use system-wide Boost (unless ZANO_USE_SYSTEM_BOOST is defined for some reason, which is not recommended) -if(not DEFINED ENV{ZANO_USE_SYSTEM_BOOST}) +if(NOT DEFINED ENV{ZANO_USE_SYSTEM_BOOST}) set(Boost_NO_SYSTEM_PATHS ON) endif() @@ -212,8 +212,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "iOS") elseif(CMAKE_SYSTEM_NAME STREQUAL "Android") set(Boost_LIBRARY_DIRS "${Boost_LIBRARY_DIRS}/${CMAKE_ANDROID_ARCH_ABI}/") set(Boost_LIBRARIES "${Boost_LIBRARY_DIRS}libboost_system.a;${Boost_LIBRARY_DIRS}libboost_filesystem.a;${Boost_LIBRARY_DIRS}libboost_thread.a;${Boost_LIBRARY_DIRS}libboost_timer.a;${Boost_LIBRARY_DIRS}libboost_date_time.a;${Boost_LIBRARY_DIRS}libboost_chrono.a;${Boost_LIBRARY_DIRS}libboost_regex.a;${Boost_LIBRARY_DIRS}libboost_serialization.a;${Boost_LIBRARY_DIRS}libboost_atomic.a;${Boost_LIBRARY_DIRS}libboost_program_options.a") +elseif(APPLE) + find_package(Boost 1.71 EXACT REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options locale) else() - find_package(Boost 1.70...1.71 REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options locale) + find_package(Boost 1.70 EXACT REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options locale) endif()