From b7b840676c4a77d748e93624edaabd389e359ac5 Mon Sep 17 00:00:00 2001 From: assiduous Date: Mon, 3 Feb 2020 13:57:22 -0800 Subject: Disallowed missing direct and indirect dependencies when linking GL and VK shared libs on Linux (fixed https://github.com/DiligentGraphics/DiligentCore/issues/119) --- Graphics/GraphicsEngineVulkan/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/CMakeLists.txt b/Graphics/GraphicsEngineVulkan/CMakeLists.txt index a8669ae5..9300a081 100644 --- a/Graphics/GraphicsEngineVulkan/CMakeLists.txt +++ b/Graphics/GraphicsEngineVulkan/CMakeLists.txt @@ -217,6 +217,11 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") # as hiding is intended target_compile_options(Diligent-GraphicsEngineVk-static PRIVATE -Wno-overloaded-virtual) target_compile_options(Diligent-GraphicsEngineVk-shared PRIVATE -Wno-overloaded-virtual) +elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU") + set_target_properties(Diligent-GraphicsEngineVk-shared PROPERTIES + # Disallow missing direct and indirect dependencies to enssure that .so is self-contained + LINK_FLAGS "-Wl,--no-undefined -Wl,--no-allow-shlib-undefined" + ) endif() if(PLATFORM_WIN32) -- cgit v1.2.3