mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Fix CMake formatting inconsistencies
This commit is contained in:
parent
e948a5f41e
commit
753644a5bd
@ -56,7 +56,7 @@ find_program (CMAKE_UNAME uname /bin /usr/bin /usr/local/bin)
|
|||||||
if(CMAKE_UNAME)
|
if(CMAKE_UNAME)
|
||||||
exec_program(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
|
exec_program(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
|
||||||
string(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
|
string(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
|
||||||
endif (CMAKE_UNAME)
|
endif()
|
||||||
|
|
||||||
set(CMAKE_C_COMPILER /usr/bin/clang CACHE FILEPATH "" FORCE)
|
set(CMAKE_C_COMPILER /usr/bin/clang CACHE FILEPATH "" FORCE)
|
||||||
set(CMAKE_CXX_COMPILER /usr/bin/clang++ CACHE FILEPATH "" FORCE)
|
set(CMAKE_CXX_COMPILER /usr/bin/clang++ CACHE FILEPATH "" FORCE)
|
||||||
@ -99,12 +99,12 @@ set (CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
|
|||||||
# hardcode CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did before, Alex
|
# hardcode CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did before, Alex
|
||||||
if(NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
|
if(NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
|
||||||
find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool)
|
find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool)
|
||||||
endif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
|
endif()
|
||||||
|
|
||||||
# Setup iOS platform unless specified manually with IOS_PLATFORM
|
# Setup iOS platform unless specified manually with IOS_PLATFORM
|
||||||
if(NOT DEFINED IOS_PLATFORM)
|
if(NOT DEFINED IOS_PLATFORM)
|
||||||
set(IOS_PLATFORM "OS")
|
set(IOS_PLATFORM "OS")
|
||||||
endif (NOT DEFINED IOS_PLATFORM)
|
endif()
|
||||||
set(IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING "Type of iOS Platform: OS or SIMULATOR")
|
set(IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING "Type of iOS Platform: OS or SIMULATOR")
|
||||||
|
|
||||||
# Check the platform selection and setup for developer root
|
# Check the platform selection and setup for developer root
|
||||||
@ -133,11 +133,11 @@ if (NOT DEFINED IOS_SDK_ROOT)
|
|||||||
list(SORT _IOS_SDKS)
|
list(SORT _IOS_SDKS)
|
||||||
list(REVERSE _IOS_SDKS)
|
list(REVERSE _IOS_SDKS)
|
||||||
list(GET _IOS_SDKS 0 IOS_SDK_ROOT)
|
list(GET _IOS_SDKS 0 IOS_SDK_ROOT)
|
||||||
else (_IOS_SDKS)
|
else()
|
||||||
message(FATAL_ERROR "No iOS SDK's found in default search path ${IOS_DEVELOPER_ROOT}. Manually set IOS_SDK_ROOT or install the iOS SDK.")
|
message(FATAL_ERROR "No iOS SDK's found in default search path ${IOS_DEVELOPER_ROOT}. Manually set IOS_SDK_ROOT or install the iOS SDK.")
|
||||||
endif (_IOS_SDKS)
|
endif()
|
||||||
message(STATUS "Toolchain using default iOS SDK: ${IOS_SDK_ROOT}")
|
message(STATUS "Toolchain using default iOS SDK: ${IOS_SDK_ROOT}")
|
||||||
endif (NOT DEFINED IOS_SDK_ROOT)
|
endif()
|
||||||
set(IOS_SDK_ROOT ${IOS_SDK_ROOT} CACHE PATH "Location of the selected iOS SDK")
|
set(IOS_SDK_ROOT ${IOS_SDK_ROOT} CACHE PATH "Location of the selected iOS SDK")
|
||||||
|
|
||||||
# Set the sysroot default to the most recent SDK
|
# Set the sysroot default to the most recent SDK
|
||||||
@ -149,7 +149,7 @@ if (${IOS_PLATFORM} STREQUAL OS)
|
|||||||
set(IOS_ARCH arm64)
|
set(IOS_ARCH arm64)
|
||||||
elseif(${IOS_PLATFORM} STREQUAL SIMULATOR)
|
elseif(${IOS_PLATFORM} STREQUAL SIMULATOR)
|
||||||
set(IOS_ARCH x86_64)
|
set(IOS_ARCH x86_64)
|
||||||
endif (${IOS_PLATFORM} STREQUAL OS)
|
endif()
|
||||||
|
|
||||||
set(CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE STRING "Build architecture for iOS" FORCE)
|
set(CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE STRING "Build architecture for iOS" FORCE)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user