-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
89 lines (71 loc) · 2.91 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
cmake_minimum_required(VERSION 3.5)
project(ClapWorkspace)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# specify the C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
# architecture
if ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
set(ARCH_DIR "x64")
else()
set(ARCH_DIR "x86")
endif()
set(SDL_SENSORS OFF CACHE BOOL "Enabling SDL Sensors")
set(ENABLE_BZIP2 OFF CACHE BOOL "Enable use of BZip2")
set(ENABLE_LZMA OFF CACHE BOOL "Enable use of LZMA")
set(ENABLE_ZSTD OFF CACHE BOOL "Enable use of Zstandard")
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libraries")
set(ASSIMP_BUILD_STATIC_LIB ON)
set(BUILD_SHARED_LIBS OFF)
set(ASSIMP_BUILD_ASSIMP_TOOLS OFF)
set(ASSIMP_BUILD_TESTS OFF)
set(ASSIMP_BUILD_SAMPLES OFF)
set(ASSIMP_NO_BOOST_WORKAROUND ON CACHE BOOL "Disable Boost workarounds")
set(ASSIMP_BUILD_BOOST_WORKAROUND OFF CACHE BOOL "Do not build Boost workarounds")
add_compile_definitions(_CRT_SCURE_NO_WARNINGS)
add_compile_definitions(CLAP_USE_SDL3)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/SDL)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/Glad)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/imgui)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/zip)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/assimp)
#Folder Structure
set_target_properties (Glad PROPERTIES
FOLDER Dependencies
)
set_target_properties (assimp PROPERTIES
FOLDER Dependencies
)
set_target_properties (SDL3-static PROPERTIES
FOLDER Dependencies
)
set_target_properties (uninstall PROPERTIES
FOLDER Dependencies
)
set_target_properties (ImGui PROPERTIES
FOLDER Dependencies
)
set_target_properties (zip PROPERTIES
FOLDER Dependencies
)
set(CLAP_INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/SDL/include
${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/miniaudio
${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/Glad/include
${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/imgui
${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/glm
${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/assimp/include
${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/assimp/build/include
${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/stb/include
${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/json
${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/utf8
${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/zip/src)
set(CLAP_LINK_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/SDL
${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/Glad
${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/assimp
${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/imgui
${CMAKE_CURRENT_SOURCE_DIR}/Clap/thirdparty/zip)
set(CLAP_WORKSPACE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(CLAP_LINK_LIBS SDL3::SDL3 ImGui Glad zip assimp zlibstatic)
add_subdirectory(Clap)