glslang/0001-build-set-SOVERSION-on-all-libraries.patch

65 lines
2.7 KiB
Diff

From ed00a83502072235206615a8148814e74fdfc711 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Tue, 18 Aug 2020 17:12:16 +0200
Subject: [PATCH] build: set SOVERSION on all libraries
References: https://github.com/KhronosGroup/glslang/pull/2373
Commit fbe9a23baf2cb020fe3f80d68d972e2a97d9b954 erroneously
only added SOVERSION to libglslang.so, but none of the others
that are produced.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
SPIRV/CMakeLists.txt | 2 ++
StandAlone/CMakeLists.txt | 1 +
hlsl/CMakeLists.txt | 1 +
3 files changed, 4 insertions(+)
diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt
index d699dadd..75202255 100644
--- a/SPIRV/CMakeLists.txt
+++ b/SPIRV/CMakeLists.txt
@@ -69,6 +69,7 @@ set(SPVREMAP_HEADERS
doc.h)
add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS})
+set_target_properties(SPIRV PROPERTIES VERSION "${GLSLANG_VERSION}" SOVERSION "${GLSLANG_VERSION_MAJOR}")
set_property(TARGET SPIRV PROPERTY FOLDER glslang)
set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON)
target_include_directories(SPIRV PUBLIC
@@ -79,6 +80,7 @@ glslang_add_build_info_dependency(SPIRV)
if (ENABLE_SPVREMAPPER)
add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
+ set_target_properties(SPVRemapper PROPERTIES VERSION "${GLSLANG_VERSION}" SOVERSION "${GLSLANG_VERSION_MAJOR}")
set_property(TARGET SPVRemapper PROPERTY FOLDER glslang)
set_property(TARGET SPVRemapper PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()
diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt
index 8038c043..ea3a31c2 100644
--- a/StandAlone/CMakeLists.txt
+++ b/StandAlone/CMakeLists.txt
@@ -34,6 +34,7 @@
add_library(glslang-default-resource-limits
${CMAKE_CURRENT_SOURCE_DIR}/ResourceLimits.cpp
${CMAKE_CURRENT_SOURCE_DIR}/resource_limits_c.cpp)
+set_target_properties(glslang-default-resource-limits PROPERTIES VERSION "${GLSLANG_VERSION}" SOVERSION "${GLSLANG_VERSION_MAJOR}")
set_property(TARGET glslang-default-resource-limits PROPERTY FOLDER glslang)
set_property(TARGET glslang-default-resource-limits PROPERTY POSITION_INDEPENDENT_CODE ON)
diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt
index 62faa195..a73761ba 100644
--- a/hlsl/CMakeLists.txt
+++ b/hlsl/CMakeLists.txt
@@ -40,6 +40,7 @@
add_library(HLSL ${LIB_TYPE} "stub.cpp")
set_property(TARGET HLSL PROPERTY FOLDER hlsl)
set_property(TARGET HLSL PROPERTY POSITION_INDEPENDENT_CODE ON)
+set_target_properties(HLSL PROPERTIES VERSION "${GLSLANG_VERSION}" SOVERSION "${GLSLANG_VERSION_MAJOR}")
if(WIN32 AND BUILD_SHARED_LIBS)
set_target_properties(HLSL PROPERTIES PREFIX "")
--
2.28.0