set(CMAKE_SYSTEM_VERSION 1) set(OS "ios") set(CPU "armv7") set(PLATFORM "darwin") if("${OS}" STREQUAL "linux" OR "${OS}" STREQUAL "android") set(CMAKE_SYSTEM_NAME Linux) endif() # set special CORE_SYSTEM_NAME if("${OS}" STREQUAL "android") set(CORE_SYSTEM_NAME android) elseif("${OS}" STREQUAL "ios") set(CORE_SYSTEM_NAME ios) elseif("${PLATFORM}" STREQUAL "raspberry-pi") set(CORE_SYSTEM_NAME rbpi) elseif("${PLATFORM}" STREQUAL "darwin") set(CORE_SYSTEM_NAME osx) endif() include("${CMAKE_CURRENT_LIST_DIR}/common.cmake") #set(CMAKE_FIND_ROOT_PATH @CMAKE_FIND_ROOT_PATH@) if("${OS}" STREQUAL "ios" OR "${OS}" STREQUAL "osx") set(CMAKE_SYSTEM_NAME Darwin) #set(CMAKE_OSX_SYSROOT @use_sdk_path@) #list(APPEND CMAKE_FIND_ROOT_PATH ${CMAKE_OSX_SYSROOT} ${CMAKE_OSX_SYSROOT}/usr) #set(CMAKE_LIBRARY_PATH @CMAKE_FIND_ROOT_PATH@/lib:@use_sdk_path@/lib) #set(CMAKE_INCLUDE_PATH @CMAKE_FIND_ROOT_PATH@/include:@use_sdk_path@/include) endif() #if("${CORE_SYSTEM_NAME}" STREQUAL "rbpi") # list(APPEND CMAKE_FIND_ROOT_PATH @use_firmware@/opt/vc) # set(CMAKE_LIBRARY_PATH @CMAKE_FIND_ROOT_PATH@/lib:@use_firmware@/opt/vc/lib) # set(CMAKE_INCLUDE_PATH @CMAKE_FIND_ROOT_PATH@/include:@use_firmware@/opt/vc/include) #endif() # specify the cross compiler set(COMPILER_PREFIX /var/www/ud_3/xbmc/osx/osxcross/target/bin/arm-apple-darwin14) set(CMAKE_C_COMPILER ${COMPILER_PREFIX}-clang) set(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-clang++) set(CMAKE_AR ${COMPILER_PREFIX}-ar CACHE FILEPATH "Archiver") set(CMAKE_LINKER ${COMPILER_PREFIX}-ld CACHE FILEPATH "Linker") set(CMAKE_RANLIB ${COMPILER_PREFIX}-ranlib) set(CMAKE_C_FLAGS "-mcpu=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -pipe -Wno-trigraphs -fpascal-strings -O3 -Wreturn-type -Wunused-variable -fmessage-length=0 -gdwarf-2") set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -stdlib=libc++") set(CMAKE_CPP_FLAGS "") set(ENV{CFLAGS} ${CMAKE_C_FLAGS}) set(ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS}) set(ENV{CPPFLAGS} ${CMAKE_CPP_FLAGS}) # search for programs in the build host directories #set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # for libraries and headers in the target directories #set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) #set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) if(NOT OS STREQUAL "linux") set(ADDONS_PREFER_STATIC_LIBS ON) endif()