-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
40 lines (29 loc) · 1.27 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
CMAKE_MINIMUM_REQUIRED(VERSION 3.10)
PROJECT(ATMOSPHERER-RENDERER)
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
SET(AGZ_ENABLE_D3D11 ON)
ADD_SUBDIRECTORY(ext/agz-utils)
TARGET_COMPILE_DEFINITIONS(AGZUtils PUBLIC AGZ_UTILS_SSE _UNICODE)
SET_TARGET_PROPERTIES(AGZUtils PROPERTIES FOLDER "ThirdParty")
SET(PROJECT_ASSET_DIR "${CMAKE_SOURCE_DIR}/asset/")
FILE(GLOB_RECURSE CPP_SRC
"${PROJECT_SOURCE_DIR}/src/*.h"
"${PROJECT_SOURCE_DIR}/src/*.cpp")
FILE(GLOB_RECURSE HLSL_SRC
"${PROJECT_ASSET_DIR}/*.hlsl")
SET(TargetName AtmosphereRenderer)
ADD_EXECUTABLE(${TargetName} ${CPP_SRC} ${HLSL_SRC})
SOURCE_GROUP("Sources" FILES ${CPP_SRC})
SOURCE_GROUP("Shaders" FILES ${HLSL_SRC})
SET_PROPERTY(SOURCE ${HLSL_SRC} PROPERTY VS_SETTINGS "ExcludedFromBuild=true")
SET_PROPERTY(TARGET ${TargetName} PROPERTY CXX_STANDARD 20)
SET_PROPERTY(TARGET ${TargetName} PROPERTY CXX_STANDARD_REQUIRED ON)
IF(MSVC)
SET_PROPERTY(
TARGET ${TargetName}
PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/")
ENDIF()
TARGET_INCLUDE_DIRECTORIES(${TargetName} PUBLIC "${CMAKE_SOURCE_DIR}/ext/cy")
TARGET_LINK_LIBRARIES(${TargetName} PUBLIC AGZUtils)