forked from DaOnlyOwner/hym
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
53 lines (37 loc) · 1.48 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
cmake_minimum_required(VERSION 3.8)
macro(setupAndLink target)
target_compile_features(${target} PUBLIC cxx_std_20)
set_target_properties(${target} PROPERTIES CXX_STANDARD_REQUIRED ON)
target_compile_options(${target} PRIVATE -DUNICODE -DENGINE_DLL -DRES=\"${CMAKE_SOURCE_DIR}/resources\" -DSHADER_RES=\"${CMAKE_SOURCE_DIR}/resources/shaders\")
target_include_directories(${target} PRIVATE lib/DiligentCore engine/include lib/entt/single_include lib/DiligentTools/TextureLoader/interface lib/DiligentTools/Imgui/interface
lib/DiligentTools/ThirdParty/imgui/backends)
target_link_libraries(${target} PRIVATE glfw)
target_link_libraries(${target}
PRIVATE
Diligent-GraphicsEngineD3D12-shared
Diligent-GraphicsEngineVk-shared
Diligent-Common
Diligent-GraphicsTools
Diligent-TextureLoader
Diligent-Imgui
fmt
glm
assimp::assimp
)
copy_required_dlls(${target})
endmacro()
project(Hym)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT HymTest)
file(GLOB_RECURSE SRC engine/src/*.cpp)
file(GLOB_RECURSE INC engine/include/*.h)
add_subdirectory(lib/DiligentCore)
option(GLFW_BUILD_EXAMPLES "" OFF)
option(GLFW_INSTALL "" OFF)
option(GLFW_BUILD_TESTS "" OFF)
add_subdirectory(lib/glfw)
add_subdirectory(lib/fmt)
add_subdirectory(lib/glm)
add_subdirectory(lib/assimp)
add_subdirectory(lib/DiligentTools)
add_executable(HymTest engine/test/test.cpp ${SRC} ${INC} lib/DiligentTools/ThirdParty/imgui/backends/imgui_impl_glfw.cpp)
setupAndLink(HymTest)