runtime/native/CMakeLists.txt

20 lines
590 B
CMake
Raw Normal View History

2024-06-04 21:50:17 +00:00
project(native-trampoline)
# Build
add_executable(trampoline src/memory.cpp src/main.cpp src/trampoline.cpp src/ptrace.cpp)
# Warnings
target_compile_options(trampoline PRIVATE -Wall -Wextra -Werror -Wpointer-arith -Wshadow -Wnull-dereference)
# Link
target_link_libraries(trampoline dl trampoline-headers)
2024-06-05 04:11:54 +00:00
# RPath
set_target_properties(trampoline PROPERTIES INSTALL_RPATH "$ORIGIN/../lib/native")
target_link_options(trampoline PRIVATE "LINKER:--disable-new-dtags")
2024-06-04 21:50:17 +00:00
# Install
function(install_trampoline bin_dir)
install(TARGETS trampoline DESTINATION "${bin_dir}")
endfunction()