-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
38 lines (32 loc) · 1.05 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
cmake_minimum_required(VERSION 3.25)
message(STATUS "CMAKE VERSION:${CMAKE_VERSION}")
if(NOT DEFINED SKBUILD_PROJECT_NAME)
set(SKBUILD_PROJECT_NAME _core)
set(SKBUILD_PROJECT_VERSION 0.0.0)
endif()
message(
STATUS
"Building CMake project ${SKBUILD_PROJECT_NAME} ${SKBUILD_PROJECT_VERSION}")
project(
${SKBUILD_PROJECT_NAME}
VERSION ${SKBUILD_PROJECT_VERSION}
LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD
20
CACHE STRING "C++ standard")
set(CMAKE_CXX_STANDARD_REQUIRED
ON
CACHE BOOL "C++ standard required")
set(CMAKE_CXX_EXTENSIONS
OFF
CACHE BOOL "C++ extensions")
# Project default module
find_package(cmake-modules REQUIRED)
include(cmake-modules/ProjectDefault)
find_program(cppcheck NAMES "cppcheck" "cppcheck.exe")
cmake_path(GET cppcheck PARENT_PATH cppcheck_dir)
file(GLOB cppcheck_runtimes ${cppcheck_dir}/*)
install(PROGRAMS ${cppcheck_runtimes}
DESTINATION ${SKBUILD_PROJECT_NAME}/Cppcheck)
install(DIRECTORY ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/Cppcheck
DESTINATION ${SKBUILD_PROJECT_NAME})