bootlatch/CMakeLists.txt

39 lines
1.0 KiB
CMake

cmake_minimum_required(VERSION 3.16)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
include(Colours)
include(Binaries)
project(bootlatch VERSION 0.1)
string(TIMESTAMP BUILD_TIME)
execute_process(COMMAND conan install ${CMAKE_SOURCE_DIR} --output-folder=${CMAKE_BINARY_DIR} --build missing)
include(${CMAKE_BINARY_DIR}/conan_toolchain.cmake)
set(CMAKE_CXX_STANDARD 17)
# nlohmann/json
find_package(nlohmann_json)
include_directories(${nlohmann_json_INCLUDE_DIR})
include_directories(include)
include_directories(ext_include)
include_directories(${CMAKE_BINARY_DIR}/include)
# docs
find_package(Doxygen)
if (DOXYGEN_FOUND)
configure_file(${CMAKE_SOURCE_DIR}/doc/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating documentation with doxygen"
VERBATIM)
endif()
build_executable(TARGET bootlatch
SUBDIRS bootlatch)
install(TARGETS bootlatch RUNTIME)