Skip to content

Commit

Permalink
ios test
Browse files Browse the repository at this point in the history
  • Loading branch information
phunkyfish committed Jan 15, 2020
1 parent d57dadb commit 9cd47fa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
10 changes: 9 additions & 1 deletion depends/common/ffmpeg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@ if(CMAKE_CXX_FLAGS)
endif()

if(CMAKE_EXE_LINKER_FLAGS)
list(APPEND ffmpeg_conf --extra-ldflags=${CMAKE_EXE_LINKER_FLAGS})
if(CORE_SYSTEM_NAME STREQUAL darwin_embedded)
set(ldflags "${CMAKE_EXE_LINKER_FLAGS} -L/opt/X11/lib")
list(APPEND ffmpeg_conf --extra-ldflags=${ldflags})
else()
list(APPEND ffmpeg_conf --extra-ldflags=${CMAKE_EXE_LINKER_FLAGS})
endif()
elseif(CORE_SYSTEM_NAME STREQUAL darwin_embedded)
list(APPEND ffmpeg_conf --extra-ldflags=-L/opt/X11/lib)
endif()

if(ENABLE_NEON)
Expand Down Expand Up @@ -75,6 +82,7 @@ elseif(CORE_SYSTEM_NAME STREQUAL darwin_embedded)
endif()
list(APPEND ffmpeg_conf --disable-decoder=mpeg_xvmc --disable-crystalhd --enable-videotoolbox
--target-os=darwin)
list(APPEND ffmpeg_conf --extra-libs=-lX11 --disable-linux-perf)
elseif(CORE_SYSTEM_NAME STREQUAL osx)
list(APPEND ffmpeg_conf --disable-decoder=mpeg_xvmc --disable-crystalhd --enable-videotoolbox
--target-os=darwin
Expand Down
14 changes: 7 additions & 7 deletions depends/common/gmp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,24 @@ if (NOT DEFINED CMAKE_IOS_SDK_ROOT)
message (STATUS "XXXXXXXToolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT}")
endif ()
#set (CMAKE_IOS_SDK_ROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Location of the selected iOS SDK")
message (STATUS "XXXXXXXToolch Test")
message (STATUS "XXXXXXXToolch Test X ${CORE_SYSTEM_NAME} X ${CMAKE_IOS_SDK_ROOT}")
# set (CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Sysroot used for iOS support")
endif()

#
# Darwin based OSes will use -isysroot, however libtool will expect --sysroot
# So we hack around this otherwise libttol won't be able to find the standard C headers
#
if(CORE_SYSTEM_NAME STREQUAL osx OR CORE_SYSTEM_NAME STREQUAL ios OR CORE_SYSTEM_NAME STREQUAL darwin_embedded)
if(CORE_SYSTEM_NAME STREQUAL osx)
set (COMPILER_WITH_LIBTOOL_SYSROOT_APPLE
"CC_FOR_BUILD=${CMAKE_C_COMPILER} --sysroot ${CMAKE_OSX_SYSROOT}"
"CPP_FOR_BUILD=${CMAKE_C_COMPILER} -E --sysroot ${CMAKE_OSX_SYSROOT}"
)
#elseif(CORE_SYSTEM_NAME STREQUAL ios OR CORE_SYSTEM_NAME STREQUAL darwin_embedded)
# set (COMPILER_WITH_LIBTOOL_SYSROOT_APPLE
# "CC_FOR_BUILD=${CMAKE_C_COMPILER} --sysroot ${CMAKE_IOS_SDK_ROOT}"
# )
## "CPP_FOR_BUILD=${CMAKE_C_COMPILER} -E --sysroot ${CMAKE_IOS_SDK_ROOT}"
elseif(CORE_SYSTEM_NAME STREQUAL ios OR CORE_SYSTEM_NAME STREQUAL darwin_embedded)
set (COMPILER_WITH_LIBTOOL_SYSROOT_APPLE
"CC_FOR_BUILD=${CMAKE_C_COMPILER} --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk"
"CPP_FOR_BUILD=${CMAKE_C_COMPILER} -E --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk"
)
else()
set (COMPILER_WITH_LIBTOOL_SYSROOT_APPLE "")
endif()
Expand Down

0 comments on commit 9cd47fa

Please sign in to comment.