]> git.saurik.com Git - apple/libdispatch.git/blob - cmake/modules/DispatchAppleOptions.cmake
libdispatch-913.1.6.tar.gz
[apple/libdispatch.git] / cmake / modules / DispatchAppleOptions.cmake
1
2 set(WITH_APPLE_PTHREAD_SOURCE "" CACHE PATH "Path to Apple's libpthread")
3 set(WITH_APPLE_LIBPLATFORM_SOURCE "" CACHE PATH "Path to Apple's libplatform")
4 set(WITH_APPLE_LIBCLOSURE_SOURCE "" CACHE PATH "Path to Apple's libclosure")
5 set(WITH_APPLE_XNU_SOURCE "" CACHE PATH "Path to Apple's XNU")
6 set(WITH_APPLE_OBJC4_SOURCE "" CACHE PATH "Path to Apple's ObjC4")
7
8 if(WITH_APPLE_PTHREAD_SOURCE)
9 include_directories(SYSTEM "${WITH_APPLE_PTHREAD_SOURCE}")
10 endif()
11 if(WITH_APPLE_LIBPLATFORM_SOURCE)
12 include_directories(SYSTEM "${WITH_APPLE_LIBPLATFORM_SOURCE}/include")
13 endif()
14 if(WITH_APPLE_LIBCLOSURE_SOURCE)
15 include_directories(SYSTEM "${WITH_APPLE_LIBCLOSURE_SOURCE}")
16 endif()
17 if(WITH_APPLE_XNU_SOURCE)
18 # FIXME(compnerd) this should use -idirafter
19 include_directories("${WITH_APPLE_XNU_SOURCE}/libkern")
20 include_directories(SYSTEM
21 "${WITH_APPLE_XNU_SOURCE}/bsd"
22 "${WITH_APPLE_XNU_SOURCE}/libsyscall"
23 "${WITH_APPLE_XNU_SOURCE}/libsyscall/wrappers/libproc")
24
25 # hack for xnu/bsd/sys/event.h EVFILT_SOCK declaration
26 add_definitions(-DPRIVATE=1)
27 endif()
28
29 if(IS_DIRECTORY "/System/Library/Frameworks/System.framework/PrivateHeaders")
30 include_directories(SYSTEM
31 "/System/Library/Frameworks/System.framework/PrivateHeaders")
32 endif()
33
34 option(ENABLE_APPLE_TSD_OPTIMIZATIONS "use non-portable pthread TSD optimizations" OFF)
35 if(ENABLE_APPLE_TSD_OPTIMIZATIONS)
36 set(USE_APPLE_TSD_OPTIMIZATIONS 1)
37 else()
38 set(USE_APPLE_TSD_OPTIMIZATIONS 0)
39 endif()
40
41 # TODO(compnerd) link in libpthread headers
42
43