Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (20 sloc) 673 Bytes
include(darling_lib)
#include(CMakeParseArguments)
function(wrap_elf name elfname)
add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/${name}.c
COMMAND
${CMAKE_BINARY_DIR}/src/libelfloader/wrapgen/wrapgen
${elfname}
${CMAKE_CURRENT_BINARY_DIR}/${name}.c
DEPENDS
wrapgen
)
set(DYLIB_INSTALL_NAME "/usr/lib/native/lib${name}.dylib")
include_directories(${CMAKE_SOURCE_DIR}/src/libelfloader/native)
add_darling_library(${name} SHARED ${CMAKE_CURRENT_BINARY_DIR}/${name}.c)
target_link_libraries(${name} PRIVATE system elfloader)
make_fat(${name})
install(TARGETS ${name} DESTINATION libexec/darling/usr/lib/native)
endfunction(wrap_elf)
You can’t perform that action at this time.