-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
74 lines (61 loc) · 2.61 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
cmake_minimum_required(VERSION 3.22.0)
project(TemplateProject CXX C)
set(EXTERN_LIB_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external)
set(CMAKE_CXX_STANDARD 20) # this does nothing for MSVC, use target_compile_options below
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)
# Definitions
if(WIN32)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-DWIN32_LEAN_AND_MEAN)
add_definitions(-DNOMINMAX)
endif()
option(USE_DEBUG "Enter debug mode" OFF)
if (USE_DEBUG)
add_definitions(-DDEBUG)
endif()
###### Find OpenGL
# find_package(OpenGL REQUIRED)
###### GLFW Stuff
# set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "")
# set(GLFW_BUILD_TESTS OFF CACHE BOOL "")
# set(GLFW_BUILD_DOCS OFF CACHE BOOL "")
# set(GLFW_INSTALL OFF CACHE BOOL "")
# add_subdirectory(external/glfw)
###### Assimp Stuff
# set(ASSIMP_NO_EXPORT ON CACHE BOOL "")
# set(ASSIMP_BUILD_DRACO OFF CACHE BOOL "")
# set(ASSIMP_BUILD_ASSIMP_TOOLS OFF CACHE BOOL "")
# set(ASSIMP_BUILD_TESTS OFF CACHE BOOL "")
# set(ASSIMP_INSTALL_PDB OFF CACHE BOOL "")
# set(ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT OFF CACHE BOOL "")
# set(ASSIMP_BUILD_OBJ_IMPORTER ON CACHE BOOL "")
# set(ASSIMP_BUILD_GLTF_IMPORTER ON CACHE BOOL "")
# if(WIN32)
# set(ASSIMP_BUILD_ZLIB ON CACHE BOOL "")
# endif()
# add_subdirectory(external/assimp)
# if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
# set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-ignored-attributes -Wno-defaulted-function-deleted -Wno-braced-scalar-init -Wno-writable-strings -Wno-format -Wno-deprecated-declarations -Wno-macro-redefined")
# endif ()
###### GLAD Stuff
# set(GLAD_SOURCES external/glad/src/glad.c)
# add_library(glad ${GLAD_SOURCES})
###### Include Directories ...
# include_directories(external/glfw/include)
# include_directories(external/glm)
# include_directories(external/glad/include)
# include_directories(external/stb)
# include_directories(external/assimp/include)
# include_directories($<TARGET_FILE_DIR:assimp>/../include) # there is one config.h file which gets build in assimp's build directory by cmake.
# include_directories(external/imgui)
include_directories(common)
# if(WIN32)
# set_property(TARGET zlibstatic PROPERTY FOLDER "ThirdPartyLibraries")
# endif()
# set_property(TARGET glfw PROPERTY FOLDER "ThirdPartyLibraries")
# set_property(TARGET glad PROPERTY FOLDER "ThirdPartyLibraries")
# set_property(TARGET assimp PROPERTY FOLDER "ThirdPartyLibraries")
# Include Common SharedUtils
add_subdirectory(common)
add_subdirectory(src)