-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
executable file
·42 lines (34 loc) · 1.14 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
cmake_minimum_required(VERSION 3.30)
project(Fussion
VERSION 0.1
LANGUAGES C CXX)
include(cmake/CPM.cmake)
include(cmake/CompilerWarnings.cmake)
include(cmake/Cache.cmake)
include(cmake/StandardOptions.cmake)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
function(ApplyCommonCompilerOptions target)
set_property(TARGET ${target} PROPERTY CXX_STANDARD 23)
endfunction()
function(CopyRuntimeTargets target)
if (WIN32)
add_custom_command(
TARGET "${target}" POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy -t "$<TARGET_FILE_DIR:${target}>"
"$<TARGET_RUNTIME_DLLS:${target}>" USES_TERMINAL COMMAND_EXPAND_LISTS
)
endif ()
endfunction()
function(GroupSourcesByFolder target)
get_target_property(sources ${target} SOURCES)
source_group(TREE "${CMAKE_SOURCE_DIR}/${ARGN}" FILES ${sources})
endfunction()
TryEnableCache()
add_subdirectory(Fussion/Vendor)
add_subdirectory(Vendor)
add_subdirectory(HeaderTool)
add_subdirectory(Fussion)
add_subdirectory(Editor)
if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/Sandbox")
add_subdirectory(Sandbox)
endif ()