ref: 2e8f4cf72e372ef53f01e5a663713e2415ba2cba
parent: 6d297b5fc257a7129c035e989294760e292fe5e3
parent: bdbc2475c623a9a621c292aa6822d655bded47f8
author: Clownacy <Clownacy@users.noreply.github.com>
date: Fri May 8 14:12:47 EDT 2020
Merge pull request #117 from GabrielRavier/portableAddOpenGLPolicy CMakeLists: Fix CMP0072 warning
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -596,6 +596,10 @@
endif()
if(BACKEND_RENDERER MATCHES "OpenGL3" OR (BACKEND_PLATFORM MATCHES "GLFW3" AND BACKEND_RENDERER MATCHES "Software"))
+ if (CMAKE_VERSION GREATER_EQUAL 3.11)
+ cmake_policy(SET CMP0072 NEW)
+ endif()
+
find_package(OpenGL REQUIRED)
target_link_libraries(CSE2 PRIVATE OpenGL::GL)
endif()
--- a/DoConfig/CMakeLists.txt
+++ b/DoConfig/CMakeLists.txt
@@ -73,6 +73,10 @@
add_subdirectory("../external/glad" "glad" EXCLUDE_FROM_ALL)
target_link_libraries(DoConfig PRIVATE glad)
+if (CMAKE_VERSION GREATER_EQUAL 3.11)
+ cmake_policy(SET CMP0072 NEW)
+endif()
+
find_package(OpenGL REQUIRED)
target_link_libraries(DoConfig PRIVATE OpenGL::GL)