basic setup

This commit is contained in:
Thomas Lindner 2022-05-19 22:16:30 +02:00
parent c60811620a
commit 697695b860
2 changed files with 2 additions and 10 deletions

View file

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.20) cmake_minimum_required(VERSION 3.20)
project(basiccmake LANGUAGES CXX) project(gpn-maze-bot LANGUAGES CXX)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(GlobalOptions) include(GlobalOptions)
@ -10,11 +10,3 @@ include(Format)
#find_package(foo REQUIRED) #find_package(foo REQUIRED)
add_subdirectory(src) add_subdirectory(src)
install(DIRECTORY include TYPE INCLUDE FILES_MATCHING PATTERN *.h)
install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}-targets)
install(EXPORT ${PROJECT_NAME}-targets NAMESPACE ${PROJECT_NAME}::
DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}")
configure_file(cmake/config.cmake.in ${PROJECT_NAME}-config.cmake @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}")

View file

@ -1,3 +1,3 @@
add_compile_options(-Wall -Werror -Wno-unknown-warning-option) add_compile_options(-Wall -Werror -Wno-unknown-warning-option)
set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_CLANG_TIDY clang-tidy --config=) #set(CMAKE_CXX_CLANG_TIDY clang-tidy --config=)