SHA256
1
0
forked from pool/gzdoom
gzdoom/gzdoom-staticlibs.patch

100 lines
3.9 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.
---
asmjit/CMakeLists.txt | 2 +-
dumb/CMakeLists.txt | 2 +-
gdtoa/CMakeLists.txt | 2 +-
glslang/glslang/CMakeLists.txt | 2 +-
glslang/spirv/CMakeLists.txt | 4 ++--
lzma/CMakeLists.txt | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
Index: gzdoom-4.0.0/asmjit/CMakeLists.txt
===================================================================
--- gzdoom-4.0.0.orig/asmjit/CMakeLists.txt
+++ gzdoom-4.0.0/asmjit/CMakeLists.txt
@@ -97,7 +97,7 @@ set(ASMJIT_SRCS
asmjit/x86/x86regalloc.cpp
)
-add_library(${ASMJITNAME} ${ASMJIT_SRCS} ${ASMJIT_PUBLIC_HDRS})
+add_library(${ASMJITNAME} STATIC ${ASMJIT_SRCS} ${ASMJIT_PUBLIC_HDRS})
set_target_properties(${ASMJITNAME} PROPERTIES OUTPUT_NAME asmjit)
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 )