mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-02-26 20:33:53 +01:00
27 lines
717 B
CMake
27 lines
717 B
CMake
cmake_minimum_required(VERSION 3.10)
|
|
|
|
project(rds95 VERSION 1.6)
|
|
|
|
add_compile_options(-Wall -Werror -Wextra -pedantic -O2 -std=c18 -march=native -DVERSION=\"${PROJECT_VERSION}\")
|
|
|
|
file(GLOB INIH_FILES "inih/*.c")
|
|
add_library(inih OBJECT ${INIH_FILES})
|
|
|
|
file(GLOB SOURCES src/*.c)
|
|
|
|
add_executable(rds95 ${SOURCES})
|
|
|
|
find_package(Lua REQUIRED)
|
|
|
|
target_include_directories(rds95 PRIVATE ${LUA_INCLUDE_DIR})
|
|
target_link_libraries(rds95 PRIVATE m pthread pulse pulse-simple inih ${LUA_LIBRARIES})
|
|
|
|
install(TARGETS rds95 DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
|
|
|
install(CODE
|
|
"
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy
|
|
\"${CMAKE_CURRENT_SOURCE_DIR}/src/command.lua\"
|
|
\"$ENV{HOME}/.rds95.command.lua\")
|
|
")
|