diff --git a/cmake/dependencies/devil.cmake b/cmake/dependencies/devil.cmake index 5b98f1e..6cdaa0b 100644 --- a/cmake/dependencies/devil.cmake +++ b/cmake/dependencies/devil.cmake @@ -8,10 +8,14 @@ if(UNIX) "e.g. sudo apt install libdevil-dev") endif() elseif(WIN32) - + include(FetchContent) # As the URL method is used for download, set the policy if available if(POLICY CMP0135) - cmake_policy(SET CMP0135 NEW) + cmake_policy(SET CMP0135 NEW) + endif() + # Temporary CMake >= 3.30 fix https://github.com/FLAMEGPU/FLAMEGPU2/issues/1223 + if(POLICY CMP0169) + cmake_policy(SET CMP0169 OLD) endif() # On windows, always download manually. There are issues with find_package and multi-config generators where a release library will be found, but no debug library, which can break things. diff --git a/cmake/dependencies/glew.cmake b/cmake/dependencies/glew.cmake index d62ea36..10f2f7c 100644 --- a/cmake/dependencies/glew.cmake +++ b/cmake/dependencies/glew.cmake @@ -10,10 +10,15 @@ if(UNIX) "e.g. sudo apt install libglew-dev") endif () elseif(WIN32) + include(FetchContent) # As the URL method is used for download, set the policy if available if(POLICY CMP0135) cmake_policy(SET CMP0135 NEW) endif() + # Temporary CMake >= 3.30 fix https://github.com/FLAMEGPU/FLAMEGPU2/issues/1223 + if(POLICY CMP0169) + cmake_policy(SET CMP0169 OLD) + endif() # On windows, always download manually. There are issues with find_package and multi-config generators where a release library will be found, but no debug library, which can break things. # Declare source properties # This mirror is linked from the official Glew website, and more stable than SourceForge diff --git a/cmake/dependencies/glm.cmake b/cmake/dependencies/glm.cmake index d328c95..7f7ba19 100644 --- a/cmake/dependencies/glm.cmake +++ b/cmake/dependencies/glm.cmake @@ -2,9 +2,14 @@ # glm # ####### +include(FetchContent) # As the URL method is used for download, set the policy if available if(POLICY CMP0135) - cmake_policy(SET CMP0135 NEW) + cmake_policy(SET CMP0135 NEW) +endif() +# Temporary CMake >= 3.30 fix https://github.com/FLAMEGPU/FLAMEGPU2/issues/1223 +if(POLICY CMP0169) + cmake_policy(SET CMP0169 OLD) endif() set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules/ ${CMAKE_MODULE_PATH}) diff --git a/cmake/dependencies/imgui.cmake b/cmake/dependencies/imgui.cmake index 636731f..5b6391c 100644 --- a/cmake/dependencies/imgui.cmake +++ b/cmake/dependencies/imgui.cmake @@ -4,9 +4,15 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules/ ${CMAKE_MODULE_PATH}) include(FetchContent) - cmake_policy(SET CMP0079 NEW) - +# As the URL method is used for download, set the policy if available +if(POLICY CMP0135) + cmake_policy(SET CMP0135 NEW) +endif() +# Temporary CMake >= 3.30 fix https://github.com/FLAMEGPU/FLAMEGPU2/issues/1223 +if(POLICY CMP0169) + cmake_policy(SET CMP0169 OLD) +endif() # Change the source_dir to allow inclusion via imgui/imgui.h rather than imgui.h FetchContent_Declare( imgui diff --git a/cmake/dependencies/sdl2.cmake b/cmake/dependencies/sdl2.cmake index 1002ea1..e5cd867 100644 --- a/cmake/dependencies/sdl2.cmake +++ b/cmake/dependencies/sdl2.cmake @@ -25,9 +25,15 @@ elseif(WIN32) # On windows, always download manually. There are issues with find_package and multi-config generators where a release library will be found, but no debug library, which can break things. # Declare source properties # As the URL method is used for download, set the policy if available + include(FetchContent) + # As the URL method is used for download, set the policy if available if(POLICY CMP0135) cmake_policy(SET CMP0135 NEW) endif() + # Temporary CMake >= 3.30 fix https://github.com/FLAMEGPU/FLAMEGPU2/issues/1223 + if(POLICY CMP0169) + cmake_policy(SET CMP0169 OLD) + endif() FetchContent_Declare( SDL2 URL "https://www.libsdl.org/release/SDL2-devel-2.0.12-VC.zip"