Commit 694dfef 1 parent 6746215 commit 694dfef Copy full SHA for 694dfef
File tree 2 files changed +20
-4
lines changed
2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ if(IOS)
46
46
string (COMPARE NOTEQUAL "${IPHONESIMULATOR_ARCHS} " "" has_simulator)
47
47
set (ios_opts "-DCMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=NO" )
48
48
if (has_simulator)
49
+ if (CMAKE_GENERATOR STREQUAL "Xcode" AND XCODE_VERSION VERSION_GREATER_EQUAL 12 AND CMAKE_VERSION VERSION_LESS 3.19.5)
50
+ hunter_user_error("CMake 3.19.5+ version should be used for CMAKE_IOS_INSTALL_COMBINED on Xcode 12+" )
51
+ endif ()
49
52
list (APPEND ios_opts "-DCMAKE_IOS_INSTALL_COMBINED=YES" )
50
53
endif ()
51
54
else ()
@@ -149,6 +152,12 @@ foreach(configuration ${configuration_types})
149
152
set (build_type_opts "-DCMAKE_CONFIGURATION_TYPES=${configuration} " )
150
153
endif ()
151
154
155
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15" )
156
+ set (cmake_install_command --install .)
157
+ else ()
158
+ set (cmake_install_command --build . --target install )
159
+ endif ()
160
+
152
161
ExternalProject_Add(
153
162
"${current_project} "
154
163
GIT_REPOSITORY
@@ -188,8 +197,7 @@ foreach(configuration ${configuration_types})
188
197
${ios_opts}
189
198
INSTALL_COMMAND
190
199
"@CMAKE_COMMAND@"
191
- --build .
192
- --target install
200
+ ${cmake_install_command}
193
201
--config ${configuration}
194
202
COMMAND # Copy license files
195
203
"@CMAKE_COMMAND@"
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ if(IOS)
46
46
string (COMPARE NOTEQUAL "${IPHONESIMULATOR_ARCHS} " "" has_simulator)
47
47
set (ios_opts "-DCMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=NO" )
48
48
if (has_simulator)
49
+ if (CMAKE_GENERATOR STREQUAL "Xcode" AND XCODE_VERSION VERSION_GREATER_EQUAL 12 AND CMAKE_VERSION VERSION_LESS 3.19.5)
50
+ hunter_user_error("CMake 3.19.5+ version should be used for CMAKE_IOS_INSTALL_COMBINED on Xcode 12+" )
51
+ endif ()
49
52
list (APPEND ios_opts "-DCMAKE_IOS_INSTALL_COMBINED=YES" )
50
53
endif ()
51
54
else ()
@@ -149,6 +152,12 @@ foreach(configuration ${configuration_types})
149
152
set (build_type_opts "-DCMAKE_CONFIGURATION_TYPES=${configuration} " )
150
153
endif ()
151
154
155
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15" )
156
+ set (cmake_install_command --install .)
157
+ else ()
158
+ set (cmake_install_command --build . --target install )
159
+ endif ()
160
+
152
161
ExternalProject_Add(
153
162
"${current_project} "
154
163
URL
@@ -187,8 +196,7 @@ foreach(configuration ${configuration_types})
187
196
${ios_opts}
188
197
INSTALL_COMMAND
189
198
"@CMAKE_COMMAND@"
190
- --build .
191
- --target install
199
+ ${cmake_install_command}
192
200
--config ${configuration}
193
201
COMMAND # Copy license files
194
202
"@CMAKE_COMMAND@"
You can’t perform that action at this time.
0 commit comments