mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-26 20:49:29 -05:00
gnu: glslang: Install all libraries.
* gnu/packages/patches/glslang-install-static-libs.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/vulkan.scm (glslang)[source](patches): New field.
This commit is contained in:
parent
8fbf62a6f9
commit
031fab603b
3 changed files with 63 additions and 0 deletions
|
@ -1249,6 +1249,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/glibc-2.29-supported-locales.patch \
|
%D%/packages/patches/glibc-2.29-supported-locales.patch \
|
||||||
%D%/packages/patches/glibc-static-nss.patch \
|
%D%/packages/patches/glibc-static-nss.patch \
|
||||||
%D%/packages/patches/glibc-supported-locales.patch \
|
%D%/packages/patches/glibc-supported-locales.patch \
|
||||||
|
%D%/packages/patches/glslang-install-static-libs.patch \
|
||||||
%D%/packages/patches/gmp-arm-asm-nothumb.patch \
|
%D%/packages/patches/gmp-arm-asm-nothumb.patch \
|
||||||
%D%/packages/patches/gmp-faulty-test.patch \
|
%D%/packages/patches/gmp-faulty-test.patch \
|
||||||
%D%/packages/patches/gnash-fix-giflib-version.patch \
|
%D%/packages/patches/gnash-fix-giflib-version.patch \
|
||||||
|
|
61
gnu/packages/patches/glslang-install-static-libs.patch
Normal file
61
gnu/packages/patches/glslang-install-static-libs.patch
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
Install OGLCompiler et.al. even when building shared libraries. Also fix
|
||||||
|
CMake file locations.
|
||||||
|
|
||||||
|
Patch taken from Gentoo:
|
||||||
|
|
||||||
|
https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-util/glslang/files/glslang-1.3.231-Install-static-libs.patch
|
||||||
|
|
||||||
|
diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt
|
||||||
|
--- a/OGLCompilersDLL/CMakeLists.txt
|
||||||
|
+++ b/OGLCompilersDLL/CMakeLists.txt
|
||||||
|
@@ -41,7 +41,7 @@ if(WIN32)
|
||||||
|
source_group("Source" FILES ${SOURCES})
|
||||||
|
endif(WIN32)
|
||||||
|
|
||||||
|
-if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
|
||||||
|
+if(ENABLE_GLSLANG_INSTALL)
|
||||||
|
install(TARGETS OGLCompiler EXPORT glslang-targets)
|
||||||
|
|
||||||
|
# Backward compatibility
|
||||||
|
@@ -49,7 +49,7 @@ if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
|
||||||
|
message(WARNING \"Using `OGLCompilerTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\")
|
||||||
|
|
||||||
|
if (NOT TARGET glslang::OGLCompiler)
|
||||||
|
- include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/glslang-targets.cmake\")
|
||||||
|
+ include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_library(OGLCompiler ALIAS glslang::OGLCompiler)
|
||||||
|
diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt
|
||||||
|
--- a/glslang/CMakeLists.txt
|
||||||
|
+++ b/glslang/CMakeLists.txt
|
||||||
|
@@ -203,7 +203,7 @@ endif()
|
||||||
|
################################################################################
|
||||||
|
if(ENABLE_GLSLANG_INSTALL)
|
||||||
|
install(TARGETS glslang EXPORT glslang-targets)
|
||||||
|
- if(NOT BUILD_SHARED_LIBS)
|
||||||
|
+ if(BUILD_SHARED_LIBS)
|
||||||
|
install(TARGETS MachineIndependent EXPORT glslang-targets)
|
||||||
|
install(TARGETS GenericCodeGen EXPORT glslang-targets)
|
||||||
|
|
||||||
|
diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt
|
||||||
|
--- a/glslang/OSDependent/Unix/CMakeLists.txt
|
||||||
|
+++ b/glslang/OSDependent/Unix/CMakeLists.txt
|
||||||
|
@@ -52,7 +52,7 @@ else()
|
||||||
|
target_link_libraries(OSDependent Threads::Threads)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
-if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
|
||||||
|
+if(ENABLE_GLSLANG_INSTALL)
|
||||||
|
install(TARGETS OSDependent EXPORT glslang-targets)
|
||||||
|
|
||||||
|
# Backward compatibility
|
||||||
|
@@ -60,7 +60,7 @@ if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS)
|
||||||
|
message(WARNING \"Using `OSDependentTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\")
|
||||||
|
|
||||||
|
if (NOT TARGET glslang::OSDependent)
|
||||||
|
- include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/glslang-targets.cmake\")
|
||||||
|
+ include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_library(OSDependent ALIAS glslang::OSDependent)
|
|
@ -161,6 +161,7 @@ (define-public glslang
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
(url "https://github.com/KhronosGroup/glslang")
|
(url "https://github.com/KhronosGroup/glslang")
|
||||||
(commit version)))
|
(commit version)))
|
||||||
|
(patches (search-patches "glslang-install-static-libs.patch"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"12a1zl8qxa28nbf6m67260c0lwdw3bqbj0jz1382wgm5px1fpqw6"))
|
"12a1zl8qxa28nbf6m67260c0lwdw3bqbj0jz1382wgm5px1fpqw6"))
|
||||||
|
|
Loading…
Reference in a new issue