nanosm/CMakeLists.txt

53 lines
824 B
CMake
Raw Normal View History

cmake_minimum_required(VERSION 3.15)
project(nanosm
LANGUAGES CXX
)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
include(Policies)
include(ProjectFuncs)
include(CompilerFlags)
2024-02-01 23:20:42 -05:00
add_subdirectory(third_party/tomlplusplus)
add_executable(nanosm
src/main.cpp
2024-02-01 23:20:42 -05:00
src/tomlpp_src.cpp
# glue code
src/EventLoop.cpp
src/Timer.cpp
src/WordExp.cpp
src/Process.cpp
src/RestartingProcess.cpp
)
2024-02-01 23:20:42 -05:00
target_compile_definitions(nanosm PRIVATE
-DTOML_HEADER_ONLY=0
)
target_link_libraries(nanosm PRIVATE
tomlplusplus::tomlplusplus
)
nanosm_target(nanosm)
2024-02-02 06:39:42 -05:00
# cmake install stuff
include(GNUInstallDirs)
# doc files
install(FILES
${PROJECT_SOURCE_DIR}/LICENSE
${PROJECT_SOURCE_DIR}/doc/nanosm.toml
DESTINATION ${CMAKE_INSTALL_DOCDIR}
)
install(TARGETS nanosm
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)