-
Notifications
You must be signed in to change notification settings - Fork 16
/
CMakeLists.txt
43 lines (32 loc) · 1.21 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
39
40
41
42
43
cmake_minimum_required(VERSION 3.8)
project(GLGrassRenderer VERSION 0.0.1 LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
option(BP_ENABLE_CLANG_TIDY "Enable testing with clang-tidy" OFF)
option(BP_ENABLE_CPPCHECK "Enable testing with cppcheck" OFF)
include("compiler")
include("clangformat")
if (BP_ENABLE_CLANG_TIDY)
include("ClangTidy")
endif()
if (BP_ENABLE_CPPCHECK)
include("cppcheck")
endif()
# Conan package manager
if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/master/conan.cmake"
"${CMAKE_BINARY_DIR}/conan.cmake")
endif()
include(${CMAKE_BINARY_DIR}/conan.cmake)
conan_cmake_run(CONANFILE conanfile.txt
BASIC_SETUP CMAKE_TARGETS
BUILD missing)
add_custom_target(assets
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}/bin
)
add_subdirectory(third-party)
add_subdirectory(src)