26 lines
610 B
CMake
26 lines
610 B
CMake
project(native-runtime)
|
|
|
|
# Build
|
|
add_executable(runtime
|
|
src/memory.cpp
|
|
src/main.cpp
|
|
src/trampoline.cpp
|
|
src/loop.cpp
|
|
src/signals.cpp
|
|
)
|
|
|
|
# Warnings
|
|
target_compile_options(runtime PRIVATE -Wall -Wextra -Werror -Wpointer-arith -Wshadow -Wnull-dereference)
|
|
|
|
# Link
|
|
target_link_libraries(runtime dl rt trampoline-headers)
|
|
|
|
# RPath
|
|
set_target_properties(runtime PROPERTIES INSTALL_RPATH "${RUNTIME_RPATH}")
|
|
target_link_options(runtime PRIVATE "LINKER:${RUNTIME_EXTRA_LINK_FLAG}")
|
|
|
|
# Install
|
|
function(install_runtime bin_dir)
|
|
install(TARGETS runtime DESTINATION "${bin_dir}")
|
|
endfunction()
|