gzdoom/gzdoom-staticlibs.patch

86 lines
3.4 KiB
Diff

From: Jan Engelhardt <jengelh@inai.de>
Date: 2018-01-02 19:17:14.364202580 +0100
Bundled code needs to be explicitly set to STATIC, or cmake will generate files
like "liblzma.so" etc. with no versioning and which are not installed by
cmake_install. Some of the code is also an older version and may not
necessarily be suitable for getting switched out by system library copies.
---
dumb/CMakeLists.txt | 2 +-
gdtoa/CMakeLists.txt | 2 +-
glslang/glslang/CMakeLists.txt | 2 +-
glslang/spirv/CMakeLists.txt | 4 ++--
lzma/CMakeLists.txt | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
Index: gzdoom-4.0.0/dumb/CMakeLists.txt
===================================================================
--- gzdoom-4.0.0.orig/dumb/CMakeLists.txt
+++ gzdoom-4.0.0/dumb/CMakeLists.txt
@@ -24,7 +24,7 @@ endif()
include_directories( include )
-add_library( dumb
+add_library( dumb STATIC
src/core/unload.c
src/core/rendsig.c
src/core/rendduh.c
Index: gzdoom-4.0.0/gdtoa/CMakeLists.txt
===================================================================
--- gzdoom-4.0.0.orig/gdtoa/CMakeLists.txt
+++ gzdoom-4.0.0/gdtoa/CMakeLists.txt
@@ -35,7 +35,7 @@ if( NOT MSVC AND NOT APPLE )
set( GEN_FP_DEPS ${CMAKE_CURRENT_BINARY_DIR}/arith.h ${CMAKE_CURRENT_BINARY_DIR}/gd_qnan.h )
endif()
-add_library( gdtoa
+add_library( gdtoa STATIC
${GEN_FP_FILES}
dmisc.c
dtoa.c
Index: gzdoom-4.0.0/glslang/glslang/CMakeLists.txt
===================================================================
--- gzdoom-4.0.0.orig/glslang/glslang/CMakeLists.txt
+++ gzdoom-4.0.0/glslang/glslang/CMakeLists.txt
@@ -106,7 +106,7 @@ set(HEADERS
# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
# set(BISON_GLSLParser_OUTPUT_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/MachineIndependent/glslang_tab.cpp)
-add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS})
+add_library(glslang STATIC ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS})
set_property(TARGET glslang PROPERTY FOLDER glslang)
set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON)
target_link_libraries(glslang OGLCompiler OSDependent)
Index: gzdoom-4.0.0/glslang/spirv/CMakeLists.txt
===================================================================
--- gzdoom-4.0.0.orig/glslang/spirv/CMakeLists.txt
+++ gzdoom-4.0.0/glslang/spirv/CMakeLists.txt
@@ -56,12 +56,12 @@ if(ENABLE_NV_EXTENSIONS)
GLSL.ext.NV.h)
endif(ENABLE_NV_EXTENSIONS)
-add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS})
+add_library(SPIRV STATIC ${SOURCES} ${HEADERS})
set_property(TARGET SPIRV PROPERTY FOLDER glslang)
set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON)
target_include_directories(SPIRV PUBLIC ..)
-add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
+add_library(SPVRemapper STATIC ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS})
set_property(TARGET SPVRemapper PROPERTY FOLDER glslang)
set_property(TARGET SPVRemapper PROPERTY POSITION_INDEPENDENT_CODE ON)
Index: gzdoom-4.0.0/lzma/CMakeLists.txt
===================================================================
--- gzdoom-4.0.0.orig/lzma/CMakeLists.txt
+++ gzdoom-4.0.0/lzma/CMakeLists.txt
@@ -34,5 +34,5 @@ else()
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_7ZIP_ST" )
endif()
-add_library( lzma ${LZMA_FILES} )
+add_library( lzma STATIC ${LZMA_FILES} )
target_link_libraries( lzma )