git.s-ol.nu forks/DiligentCore / 7231125
Added 'Diligent-' prefix to project names to avoid name conflicts (https://github.com/DiligentGraphics/DiligentEngine/issues/20) Egor Yusov 3 years ago
27 changed file(s) with 413 addition(s) and 409 deletion(s). Raw diff Collapse all Expand all
11
22 function(copy_required_dlls TARGET_NAME)
33 if(D3D11_SUPPORTED)
4 list(APPEND ENGINE_DLLS GraphicsEngineD3D11-shared)
4 list(APPEND ENGINE_DLLS Diligent-GraphicsEngineD3D11-shared)
55 endif()
66 if(D3D12_SUPPORTED)
7 list(APPEND ENGINE_DLLS GraphicsEngineD3D12-shared)
7 list(APPEND ENGINE_DLLS Diligent-GraphicsEngineD3D12-shared)
88 endif()
99 if(GL_SUPPORTED)
10 list(APPEND ENGINE_DLLS GraphicsEngineOpenGL-shared)
10 list(APPEND ENGINE_DLLS Diligent-GraphicsEngineOpenGL-shared)
1111 endif()
1212 if(VULKAN_SUPPORTED)
13 list(APPEND ENGINE_DLLS GraphicsEngineVk-shared)
13 list(APPEND ENGINE_DLLS Diligent-GraphicsEngineVk-shared)
14 endif()
15 if(METAL_SUPPORTED)
16 list(APPEND ENGINE_DLLS Diligent-GraphicsEngineMetal-shared)
1417 endif()
1518
1619 foreach(DLL ${ENGINE_DLLS})
175178 endif()
176179
177180 if(D3D11_SUPPORTED)
178 list(APPEND BACKENDS GraphicsEngineD3D11-${LIB_TYPE})
181 list(APPEND BACKENDS Diligent-GraphicsEngineD3D11-${LIB_TYPE})
179182 endif()
180183 if(D3D12_SUPPORTED)
181 list(APPEND BACKENDS GraphicsEngineD3D12-${LIB_TYPE})
184 list(APPEND BACKENDS Diligent-GraphicsEngineD3D12-${LIB_TYPE})
182185 endif()
183186 if(GL_SUPPORTED OR GLES_SUPPORTED)
184 list(APPEND BACKENDS GraphicsEngineOpenGL-${LIB_TYPE})
187 list(APPEND BACKENDS Diligent-GraphicsEngineOpenGL-${LIB_TYPE})
185188 endif()
186189 if(VULKAN_SUPPORTED)
187 list(APPEND BACKENDS GraphicsEngineVk-${LIB_TYPE})
190 list(APPEND BACKENDS Diligent-GraphicsEngineVk-${LIB_TYPE})
188191 endif()
189192 if(METAL_SUPPORTED)
190 list(APPEND BACKENDS GraphicsEngineMetal-${LIB_TYPE})
193 list(APPEND BACKENDS Diligent-GraphicsEngineMetal-${LIB_TYPE})
191194 endif()
192195 # ${_TARGETS} == ENGINE_LIBRARIES
193196 # ${${_TARGETS}} == ${ENGINE_LIBRARIES}
198201 # Returns path to the library relative to the DiligentCore root
199202 function(get_core_library_relative_dir _TARGET _DIR)
200203 # Use the directory of Primitives (the first target processed) as reference
201 get_target_property(PRIMITIVES_SOURCE_DIR Primitives SOURCE_DIR)
204 get_target_property(PRIMITIVES_SOURCE_DIR Diligent-Primitives SOURCE_DIR)
202205 get_target_property(TARGET_SOURCE_DIR ${_TARGET} SOURCE_DIR)
203206 file(RELATIVE_PATH TARGET_RELATIVE_PATH "${PRIMITIVES_SOURCE_DIR}/.." "${TARGET_SOURCE_DIR}")
204207 set(${_DIR} ${TARGET_RELATIVE_PATH} PARENT_SCOPE)
6565 endif()
6666 endif(WIN32)
6767
68 add_library(BuildSettings INTERFACE)
68 add_library(Diligent-BuildSettings INTERFACE)
6969
7070 if(PLATFORM_WIN32)
7171 if(MSVC)
8484 if(${ARCH} EQUAL 64)
8585 set(VULKAN_SUPPORTED TRUE CACHE INTERNAL "Vulkan is supported on Win64 platform")
8686 endif()
87 target_compile_definitions(BuildSettings INTERFACE PLATFORM_WIN32=1)
87 target_compile_definitions(Diligent-BuildSettings INTERFACE PLATFORM_WIN32=1)
8888 elseif(PLATFORM_UNIVERSAL_WINDOWS)
8989 set(D3D11_SUPPORTED TRUE CACHE INTERNAL "D3D11 is supported on Univeral Windows platform")
9090 if(NOT CMAKE_SYSTEM_VERSION STREQUAL "8.1")
9191 set(D3D12_SUPPORTED TRUE CACHE INTERNAL "D3D12 is supported on Univeral Windows platform")
9292 endif()
93 target_compile_definitions(BuildSettings INTERFACE PLATFORM_UNIVERSAL_WINDOWS=1)
93 target_compile_definitions(Diligent-BuildSettings INTERFACE PLATFORM_UNIVERSAL_WINDOWS=1)
9494 elseif(PLATFORM_ANDROID)
9595 set(GLES_SUPPORTED TRUE CACHE INTERNAL "OpenGLES is supported on Android platform")
9696 string(REGEX MATCH [0-9]+ ANDROID_API_LEVEL ${ANDROID_PLATFORM})
9797 if(${ARCH} EQUAL 64 AND ${ANDROID_API_LEVEL} GREATER 23)
9898 set(VULKAN_SUPPORTED TRUE CACHE INTERNAL "Vulkan is supported on Android platform")
9999 endif()
100 target_compile_definitions(BuildSettings INTERFACE PLATFORM_ANDROID=1)
100 target_compile_definitions(Diligent-BuildSettings INTERFACE PLATFORM_ANDROID=1)
101101 elseif(PLATFORM_LINUX)
102102 set(GL_SUPPORTED TRUE CACHE INTERNAL "OpenGL is supported on Linux platform")
103103 if(${ARCH} EQUAL 64)
104104 set(VULKAN_SUPPORTED TRUE CACHE INTERNAL "Vulkan is supported on Linux64 platform")
105105 endif()
106 target_compile_definitions(BuildSettings INTERFACE PLATFORM_LINUX=1)
106 target_compile_definitions(Diligent-BuildSettings INTERFACE PLATFORM_LINUX=1)
107107 elseif(PLATFORM_MACOS)
108108 set(GL_SUPPORTED TRUE CACHE INTERNAL "OpenGL is supported on MacOS platform")
109109 set(METAL_SUPPORTED TRUE CACHE INTERNAL "Metal is supported on MacOS platform")
110110 set(VULKAN_SUPPORTED TRUE CACHE INTERNAL "Vulkan is enabled through MoltenVK on MacOS platform")
111 target_compile_definitions(BuildSettings INTERFACE PLATFORM_MACOS=1)
111 target_compile_definitions(Diligent-BuildSettings INTERFACE PLATFORM_MACOS=1)
112112 elseif(PLATFORM_IOS)
113113 set(GLES_SUPPORTED TRUE CACHE INTERNAL "OpenGLES is supported on iOS platform")
114114 set(METAL_SUPPORTED TRUE CACHE INTERNAL "Metal is supported on iOS platform")
126126 else()
127127 message("VULKAN_SDK is undefined. Vulkan backend will be disabled.")
128128 endif()
129 target_compile_definitions(BuildSettings INTERFACE PLATFORM_IOS=1)
129 target_compile_definitions(Diligent-BuildSettings INTERFACE PLATFORM_IOS=1)
130130 else()
131131 message(FATAL_ERROR "No PLATFORM_XXX variable defined. Make sure that 'DiligentCore' folder is processed first")
132132 endif()
166166 message("VULKAN_SUPPORTED: " ${VULKAN_SUPPORTED})
167167 message("METAL_SUPPORTED: " ${METAL_SUPPORTED})
168168
169 target_compile_definitions(BuildSettings
169 target_compile_definitions(Diligent-BuildSettings
170170 INTERFACE
171171 D3D11_SUPPORTED=$<BOOL:${D3D11_SUPPORTED}>
172172 D3D12_SUPPORTED=$<BOOL:${D3D12_SUPPORTED}>
181181 # For msvc, enable level 4 warnings except for
182182 # - w4100 - unreferenced formal parameter
183183 # - w4505 - unreferenced local function has been removed
184 target_compile_options(BuildSettings INTERFACE /W4 /wd4100 /wd4505)
184 target_compile_options(Diligent-BuildSettings INTERFACE /W4 /wd4100 /wd4505)
185185 # In all release modes also:
186186 # - disable w4189 - local variable is initialized but not referenced
187187 # - Enable AVX2 instruction set (/arch:AVX2)
189189 # - Enable whole program optimization (/GL)
190190 # - Enable string pooling (/GF)
191191 set(MSVC_ALL_RELEASE_COMPILE_OPTIONS /arch:AVX2 /wd4189 /GR- /GL /GF)
192 #target_compile_options(BuildSettings INTERFACE "$<$<CONFIG:RELEASE>:/arch:AVX2 /wd4189 /Ot")
192 #target_compile_options(Diligent-BuildSettings INTERFACE "$<$<CONFIG:RELEASE>:/arch:AVX2 /wd4189 /Ot")
193193 # In RELEASE mode:
194194 # - Set favor fast code option (/Ot)
195195 # - Enable intrinsic functions (/Oi)
198198 # In MINSIZEREL mode set favor small code option (/Os)
199199 set(MSVC_MINSIZEREL_COMPILE_OPTIONS ${MSVC_ALL_RELEASE_COMPILE_OPTIONS} /Os)
200200 set(MSVC_RELWITHDEBINFO_COMPILE_OPTIONS ${MSVC_ALL_RELEASE_COMPILE_OPTIONS} /Ot /Oi /Ob2 /Ox)
201 target_compile_options(BuildSettings INTERFACE "$<$<CONFIG:RELEASE>:${MSVC_RELEASE_COMPILE_OPTIONS}>")
202 target_compile_options(BuildSettings INTERFACE "$<$<CONFIG:MINSIZEREL>:${MSVC_MINSIZEREL_COMPILE_OPTIONS}>")
203 target_compile_options(BuildSettings INTERFACE "$<$<CONFIG:RELWITHDEBINFO>:${MSVC_RELWITHDEBINFO_COMPILE_OPTIONS}>")
201 target_compile_options(Diligent-BuildSettings INTERFACE "$<$<CONFIG:RELEASE>:${MSVC_RELEASE_COMPILE_OPTIONS}>")
202 target_compile_options(Diligent-BuildSettings INTERFACE "$<$<CONFIG:MINSIZEREL>:${MSVC_MINSIZEREL_COMPILE_OPTIONS}>")
203 target_compile_options(Diligent-BuildSettings INTERFACE "$<$<CONFIG:RELWITHDEBINFO>:${MSVC_RELWITHDEBINFO_COMPILE_OPTIONS}>")
204204 # !!!NOTE!!! For some reason above is the only form of generator expression that works
205205 # For instance, this way
206 # target_compile_options(BuildSettings INTERFACE "$<$<CONFIG:RELEASE>:/Ot>")
206 # target_compile_options(Diligent-BuildSettings INTERFACE "$<$<CONFIG:RELEASE>:/Ot>")
207207 # does not work as expected
208208
209209 set(DEBUG_MACROS DEVELOPMENT)
210 target_compile_definitions(BuildSettings INTERFACE "$<$<CONFIG:DEBUG>:${DEBUG_MACROS}>")
210 target_compile_definitions(Diligent-BuildSettings INTERFACE "$<$<CONFIG:DEBUG>:${DEBUG_MACROS}>")
211211 else()
212212
213213 set(DEBUG_MACROS _DEBUG DEBUG DEVELOPMENT)
214214 set(RELEASE_MACROS NDEBUG)
215215
216216 foreach(DBG_CONFIG ${DEBUG_CONFIGURATIONS})
217 target_compile_definitions(BuildSettings INTERFACE "$<$<CONFIG:${DBG_CONFIG}>:${DEBUG_MACROS}>")
217 target_compile_definitions(Diligent-BuildSettings INTERFACE "$<$<CONFIG:${DBG_CONFIG}>:${DEBUG_MACROS}>")
218218 endforeach()
219219
220220 foreach(REL_CONFIG ${RELEASE_CONFIGURATIONS})
221 target_compile_definitions(BuildSettings INTERFACE "$<$<CONFIG:${REL_CONFIG}>:${RELEASE_MACROS}>")
221 target_compile_definitions(Diligent-BuildSettings INTERFACE "$<$<CONFIG:${REL_CONFIG}>:${RELEASE_MACROS}>")
222222 endforeach()
223223
224224 endif(MSVC)
350350 DESTINATION "${DILIGENT_CORE_INSTALL_DIR}/lib/"
351351 )
352352 set_target_properties(DiligentCore-static PROPERTIES
353 FOLDER Core
353 FOLDER DiligentCore
354354 )
355355 else()
356356 message("Unable to find librarian tool. Combined DiligentCore static library will not be produced.")
00 cmake_minimum_required (VERSION 3.6)
11
2 project(Common CXX)
2 project(Diligent-Common CXX)
33
44 set(INCLUDE
55 include/pch.h
4040 src/Timer.cpp
4141 )
4242
43 add_library(Common STATIC ${SOURCE} ${INCLUDE} ${INTERFACE})
43 add_library(Diligent-Common STATIC ${SOURCE} ${INCLUDE} ${INTERFACE})
4444
45 target_include_directories(Common
45 target_include_directories(Diligent-Common
4646 PRIVATE
4747 include
4848 PUBLIC
4949 interface
5050 )
5151
52 target_link_libraries(Common
52 target_link_libraries(Diligent-Common
5353 PUBLIC
54 BuildSettings
55 TargetPlatform
54 Diligent-BuildSettings
55 Diligent-TargetPlatform
5656 )
57 set_common_target_properties(Common)
57 set_common_target_properties(Diligent-Common)
5858
5959 source_group("src" FILES ${SOURCE})
6060 source_group("include" FILES ${INCLUDE})
6161 source_group("interface" FILES ${INTERFACE})
6262
63 set_target_properties(Common PROPERTIES
64 FOLDER Core
63 set_target_properties(Diligent-Common PROPERTIES
64 FOLDER DiligentCore
6565 )
6666
6767 if(INSTALL_DILIGENT_CORE)
68 install_core_lib(Common)
68 install_core_lib(Diligent-Common)
6969 endif()
2424 include
2525 )
2626
27 target_link_libraries(glew-static PRIVATE BuildSettings)
27 target_link_libraries(glew-static PRIVATE Diligent-BuildSettings)
2828
2929 if(MSVC)
3030 target_compile_options(glew-static PRIVATE /wd4456)
3434 source_group("include" FILES ${INCLUDE})
3535
3636 set_target_properties(glew-static PROPERTIES
37 FOLDER Core/External
37 FOLDER DiligentCore/External
3838 )
22 set(DLL_REL_SUFFIX _${ARCH}r)
33 set(DLL_DBG_SUFFIX _${ARCH}d)
44
5 add_library(GraphicsEngineInterface INTERFACE)
6 target_include_directories(GraphicsEngineInterface
5 add_library(Diligent-GraphicsEngineInterface INTERFACE)
6 target_include_directories(Diligent-GraphicsEngineInterface
77 INTERFACE
88 GraphicsEngine/interface
99 )
10 target_link_libraries(GraphicsEngineInterface
10 target_link_libraries(Diligent-GraphicsEngineInterface
1111 INTERFACE
12 Primitives
12 Diligent-Primitives
1313 )
1414
1515 add_subdirectory(GraphicsAccessories)
00 cmake_minimum_required (VERSION 3.6)
11
2 project(GLSLTools CXX)
2 project(Diligent-GLSLTools CXX)
33
44 set(INCLUDE
55 include/GLSLSourceBuilder.h
2727 endif()
2828 endif()
2929
30 add_library(GLSLTools STATIC ${SOURCE} ${INCLUDE})
30 add_library(Diligent-GLSLTools STATIC ${SOURCE} ${INCLUDE})
3131
32 target_include_directories(GLSLTools
32 target_include_directories(Diligent-GLSLTools
3333 PUBLIC
3434 include
3535 PRIVATE
3737 ../GraphicsEngine/include
3838 )
3939
40 target_link_libraries(GLSLTools
40 target_link_libraries(Diligent-GLSLTools
4141 PRIVATE
42 BuildSettings
43 GraphicsAccessories
44 Common
42 Diligent-BuildSettings
43 Diligent-GraphicsAccessories
44 Diligent-Common
4545 PUBLIC
46 HLSL2GLSLConverterLib
47 GraphicsEngineInterface
46 Diligent-HLSL2GLSLConverterLib
47 Diligent-GraphicsEngineInterface
4848 )
4949
5050 if(VULKAN_SUPPORTED)
51 target_link_libraries(GLSLTools
51 target_link_libraries(Diligent-GLSLTools
5252 PRIVATE
5353 spirv-cross-core
5454 )
5555
5656 if (NOT ${DILIGENT_NO_GLSLANG})
57 target_link_libraries(GLSLTools
57 target_link_libraries(Diligent-GLSLTools
5858 PRIVATE
5959 glslang
6060 SPIRV
6161 )
6262
63 target_include_directories(GLSLTools
63 target_include_directories(Diligent-GLSLTools
6464 PRIVATE
6565 ../../External/glslang
6666 )
6767 endif()
6868 endif()
6969
70 set_common_target_properties(GLSLTools)
70 set_common_target_properties(Diligent-GLSLTools)
7171
7272 source_group("src" FILES ${SOURCE})
7373 source_group("include" FILES ${INCLUDE})
7474 source_group("interface" FILES ${INTERFACE})
7575
76 set_target_properties(GLSLTools PROPERTIES
77 FOLDER Core/Graphics
76 set_target_properties(Diligent-GLSLTools PROPERTIES
77 FOLDER DiligentCore/Graphics
7878 )
7979
8080 if(INSTALL_DILIGENT_CORE)
81 install_core_lib(GLSLTools)
81 install_core_lib(Diligent-GLSLTools)
8282 endif()
00 cmake_minimum_required (VERSION 3.6)
11
2 project(GraphicsAccessories CXX)
2 project(Diligent-GraphicsAccessories CXX)
33
44 set(INTERFACE
55 interface/ColorConversion.h
1717 src/GraphicsAccessories.cpp
1818 )
1919
20 add_library(GraphicsAccessories STATIC ${SOURCE} ${INTERFACE})
20 add_library(Diligent-GraphicsAccessories STATIC ${SOURCE} ${INTERFACE})
2121
22 target_include_directories(GraphicsAccessories
22 target_include_directories(Diligent-GraphicsAccessories
2323 PUBLIC
2424 interface
2525 )
2626
27 target_link_libraries(GraphicsAccessories
27 target_link_libraries(Diligent-GraphicsAccessories
2828 PUBLIC
29 BuildSettings
30 Common
31 GraphicsEngineInterface
29 Diligent-BuildSettings
30 Diligent-Common
31 Diligent-GraphicsEngineInterface
3232 )
3333
34 set_common_target_properties(GraphicsAccessories)
34 set_common_target_properties(Diligent-GraphicsAccessories)
3535
3636 source_group("src" FILES ${SOURCE})
3737 source_group("interface" FILES ${INTERFACE})
3838
39 set_target_properties(GraphicsAccessories PROPERTIES
40 FOLDER Core/Graphics
39 set_target_properties(Diligent-GraphicsAccessories PROPERTIES
40 FOLDER DiligentCore/Graphics
4141 )
4242
4343 if(INSTALL_DILIGENT_CORE)
44 install_core_lib(GraphicsAccessories)
44 install_core_lib(Diligent-GraphicsAccessories)
4545 endif()
00 cmake_minimum_required (VERSION 3.6)
11
2 project(GraphicsEngine CXX)
2 project(Diligent-GraphicsEngine CXX)
33
44 set(INCLUDE
55 include/BufferBase.h
6363 src/Texture.cpp
6464 )
6565
66 add_library(GraphicsEngine STATIC ${SOURCE} ${INTERFACE} ${INCLUDE})
67 set_common_target_properties(GraphicsEngine)
66 add_library(Diligent-GraphicsEngine STATIC ${SOURCE} ${INTERFACE} ${INCLUDE})
67 set_common_target_properties(Diligent-GraphicsEngine)
6868
69 target_include_directories(GraphicsEngine
69 target_include_directories(Diligent-GraphicsEngine
7070 PUBLIC
7171 include
7272 interface
7373 )
7474
75 target_link_libraries(GraphicsEngine
75 target_link_libraries(Diligent-GraphicsEngine
7676 PUBLIC
77 BuildSettings
78 PlatformInterface
79 Common
80 GraphicsAccessories
77 Diligent-BuildSettings
78 Diligent-PlatformInterface
79 Diligent-Common
80 Diligent-GraphicsAccessories
8181 )
8282
8383 source_group("src" FILES ${SOURCE})
8484 source_group("include" FILES ${INCLUDE})
8585 source_group("interface" FILES ${INTERFACE})
8686
87 set_target_properties(GraphicsEngine PROPERTIES
88 FOLDER Core/Graphics
87 set_target_properties(Diligent-GraphicsEngine PROPERTIES
88 FOLDER DiligentCore/Graphics
8989 )
9090
9191 if(INSTALL_DILIGENT_CORE)
92 install_core_lib(GraphicsEngine)
92 install_core_lib(Diligent-GraphicsEngine)
9393 endif()
00 cmake_minimum_required (VERSION 3.10)
11
2 project(GraphicsEngineD3D11 CXX)
2 project(Diligent-GraphicsEngineD3D11 CXX)
33
44
55 set(INCLUDE
7171 src/TextureViewD3D11Impl.cpp
7272 )
7373
74 add_library(GraphicsEngineD3D11Interface INTERFACE)
75 target_include_directories(GraphicsEngineD3D11Interface
74 add_library(Diligent-GraphicsEngineD3D11Interface INTERFACE)
75 target_include_directories(Diligent-GraphicsEngineD3D11Interface
7676 INTERFACE
7777 interface
7878 )
79 target_link_libraries(GraphicsEngineD3D11Interface
79 target_link_libraries(Diligent-GraphicsEngineD3D11Interface
8080 INTERFACE
81 GraphicsEngineD3DBaseInterface
81 Diligent-GraphicsEngineD3DBaseInterface
8282 )
8383
8484
85 add_library(GraphicsEngineD3D11-static STATIC
85 add_library(Diligent-GraphicsEngineD3D11-static STATIC
8686 ${SRC} ${INTERFACE} ${INCLUDE}
8787 readme.md
8888 )
8989
90 add_library(GraphicsEngineD3D11-shared SHARED
90 add_library(Diligent-GraphicsEngineD3D11-shared SHARED
9191 src/DLLMain.cpp
9292 src/GraphicsEngineD3D11.def
9393 readme.md
9494 )
9595
9696 # Set output name to GraphicsEngineD3D11_{32|64}{r|d}
97 set_dll_output_name(GraphicsEngineD3D11-shared GraphicsEngineD3D11)
97 set_dll_output_name(Diligent-GraphicsEngineD3D11-shared GraphicsEngineD3D11)
9898
99 set_common_target_properties(GraphicsEngineD3D11-shared)
100 set_common_target_properties(GraphicsEngineD3D11-static)
99 set_common_target_properties(Diligent-GraphicsEngineD3D11-shared)
100 set_common_target_properties(Diligent-GraphicsEngineD3D11-static)
101101
102 target_include_directories(GraphicsEngineD3D11-static
102 target_include_directories(Diligent-GraphicsEngineD3D11-static
103103 PRIVATE
104104 include
105105 )
106106
107 target_link_libraries(GraphicsEngineD3D11-static
107 target_link_libraries(Diligent-GraphicsEngineD3D11-static
108108 PRIVATE
109 BuildSettings
110 GraphicsEngineD3DBase
111 TargetPlatform
112 Common
109 Diligent-BuildSettings
110 Diligent-GraphicsEngineD3DBase
111 Diligent-TargetPlatform
112 Diligent-Common
113113 dxgi.lib
114114 d3d11.lib
115115 d3dcompiler.lib
116116 PUBLIC
117 GraphicsEngineD3D11Interface
117 Diligent-GraphicsEngineD3D11Interface
118118 )
119119
120 target_link_libraries(GraphicsEngineD3D11-shared
120 target_link_libraries(Diligent-GraphicsEngineD3D11-shared
121121 PRIVATE
122 BuildSettings
123 GraphicsEngineD3D11-static
122 Diligent-BuildSettings
123 Diligent-GraphicsEngineD3D11-static
124124 PUBLIC
125 GraphicsEngineD3D11Interface
125 Diligent-GraphicsEngineD3D11Interface
126126 )
127 target_compile_definitions(GraphicsEngineD3D11-shared PUBLIC ENGINE_DLL=1)
127 target_compile_definitions(Diligent-GraphicsEngineD3D11-shared PUBLIC ENGINE_DLL=1)
128128
129129 source_group("src" FILES ${SRC} )
130130
136136 source_group("include" FILES ${INCLUDE})
137137 source_group("interface" FILES ${INTERFACE})
138138
139 set_target_properties(GraphicsEngineD3D11-static PROPERTIES
140 FOLDER Core/Graphics
139 set_target_properties(Diligent-GraphicsEngineD3D11-static PROPERTIES
140 FOLDER DiligentCore/Graphics
141141 )
142 set_target_properties(GraphicsEngineD3D11-shared PROPERTIES
143 FOLDER Core/Graphics
142 set_target_properties(Diligent-GraphicsEngineD3D11-shared PROPERTIES
143 FOLDER DiligentCore/Graphics
144144 )
145145
146146 set_source_files_properties(
148148 )
149149
150150 if(INSTALL_DILIGENT_CORE)
151 install_core_lib(GraphicsEngineD3D11-shared)
152 install_core_lib(GraphicsEngineD3D11-static)
151 install_core_lib(Diligent-GraphicsEngineD3D11-shared)
152 install_core_lib(Diligent-GraphicsEngineD3D11-static)
153153 endif()
00 cmake_minimum_required (VERSION 3.10)
11
2 project(GraphicsEngineD3D12 CXX)
2 project(Diligent-GraphicsEngineD3D12 CXX)
33
44 set(INCLUDE
55 include/BufferD3D12Impl.h
101101 #VS_SHADER_FLAGS "/O3"
102102 )
103103
104 add_library(GraphicsEngineD3D12Interface INTERFACE)
105 target_include_directories(GraphicsEngineD3D12Interface
104 add_library(Diligent-GraphicsEngineD3D12Interface INTERFACE)
105 target_include_directories(Diligent-GraphicsEngineD3D12Interface
106106 INTERFACE
107107 interface
108108 )
109 target_link_libraries(GraphicsEngineD3D12Interface
109 target_link_libraries(Diligent-GraphicsEngineD3D12Interface
110110 INTERFACE
111 GraphicsEngineD3DBaseInterface
111 Diligent-GraphicsEngineD3DBaseInterface
112112 )
113113
114 add_library(GraphicsEngineD3D12-static STATIC
114 add_library(Diligent-GraphicsEngineD3D12-static STATIC
115115 ${SRC} ${INTERFACE} ${INCLUDE} ${SHADERS}
116116 readme.md
117117 shaders/GenerateMips/GenerateMipsCS.hlsli
118118 )
119119
120 add_library(GraphicsEngineD3D12-shared SHARED
120 add_library(Diligent-GraphicsEngineD3D12-shared SHARED
121121 src/DLLMain.cpp
122122 src/GraphicsEngineD3D12.def
123123 readme.md
124124 )
125125
126 target_include_directories(GraphicsEngineD3D12-static
126 target_include_directories(Diligent-GraphicsEngineD3D12-static
127127 PRIVATE
128128 ${CMAKE_CURRENT_BINARY_DIR}/CompiledShaders
129129 include
130130 )
131131
132 target_link_libraries(GraphicsEngineD3D12-static
132 target_link_libraries(Diligent-GraphicsEngineD3D12-static
133133 PRIVATE
134 BuildSettings
135 Common
136 GraphicsEngineD3DBase
137 GraphicsEngineNextGenBase
138 TargetPlatform
134 Diligent-BuildSettings
135 Diligent-Common
136 Diligent-GraphicsEngineD3DBase
137 Diligent-GraphicsEngineNextGenBase
138 Diligent-TargetPlatform
139139 dxgi.lib
140140 D3D12.lib
141141 d3dcompiler.lib
142142 PUBLIC
143 GraphicsEngineD3D12Interface
143 Diligent-GraphicsEngineD3D12Interface
144144 )
145145
146 target_link_libraries(GraphicsEngineD3D12-shared
146 target_link_libraries(Diligent-GraphicsEngineD3D12-shared
147147 PRIVATE
148 BuildSettings
149 GraphicsEngineD3D12-static
148 Diligent-BuildSettings
149 Diligent-GraphicsEngineD3D12-static
150150 PUBLIC
151 GraphicsEngineD3D12Interface
151 Diligent-GraphicsEngineD3D12Interface
152152 )
153 target_compile_definitions(GraphicsEngineD3D12-shared PUBLIC ENGINE_DLL=1)
153 target_compile_definitions(Diligent-GraphicsEngineD3D12-shared PUBLIC ENGINE_DLL=1)
154154
155155 # Set output name to GraphicsEngineD3D12_{32|64}{r|d}
156 set_dll_output_name(GraphicsEngineD3D12-shared GraphicsEngineD3D12)
156 set_dll_output_name(Diligent-GraphicsEngineD3D12-shared GraphicsEngineD3D12)
157157
158 set_common_target_properties(GraphicsEngineD3D12-shared)
159 set_common_target_properties(GraphicsEngineD3D12-static)
158 set_common_target_properties(Diligent-GraphicsEngineD3D12-shared)
159 set_common_target_properties(Diligent-GraphicsEngineD3D12-static)
160160
161161 source_group("src" FILES ${SRC})
162162
172172 shaders/GenerateMips/GenerateMipsCS.hlsli
173173 )
174174
175 set_target_properties(GraphicsEngineD3D12-static PROPERTIES
176 FOLDER Core/Graphics
175 set_target_properties(Diligent-GraphicsEngineD3D12-static PROPERTIES
176 FOLDER DiligentCore/Graphics
177177 )
178 set_target_properties(GraphicsEngineD3D12-shared PROPERTIES
179 FOLDER Core/Graphics
178 set_target_properties(Diligent-GraphicsEngineD3D12-shared PROPERTIES
179 FOLDER DiligentCore/Graphics
180180 )
181181
182182 set_source_files_properties(
184184 )
185185
186186 if(INSTALL_DILIGENT_CORE)
187 install_core_lib(GraphicsEngineD3D12-shared)
188 install_core_lib(GraphicsEngineD3D12-static)
187 install_core_lib(Diligent-GraphicsEngineD3D12-shared)
188 install_core_lib(Diligent-GraphicsEngineD3D12-static)
189189 endif()
00 cmake_minimum_required (VERSION 3.10)
11
2 project(GraphicsEngineD3DBase CXX)
2 project(Diligent-GraphicsEngineD3DBase CXX)
33
44 set(INCLUDE
55 include/D3DErrors.h
2626 src/ShaderResources.cpp
2727 )
2828
29 add_library(GraphicsEngineD3DBase STATIC
29 add_library(Diligent-GraphicsEngineD3DBase STATIC
3030 ${SOURCE} ${INCLUDE} ${INTERFACE} include/HLSLDefinitions_inc.fxh
3131 )
3232
3636 )
3737
3838 # Create custom target to convert HLSLDefinitions.fxh to HLSLDefinitions_inc.fxh
39 add_custom_target(ProcessHLSLDefinitions
39 add_custom_target(Diligent-ProcessHLSLDefinitions
4040 SOURCES
4141 include/HLSLDefinitions.fxh
4242 )
4343
44 add_custom_command(TARGET ProcessHLSLDefinitions
45 # Unfortunately it is not possible to set TARGET directly to GraphicsEngineD3DBase
44 add_custom_command(TARGET Diligent-ProcessHLSLDefinitions
45 # Unfortunately it is not possible to set TARGET directly to Diligent-GraphicsEngineD3DBase
4646 # because PRE_BUILD is only supported on Visual Studio 8 or later. For all other generators
4747 # PRE_BUILD is treated as PRE_LINK.
4848 COMMAND ${FILE2STRING_PATH} include/HLSLDefinitions.fxh include/HLSLDefinitions_inc.fxh
5151 VERBATIM
5252 )
5353
54 add_dependencies(GraphicsEngineD3DBase ProcessHLSLDefinitions)
54 add_dependencies(Diligent-GraphicsEngineD3DBase Diligent-ProcessHLSLDefinitions)
5555
56 add_library(GraphicsEngineD3DBaseInterface INTERFACE)
57 target_link_libraries(GraphicsEngineD3DBaseInterface INTERFACE GraphicsEngineInterface)
58 target_include_directories(GraphicsEngineD3DBaseInterface INTERFACE interface)
56 add_library(Diligent-GraphicsEngineD3DBaseInterface INTERFACE)
57 target_link_libraries(Diligent-GraphicsEngineD3DBaseInterface INTERFACE Diligent-GraphicsEngineInterface)
58 target_include_directories(Diligent-GraphicsEngineD3DBaseInterface INTERFACE interface)
5959
60 target_include_directories(GraphicsEngineD3DBase
60 target_include_directories(Diligent-GraphicsEngineD3DBase
6161 PUBLIC
6262 include
6363 )
6464
65 target_link_libraries(GraphicsEngineD3DBase
65 target_link_libraries(Diligent-GraphicsEngineD3DBase
6666 PUBLIC
67 BuildSettings
68 GraphicsEngine
69 GraphicsEngineD3DBaseInterface
67 Diligent-BuildSettings
68 Diligent-GraphicsEngine
69 Diligent-GraphicsEngineD3DBaseInterface
7070 )
7171 if(D3D12_SUPPORTED)
72 target_link_libraries(GraphicsEngineD3DBase PRIVATE D3D12.lib)
72 target_link_libraries(Diligent-GraphicsEngineD3DBase PRIVATE D3D12.lib)
7373 endif()
74 set_common_target_properties(GraphicsEngineD3DBase)
74 set_common_target_properties(Diligent-GraphicsEngineD3DBase)
7575
7676 source_group("src" FILES ${SOURCE})
7777 source_group("include" FILES ${INCLUDE})
7878 source_group("interface" FILES ${INTERFACE})
7979 source_group("generated" FILES include/HLSLDefinitions_inc.fxh)
8080
81 set_target_properties(GraphicsEngineD3DBase PROPERTIES
82 FOLDER Core/Graphics
81 set_target_properties(Diligent-GraphicsEngineD3DBase PROPERTIES
82 FOLDER DiligentCore/Graphics
8383 )
84 set_target_properties(ProcessHLSLDefinitions PROPERTIES
85 FOLDER Core/Graphics/Helper
84 set_target_properties(Diligent-ProcessHLSLDefinitions PROPERTIES
85 FOLDER DiligentCore/Graphics/Helper
8686 )
8787
8888 if(INSTALL_DILIGENT_CORE)
89 install_core_lib(GraphicsEngineD3DBase)
89 install_core_lib(Diligent-GraphicsEngineD3DBase)
9090 endif()
00 cmake_minimum_required (VERSION 3.10)
11
2 project(GraphicsEngineMetal CXX)
2 project(Diligent-GraphicsEngineMetal CXX)
33
44
55 set(INCLUDE
5454 src/TextureViewMtlImpl.mm
5555 )
5656
57 add_library(GraphicsEngineMetalInterface INTERFACE)
58 target_include_directories(GraphicsEngineMetalInterface
57 add_library(Diligent-GraphicsEngineMetalInterface INTERFACE)
58 target_include_directories(Diligent-GraphicsEngineMetalInterface
5959 INTERFACE
6060 interface
6161 )
62 target_link_libraries(GraphicsEngineMetalInterface
62 target_link_libraries(Diligent-GraphicsEngineMetalInterface
6363 INTERFACE
64 GraphicsEngineInterface
64 Diligent-GraphicsEngineInterface
6565 )
6666
6767
68 add_library(GraphicsEngineMetal-static STATIC
68 add_library(Diligent-GraphicsEngineMetal-static STATIC
6969 ${SRC} ${INTERFACE} ${INCLUDE}
7070 readme.md
7171 )
7272
73 add_library(GraphicsEngineMetal-shared SHARED
73 add_library(Diligent-GraphicsEngineMetal-shared SHARED
7474 readme.md
7575 )
7676
77 set_target_properties(GraphicsEngineMetal-shared PROPERTIES
77 set_target_properties(Diligent-GraphicsEngineMetal-shared PROPERTIES
7878 OUTPUT_NAME GraphicsEngineMetal
7979 )
8080
81 set_common_target_properties(GraphicsEngineMetal-shared)
82 set_common_target_properties(GraphicsEngineMetal-static)
81 set_common_target_properties(Diligent-GraphicsEngineMetal-shared)
82 set_common_target_properties(Diligent-GraphicsEngineMetal-static)
8383
84 target_include_directories(GraphicsEngineMetal-static
84 target_include_directories(Diligent-GraphicsEngineMetal-static
8585 PRIVATE
8686 include
8787 )
9191 message(FATAL_ERROR "Metal framework is not found")
9292 endif()
9393
94 target_link_libraries(GraphicsEngineMetal-static
94 target_link_libraries(Diligent-GraphicsEngineMetal-static
9595 PRIVATE
96 BuildSettings
97 TargetPlatform
98 Common
99 GraphicsEngine
96 Diligent-BuildSettings
97 Diligent-TargetPlatform
98 Diligent-Common
99 Diligent-GraphicsEngine
100100 ${METAL_FRAMEWORK}
101101 PUBLIC
102 GraphicsEngineMetalInterface
102 Diligent-GraphicsEngineMetalInterface
103103 )
104104
105 target_link_libraries(GraphicsEngineMetal-shared PUBLIC GraphicsEngineMetal-static)
106 target_compile_definitions(GraphicsEngineMetal-shared PUBLIC ENGINE_DLL=1)
105 target_link_libraries(Diligent-GraphicsEngineMetal-shared PUBLIC Diligent-GraphicsEngineMetal-static)
106 target_compile_definitions(Diligent-GraphicsEngineMetal-shared PUBLIC ENGINE_DLL=1)
107107
108108
109109 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
110110 CMAKE_CXX_COMPILER_ID MATCHES "GNU")
111 set_target_properties(GraphicsEngineMetal-shared PROPERTIES CXX_VISIBILITY_PRESET hidden) # -fvisibility=hidden
111 set_target_properties(Diligent-GraphicsEngineMetal-shared PROPERTIES CXX_VISIBILITY_PRESET hidden) # -fvisibility=hidden
112112 endif()
113113
114114 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
115115 # Disable the following clang warning
116116 # '<function name>' hides overloaded virtual function
117117 # as hiding is intended
118 target_compile_options(GraphicsEngineMetal-static PRIVATE -Wno-overloaded-virtual)
119 target_compile_options(GraphicsEngineMetal-shared PRIVATE -Wno-overloaded-virtual)
118 target_compile_options(Diligent-GraphicsEngineMetal-static PRIVATE -Wno-overloaded-virtual)
119 target_compile_options(Diligent-GraphicsEngineMetal-shared PRIVATE -Wno-overloaded-virtual)
120120 endif()
121121
122122
124124 source_group("include" FILES ${INCLUDE})
125125 source_group("interface" FILES ${INTERFACE})
126126
127 set_target_properties(GraphicsEngineMetal-static PROPERTIES
128 FOLDER Core/Graphics
127 set_target_properties(Diligent-GraphicsEngineMetal-static PROPERTIES
128 FOLDER DiligentCore/Graphics
129129 )
130 set_target_properties(GraphicsEngineMetal-shared PROPERTIES
131 FOLDER Core/Graphics
130 set_target_properties(Diligent-GraphicsEngineMetal-shared PROPERTIES
131 FOLDER DiligentCore/Graphics
132132 )
133133
134134 set_source_files_properties(
136136 )
137137
138138 if(INSTALL_DILIGENT_CORE)
139 install_core_lib(GraphicsEngineMetal-shared)
140 install_core_lib(GraphicsEngineMetal-static)
139 install_core_lib(Diligent-GraphicsEngineMetal-shared)
140 install_core_lib(Diligent-GraphicsEngineMetal-static)
141141 endif()
00 cmake_minimum_required (VERSION 3.6)
11
2 project(GraphicsEngineNextGenBase CXX)
2 project(Diligent-GraphicsEngineNextGenBase CXX)
33
44 set(INCLUDE
55 include/DeviceContextNextGenBase.h
1111 src/dummy.cpp
1212 )
1313
14 add_library(GraphicsEngineNextGenBase STATIC ${SOURCE} ${INCLUDE})
15 set_common_target_properties(GraphicsEngineNextGenBase)
14 add_library(Diligent-GraphicsEngineNextGenBase STATIC ${SOURCE} ${INCLUDE})
15 set_common_target_properties(Diligent-GraphicsEngineNextGenBase)
1616
17 target_include_directories(GraphicsEngineNextGenBase
17 target_include_directories(Diligent-GraphicsEngineNextGenBase
1818 PUBLIC
1919 include
2020 )
2121
22 target_link_libraries(GraphicsEngineNextGenBase
22 target_link_libraries(Diligent-GraphicsEngineNextGenBase
2323 PUBLIC
24 BuildSettings
25 PlatformInterface
26 Common
27 GraphicsAccessories
28 GraphicsEngine
24 Diligent-BuildSettings
25 Diligent-PlatformInterface
26 Diligent-Common
27 Diligent-GraphicsAccessories
28 Diligent-GraphicsEngine
2929 )
3030
3131 source_group("src" FILES ${SOURCE})
3232 source_group("include" FILES ${INCLUDE})
3333
34 set_target_properties(GraphicsEngineNextGenBase PROPERTIES
35 FOLDER Core/Graphics
34 set_target_properties(Diligent-GraphicsEngineNextGenBase PROPERTIES
35 FOLDER DiligentCore/Graphics
3636 )
3737
3838 if(INSTALL_DILIGENT_CORE)
39 install_core_lib(GraphicsEngineNextGenBase)
39 install_core_lib(Diligent-GraphicsEngineNextGenBase)
4040 endif()
00 cmake_minimum_required (VERSION 3.3)
11
2 project(GraphicsEngineOpenGL CXX)
2 project(Diligent-GraphicsEngineOpenGL CXX)
33
44 set(INCLUDE
55 include/AsyncWritableResource.h
117117 message(FATAL_ERROR "Unknown platform")
118118 endif()
119119
120 add_library(GraphicsEngineOpenGLInterface INTERFACE)
121 target_include_directories(GraphicsEngineOpenGLInterface
120 add_library(Diligent-GraphicsEngineOpenGLInterface INTERFACE)
121 target_include_directories(Diligent-GraphicsEngineOpenGLInterface
122122 INTERFACE
123123 interface
124124 )
125 target_link_libraries(GraphicsEngineOpenGLInterface
125 target_link_libraries(Diligent-GraphicsEngineOpenGLInterface
126126 INTERFACE
127 GraphicsEngineInterface
128 )
129
130
131 add_library(GraphicsEngineOpenGL-static STATIC
127 Diligent-GraphicsEngineInterface
128 )
129
130
131 add_library(Diligent-GraphicsEngineOpenGL-static STATIC
132132 ${SOURCE} ${INTERFACE} ${INCLUDE}
133133 readme.md
134134 )
135135
136 add_library(GraphicsEngineOpenGL-shared SHARED
136 add_library(Diligent-GraphicsEngineOpenGL-shared SHARED
137137 readme.md
138138 )
139139 if(MSVC)
140 target_sources(GraphicsEngineOpenGL-shared
140 target_sources(Diligent-GraphicsEngineOpenGL-shared
141141 PRIVATE
142142 src/DLLMain.cpp
143143 src/GraphicsEngineOpenGL.def
144144 )
145145 endif()
146146
147 target_include_directories(GraphicsEngineOpenGL-static
147 target_include_directories(Diligent-GraphicsEngineOpenGL-static
148148 PRIVATE
149149 include
150150 ../HLSL2GLSLConverterLib/include
152152
153153
154154 set(PRIVATE_DEPENDENCIES
155 BuildSettings
156 Common
157 TargetPlatform
158 GraphicsEngine
159 GLSLTools
160 HLSL2GLSLConverterLib
155 Diligent-BuildSettings
156 Diligent-Common
157 Diligent-TargetPlatform
158 Diligent-GraphicsEngine
159 Diligent-GLSLTools
160 Diligent-HLSL2GLSLConverterLib
161161 )
162162
163163 set(PUBLIC_DEPENDENCIES
164 GraphicsEngineOpenGLInterface
164 Diligent-GraphicsEngineOpenGLInterface
165165 )
166166
167167 if(PLATFORM_WIN32)
183183 # Disable the following clang warning
184184 # '<function name>' hides overloaded virtual function
185185 # as hiding is intended
186 target_compile_options(GraphicsEngineOpenGL-static PRIVATE -Wno-overloaded-virtual)
187 target_compile_options(GraphicsEngineOpenGL-shared PRIVATE -Wno-overloaded-virtual)
188 endif()
189
190 target_link_libraries(GraphicsEngineOpenGL-static
186 target_compile_options(Diligent-GraphicsEngineOpenGL-static PRIVATE -Wno-overloaded-virtual)
187 target_compile_options(Diligent-GraphicsEngineOpenGL-shared PRIVATE -Wno-overloaded-virtual)
188 endif()
189
190 target_link_libraries(Diligent-GraphicsEngineOpenGL-static
191191 PRIVATE
192192 ${PRIVATE_DEPENDENCIES}
193193 PUBLIC
194194 ${PUBLIC_DEPENDENCIES}
195195 )
196 target_link_libraries(GraphicsEngineOpenGL-shared
196 target_link_libraries(Diligent-GraphicsEngineOpenGL-shared
197197 PRIVATE
198 BuildSettings
199 ${WHOLE_ARCHIVE_FLAG} GraphicsEngineOpenGL-static ${NO_WHOLE_ARCHIVE_FLAG}
198 Diligent-BuildSettings
199 ${WHOLE_ARCHIVE_FLAG} Diligent-GraphicsEngineOpenGL-static ${NO_WHOLE_ARCHIVE_FLAG}
200200 PUBLIC
201201 ${PUBLIC_DEPENDENCIES}
202202 )
203203
204 target_compile_definitions(GraphicsEngineOpenGL-shared PUBLIC ENGINE_DLL=1)
204 target_compile_definitions(Diligent-GraphicsEngineOpenGL-shared PUBLIC ENGINE_DLL=1)
205205
206206 if(PLATFORM_WIN32)
207207
208208 # Do not add 'lib' prefix when building with MinGW
209 set_target_properties(GraphicsEngineOpenGL-shared PROPERTIES PREFIX "")
209 set_target_properties(Diligent-GraphicsEngineOpenGL-shared PROPERTIES PREFIX "")
210210
211211 # Set output name to GraphicsEngineOpenGL_{32|64}{r|d}
212 set_dll_output_name(GraphicsEngineOpenGL-shared GraphicsEngineOpenGL)
212 set_dll_output_name(Diligent-GraphicsEngineOpenGL-shared GraphicsEngineOpenGL)
213213
214214 else()
215 set_target_properties(GraphicsEngineOpenGL-shared PROPERTIES
215 set_target_properties(Diligent-GraphicsEngineOpenGL-shared PROPERTIES
216216 OUTPUT_NAME GraphicsEngineOpenGL
217217 )
218218 endif()
219219
220 set_common_target_properties(GraphicsEngineOpenGL-shared)
221 set_common_target_properties(GraphicsEngineOpenGL-static)
220 set_common_target_properties(Diligent-GraphicsEngineOpenGL-shared)
221 set_common_target_properties(Diligent-GraphicsEngineOpenGL-static)
222222
223223 source_group("src" FILES ${SOURCE})
224224 if(PLATFORM_WIN32)
231231 source_group("include" FILES ${INCLUDE})
232232 source_group("interface" FILES ${INTERFACE})
233233
234 set_target_properties(GraphicsEngineOpenGL-static PROPERTIES
235 FOLDER Core/Graphics
236 )
237 set_target_properties(GraphicsEngineOpenGL-shared PROPERTIES
238 FOLDER Core/Graphics
234 set_target_properties(Diligent-GraphicsEngineOpenGL-static PROPERTIES
235 FOLDER DiligentCore/Graphics
236 )
237 set_target_properties(Diligent-GraphicsEngineOpenGL-shared PROPERTIES
238 FOLDER DiligentCore/Graphics
239239 )
240240
241241 set_source_files_properties(
243243 )
244244
245245 if(INSTALL_DILIGENT_CORE)
246 install_core_lib(GraphicsEngineOpenGL-shared)
247 install_core_lib(GraphicsEngineOpenGL-static)
248 endif()
246 install_core_lib(Diligent-GraphicsEngineOpenGL-shared)
247 install_core_lib(Diligent-GraphicsEngineOpenGL-static)
248 endif()
00 cmake_minimum_required (VERSION 3.10)
11
2 project(GraphicsEngineVk CXX)
2 project(Diligent-GraphicsEngineVk CXX)
33
44 set(INCLUDE
55 include/BufferVkImpl.h
116116 )
117117
118118 # Create custom target to convert GenerateMipsCS.csh to GenerateMipsCS_inc.h
119 add_custom_target(ProcessGenerateMipsVkShader
119 add_custom_target(Diligent-ProcessGenerateMipsVkShader
120120 SOURCES
121121 ${GENERATE_MIPS_SHADER}
122122 )
123123
124 add_custom_command(TARGET ProcessGenerateMipsVkShader
125 # Unfortunately it is not possible to set TARGET directly to GraphicsEngineVk-*
124 add_custom_command(TARGET Diligent-ProcessGenerateMipsVkShader
125 # Unfortunately it is not possible to set TARGET directly to Diligent-GraphicsEngineVk-*
126126 # because PRE_BUILD is only supported on Visual Studio 8 or later. For all other generators
127127 # PRE_BUILD is treated as PRE_LINK.
128128 COMMAND ${FILE2STRING_PATH} ${GENERATE_MIPS_SHADER} ${GENERATE_MIPS_SHADER_INC}
132132 )
133133
134134
135 add_library(GraphicsEngineVkInterface INTERFACE)
136 target_include_directories(GraphicsEngineVkInterface
135 add_library(Diligent-GraphicsEngineVkInterface INTERFACE)
136 target_include_directories(Diligent-GraphicsEngineVkInterface
137137 INTERFACE
138138 interface
139139 )
140 target_link_libraries(GraphicsEngineVkInterface
140 target_link_libraries(Diligent-GraphicsEngineVkInterface
141141 INTERFACE
142 GraphicsEngineInterface
143 )
144
145 add_library(GraphicsEngineVk-static STATIC
142 Diligent-GraphicsEngineInterface
143 )
144
145 add_library(Diligent-GraphicsEngineVk-static STATIC
146146 ${SRC} ${VULKAN_UTILS_SRC} ${INTERFACE} ${INCLUDE} ${VULKAN_UTILS_INCLUDE} ${GENERATE_MIPS_SHADER} ${GENERATE_MIPS_SHADER_INC}
147147 readme.md
148148 )
149149
150 add_library(GraphicsEngineVk-shared SHARED
150 add_library(Diligent-GraphicsEngineVk-shared SHARED
151151 readme.md
152152 )
153153
154154 if(MSVC)
155 target_sources(GraphicsEngineVk-shared PRIVATE
155 target_sources(Diligent-GraphicsEngineVk-shared PRIVATE
156156 src/DLLMain.cpp
157157 src/GraphicsEngineVk.def
158158 )
159159 endif()
160160
161 add_dependencies(GraphicsEngineVk-static ProcessGenerateMipsVkShader)
162
163 target_include_directories(GraphicsEngineVk-static
161 add_dependencies(Diligent-GraphicsEngineVk-static Diligent-ProcessGenerateMipsVkShader)
162
163 target_include_directories(Diligent-GraphicsEngineVk-static
164164 PRIVATE
165165 include
166166 ../../External/vulkan
167167 )
168168
169169 set(PRIVATE_DEPENDENCIES
170 BuildSettings
171 Common
172 TargetPlatform
173 GraphicsEngineNextGenBase
174 GLSLTools
170 Diligent-BuildSettings
171 Diligent-Common
172 Diligent-TargetPlatform
173 Diligent-GraphicsEngineNextGenBase
174 Diligent-GLSLTools
175175 SPIRV-Tools-opt
176176 )
177177
189189 list(APPEND PRIVATE_DEPENDENCIES ${Vulkan_LIBRARY})
190190
191191 set(PUBLIC_DEPENDENCIES
192 GraphicsEngineVkInterface
193 )
194
195 target_link_libraries(GraphicsEngineVk-static
192 Diligent-GraphicsEngineVkInterface
193 )
194
195 target_link_libraries(Diligent-GraphicsEngineVk-static
196196 PRIVATE
197197 ${PRIVATE_DEPENDENCIES}
198198 PUBLIC
199199 ${PUBLIC_DEPENDENCIES}
200200 )
201 target_link_libraries(GraphicsEngineVk-shared
201 target_link_libraries(Diligent-GraphicsEngineVk-shared
202202 PRIVATE
203 BuildSettings
204 ${WHOLE_ARCHIVE_FLAG} GraphicsEngineVk-static ${NO_WHOLE_ARCHIVE_FLAG}
203 Diligent-BuildSettings
204 ${WHOLE_ARCHIVE_FLAG} Diligent-GraphicsEngineVk-static ${NO_WHOLE_ARCHIVE_FLAG}
205205 PUBLIC
206206 ${PUBLIC_DEPENDENCIES}
207207 )
210210 # Disable the following clang warning
211211 # '<function name>' hides overloaded virtual function
212212 # as hiding is intended
213 target_compile_options(GraphicsEngineVk-static PRIVATE -Wno-overloaded-virtual)
214 target_compile_options(GraphicsEngineVk-shared PRIVATE -Wno-overloaded-virtual)
213 target_compile_options(Diligent-GraphicsEngineVk-static PRIVATE -Wno-overloaded-virtual)
214 target_compile_options(Diligent-GraphicsEngineVk-shared PRIVATE -Wno-overloaded-virtual)
215215 endif()
216216
217217 if(PLATFORM_WIN32)
232232 message("GLSLang is not being built. Vulkan backend will only be able to consume SPIRV byte code.")
233233 endif()
234234
235 target_compile_definitions(GraphicsEngineVk-static PRIVATE ${PRIVATE_COMPILE_DEFINITIONS} NO_GLSLANG=$<BOOL:${DILIGENT_NO_GLSLANG}>)
236 target_compile_definitions(GraphicsEngineVk-shared PRIVATE ${PRIVATE_COMPILE_DEFINITIONS} ENGINE_DLL=1)
235 target_compile_definitions(Diligent-GraphicsEngineVk-static PRIVATE ${PRIVATE_COMPILE_DEFINITIONS} NO_GLSLANG=$<BOOL:${DILIGENT_NO_GLSLANG}>)
236 target_compile_definitions(Diligent-GraphicsEngineVk-shared PRIVATE ${PRIVATE_COMPILE_DEFINITIONS} ENGINE_DLL=1)
237237
238238 if(PLATFORM_WIN32)
239239
240240 # Do not add 'lib' prefix when building with MinGW
241 set_target_properties(GraphicsEngineVk-shared PROPERTIES PREFIX "")
241 set_target_properties(Diligent-GraphicsEngineVk-shared PROPERTIES PREFIX "")
242242
243243 # Set output name to GraphicsEngineVk_{32|64}{r|d}
244 set_dll_output_name(GraphicsEngineVk-shared GraphicsEngineVk)
244 set_dll_output_name(Diligent-GraphicsEngineVk-shared GraphicsEngineVk)
245245
246246 else()
247 set_target_properties(GraphicsEngineVk-shared PROPERTIES
248 OUTPUT_NAME GraphicsEngineVk
247 set_target_properties(Diligent-GraphicsEngineVk-shared PROPERTIES
248 OUTPUT_NAME Diligent-GraphicsEngineVk
249249 )
250250 endif()
251251
252252 if(PLATFORM_LINUX)
253253 get_filename_component(VULKAN_LIBRARY_PATH ${Vulkan_LIBRARY} DIRECTORY)
254 set_target_properties(GraphicsEngineVk-shared PROPERTIES
254 set_target_properties(Diligent-GraphicsEngineVk-shared PROPERTIES
255255 INSTALL_RPATH "${VULKAN_LIBRARY_PATH}"
256256 )
257257 endif()
258258
259 set_common_target_properties(GraphicsEngineVk-shared)
260 set_common_target_properties(GraphicsEngineVk-static)
259 set_common_target_properties(Diligent-GraphicsEngineVk-shared)
260 set_common_target_properties(Diligent-GraphicsEngineVk-static)
261261
262262 source_group("src" FILES ${SRC})
263263 source_group("src\\Vulkan Utilities" FILES ${VULKAN_UTILS_SRC})
277277 ${GENERATE_MIPS_SHADER_INC}
278278 )
279279
280 set_target_properties(GraphicsEngineVk-static PROPERTIES
281 FOLDER Core/Graphics
282 )
283 set_target_properties(GraphicsEngineVk-shared PROPERTIES
284 FOLDER Core/Graphics
280 set_target_properties(Diligent-GraphicsEngineVk-static PROPERTIES
281 FOLDER DiligentCore/Graphics
282 )
283 set_target_properties(Diligent-GraphicsEngineVk-shared PROPERTIES
284 FOLDER DiligentCore/Graphics
285285 )
286286
287287 set_source_files_properties(
288288 readme.md PROPERTIES HEADER_FILE_ONLY TRUE
289289 )
290290
291 set_target_properties(ProcessGenerateMipsVkShader PROPERTIES
292 FOLDER Core/Graphics/Helper
291 set_target_properties(Diligent-ProcessGenerateMipsVkShader PROPERTIES
292 FOLDER DiligentCore/Graphics/Helper
293293 )
294294
295295 if(INSTALL_DILIGENT_CORE)
296 install_core_lib(GraphicsEngineVk-shared)
297 install_core_lib(GraphicsEngineVk-static)
298 endif()
296 install_core_lib(Diligent-GraphicsEngineVk-shared)
297 install_core_lib(Diligent-GraphicsEngineVk-static)
298 endif()
00 cmake_minimum_required (VERSION 3.6)
11
2 project(GraphicsTools CXX)
2 project(Diligent-GraphicsTools CXX)
33
44 set(INCLUDE
55 include/CommonlyUsedStates.h
2323 if(D3D11_SUPPORTED)
2424 list(APPEND SOURCE src/TextureUploaderD3D11.cpp)
2525 list(APPEND INCLUDE include/TextureUploaderD3D11.h)
26 list(APPEND DEPENDENCIES GraphicsEngineD3D11Interface)
26 list(APPEND DEPENDENCIES Diligent-GraphicsEngineD3D11Interface)
2727 endif()
2828
2929 if(D3D12_SUPPORTED OR VULKAN_SUPPORTED)
3434 if(GL_SUPPORTED OR GLES_SUPPORTED)
3535 list(APPEND SOURCE src/TextureUploaderGL.cpp)
3636 list(APPEND INCLUDE include/TextureUploaderGL.h)
37 list(APPEND DEPENDENCIES GraphicsEngineOpenGLInterface)
37 list(APPEND DEPENDENCIES Diligent-GraphicsEngineOpenGLInterface)
3838 endif()
3939
40 add_library(GraphicsTools STATIC ${SOURCE} ${INCLUDE})
40 add_library(Diligent-GraphicsTools STATIC ${SOURCE} ${INCLUDE})
4141
42 target_include_directories(GraphicsTools
42 target_include_directories(Diligent-GraphicsTools
4343 PUBLIC
4444 include
4545 PRIVATE
4646 ../GraphicsEngineD3DBase/include
4747 )
4848
49 target_link_libraries(GraphicsTools
49 target_link_libraries(Diligent-GraphicsTools
5050 PRIVATE
51 Common
52 BuildSettings
53 PlatformInterface
54 GraphicsAccessories
51 Diligent-Common
52 Diligent-BuildSettings
53 Diligent-PlatformInterface
54 Diligent-GraphicsAccessories
5555 ${DEPENDENCIES}
5656 PUBLIC
57 GraphicsEngineInterface
57 Diligent-GraphicsEngineInterface
5858 )
5959
60 set_common_target_properties(GraphicsTools)
60 set_common_target_properties(Diligent-GraphicsTools)
6161
6262 source_group("src" FILES ${SOURCE})
6363 source_group("include" FILES ${INCLUDE})
6464 source_group("interface" FILES ${INTERFACE})
6565
66 set_target_properties(GraphicsTools PROPERTIES
67 FOLDER Core/Graphics
66 set_target_properties(Diligent-GraphicsTools PROPERTIES
67 FOLDER DiligentCore/Graphics
6868 )
6969
7070 if(INSTALL_DILIGENT_CORE)
71 install_core_lib(GraphicsTools)
71 install_core_lib(Diligent-GraphicsTools)
7272 endif()
00 cmake_minimum_required (VERSION 3.6)
11
2 project(HLSL2GLSLConverterLib CXX)
2 project(Diligent-HLSL2GLSLConverterLib CXX)
33
44 set(INCLUDE
55 include/GLSLDefinitions.h
1717 src/HLSL2GLSLConverterObject.cpp
1818 )
1919
20 add_library(HLSL2GLSLConverterLib STATIC ${SOURCE} ${INTERFACE} ${INCLUDE} include/GLSLDefinitions_inc.h)
21 set_common_target_properties(HLSL2GLSLConverterLib)
20 add_library(Diligent-HLSL2GLSLConverterLib STATIC ${SOURCE} ${INTERFACE} ${INCLUDE} include/GLSLDefinitions_inc.h)
21 set_common_target_properties(Diligent-HLSL2GLSLConverterLib)
2222
2323 set_source_files_properties(
2424 ${CMAKE_CURRENT_SOURCE_DIR}/include/GLSLDefinitions_inc.h
2525 PROPERTIES GENERATED TRUE
2626 )
2727
28 target_include_directories(HLSL2GLSLConverterLib
28 target_include_directories(Diligent-HLSL2GLSLConverterLib
2929 PUBLIC
3030 interface
3131 PRIVATE
3232 include
3333 )
3434
35 target_link_libraries(HLSL2GLSLConverterLib
35 target_link_libraries(Diligent-HLSL2GLSLConverterLib
3636 PRIVATE
37 BuildSettings
38 Common
39 PlatformInterface
40 GraphicsEngine
37 Diligent-BuildSettings
38 Diligent-Common
39 Diligent-PlatformInterface
40 Diligent-GraphicsEngine
4141 PUBLIC
42 GraphicsEngineInterface
42 Diligent-GraphicsEngineInterface
4343 )
4444
4545 if(NOT FILE2STRING_PATH STREQUAL "")
4646 # Create custom target to convert GLSLDefinitions.h to GLSLDefinitions_inc.h
47 add_custom_target(ProcessGLSLDefinitions
47 add_custom_target(Diligent-ProcessGLSLDefinitions
4848 SOURCES
4949 include/GLSLDefinitions.h
5050 )
5151
52 add_custom_command(TARGET ProcessGLSLDefinitions
52 add_custom_command(TARGET Diligent-ProcessGLSLDefinitions
5353 # Unfortunately it is not possible to set TARGET directly to HLSL2GLSLConverterLib
5454 # because PRE_BUILD is only supported on Visual Studio 8 or later. For all other generators
5555 # PRE_BUILD is treated as PRE_LINK.
5959 VERBATIM
6060 )
6161
62 add_dependencies(HLSL2GLSLConverterLib ProcessGLSLDefinitions)
63 set_target_properties(ProcessGLSLDefinitions PROPERTIES
64 FOLDER Core/Graphics/Helper
62 add_dependencies(Diligent-HLSL2GLSLConverterLib Diligent-ProcessGLSLDefinitions)
63 set_target_properties(Diligent-ProcessGLSLDefinitions PROPERTIES
64 FOLDER DiligentCore/Graphics/Helper
6565 )
6666 else()
6767 message(WARNING "File2String utility is currently unavailable on this host system. This is not an issues unless you modify GLSLDefinitions.h file")
7272 source_group("interface" FILES ${INTERFACE})
7373 source_group("generated" FILES include/GLSLDefinitions_inc.h)
7474
75 set_target_properties(HLSL2GLSLConverterLib PROPERTIES
76 FOLDER Core/Graphics
75 set_target_properties(Diligent-HLSL2GLSLConverterLib PROPERTIES
76 FOLDER DiligentCore/Graphics
7777 )
7878
7979 if(INSTALL_DILIGENT_CORE)
80 install_core_lib(HLSL2GLSLConverterLib)
80 install_core_lib(Diligent-HLSL2GLSLConverterLib)
8181 endif()
00 cmake_minimum_required (VERSION 3.6)
11
2 project(AndroidPlatform CXX)
2 project(Diligent-AndroidPlatform CXX)
33
44 set(INTERFACE
55 interface/AndroidDebug.h
1313 src/AndroidFileSystem.cpp
1414 )
1515
16 add_library(AndroidPlatform ${SOURCE} ${INTERFACE} ${PLATFORM_INTERFACE_HEADERS})
17 set_common_target_properties(AndroidPlatform)
16 add_library(Diligent-AndroidPlatform ${SOURCE} ${INTERFACE} ${PLATFORM_INTERFACE_HEADERS})
17 set_common_target_properties(Diligent-AndroidPlatform)
1818
19 target_include_directories(AndroidPlatform
19 target_include_directories(Diligent-AndroidPlatform
2020 PUBLIC
2121 interface
2222 )
2323
24 target_link_libraries(AndroidPlatform
24 target_link_libraries(Diligent-AndroidPlatform
2525 PRIVATE
2626 log
2727 PUBLIC
28 BuildSettings
29 PlatformInterface
30 BasicPlatform
28 Diligent-BuildSettings
29 Diligent-PlatformInterface
30 Diligent-BasicPlatform
3131 )
3232
3333 source_group("src" FILES ${SOURCE})
3434 source_group("include" FILES ${INCLUDE})
3535 source_group("interface" FILES ${PLATFORM_INTERFACE_HEADERS})
3636
37 set_target_properties(AndroidPlatform PROPERTIES
38 FOLDER Core/Platforms
37 set_target_properties(Diligent-AndroidPlatform PROPERTIES
38 FOLDER DiligentCore/Platforms
3939 )
4040
4141 if(INSTALL_DILIGENT_CORE)
42 install_core_lib(AndroidPlatform)
42 install_core_lib(Diligent-AndroidPlatform)
4343 endif()
00 cmake_minimum_required (VERSION 3.6)
11
2 project(ApplePlatform CXX)
2 project(Diligent-ApplePlatform CXX)
33
44 set(INTERFACE
55 interface/CFObjectWrapper.h
1515 )
1616
1717
18 add_library(ApplePlatform ${SOURCE} ${INTERFACE} ${PLATFORM_INTERFACE_HEADERS})
19 set_common_target_properties(ApplePlatform)
18 add_library(Diligent-ApplePlatform ${SOURCE} ${INTERFACE} ${PLATFORM_INTERFACE_HEADERS})
19 set_common_target_properties(Diligent-ApplePlatform)
2020
21 target_include_directories(ApplePlatform
21 target_include_directories(Diligent-ApplePlatform
2222 PUBLIC
2323 interface
2424 )
2525
26 target_link_libraries(ApplePlatform
26 target_link_libraries(Diligent-ApplePlatform
2727 PUBLIC
28 BuildSettings
29 BasicPlatform
30 PlatformInterface
28 Diligent-BuildSettings
29 Diligent-BasicPlatform
30 Diligent-PlatformInterface
3131 )
3232
3333 if(PLATFORM_MACOS)
34 target_link_libraries(ApplePlatform
34 target_link_libraries(Diligent-ApplePlatform
3535 PRIVATE
3636 ${APP_KIT}
3737 )
3838 elseif(PLATFORM_IOS)
39 target_link_libraries(ApplePlatform
39 target_link_libraries(Diligent-ApplePlatform
4040 PRIVATE
4141 ${CORE_FOUNDATION}
4242 ${FOUNDATION}
4747 source_group("include" FILES ${INCLUDE})
4848 source_group("interface" FILES ${PLATFORM_INTERFACE_HEADERS})
4949
50 set_target_properties(ApplePlatform PROPERTIES
51 FOLDER Core/Platforms
50 set_target_properties(Diligent-ApplePlatform PROPERTIES
51 FOLDER DiligentCore/Platforms
5252 )
5353
5454 if(INSTALL_DILIGENT_CORE)
55 install_core_lib(ApplePlatform)
55 install_core_lib(Diligent-ApplePlatform)
5656 endif()
00 cmake_minimum_required (VERSION 3.6)
11
2 project(BasicPlatform CXX)
2 project(Diligent-BasicPlatform CXX)
33
44 set(SOURCE
55 src/BasicFileSystem.cpp
1919 list(APPEND INTERFACE interface/StandardFile.h)
2020 endif()
2121
22 add_library(BasicPlatform STATIC ${SOURCE} ${INTERFACE})
23 set_common_target_properties(BasicPlatform)
22 add_library(Diligent-BasicPlatform STATIC ${SOURCE} ${INTERFACE})
23 set_common_target_properties(Diligent-BasicPlatform)
2424
25 target_include_directories(BasicPlatform
25 target_include_directories(Diligent-BasicPlatform
2626 PUBLIC
2727 interface
2828 )
2929
30 target_link_libraries(BasicPlatform
30 target_link_libraries(Diligent-BasicPlatform
3131 PUBLIC
32 BuildSettings
33 Primitives
32 Diligent-BuildSettings
33 Diligent-Primitives
3434 )
3535
3636 source_group("src" FILES ${SOURCE})
3737 source_group("interface" FILES ${INTERFACE})
3838
39 set_target_properties(BasicPlatform PROPERTIES
40 FOLDER Core/Platforms
39 set_target_properties(Diligent-BasicPlatform PROPERTIES
40 FOLDER DiligentCore/Platforms
4141 )
4242
4343
4444 if(INSTALL_DILIGENT_CORE)
45 install_core_lib(BasicPlatform)
46 get_core_library_relative_dir(BasicPlatform BASIC_PLATFORM_DIR)
45 install_core_lib(Diligent-BasicPlatform)
46 get_core_library_relative_dir(Diligent-BasicPlatform BASIC_PLATFORM_DIR)
4747 install(DIRECTORY "../interface"
4848 DESTINATION "${DILIGENT_CORE_INSTALL_DIR}/headers/${BASIC_PLATFORM_DIR}/../"
4949 )
00 cmake_minimum_required (VERSION 3.6)
11
2 add_library(PlatformInterface INTERFACE)
2 add_library(Diligent-PlatformInterface INTERFACE)
33
4 target_include_directories(PlatformInterface INTERFACE interface)
4 target_include_directories(Diligent-PlatformInterface INTERFACE interface)
55
66 set(PLATFORM_INTERFACE_HEADERS
77 ../interface/Atomics.h
1515
1616 if(PLATFORM_WIN32)
1717 add_subdirectory(Win32)
18 add_library(TargetPlatform ALIAS Win32Platform)
18 add_library(Diligent-TargetPlatform ALIAS Diligent-Win32Platform)
1919 elseif(PLATFORM_UNIVERSAL_WINDOWS)
2020 add_subdirectory(UWP)
21 add_library(TargetPlatform ALIAS UniversalWindowsPlatform)
21 add_library(Diligent-TargetPlatform ALIAS Diligent-UniversalWindowsPlatform)
2222 elseif(PLATFORM_ANDROID)
2323 add_subdirectory(Android)
24 add_library(TargetPlatform ALIAS AndroidPlatform)
24 add_library(Diligent-TargetPlatform ALIAS Diligent-AndroidPlatform)
2525 elseif(PLATFORM_LINUX)
2626 add_subdirectory(Linux)
27 add_library(TargetPlatform ALIAS LinuxPlatform)
27 add_library(Diligent-TargetPlatform ALIAS Diligent-LinuxPlatform)
2828 elseif(PLATFORM_MACOS OR PLATFORM_IOS)
2929 add_subdirectory(Apple)
30 add_library(TargetPlatform ALIAS ApplePlatform)
30 add_library(Diligent-TargetPlatform ALIAS Diligent-ApplePlatform)
3131 else()
3232 message(FATAL_ERROR "No PLATFORM_XXX variable defined. Make sure that 'DiligentCore' folder is processed first")
3333 endif()
00 cmake_minimum_required (VERSION 3.6)
11
2 project(LinuxPlatform CXX)
2 project(Diligent-LinuxPlatform CXX)
33
44 set(INTERFACE
55 interface/LinuxDebug.h
1313 src/LinuxFileSystem.cpp
1414 )
1515
16 add_library(LinuxPlatform ${SOURCE} ${INTERFACE} ${PLATFORM_INTERFACE_HEADERS})
17 set_common_target_properties(LinuxPlatform)
16 add_library(Diligent-LinuxPlatform ${SOURCE} ${INTERFACE} ${PLATFORM_INTERFACE_HEADERS})
17 set_common_target_properties(Diligent-LinuxPlatform)
1818
19 target_include_directories(LinuxPlatform
19 target_include_directories(Diligent-LinuxPlatform
2020 PUBLIC
2121 interface
2222 )
2323
24 target_link_libraries(LinuxPlatform
24 target_link_libraries(Diligent-LinuxPlatform
2525 PUBLIC
26 BuildSettings
27 BasicPlatform
28 PlatformInterface
26 Diligent-BuildSettings
27 Diligent-BasicPlatform
28 Diligent-PlatformInterface
2929 )
3030
3131 source_group("src" FILES ${SOURCE})
3232 source_group("include" FILES ${INCLUDE})
3333 source_group("interface" FILES ${PLATFORM_INTERFACE_HEADERS})
3434
35 set_target_properties(LinuxPlatform PROPERTIES
36 FOLDER Core/Platforms
35 set_target_properties(Diligent-LinuxPlatform PROPERTIES
36 FOLDER DiligentCore/Platforms
3737 )
3838
3939 if(INSTALL_DILIGENT_CORE)
40 install_core_lib(LinuxPlatform)
40 install_core_lib(Diligent-LinuxPlatform)
4141 endif()
00 cmake_minimum_required (VERSION 3.8)
11
2 project(UniversalWindowsPlatform CXX)
2 project(Diligent-UniversalWindowsPlatform CXX)
33
44 set(INTERFACE
55 interface/UWPDebug.h
1414 ../Win32/src/Win32Atomics.cpp
1515 )
1616
17 add_library(UniversalWindowsPlatform ${SOURCE} ${INTERFACE} ${PLATFORM_INTERFACE_HEADERS})
18 set_common_target_properties(UniversalWindowsPlatform)
17 add_library(Diligent-UniversalWindowsPlatform ${SOURCE} ${INTERFACE} ${PLATFORM_INTERFACE_HEADERS})
18 set_common_target_properties(Diligent-UniversalWindowsPlatform)
1919
20 target_include_directories(UniversalWindowsPlatform
20 target_include_directories(Diligent-UniversalWindowsPlatform
2121 PUBLIC
2222 ../Win32/interface
2323 interface
2424 )
2525
26 target_link_libraries(UniversalWindowsPlatform
26 target_link_libraries(Diligent-UniversalWindowsPlatform
2727 PUBLIC
28 BuildSettings
29 BasicPlatform
30 PlatformInterface
28 Diligent-BuildSettings
29 Diligent-BasicPlatform
30 Diligent-PlatformInterface
3131 )
3232
3333 source_group("src" FILES ${SOURCE})
3434 source_group("include" FILES ${INCLUDE})
3535 source_group("interface" FILES ${PLATFORM_INTERFACE_HEADERS})
3636
37 set_target_properties(UniversalWindowsPlatform PROPERTIES
38 FOLDER Core/Platforms
37 set_target_properties(Diligent-UniversalWindowsPlatform PROPERTIES
38 FOLDER DiligentCore/Platforms
3939 )
4040
4141 if(INSTALL_DILIGENT_CORE)
42 install_core_lib(UniversalWindowsPlatform)
42 install_core_lib(Diligent-UniversalWindowsPlatform)
4343 endif()
1515 src/Win32FileSystem.cpp
1616 )
1717
18 add_library(Win32Platform ${SOURCE} ${INTERFACE} ${PLATFORM_INTERFACE_HEADERS})
19 set_common_target_properties(Win32Platform)
18 add_library(Diligent-Win32Platform ${SOURCE} ${INTERFACE} ${PLATFORM_INTERFACE_HEADERS})
19 set_common_target_properties(Diligent-Win32Platform)
2020
21 target_include_directories(Win32Platform
21 target_include_directories(Diligent-Win32Platform
2222 PUBLIC
2323 interface
2424 )
2525
26 target_link_libraries(Win32Platform
26 target_link_libraries(Diligent-Win32Platform
2727 PUBLIC
28 BuildSettings
29 BasicPlatform
30 PlatformInterface
28 Diligent-BuildSettings
29 Diligent-BasicPlatform
30 Diligent-PlatformInterface
3131 PRIVATE
3232 Shlwapi.lib
3333 )
3636 source_group("include" FILES ${INCLUDE})
3737 source_group("interface" FILES ${PLATFORM_INTERFACE_HEADERS})
3838
39 set_target_properties(Win32Platform PROPERTIES
40 FOLDER Core/Platforms
39 set_target_properties(Diligent-Win32Platform PROPERTIES
40 FOLDER DiligentCore/Platforms
4141 )
4242
4343 if(INSTALL_DILIGENT_CORE)
44 install_core_lib(Win32Platform)
44 install_core_lib(Diligent-Win32Platform)
4545 endif()
00 cmake_minimum_required (VERSION 3.6)
11
2 project(Primitives CXX)
2 project(Diligent-Primitives CXX)
33
44 set(SOURCE
55 src/DebugOutput.cpp
2222
2323 # This should be an interface library. However, CMake does not show
2424 # interface libraries in an IDE, so we have to create a static library instead
25 add_library(Primitives STATIC ${INTERFACE} ${SOURCE})
26 set_common_target_properties(Primitives)
25 add_library(Diligent-Primitives STATIC ${INTERFACE} ${SOURCE})
26 set_common_target_properties(Diligent-Primitives)
2727
28 target_link_libraries(Primitives
28 target_link_libraries(Diligent-Primitives
2929 PUBLIC
30 BuildSettings
30 Diligent-BuildSettings
3131 )
3232
33 target_include_directories(Primitives
33 target_include_directories(Diligent-Primitives
3434 PUBLIC
3535 interface
3636 )
3838 source_group("interface" FILES ${INTERFACE})
3939 source_group("src" FILES ${SOURCE})
4040
41 set_target_properties(Primitives PROPERTIES
42 FOLDER Core
41 set_target_properties(Diligent-Primitives PROPERTIES
42 FOLDER DiligentCore
4343 )
4444
4545 if(INSTALL_DILIGENT_CORE)
46 install_core_lib(Primitives)
46 install_core_lib(Diligent-Primitives)
4747 endif()
1616 * Added `DRAW_FLAG_VERIFY_DRAW_ATTRIBS`, `DRAW_FLAG_VERIFY_RENDER_TARGETS`, and `DRAW_FLAG_VERIFY_ALL` flags (API Version 240022)
1717 * `TEXTURE_VIEW_FLAGS` enum and `Flags` member to `TextureViewDesc` structure (API Version 240023)
1818 * Added `IShaderResourceVariable::IsBound()` method
19 * Added `Diligent-` prefix to project names to avoid name conflicts.
1920
2021 ## v2.4.b
2122
3131 source_group("source" FILES ${SOURCE})
3232
3333 set_target_properties(File2String PROPERTIES
34 FOLDER Core/Utilities
34 FOLDER DiligentCore/Utilities
3535 )
3636
3737 # When setting RUNTIME_OUTPUT_DIRECTORY_RELEASE to DST_DIR,