20 lines
590 B
CMake
20 lines
590 B
CMake
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)
|
|
|
|
# RPath
|
|
set_target_properties(trampoline PROPERTIES INSTALL_RPATH "$ORIGIN/../lib/native")
|
|
target_link_options(trampoline PRIVATE "LINKER:--disable-new-dtags")
|
|
|
|
# Install
|
|
function(install_trampoline bin_dir)
|
|
install(TARGETS trampoline DESTINATION "${bin_dir}")
|
|
endfunction()
|