nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1diff --git a/CMakeLists.txt b/CMakeLists.txt
2index 16b26eac8..7bbdab0c7 100755
3--- a/CMakeLists.txt
4+++ b/CMakeLists.txt
5@@ -1,13 +1,13 @@
6 ################################################################################
7 # Top-level CMakeLists.txt file for Crazy Eddie's GUI System
8 ################################################################################
9-cmake_minimum_required(VERSION 3.1)
10+cmake_minimum_required(VERSION 3.10)
11 if (POLICY CMP0017)
12- cmake_policy(SET CMP0017 OLD)
13+ cmake_policy(SET CMP0017 NEW)
14 endif()
15
16 if (POLICY CMP0045)
17- cmake_policy(SET CMP0045 OLD)
18+ cmake_policy(SET CMP0045 NEW)
19 endif()
20
21 if (APPLE AND NOT CMAKE_OSX_ARCHITECTURES)
22@@ -112,7 +112,7 @@ if(NOT ${OGRE_FOUND})
23 endif()
24 if(${OGRE_FOUND})
25 if (${OGRE_VERSION} VERSION_GREATER 1.11)
26- set(CMAKE_CXX_STANDARD 11)
27+ set(CMAKE_CXX_STANDARD 14)
28 set(CMAKE_CXX_STANDARD_REQUIRED ON)
29 set(CMAKE_CXX_EXTENSIONS OFF)
30
31diff --git a/cmake/CEGUIMacros.cmake b/cmake/CEGUIMacros.cmake
32index 2aca3ff3d..6c3384d63 100644
33--- a/cmake/CEGUIMacros.cmake
34+++ b/cmake/CEGUIMacros.cmake
35@@ -51,17 +51,15 @@ endmacro()
36 macro (cegui_target_link_libraries _TARGET_NAME)
37 target_link_libraries(${_TARGET_NAME} ${ARGN})
38
39- get_target_property(_TARGET_EXISTS ${_TARGET_NAME}_Static TYPE)
40- if (_TARGET_EXISTS)
41+ if (TARGET ${_TARGET_NAME}_Static)
42 foreach(_LIB ${ARGN})
43 if (${_LIB} STREQUAL optimized OR ${_LIB} STREQUAL debug OR ${_LIB} STREQUAL general)
44 set (_BUILD ${_LIB})
45 else()
46- get_target_property(_LIB_IS_IN_PROJECT ${_LIB}_Static TYPE)
47-
48- if (_LIB_IS_IN_PROJECT)
49+ if (TARGET ${_LIB}_Static)
50 target_link_libraries(${_TARGET_NAME}_Static ${_BUILD} ${_LIB}_Static)
51 else()
52+ # Fall back to the provided dependency if it is not a CMake target
53 target_link_libraries(${_TARGET_NAME}_Static ${_BUILD} ${_LIB})
54 endif()
55 endif()
56@@ -73,9 +71,7 @@ endmacro()
57 # add dynamic dependency libraries to a target
58 #
59 macro (cegui_add_dependency_dynamic_libs _TARGET_NAME _DEP_NAME)
60- get_target_property(_TARGET_EXISTS ${_TARGET_NAME} TYPE)
61-
62- if (_TARGET_EXISTS)
63+ if (TARGET ${_TARGET_NAME})
64 if (${_DEP_NAME}_LIBRARIES)
65 if (${_DEP_NAME}_LIBRARIES_DBG)
66 foreach(_LIB ${${_DEP_NAME}_LIBRARIES})
67@@ -98,9 +94,7 @@ endmacro()
68 # if static do not exist)
69 #
70 macro (cegui_add_dependency_static_libs _TARGET_NAME _DEP_NAME)
71- get_target_property(_TARGET_EXISTS ${_TARGET_NAME} TYPE)
72-
73- if (_TARGET_EXISTS)
74+ if (TARGET ${_TARGET_NAME})
75 if (${_DEP_NAME}_LIBRARIES_STATIC)
76 if (${_DEP_NAME}_LIBRARIES_STATIC_DBG)
77 foreach(_LIB ${${_DEP_NAME}_LIBRARIES_STATIC})
78@@ -137,8 +131,16 @@ endmacro()
79 #
80 macro (cegui_add_dependency _TARGET_NAME _DEP_NAME)
81 # Optional additional arguments: "SCOPE" "IS_SYSTEM"
82- get_target_property(_DYNAMIC_EXISTS ${_TARGET_NAME} TYPE)
83- get_target_property(_STATIC_EXISTS ${_TARGET_NAME}_Static TYPE)
84+ if (TARGET ${_TARGET_NAME})
85+ set(_DYNAMIC_EXISTS TRUE)
86+ else()
87+ set(_DYNAMIC_EXISTS FALSE)
88+ endif()
89+ if (TARGET ${_TARGET_NAME}_Static)
90+ set(_STATIC_EXISTS TRUE)
91+ else()
92+ set(_STATIC_EXISTS FALSE)
93+ endif()
94 if ("${ARGC}" GREATER 2)
95 if (("${ARGC}" GREATER 3) AND "${ARGV3}")
96 if (_DYNAMIC_EXISTS)