runtime/native/CMakeLists.txt
2024-06-08 16:28:47 -04:00

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()