@@ -53,9 +53,9 @@ set(CMAKE_RANLIB ranlib CACHE FILEPATH "" FORCE)
53
53
set (PKG_CONFIG_EXECUTABLE pkg-config CACHE FILEPATH "" FORCE)
54
54
55
55
# Setup iOS platform unless specified manually with IOS_PLATFORM
56
- if (NOT DEFINED IOS_PLATFORM)
56
+ if (NOT IOS_PLATFORM)
57
57
set (IOS_PLATFORM "OS" )
58
- endif (NOT DEFINED IOS_PLATFORM)
58
+ endif (NOT IOS_PLATFORM)
59
59
set (IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING "Type of iOS Platform" )
60
60
61
61
# Check the platform selection and setup for developer root
@@ -118,9 +118,9 @@ set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
118
118
# (where install_name_tool was hardcoded) and where CMAKE_INSTALL_NAME_TOOL isn't in the cache
119
119
# and still cmake didn't fail in CMakeFindBinUtils.cmake (because it isn't rerun)
120
120
# hardcode CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did before, Alex
121
- if (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
121
+ if (NOT CMAKE_INSTALL_NAME_TOOL)
122
122
find_program (CMAKE_INSTALL_NAME_TOOL install_name_tool)
123
- endif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
123
+ endif (NOT CMAKE_INSTALL_NAME_TOOL)
124
124
125
125
# Setup iOS deployment target
126
126
set (IOS_DEPLOYMENT_TARGET ${IOS_DEPLOYMENT_TARGET} CACHE STRING "Minimum iOS version" )
@@ -130,17 +130,17 @@ set(IOS_DEPLOYMENT_TARGET ${IOS_DEPLOYMENT_TARGET} CACHE STRING "Minimum iOS ver
130
130
exec_program (/usr/bin/xcode-select ARGS -print-path OUTPUT_VARIABLE CMAKE_XCODE_DEVELOPER_DIR)
131
131
set (XCODE_POST_43_ROOT "${CMAKE_XCODE_DEVELOPER_DIR} /Platforms/${IOS_PLATFORM_LOCATION} /Developer" )
132
132
set (XCODE_PRE_43_ROOT "/Developer/Platforms/${IOS_PLATFORM_LOCATION} /Developer" )
133
- if (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)
133
+ if (NOT CMAKE_IOS_DEVELOPER_ROOT)
134
134
if (EXISTS ${XCODE_POST_43_ROOT} )
135
135
set (CMAKE_IOS_DEVELOPER_ROOT ${XCODE_POST_43_ROOT} )
136
136
elseif (EXISTS ${XCODE_PRE_43_ROOT} )
137
137
set (CMAKE_IOS_DEVELOPER_ROOT ${XCODE_PRE_43_ROOT} )
138
138
endif (EXISTS ${XCODE_POST_43_ROOT} )
139
- endif (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)
139
+ endif (NOT CMAKE_IOS_DEVELOPER_ROOT)
140
140
set (CMAKE_IOS_DEVELOPER_ROOT ${CMAKE_IOS_DEVELOPER_ROOT} CACHE PATH "Location of iOS Platform" )
141
141
142
142
# Find and use the most recent iOS sdk unless specified manually with CMAKE_IOS_SDK_ROOT
143
- if (NOT DEFINED CMAKE_IOS_SDK_ROOT)
143
+ if (NOT CMAKE_IOS_SDK_ROOT)
144
144
file (GLOB _CMAKE_IOS_SDKS "${CMAKE_IOS_DEVELOPER_ROOT} /SDKs/*" )
145
145
if (_CMAKE_IOS_SDKS)
146
146
list (SORT _CMAKE_IOS_SDKS)
@@ -150,7 +150,7 @@ if(NOT DEFINED CMAKE_IOS_SDK_ROOT)
150
150
message (FATAL_ERROR "No iOS SDK's found in default search path ${CMAKE_IOS_DEVELOPER_ROOT} . Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK." )
151
151
endif (_CMAKE_IOS_SDKS)
152
152
message (STATUS "Toolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT} " )
153
- endif (NOT DEFINED CMAKE_IOS_SDK_ROOT)
153
+ endif (NOT CMAKE_IOS_SDK_ROOT)
154
154
set (CMAKE_IOS_SDK_ROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Location of the selected iOS SDK" )
155
155
156
156
# Set the sysroot default to the most recent SDK
0 commit comments