mirror of
https://github.com/darlinghq/darling.git
synced 2024-12-04 02:21:31 +00:00
Add a cmake option BUILD_ANDROID
And skip components not applicable on Android * fuse: Android's kernel do support fuse, but there's no libfuse. Instead, those who need fuse, like the /system/bin/sdcard daemon, talks to the kernel directly. * udev: Android doesn't use udev. They use ueventd instead.
This commit is contained in:
parent
600b660812
commit
357243f047
@ -31,6 +31,7 @@ enable_language(ASM-ATT)
|
||||
|
||||
option(FRAMEWORK_COREAUDIO "Enable audio-related functionality" OFF)
|
||||
option(FRAMEWORK_APPKIT "Enable AppKit development code" OFF)
|
||||
option(BUILD_ANDROID "Target Android platforms" OFF)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
@ -78,6 +79,8 @@ InstallSymlink(/Volumes/SystemRoot/lib64 ${CMAKE_INSTALL_PREFIX}/libexec/darling
|
||||
|
||||
InstallSymlink(/Volumes/SystemRoot/usr/share/zoneinfo ${CMAKE_INSTALL_PREFIX}/libexec/darling/usr/share/zoneinfo)
|
||||
|
||||
# Our udev rules, so /dev/mach has 0666 permissions
|
||||
install(DIRECTORY etc/udev DESTINATION /etc)
|
||||
if(NOT BUILD_ANDROID)
|
||||
# Our udev rules, so /dev/mach has 0666 permissions
|
||||
install(DIRECTORY etc/udev DESTINATION /etc)
|
||||
endif(NOT BUILD_ANDROID)
|
||||
|
||||
|
@ -86,7 +86,10 @@ add_subdirectory(kernel)
|
||||
add_subdirectory(libc)
|
||||
|
||||
add_definitions(-D_LIBC_NO_FEATURE_VERIFICATION)
|
||||
add_subdirectory(external/darling-dmg)
|
||||
if(NOT BUILD_ANDROID)
|
||||
# Android is lack of libfuse
|
||||
add_subdirectory(external/darling-dmg)
|
||||
endif(NOT BUILD_ANDROID)
|
||||
add_subdirectory(libm)
|
||||
add_subdirectory(libmacho)
|
||||
add_subdirectory(libgcc)
|
||||
|
@ -9,6 +9,11 @@ endif(COMMAND cmake_policy)
|
||||
|
||||
enable_language(C ASM)
|
||||
|
||||
if(BUILD_ANDROID)
|
||||
list(APPEND CMAKE_MODULE_PATH "$ENV{ANDROID_NDK}/build/cmake")
|
||||
include(android.toolchain)
|
||||
endif(BUILD_ANDROID)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-Ttext-segment,0x400000 -Wl,-Tbss,0x410000 -Wl,-Tdata,0x420000")
|
||||
|
Loading…
Reference in New Issue
Block a user