-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
56 lines (44 loc) · 1.46 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
# CMakeList.txt : CMake project for ShaderReflection, include source and define
# project specific logic here.
#
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
cmake_policy(SET CMP0054 NEW)
project ("ShaderReflection")
# Detect Linux
if(UNIX AND NOT APPLE)
set(LINUX TRUE)
endif()
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
if (GGP)
message("GGP platform")
elseif (LINUX)
message("LINUX platform")
elseif (WIN32)
message("WIN32 platform")
endif()
# ------------------------------------------------------------------------------
# Configure C++ flags
# ------------------------------------------------------------------------------
if(MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /Zc:__cplusplus /std:c++17")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
endif()
set(CMAKE_CXX_STANDARD 17)
set(ROOT_DIR ${CMAKE_SOURCE_DIR})
set(THIRD_PARTY_DIR ${ROOT_DIR}/third_party)
set(SHADER_PARTY_DIR ${ROOT_DIR}/shaders)
set(LIBPORTO_DISABLE_SAMPLES ON)
add_subdirectory(${THIRD_PARTY_DIR}/libporto)
set(ENABLE_DXVK OFF CACHE BOOL "" FORCE)
set(ENABLE_DXIIVK OFF CACHE BOOL "" FORCE)
target_compile_definitions(
porto
PUBLIC LIBPORTO_EXPERIMENTAL_ENABLE_SPIRV_SHADERS
)
target_compile_definitions(
porto_d3dcompiler
PUBLIC LIBPORTO_EXPERIMENTAL_ENABLE_SHADER_REFLECTION
)
add_subdirectory(projects)