-
Notifications
You must be signed in to change notification settings - Fork 102
/
Copy pathCMakeLists.txt
36 lines (28 loc) · 1.11 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
cmake_minimum_required(VERSION 3.5)
project (Deserialize)
include(GLTFPlatform)
GetGLTFPlatform(Platform)
file(GLOB source_files
"${CMAKE_CURRENT_LIST_DIR}/Source/main.cpp"
)
add_executable(Deserialize ${source_files})
if (MSVC)
# Generate PDB files in all configurations, not just Debug (/Zi)
# Set warning level to 4 (/W4)
target_compile_options(Deserialize PRIVATE "/Zi;/W4;/EHsc")
# Make sure that all PDB files on Windows are installed to the output folder. By default, only the debug build does this.
set_target_properties(Deserialize PROPERTIES COMPILE_PDB_NAME "Deserialize" COMPILE_PDB_OUTPUT_DIRECTORY "${RUNTIME_OUTPUT_DIRECTORY}")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(Deserialize
PRIVATE "-Wunguarded-availability"
PRIVATE "-Wall"
PRIVATE "-Werror"
PUBLIC "-Wno-unknown-pragmas")
endif()
target_link_libraries(Deserialize
GLTFSDK
)
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.1)
target_link_libraries(Deserialize stdc++fs)
endif()
CreateGLTFInstallTargets(Deserialize ${Platform})