summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorlogzero <core13@gmx.net>2020-05-01 19:35:48 +0000
committerlogzero <core13@gmx.net>2020-05-01 20:56:32 +0000
commit8037c879fba232aa4d389b95d5e4bbe9c80cae14 (patch)
treef11fac0d4980c219de0802af8b518def81fa007c /Graphics/GraphicsEngineOpenGL
parentUpdated third-party modules (diff)
downloadDiligentCore-8037c879fba232aa4d389b95d5e4bbe9c80cae14.tar.gz
DiligentCore-8037c879fba232aa4d389b95d5e4bbe9c80cae14.zip
Use export map to restrict visible lib symbols under MinGW.
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/CMakeLists.txt b/Graphics/GraphicsEngineOpenGL/CMakeLists.txt
index 39d771e5..d7446208 100644
--- a/Graphics/GraphicsEngineOpenGL/CMakeLists.txt
+++ b/Graphics/GraphicsEngineOpenGL/CMakeLists.txt
@@ -217,6 +217,15 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
# Disallow missing direct and indirect dependencies to enssure that .so is self-contained
LINK_FLAGS "-Wl,--no-undefined -Wl,--no-allow-shlib-undefined"
)
+ if(PLATFORM_WIN32)
+ # Restrict export to GetEngineFactoryOpenGL
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/export.map
+ "{ global: *GetEngineFactoryOpenGL*; local: *; };"
+ )
+ set_property(TARGET Diligent-GraphicsEngineOpenGL-shared APPEND_STRING PROPERTY
+ LINK_FLAGS " -Wl,--version-script=export.map"
+ )
+ endif()
endif()
target_link_libraries(Diligent-GraphicsEngineOpenGL-static