PageRenderTime 25ms CodeModel.GetById 18ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/share/cmake/iPhone-toolchain.cmake

http://github.com/imageworks/OpenColorIO
CMake | 42 lines | 32 code | 10 blank | 0 comment | 0 complexity | 5dc71cb143f048b58e28b349cc34e410 MD5 | raw file
 1
 2set(IPHONE_SDK "4.3")
 3set(IPHONE_ROOT "/Developer/Platforms/iPhoneOS.platform/Developer")
 4set(IPHONE_SDK_ROOT "${IPHONE_ROOT}/SDKs/iPhoneOS${IPHONE_SDK}.sdk")
 5
 6set(CMAKE_FIND_ROOT_PATH "${IPHONE_SDK_ROOT}" "${IPHONE_ROOT}")
 7set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
 8set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
 9set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
10
11set(CMAKE_SYSTEM_NAME "GNU")
12set(CMAKE_SYSTEM_PROCESSOR armv7)
13set(CMAKE_OSX_ARCHITECTURES armv7)
14
15set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
16
17set(CMAKE_C_COMPILER gcc-4.2)
18set(CMAKE_CXX_COMPILER g++-4.2)
19
20add_definitions("-D__IPHONE__")
21add_definitions("-arch armv7 -pipe -no-cpp-precomp --sysroot=${IPHONE_SDK_ROOT} -miphoneos-version-min=${IPHONE_SDK}")
22set(CMAKE_C_LINK_FLAGS "-arch armv7 --isysroot=${IPHONE_SDK_ROOT} -miphoneos-version-min=${IPHONE_SDK} -L${IPHONE_SDK_ROOT}/usr/lib -L${IPHONE_SDK_ROOT}/usr/lib/system")
23set(CMAKE_CXX_LINK_FLAGS ${CMAKE_C_LINK_FLAGS})
24
25include_directories("${IPHONE_SDK_ROOT}/usr/include")
26include_directories("${IPHONE_SDK_ROOT}/usr/include/c++/4.2.1")
27include_directories("${IPHONE_SDK_ROOT}/usr/include/c++/4.2.1/armv7-apple-darwin10")
28
29link_directories("${IPHONE_SDK_ROOT}/usr/lib")
30link_directories("${IPHONE_SDK_ROOT}/usr/lib/system")
31
32set(CMAKE_CROSSCOMPILING TRUE)
33set(IPHONE TRUE)
34
35set(OCIO_BUILD_SHARED FALSE)
36set(OCIO_BUILD_STATIC TRUE)
37set(OCIO_BUILD_TRUELIGHT FALSE)
38set(OCIO_BUILD_APPS FALSE)
39set(OCIO_BUILD_NUKE FALSE)
40set(OCIO_BUILD_PYGLUE FALSE)
41set(OCIO_BUILD_JNIGLUE FALSE)
42set(OCIO_BUILD_SSE FALSE)