3
3
if ("${CMAKE_MAJOR_VERSION} .${CMAKE_MINOR_VERSION} " LESS 2.8)
4
4
message (FATAL_ERROR "CMake >= 2.8.0 required" )
5
5
endif ()
6
- if (CMAKE_VERSION VERSION_LESS "2.8.3 " )
7
- message (FATAL_ERROR "CMake >= 2.8.3 required" )
6
+ if (CMAKE_VERSION VERSION_LESS "3.1.0 " )
7
+ message (FATAL_ERROR "CMake >= 3.1.0 required" )
8
8
endif ()
9
9
cmake_policy (PUSH)
10
- cmake_policy (VERSION 2.8.3 ...3.26 )
10
+ cmake_policy (VERSION 3.1.0 ...3.27 )
11
11
#----------------------------------------------------------------
12
12
# Generated CMake target import file.
13
13
#----------------------------------------------------------------
@@ -63,10 +63,6 @@ set_target_properties(debug_assert PROPERTIES
63
63
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX} /include"
64
64
)
65
65
66
- if (CMAKE_VERSION VERSION_LESS 3.1.0)
67
- message (FATAL_ERROR "This file relies on consumers using CMake 3.1.0 or greater." )
68
- endif ()
69
-
70
66
# Load information for each installed configuration.
71
67
file (GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR} /debug_assert-targets-*.cmake" )
72
68
foreach (_cmake_config_file IN LISTS _cmake_config_files)
@@ -80,9 +76,12 @@ set(_IMPORT_PREFIX)
80
76
81
77
# Loop over all imported files and verify that they actually exist
82
78
foreach (_cmake_target IN LISTS _cmake_import_check_targets)
83
- foreach (_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target} " )
84
- if (NOT EXISTS "${_cmake_file} " )
85
- message (FATAL_ERROR "The imported target \" ${_cmake_target} \" references the file
79
+ if (CMAKE_VERSION VERSION_LESS "3.28"
80
+ OR NOT DEFINED _cmake_import_check_xcframework_for_${_cmake_target}
81
+ OR NOT IS_DIRECTORY "${_cmake_import_check_xcframework_for_${_cmake_target} }" )
82
+ foreach (_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target} " )
83
+ if (NOT EXISTS "${_cmake_file} " )
84
+ message (FATAL_ERROR "The imported target \" ${_cmake_target} \" references the file
86
85
\" ${_cmake_file} \"
87
86
but this file does not exist. Possible reasons include:
88
87
* The file was deleted, renamed, or moved to another location.
@@ -91,8 +90,9 @@ but this file does not exist. Possible reasons include:
91
90
\" ${CMAKE_CURRENT_LIST_FILE} \"
92
91
but not all the files it references.
93
92
" )
94
- endif ()
95
- endforeach ()
93
+ endif ()
94
+ endforeach ()
95
+ endif ()
96
96
unset (_cmake_file)
97
97
unset ("_cmake_import_check_files_for_${_cmake_target} " )
98
98
endforeach ()
0 commit comments