File tree Expand file tree Collapse file tree 2 files changed +48
-4
lines changed
Expand file tree Collapse file tree 2 files changed +48
-4
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.12)
22
3+ # Set CMake policies to handle compatibility with older dependencies
4+ if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.27" )
5+ cmake_policy (SET CMP0144 NEW)
6+ endif ()
7+
8+ # Set policy to handle older CMake requirements in dependencies
9+ if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.5" )
10+ cmake_policy (SET CMP0000 NEW)
11+ endif ()
12+
313if (PACKAGE_MANAGER)
414 if (NOT PACKAGE_MANAGER MATCHES "^(hunter|vcpkg)$" )
515 message (FATAL_ERROR "PACKAGE_MANAGER must be set to 'hunter', 'vcpkg' or isn't set" )
@@ -16,10 +26,6 @@ else ()
1626endif ()
1727message (STATUS "Selected package manager: ${PACKAGE_MANAGER} " )
1828
19- if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.27" )
20- cmake_policy (SET CMP0144 NEW)
21- endif ()
22-
2329find_program (CCACHE_FOUND ccache)
2430if (CCACHE_FOUND)
2531 set_property (GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
Original file line number Diff line number Diff line change 1515# CMAKE_ARGS "CMAKE_VARIABLE=value"
1616# )
1717
18+ # Fix for Protobuf CMake compatibility issue with modern CMake versions
19+ hunter_config(
20+ Protobuf
21+ VERSION 3.19.4-p0
22+ CMAKE_ARGS
23+ CMAKE_POLICY_VERSION_MINIMUM=3.5
24+ protobuf_BUILD_TESTS=OFF
25+ protobuf_BUILD_SHARED_LIBS=OFF
26+ KEEP_PACKAGE_SOURCES
27+ )
28+
29+ # Fix for c-ares CMake compatibility issue with modern CMake versions
30+ hunter_config(
31+ c-ares
32+ VERSION 1.14.0-p0
33+ CMAKE_ARGS
34+ CMAKE_POLICY_VERSION_MINIMUM=3.5
35+ KEEP_PACKAGE_SOURCES
36+ )
37+
38+ # Fix for yaml-cpp CMake compatibility issue with modern CMake versions
39+ hunter_config(
40+ yaml-cpp
41+ VERSION 0.6.2-0f9a586-p1
42+ CMAKE_ARGS
43+ CMAKE_POLICY_VERSION_MINIMUM=3.5
44+ KEEP_PACKAGE_SOURCES
45+ )
46+
47+ # Fix for Boost.DI CMake compatibility issue with modern CMake versions
48+ hunter_config(
49+ Boost.DI
50+ VERSION 1.1.0-p1
51+ CMAKE_ARGS
52+ CMAKE_POLICY_VERSION_MINIMUM=3.5
53+ KEEP_PACKAGE_SOURCES
54+ )
55+
1856hunter_config(
1957 soralog
2058 VERSION 0.2.5
You can’t perform that action at this time.
0 commit comments