forked from fenbf/particles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
67 lines (52 loc) · 2.59 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
cmake_minimum_required(VERSION 3.28)
project(particles CXX)
set(CMAKE_SCRIPTS_PATH "${PROJECT_SOURCE_DIR}/cmake")
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
include(${CMAKE_SCRIPTS_PATH}/StandardProjectSettings.cmake)
include(${CMAKE_SCRIPTS_PATH}/PreventInSourceBuilds.cmake)
include(${CMAKE_SCRIPTS_PATH}/Cache.cmake)
include(${CMAKE_SCRIPTS_PATH}/CompilerWarnings.cmake)
include(${CMAKE_SCRIPTS_PATH}/Linker.cmake)
include(${CMAKE_SCRIPTS_PATH}/CheckMinimumToolRequirements.cmake)
include_directories(BEFORE
SYSTEM
src/glm
)
set(TARGET_LIB "particles")
include(${CMAKE_SCRIPTS_PATH}/GetParticlesSources.cmake)
set(Particles_SOURCE_DIR "")
Particles_get_modules("${Particles_SOURCE_DIR}" Particles_modules)
Particles_get_source_files("${Particles_SOURCE_DIR}" Particles_source_files)
add_library(${TARGET_LIB}
STATIC
${Particles_source_files}
)
target_sources(${TARGET_LIB}
PUBLIC
FILE_SET CXX_MODULES FILES
${Particles_modules}
)
add_library(particles::lib ALIAS ${TARGET_LIB})
set(POS_INDEP_CODE "ON")
set_target_properties(${TARGET_LIB}
PROPERTIES
POSITION_INDEPENDENT_CODE ${POS_INDEP_CODE}
)
include(ProjectOptions.cmake)
particles_set_project_warnings(${particles_WARNINGS_AS_ERRORS} ${TARGET_LIB})
add_subdirectory(test/cpu_test)
message(STATUS "Particles: CMAKE_CXX_COMPILER_ID = \"${CMAKE_CXX_COMPILER_ID}\".")
message(STATUS "Particles: CMAKE_CXX_COMPILER_VERSION = \"${CMAKE_CXX_COMPILER_VERSION}\".")
message(STATUS "Particles: CMAKE_BUILD_TYPE = \"${CMAKE_BUILD_TYPE}\".")
message(STATUS "Particles: WARNINGS_AS_ERRORS = \"${WARNINGS_AS_ERRORS}\".")
message(STATUS "Particles: SOME_WARNINGS_OFF = \"${SOME_WARNINGS_OFF}\".")
message(STATUS "Particles: CMAKE_MODULE_PATH = \"${CMAKE_MODULE_PATH}\".")
message(STATUS "Particles: CMAKE_SCRIPTS_PATH = \"${CMAKE_SCRIPTS_PATH}\".")
message(STATUS "Particles: CMAKE_GENERATOR = \"${CMAKE_GENERATOR}\".")
message(STATUS "Particles: GENERATOR_IS_MULTI_CONFIG = \"${GENERATOR_IS_MULTI_CONFIG}\".")
message(STATUS "Particles: CMAKE_RUNTIME_OUTPUT_DIRECTORY = \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}\".")
message(STATUS "Particles: C++ standard = \"${CMAKE_CXX_STANDARD}\".")
message(STATUS "Particles: C++ standard required = \"${CMAKE_CXX_STANDARD_REQUIRED}\".")
message(STATUS "Particles: C++ extensions = \"${CMAKE_CXX_EXTENSIONS}\".")