this repo has no description
1if(COMMAND cmake_policy)
2 cmake_policy(SET CMP0003 NEW)
3 cmake_policy(SET CMP0011 NEW)
4endif(COMMAND cmake_policy)
5
6include(use_ld64)
7
8FUNCTION(add_darling_executable exe)
9 foreach(f IN LISTS ARGN)
10 set(files ${files} ${f})
11 endforeach(f)
12
13 add_executable(${exe} ${files})
14 set_property(TARGET ${exe} APPEND_STRING PROPERTY
15 LINK_FLAGS " ${CMAKE_EXE_LINKER_FLAGS} -nostdlib ${CMAKE_BINARY_DIR}/src/external/csu/CMakeFiles/crt1.10.6.dir/start.S.o ")
16
17 if (BUILD_TARGET_64BIT)
18 target_compile_options(${exe} PRIVATE -arch ${APPLE_ARCH_64BIT})
19 elseif (BUILD_TARGET_32BIT)
20 target_compile_options(${exe} PRIVATE -arch ${APPLE_ARCH_32BIT})
21 set_property(TARGET ${exe} APPEND_STRING PROPERTY
22 LINK_FLAGS " -arch ${APPLE_ARCH_32BIT}")
23 endif (BUILD_TARGET_64BIT)
24
25 use_ld64(${exe})
26 target_link_libraries(${exe} system)
27 add_dependencies(${exe} crt1.10.6)
28
29 if ((NOT NO_DSYM) AND (NOT ${exe}_NO_DSYM))
30 dsym(${exe})
31 endif ((NOT NO_DSYM) AND (NOT ${exe}_NO_DSYM))
32ENDFUNCTION(add_darling_executable)
33