diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ad91715..d336eedd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,20 +48,6 @@ try_compile(CAN_TARGET_I386 ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE32} COMPILE_DEFINITIONS "${TARGET_I386_CFLAGS}" CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${TARGET_I386_CFLAGS}") -if(LLVM_ANDROID_TOOLCHAIN_DIR) - if(EXISTS ${LLVM_ANDROID_TOOLCHAIN_DIR}/arm-linux-androideabi) - set(CAN_TARGET_ARM_ANDROID 1) - set(TARGET_ARM_ANDROID_CFLAGS - -target arm-linux-androideabi - --sysroot=${LLVM_ANDROID_TOOLCHAIN_DIR}/sysroot - -B${LLVM_ANDROID_TOOLCHAIN_DIR} - ) - else() - set(CAN_TARGET_ARM_ANDROID 0) - endif() - # TODO: support i686 and MIPS Android toolchains -endif() - function(filter_available_targets out_var) set(archs) foreach(arch ${ARGN}) @@ -106,6 +92,13 @@ function(set_target_compile_flags target) set_property(TARGET ${target} PROPERTY COMPILE_FLAGS "${argstring}") endfunction() +function(set_target_link_flags target) + foreach(arg ${ARGN}) + set(argstring "${argstring} ${arg}") + endforeach() + set_property(TARGET ${target} PROPERTY LINK_FLAGS "${argstring}") +endfunction() + # Compute the Clang version from the LLVM version. # FIXME: We should be able to reuse CLANG_VERSION variable calculated # in Clang cmake files, instead of copying the rules here. |