Skip to content

Commit c3f1547

Browse files
committed
Use def-based exports in non-msvc PLATFORM_WIN32 builds
1 parent 243c7dd commit c3f1547

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

Graphics/Archiver/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ add_library(Diligent-Archiver-shared SHARED
7878
readme.md
7979
)
8080

81-
if(MSVC)
81+
if(PLATFORM_WIN32 AND NOT MINGW_BUILD)
8282
target_sources(Diligent-Archiver-shared PRIVATE ${DLL_SOURCE})
8383
endif()
8484

Graphics/Archiver/interface/ArchiverFactoryLoader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
// https://gcc.gnu.org/wiki/Visibility
3333
# define API_QUALIFIER __attribute__((visibility("default")))
3434
#elif PLATFORM_WIN32 || PLATFORM_UNIVERSAL_WINDOWS
35-
# define API_QUALIFIER __declspec(dllexport)
35+
# define API_QUALIFIER
3636
#else
3737
# error Unsupported platform
3838
#endif

Graphics/GraphicsEngineOpenGL/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ add_library(Diligent-GraphicsEngineOpenGL-static STATIC
173173
add_library(Diligent-GraphicsEngineOpenGL-shared SHARED
174174
readme.md
175175
)
176-
if(MSVC)
176+
if(PLATFORM_WIN32 AND NOT MINGW_BUILD)
177177
target_sources(Diligent-GraphicsEngineOpenGL-shared PRIVATE ${DLL_SOURCE})
178178
endif()
179179

Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
// https://gcc.gnu.org/wiki/Visibility
4343
# define API_QUALIFIER __attribute__((visibility("default")))
4444
#elif PLATFORM_WIN32
45-
# define API_QUALIFIER __declspec(dllexport)
45+
# define API_QUALIFIER
4646
#else
4747
# error Unsupported platform
4848
#endif

Graphics/GraphicsEngineVulkan/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ add_library(Diligent-GraphicsEngineVk-shared SHARED
162162
readme.md
163163
)
164164

165-
if(MSVC)
165+
if(PLATFORM_WIN32 AND NOT MINGW_BUILD)
166166
target_sources(Diligent-GraphicsEngineVk-shared PRIVATE ${DLL_SOURCE})
167167
endif()
168168

Graphics/GraphicsEngineVulkan/interface/EngineFactoryVk.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
// https://gcc.gnu.org/wiki/Visibility
4040
# define API_QUALIFIER __attribute__((visibility("default")))
4141
#elif PLATFORM_WIN32
42-
# define API_QUALIFIER __declspec(dllexport)
42+
# define API_QUALIFIER
4343
#else
4444
# error Unsupported platform
4545
#endif

Graphics/GraphicsEngineWebGPU/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ add_library(Diligent-GraphicsEngineWebGPU-shared SHARED
106106
readme.md
107107
)
108108

109-
if(MSVC)
109+
if(PLATFORM_WIN32 AND NOT MINGW_BUILD)
110110
target_sources(Diligent-GraphicsEngineWebGPU-shared PRIVATE ${DLL_SOURCE})
111111
endif()
112112

Graphics/GraphicsEngineWebGPU/interface/EngineFactoryWebGPU.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
// https://gcc.gnu.org/wiki/Visibility
3939
# define API_QUALIFIER __attribute__((visibility("default")))
4040
#elif PLATFORM_WIN32
41-
# define API_QUALIFIER __declspec(dllexport)
41+
# define API_QUALIFIER
4242
#else
4343
# error Unsupported platform
4444
#endif

0 commit comments

Comments
 (0)