Commit b09d37d1 authored by Ghislain MARY's avatar Ghislain MARY

Fix build for iOS with Xcode.

parent e53fb56c
......@@ -113,11 +113,11 @@ else()
else()
set(EP_vpx_TARGET "x86-darwin10-gcc")
endif()
if(CMAKE_GENERATOR STREQUAL "Xcode")
# It appears that the build occurs in the cmake directory instead of the Build/vpx one with Xcode, so these flags are needed for include files to be found...
set(EP_vpx_EXTRA_CFLAGS "${EP_vpx_EXTRA_CFLAGS} -I${LINPHONE_BUILDER_WORK_DIR}/Build/vpx")
set(EP_vpx_EXTRA_ASFLAGS "${EP_vpx_EXTRA_ASFLAGS} -I${LINPHONE_BUILDER_WORK_DIR}/Build/vpx")
endif()
endif()
if(CMAKE_GENERATOR STREQUAL "Xcode")
# It appears that the build occurs in the cmake directory instead of the Build/vpx one with Xcode, so these flags are needed for include files to be found...
set(EP_vpx_EXTRA_CFLAGS "${EP_vpx_EXTRA_CFLAGS} -I${LINPHONE_BUILDER_WORK_DIR}/Build/vpx")
set(EP_vpx_EXTRA_ASFLAGS "${EP_vpx_EXTRA_ASFLAGS} -I${LINPHONE_BUILDER_WORK_DIR}/Build/vpx")
endif()
set(EP_vpx_LINKING_TYPE "--enable-static" "--disable-shared" "--enable-pic")
elseif(ANDROID)
......
......@@ -88,6 +88,12 @@ set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_SYSTEM_NAME "Darwin")
set(IOS True)
# The following variables are needed to build correctly with Xcode
if(CMAKE_GENERATOR STREQUAL "Xcode")
set(CMAKE_MACOSX_BUNDLE YES)
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED NO)
endif()
# Define the compiler
CMAKE_FORCE_C_COMPILER(${IOS_TOOLCHAIN_CC} Clang)
CMAKE_FORCE_CXX_COMPILER(${IOS_TOOLCHAIN_CXX} Clang)
......
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