-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dependency.cmake
142 lines (97 loc) · 3.88 KB
/
Dependency.cmake
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# ------ Set for ExternalProject ---------------- #
MESSAGE( STATUS "Setting for ExternalProject")
INCLUDE( ExternalProject )
MESSAGE( STATUS "Setting Done")
# ----------------------------------------------- #
# ------ Set Variables for Dependency ----------- #
MESSAGE( STATUS "Setting Variables for Dependency")
SET( MAIN_DIR ${CMAKE_SOURCE_DIR} )
SET( SRC_DIR ${MAIN_DIR}/src )
SET( THIRD_PARTY_DIR ${MAIN_DIR}/third-party )
SET( SRCS )
SET( INCS )
SET( DEP )
SET( DEP_INCLUDE_DIR )
SET( DEP_LIB_DIR )
SET( DEP_LIBS )
MESSAGE( STATUS "Setting Done")
# ----------------------------------------------- #
#### Window SDK ---------------------------------- #
MESSAGE( STATUS "Window - Linking : WINDOW SDK")
SET( WINDOWSDK_INCLUDE_DIR
"C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\shared"
"C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\um"
"C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\winrt
")
SET( WINDOWSDK_LIB_DIR
"C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\um"
)
SET( WINDOWSDK_LIBS winMM.lib Pdh.lib)
LIST( APPEND DEP_INCLUDE_DIR ${WINDOWSDK_INCLUDE_DIR} )
LIST( APPEND DEP_LIB_DIR ${WINDOWSDK_LIB_DIR} )
LIST( APPEND DEP_LIBS ${WINDOWSDK_LIBS} )
MESSAGE( STATUS "WindowSDK - Done")
#### Window SDK ---------------------------------- #
#### DIRECTX11 ---------------------------------- #
MESSAGE( STATUS "Directx11 - Linking : DIRECTX SDK")
SET( D11_INCLUDE_DIR
"C:\\Program Files (x86)\\Microsoft DirectX SDK (June 2010)\\Include"
)
SET( D11_LIB_DIR
"C:\\Program Files (x86)\\Microsoft DirectX SDK (June 2010)\\Lib\\x64"
)
SET( D11_LIBS d3d11.lib d3dx11.lib d3dx10.lib dxgi.lib dxguid.lib d3dcompiler.lib dinput8.lib )
LIST( APPEND DEP_INCLUDE_DIR ${D11_INCLUDE_DIR} )
LIST( APPEND DEP_LIB_DIR ${D11_LIB_DIR} )
LIST( APPEND DEP_LIBS ${D11_LIBS} )
MESSAGE( STATUS "Directx11 - Done")
#### DIRECTX11 ---------------------------------- #
#### YAML-CPP ----------------------------------- #
MESSAGE( STATUS "yaml-cpp - Linking ... ")
SET( YAML_DIR ${THIRD_PARTY_DIR}/yaml-cpp )
EXTERNALPROJECT_ADD(
yaml-cpp-project
GIT_REPOSITORY GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git
GIT_TAG "yaml-cpp-0.7.0"
PREFIX ${CMAKE_BINARY_DIR}/yaml-cpp
INSTALL_DIR ${CMAKE_BINARY_DIR}/yaml-cpp
SOURCE_DIR ${CMAKE_SOURCE_DIR}/third-party/yaml-cpp
BINARY_DIR ${CMAKE_BINARY_DIR}/yaml-cpp/build
UPDATE_COMMAND "" PATCH_COMMAND "" TEST_COMMAND "" INSTALL_COMMAND ""
CMAKE_ARGS -DYAML_CPP_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}
)
ADD_LIBRARY( yaml-cpp STATIC IMPORTED )
SET_TARGET_PROPERTIES(yaml-cpp PROPERTIES IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/yaml-cpp/build/Debug/yaml-cppd.lib
)
LIST( APPEND DEP yaml-cpp-project )
LIST( APPEND DEP_INCLUDE_DIR ${YAML_DIR}/include )
LIST( APPEND DEP_LIBS yaml-cpp )
MESSAGE( STATUS "yaml-cpp - Done")
#### YAML-CPP ----------------------------------- #
#### UUID --------------------------------------- #
MESSAGE( STATUS "RPCRT4-UUID - Linking ... ")
SET( UUID_LIBS Rpcrt4.lib )
LIST( APPEND DEP_LIBS ${UUID_LIBS} )
MESSAGE( STATUS "RPCRT4-UUID - Done")
#### UUID --------------------------------------- #
#### IMGUI -------------------------------------- #
MESSAGE( STATUS "IMGUI - Linking ... ")
SET( IMGUI_DIR ${CMAKE_SOURCE_DIR}/third-party/imgui )
SET( IMGUIS
${IMGUI_DIR}/imconfig.h
${IMGUI_DIR}/imgui.h ${IMGUI_DIR}/imgui.cpp
${IMGUI_DIR}/imgui_demo.cpp
${IMGUI_DIR}/imgui_draw.cpp
${IMGUI_DIR}/imgui_impl_dx11.h ${IMGUI_DIR}/imgui_impl_dx11.cpp
${IMGUI_DIR}/imgui_impl_win32.h ${IMGUI_DIR}/imgui_impl_win32.cpp
${IMGUI_DIR}/imgui_internal.h
${IMGUI_DIR}/imgui_tables.cpp
${IMGUI_DIR}/imgui_widgets.cpp
${IMGUI_DIR}/imstb_rectpack.h
${IMGUI_DIR}/imstb_textedit.h
${IMGUI_DIR}/imstb_truetype.h
)
LIST( APPEND SRCS ${IMGUIS} )
LIST( APPEND INCS ${IMGUI_DIR} )
MESSAGE( STATUS "IMGUI - Done ")
#### IMGUI -------------------------------------- #