Commit 2e2b398f authored by Ghislain MARY's avatar Ghislain MARY

Clean IOS toolchain.

parent e0f344c0
...@@ -93,7 +93,7 @@ else() ...@@ -93,7 +93,7 @@ else()
"--disable-iconv" "--disable-iconv"
"--enable-cross-compile" "--enable-cross-compile"
"--cross-prefix=${SDK_BIN_PATH}/" "--cross-prefix=${SDK_BIN_PATH}/"
"--sysroot=${SYSROOT_PATH}" "--sysroot=${CMAKE_OSX_SYSROOT}"
"--ar=\$AR" "--ar=\$AR"
"--cc=\$CC" "--cc=\$CC"
"--nm=\$NM" "--nm=\$NM"
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
############################################################################ ############################################################################
set(OSX_FLAGS "") set(OSX_FLAGS "")
if(NOT "@LINPHONE_BUILDER_OSX_ARCHITECTURES@" STREQUAL "") if(NOT "@CMAKE_OSX_ARCHITECTURES@" STREQUAL "")
set(OSX_FLAGS "${OSX_FLAGS} -arch @LINPHONE_BUILDER_OSX_ARCHITECTURES@") set(OSX_FLAGS "${OSX_FLAGS} -arch @CMAKE_OSX_ARCHITECTURES@")
endif() endif()
if(NOT "@CMAKE_OSX_SYSROOT@" STREQUAL "") if(NOT "@CMAKE_OSX_SYSROOT@" STREQUAL "")
set(OSX_FLAGS "${OSX_FLAGS} -isysroot @CMAKE_OSX_SYSROOT@") set(OSX_FLAGS "${OSX_FLAGS} -isysroot @CMAKE_OSX_SYSROOT@")
......
...@@ -143,8 +143,8 @@ function(linphone_builder_get_autotools_configuration) ...@@ -143,8 +143,8 @@ function(linphone_builder_get_autotools_configuration)
if(CMAKE_TOOLCHAIN_FILE) if(CMAKE_TOOLCHAIN_FILE)
list(APPEND _autotools_command "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}") list(APPEND _autotools_command "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
endif() endif()
if(LINPHONE_BUILDER_OSX_ARCHITECTURES) if(CMAKE_OSX_ARCHITECTURES)
list(APPEND _autotools_command "-DLINPHONE_BUILDER_OSX_ARCHITECTURES=${LINPHONE_BUILDER_OSX_ARCHITECTURES}") list(APPEND _autotools_command "-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}")
endif() endif()
list(APPEND _autotools_command "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Autotools/") list(APPEND _autotools_command "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Autotools/")
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/Autotools) execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/Autotools)
...@@ -223,54 +223,59 @@ endmacro() ...@@ -223,54 +223,59 @@ endmacro()
macro(linphone_builder_apply_flags) macro(linphone_builder_apply_flags)
foreach(BUILD_CONFIG "" "_DEBUG" "_MINSIZEREL" "_RELEASE" "_RELWITHDEBINFO") set(BUILD_TYPES "Debug" "Release" "RelWithDebInfo" "MinSizeRel")
if(LINPHONE_BUILDER_CPPFLAGS) list(FIND BUILD_TYPES "${CMAKE_BUILD_TYPE}" BUILD_TYPE_FOUND)
set(CMAKE_C_FLAGS${BUILD_CONFIG} "${CMAKE_C_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CPPFLAGS}") set(BUILD_TYPE_SUFFIX "")
set(CMAKE_CXX_FLAGS${BUILD_CONFIG} "${CMAKE_CXX_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CPPFLAGS}") if(NOT ${BUILD_TYPE_FOUND} EQUAL -1)
set(AUTOTOOLS_C_FLAGS${BUILD_CONFIG} "${AUTOTOOLS_C_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CPPFLAGS}") string(TOUPPER "${CMAKE_BUILD_TYPE}" UPPER_BUILD_TYPE)
set(AUTOTOOLS_CXX_FLAGS${BUILD_CONFIG} "${AUTOTOOLS_CXX_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CPPFLAGS}") set(BUILD_TYPE_SUFFIX "_${UPPER_BUILD_TYPE}")
endif() endif()
if(LINPHONE_BUILDER_CFLAGS) set(BUILD_TYPE_SUFFIX "")
set(CMAKE_C_FLAGS${BUILD_CONFIG} "${CMAKE_C_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CFLAGS}")
set(AUTOTOOLS_C_FLAGS${BUILD_CONFIG} "${AUTOTOOLS_C_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CFLAGS}") if(LINPHONE_BUILDER_OSX_ARCHITECTURES)
endif() set(CMAKE_OSX_ARCHITECTURES ${LINPHONE_BUILDER_OSX_ARCHITECTURES})
if(LINPHONE_BUILDER_CXXFLAGS) set(AUTOTOOLS_ARCH "-arch ${CMAKE_OSX_ARCHITECTURES}")
set(CMAKE_CXX_FLAGS${BUILD_CONFIG} "${CMAKE_CXX_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CXXFLAGS}") set(AUTOTOOLS_C_FLAGS "${AUTOTOOLS_C_FLAGS} ${AUTOTOOLS_ARCH}")
set(AUTOTOOLS_CXX_FLAGS${BUILD_CONFIG} "{AUTOTOOLS_CXX_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CXX_FLAGS}") set(AUTOTOOLS_CXX_FLAGS "${AUTOTOOLS_CXX_FLAGS} ${AUTOTOOLS_ARCH}")
endif() set(AUTOTOOLS_OBJC_FLAGS "${AUTOTOOLS_OBJC_FLAGS} ${AUTOTOOLS_ARCH}")
if(LINPHONE_BUILDER_OBJCFLAGS) set(AUTOTOOLS_LINKER_FLAGS "${AUTOTOOLS_LINKER_FLAGS} ${AUTOTOOLS_ARCH}")
set(CMAKE_C_FLAGS${BUILD_CONFIG} "${CMAKE_C_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_OBJCFLAGS}") endif()
set(AUTOTOOLS_OBJC_FLAGS${BUILD_CONFIG} "${AUTOTOOLS_OBJC_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_OBJCFLAGS}")
endif() if(LINPHONE_BUILDER_CPPFLAGS)
if(LINPHONE_BUILDER_LDFLAGS) set(CMAKE_C_FLAGS${BUILD_TYPE_SUFFIX} "${CMAKE_C_FLAGS${BUILD_TYPE_SUFFIX}} ${LINPHONE_BUILDER_CPPFLAGS}")
# TODO: The two following lines should not be here set(CMAKE_CXX_FLAGS${BUILD_TYPE_SUFFIX} "${CMAKE_CXX_FLAGS${BUILD_TYPE_SUFFIX}} ${LINPHONE_BUILDER_CPPFLAGS}")
set(CMAKE_C_FLAGS${BUILD_CONFIG} "${CMAKE_C_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_LDFLAGS}") set(AUTOTOOLS_C_FLAGS "${AUTOTOOLS_C_FLAGS} ${LINPHONE_BUILDER_CPPFLAGS}")
set(CMAKE_CXX_FLAGS${BUILD_CONFIG} "${CMAKE_CXX_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_LDFLAGS}") set(AUTOTOOLS_CXX_FLAGS "${AUTOTOOLS_CXX_FLAGS} ${LINPHONE_BUILDER_CPPFLAGS}")
endif()
set(CMAKE_EXE_LINKER_FLAGS${BUILD_CONFIG} "${CMAKE_EXE_LINKER_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_LDFLAGS}") if(LINPHONE_BUILDER_CFLAGS)
set(CMAKE_MODULE_LINKER_FLAGS${BUILD_CONFIG} "${CMAKE_MODULE_LINKER_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_LDFLAGS}") set(CMAKE_C_FLAGS${BUILD_TYPE_SUFFIX} "${CMAKE_C_FLAGS${BUILD_TYPE_SUFFIX}} ${LINPHONE_BUILDER_CFLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS${BUILD_CONFIG} "${CMAKE_SHARED_LINKER_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_LDFLAGS}") set(AUTOTOOLS_C_FLAGS "${AUTOTOOLS_C_FLAGS} ${LINPHONE_BUILDER_CFLAGS}")
set(AUTOTOOLS_LINKER_FLAGS${BUILD_CONFIG} "${AUTOTOOLS_LINKER_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_LDFLAGS}") endif()
endif() if(LINPHONE_BUILDER_CXXFLAGS)
endforeach() set(CMAKE_CXX_FLAGS${BUILD_TYPE_SUFFIX} "${CMAKE_CXX_FLAGS${BUILD_TYPE_SUFFIX}} ${LINPHONE_BUILDER_CXXFLAGS}")
set(AUTOTOOLS_CXX_FLAGS "{AUTOTOOLS_CXX_FLAGS} ${LINPHONE_BUILDER_CXX_FLAGS}")
endif()
if(LINPHONE_BUILDER_OBJCFLAGS)
set(CMAKE_C_FLAGS${BUILD_TYPE_SUFFIX} "${CMAKE_C_FLAGS${BUILD_TYPE_SUFFIX}} ${LINPHONE_BUILDER_OBJCFLAGS}")
set(AUTOTOOLS_OBJC_FLAGS "${AUTOTOOLS_OBJC_FLAGS} ${LINPHONE_BUILDER_OBJCFLAGS}")
endif()
if(LINPHONE_BUILDER_LDFLAGS)
set(CMAKE_EXE_LINKER_FLAGS${BUILD_TYPE_SUFFIX} "${CMAKE_EXE_LINKER_FLAGS${BUILD_TYPE_SUFFIX}} ${LINPHONE_BUILDER_LDFLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS${BUILD_TYPE_SUFFIX} "${CMAKE_MODULE_LINKER_FLAGS${BUILD_TYPE_SUFFIX}} ${LINPHONE_BUILDER_LDFLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS${BUILD_TYPE_SUFFIX} "${CMAKE_SHARED_LINKER_FLAGS${BUILD_TYPE_SUFFIX}} ${LINPHONE_BUILDER_LDFLAGS}")
set(AUTOTOOLS_LINKER_FLAGS "${AUTOTOOLS_LINKER_FLAGS} ${LINPHONE_BUILDER_LDFLAGS}")
endif()
endmacro() endmacro()
macro(linphone_builder_apply_cmake_flags_to_autotools_project PROJNAME) macro(linphone_builder_apply_cmake_flags_to_autotools_project PROJNAME)
if(EP_${PROJNAME}_BUILD_METHOD STREQUAL "autotools") if(EP_${PROJNAME}_BUILD_METHOD STREQUAL "autotools")
set(BUILD_TYPES "Debug" "Release" "RelWithDebInfo" "MinSizeRel") set(ep_asflags "${AUTOTOOLS_AS_FLAGS}")
list(FIND BUILD_TYPES "${CMAKE_BUILD_TYPE}" BUILD_TYPE_FOUND) set(ep_cppflags "${AUTOTOOLS_CPP_FLAGS}")
set(BUILD_TYPE_SUFFIX "") set(ep_cflags "${AUTOTOOLS_C_FLAGS}")
if(NOT ${BUILD_TYPE_FOUND} EQUAL -1) set(ep_cxxflags "${AUTOTOOLS_CXX_FLAGS}")
string(TOUPPER "${CMAKE_BUILD_TYPE}" UPPER_BUILD_TYPE) set(ep_objcflags "${AUTOTOOLS_OBJC_FLAGS}")
set(BUILD_TYPE_SUFFIX "_${UPPER_BUILD_TYPE}") set(ep_ldflags "${AUTOTOOLS_LINKER_FLAGS}")
endif()
set(ep_asflags "${AUTOTOOLS_AS_FLAGS${BUILD_TYPE_SUFFIX}}")
set(ep_cppflags "${AUTOTOOLS_CPP_FLAGS${BUILD_TYPE_SUFFIX}}")
set(ep_cflags "${AUTOTOOLS_C_FLAGS${BUILD_TYPE_SUFFIX}}")
set(ep_cxxflags "${AUTOTOOLS_CXX_FLAGS${BUILD_TYPE_SUFFIX}}")
set(ep_objcflags "${AUTOTOOLS_OBJC_FLAGS${BUILD_TYPE_SUFFIX}}")
set(ep_ldflags "${AUTOTOOLS_LINKER_FLAGS${BUILD_TYPE_SUFFIX}}")
endif() endif()
endmacro() endmacro()
...@@ -746,7 +751,7 @@ endfunction() ...@@ -746,7 +751,7 @@ endfunction()
macro(linphone_builder_add_dummy_libraries_generation) macro(linphone_builder_add_dummy_libraries_generation)
if(LINPHONE_BUILDER_DUMMY_LIBRARIES) if(LINPHONE_BUILDER_DUMMY_LIBRARIES)
linphone_builder_apply_flags() # linphone_builder_apply_flags()
linphone_builder_set_ep_directories(dummy_libraries) linphone_builder_set_ep_directories(dummy_libraries)
linphone_builder_expand_external_project_vars() linphone_builder_expand_external_project_vars()
ExternalProject_Add(EP_dummy_libraries ExternalProject_Add(EP_dummy_libraries
......
...@@ -58,9 +58,6 @@ if(APPLE) ...@@ -58,9 +58,6 @@ if(APPLE)
set(CMAKE_OSX_ARCHITECTURES "i386") set(CMAKE_OSX_ARCHITECTURES "i386")
set(LINPHONE_BUILDER_HOST "i686-apple-darwin") set(LINPHONE_BUILDER_HOST "i686-apple-darwin")
endif() endif()
set(LINPHONE_BUILDER_CPPFLAGS "-arch ${CMAKE_OSX_ARCHITECTURES}")
set(LINPHONE_BUILDER_OBJCFLAGS "-arch ${CMAKE_OSX_ARCHITECTURES}")
set(LINPHONE_BUILDER_LDFLAGS "-arch ${CMAKE_OSX_ARCHITECTURES}")
set(CMAKE_MACOSX_RPATH 1) set(CMAKE_MACOSX_RPATH 1)
endif() endif()
if(WIN32) if(WIN32)
......
...@@ -51,7 +51,7 @@ if("${PLATFORM}" MATCHES "Simulator") ...@@ -51,7 +51,7 @@ if("${PLATFORM}" MATCHES "Simulator")
else() else()
set(CLANG_TARGET_SPECIFIER "iphoneos-version-min") set(CLANG_TARGET_SPECIFIER "iphoneos-version-min")
endif() endif()
set(COMMON_FLAGS "-arch ${LINPHONE_BUILDER_OSX_ARCHITECTURES} -m${CLANG_TARGET_SPECIFIER}=${LINPHONE_IOS_DEPLOYMENT_TARGET} -DTARGET_OS_IPHONE=1 -D__IOS -fms-extensions") set(COMMON_FLAGS "-m${CLANG_TARGET_SPECIFIER}=${LINPHONE_IOS_DEPLOYMENT_TARGET} -DTARGET_OS_IPHONE=1 -D__IOS -fms-extensions")
set(LINPHONE_BUILDER_CPPFLAGS "${COMMON_FLAGS} -Dasm=__asm") set(LINPHONE_BUILDER_CPPFLAGS "${COMMON_FLAGS} -Dasm=__asm")
set(LINPHONE_BUILDER_LDFLAGS "${COMMON_FLAGS}") set(LINPHONE_BUILDER_LDFLAGS "${COMMON_FLAGS}")
set(LINPHONE_BUILDER_PKG_CONFIG_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig) # Restrict pkg-config to search in the install directory set(LINPHONE_BUILDER_PKG_CONFIG_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig) # Restrict pkg-config to search in the install directory
......
#!/bin/bash
xcrun @TOOLNAME@ $*
...@@ -25,48 +25,57 @@ if(NOT APPLE) ...@@ -25,48 +25,57 @@ if(NOT APPLE)
message(FATAL_ERROR "You need to build using a Mac OS X system") message(FATAL_ERROR "You need to build using a Mac OS X system")
endif() endif()
execute_process(COMMAND xcode-select -print-path OUTPUT_VARIABLE XCODE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND xcode-select -print-path
RESULT_VARIABLE XCODE_SELECT_RESULT
OUTPUT_VARIABLE XCODE_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT ${XCODE_SELECT_RESULT} EQUAL 0) if(NOT ${XCODE_SELECT_RESULT} EQUAL 0)
message(FATAL_ERROR "xcode-select failed: ${XCODE_SELECT_RESULT}. You may need to install Xcode.") message(FATAL_ERROR "xcode-select failed: ${XCODE_SELECT_RESULT}. You may need to install Xcode.")
endif() endif()
string(TOLOWER ${PLATFORM} PLATFORM_LOWER) string(TOLOWER ${PLATFORM} PLATFORM_LOWER)
execute_process(COMMAND xcrun --sdk iphone${PLATFORM_LOWER} --show-sdk-version RESULT_VARIABLE IOS_SDK_VERSION OUTPUT_VARIABLE XCODE_SDK_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND xcrun --sdk iphone${PLATFORM_LOWER} --show-sdk-version
if(NOT ${XCRUN_RESULT} EQUAL 0) RESULT_VARIABLE XCRUN_SHOW_SDK_VERSION_RESULT
message(FATAL_ERROR "xcrun failed: ${XCRUN_RESULT}. You may need to install Xcode.") OUTPUT_VARIABLE IOS_SDK_VERSION
else () OUTPUT_STRIP_TRAILING_WHITESPACE
set(IOS_SDK_VERSION "${XCODE_SDK_VERSION}") )
if(NOT ${XCRUN_SHOW_SDK_VERSION_RESULT} EQUAL 0)
message(FATAL_ERROR "xcrun failed: ${XCRUN_SHOW_SDK_VERSION_RESULT}. You may need to install Xcode.")
endif() endif()
if(EXISTS "${XCODE_PATH}/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/") execute_process(COMMAND xcrun --sdk iphone${PLATFORM_LOWER} --show-sdk-path
# New path with Xcode 4.3 RESULT_VARIABLE XCRUN_SHOW_SDK_PATH_RESULT
file(GLOB SDK_PATH_LIST "${XCODE_PATH}/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/iPhone${PLATFORM}*.sdk") OUTPUT_VARIABLE CMAKE_OSX_SYSROOT
set(SDK_BIN_PATH "${XCODE_PATH}/Platforms/iPhone${PLATFORM}.platform/Developer/usr/bin") OUTPUT_STRIP_TRAILING_WHITESPACE
else() )
file(GLOB SDK_PATH_LIST "/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/iPhone${PLATFORM}*.sdk") if(NOT ${XCRUN_SHOW_SDK_PATH_RESULT} EQUAL 0)
set(SDK_BIN_PATH "/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/usr/bin") message(FATAL_ERROR "xcrun failed: ${XCRUN_SHOW_SDK_PATH_RESULT}. You may need to install Xcode.")
endif() endif()
list(SORT SDK_PATH_LIST)
list(REVERSE SDK_PATH_LIST)
list(GET SDK_PATH_LIST 0 CMAKE_OSX_SYSROOT)
message(STATUS "Using sysroot path: ${CMAKE_OSX_SYSROOT}")
message(STATUS "Using sdk version: ${IOS_SDK_VERSION}")
set(IOS_TOOLCHAIN_HOST ${COMPILER_PREFIX})
foreach(TOOLNAME clang clang++ ld ar ranlib strip nm) execute_process(COMMAND xcrun --sdk iphone${PLATFORM_LOWER} --find clang
configure_file(${CMAKE_CURRENT_LIST_DIR}/tool_wrapper.cmake ${CMAKE_CURRENT_BINARY_DIR}/${IOS_TOOLCHAIN_HOST}-${TOOLNAME}) RESULT_VARIABLE XCRUN_FIND_CLANG_RESULT
endforeach(TOOLNAME) OUTPUT_VARIABLE IOS_CLANG_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT ${XCRUN_FIND_CLANG_RESULT} EQUAL 0)
message(FATAL_ERROR "xcrun failed: ${XCRUN_FIND_CLANG_RESULT}. You may need to install Xcode.")
endif()
get_filename_component(IOS_TOOLCHAIN_PATH "${IOS_CLANG_PATH}" DIRECTORY)
set(IOS_TOOLCHAIN_CC "${CMAKE_CURRENT_BINARY_DIR}/${IOS_TOOLCHAIN_HOST}-clang") message(STATUS "Using sysroot path: ${CMAKE_OSX_SYSROOT}")
set(IOS_TOOLCHAIN_CXX "${CMAKE_CURRENT_BINARY_DIR}/${IOS_TOOLCHAIN_HOST}-clang++") message(STATUS "Using sdk version: ${IOS_SDK_VERSION}")
set(IOS_TOOLCHAIN_OBJC "${CMAKE_CURRENT_BINARY_DIR}/${IOS_TOOLCHAIN_HOST}-clang") set(SDK_BIN_PATH "${CMAKE_OSX_SYSROOT}/../../usr/bin")
set(IOS_TOOLCHAIN_LD "${CMAKE_CURRENT_BINARY_DIR}/${IOS_TOOLCHAIN_HOST}-ld")
set(IOS_TOOLCHAIN_AR "${CMAKE_CURRENT_BINARY_DIR}/${IOS_TOOLCHAIN_HOST}-ar") set(IOS_TOOLCHAIN_CC "${IOS_TOOLCHAIN_PATH}/clang")
set(IOS_TOOLCHAIN_RANLIB "${CMAKE_CURRENT_BINARY_DIR}/${IOS_TOOLCHAIN_HOST}-ranlib") set(IOS_TOOLCHAIN_CXX "${IOS_TOOLCHAIN_PATH}/clang++")
set(IOS_TOOLCHAIN_STRIP "${CMAKE_CURRENT_BINARY_DIR}/${IOS_TOOLCHAIN_HOST}-strip") set(IOS_TOOLCHAIN_OBJC "${IOS_TOOLCHAIN_PATH}/clang")
set(IOS_TOOLCHAIN_NM "${CMAKE_CURRENT_BINARY_DIR}/${IOS_TOOLCHAIN_HOST}-nm") set(IOS_TOOLCHAIN_LD "${IOS_TOOLCHAIN_PATH}/ld")
set(IOS_TOOLCHAIN_AR "${IOS_TOOLCHAIN_PATH}/ar")
set(IOS_TOOLCHAIN_RANLIB "${IOS_TOOLCHAIN_PATH}/ranlib")
set(IOS_TOOLCHAIN_STRIP "${IOS_TOOLCHAIN_PATH}/strip")
set(IOS_TOOLCHAIN_NM "${IOS_TOOLCHAIN_PATH}/nm")
execute_process(COMMAND xcodebuild -version OUTPUT_VARIABLE XCODE_VERSION_RAW OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND xcodebuild -version OUTPUT_VARIABLE XCODE_VERSION_RAW OUTPUT_STRIP_TRAILING_WHITESPACE)
STRING(REGEX REPLACE "Xcode ([^\n]*).*" "\\1" XCODE_VERSION "${XCODE_VERSION_RAW}") STRING(REGEX REPLACE "Xcode ([^\n]*).*" "\\1" XCODE_VERSION "${XCODE_VERSION_RAW}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment