Changed policy in CMakeList to work with lower version of CMake

This commit is contained in:
madzik 2024-11-12 11:52:25 +00:00
parent 0bce074010
commit 7bf6dee8db

View File

@ -101,13 +101,15 @@ set(RAPIDJSON_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(RAPIDJSON_BUILD_CXX17 ON CACHE BOOL "" FORCE)
cmake_policy(SET CMP0077 NEW)
cmake_policy(SET CMP0135 NEW)
if(${CMAKE_VERSION} VERSION_GREATER "3.23.0")
cmake_policy(SET CMP0135 NEW)
endif()
FetchContent_Declare(
libwebsockets
URL https://github.com/warmcat/libwebsockets/archive/refs/tags/v4.3.3.zip
URL_HASH MD5=96ad80a3283825a9af6a2d9d1acbd132
SYSTEM
)
FetchContent_MakeAvailable(libwebsockets)
@ -116,7 +118,6 @@ FetchContent_Declare(
RapidJSON
URL https://github.com/Tencent/rapidjson/archive/refs/tags/v1.1.0.zip
URL_HASH MD5=ceb1cf16e693a3170c173dc040a9d2bd
SYSTEM
)
if(NOT RapidJSON_POPULATED)