2019-08-30 05:10:24 +08:00
|
|
|
cmake_minimum_required(VERSION 3.5)
|
|
|
|
|
|
|
|
project(clue VERSION 1.0.0 LANGUAGES CXX)
|
|
|
|
|
|
|
|
option(CLUE_BUILD_TEST "Build tests for clue" OFF)
|
|
|
|
option(CLUE_BUILD_EXAMPLE "Build examples" OFF)
|
|
|
|
|
|
|
|
include(GNUInstallDirs)
|
2021-09-28 10:50:26 +08:00
|
|
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include/clue.hpp")
|
2019-08-30 05:10:24 +08:00
|
|
|
|
|
|
|
if(CLUE_BUILD_TEST)
|
|
|
|
file(GLOB TEST_SOURCES "tests/*.cpp")
|
|
|
|
add_executable(test_clue ${TEST_SOURCES})
|
2021-09-28 10:50:26 +08:00
|
|
|
target_include_directories(test_clue PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/tests")
|
2019-08-30 05:10:24 +08:00
|
|
|
install(TARGETS test_clue
|
|
|
|
RUNTIME DESTINATION tools)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CLUE_BUILD_EXAMPLE)
|
|
|
|
file(GLOB EXAMPLES "examples/*.cpp")
|
|
|
|
install(FILES ${EXAMPLES} DESTINATION examples)
|
|
|
|
endif()
|
|
|
|
|
2021-09-28 10:50:26 +08:00
|
|
|
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/clue.hpp" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
|
2019-08-30 05:10:24 +08:00
|
|
|
# end of file
|