Skip to content

Commit 59421dc

Browse files
committed
- Disable statically linked zlib for build platforms
1 parent f7d0142 commit 59421dc

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ platforms:
5454
script_location: toolchain/ci
5555
template_location: toolchain/cmake/Templates
5656
version:
57-
hotfix: 10
57+
hotfix: 11
5858
major: 0
5959
minor: 3
6060
patch: 2

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ set ( FFMPEG_VER "4.1.2" )
118118
# Turning builds on/off
119119

120120
if(BUILD_PLATFORM)
121+
set ( ZLIB_BUILD OFF ) # There are problems with shared libs and static zlib
121122
set ( SQUISH_BUILD ON )
122123
set ( FFMPEG_BUILD ON )
123124
set ( COMPRESSONATOR_BUILD ON )

patches/assimp-zlib-find.patch

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ index dcafb649..b3d5c795 100644
1111

1212
# Toggles the use of the hunter package manager
1313
option(HUNTER_ENABLED "Enable Hunter package manager support" OFF)
14-
@@ -437,10 +437,10 @@ IF(HUNTER_ENABLED)
14+
@@ -437,10 +437,11 @@ IF(HUNTER_ENABLED)
1515
set(ASSIMP_BUILD_MINIZIP TRUE)
1616
ELSE(HUNTER_ENABLED)
1717
IF ( NOT ASSIMP_BUILD_ZLIB )
18-
- FIND_PACKAGE(ZLIB)
18+
FIND_PACKAGE(ZLIB)
1919
+ FIND_PACKAGE(zlib)
2020
ENDIF( NOT ASSIMP_BUILD_ZLIB )
2121

@@ -24,7 +24,7 @@ index dcafb649..b3d5c795 100644
2424
MESSAGE(STATUS "compiling zlib from sources")
2525
INCLUDE(CheckIncludeFile)
2626
INCLUDE(CheckTypeSize)
27-
@@ -461,11 +461,16 @@ ELSE(HUNTER_ENABLED)
27+
@@ -461,11 +461,19 @@ ELSE(HUNTER_ENABLED)
2828
SET(ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/contrib/zlib ${CMAKE_CURRENT_BINARY_DIR}/contrib/zlib)
2929
# need to ensure we don't link with system zlib or minizip as well.
3030
SET(ASSIMP_BUILD_MINIZIP 1)
@@ -35,6 +35,9 @@ index dcafb649..b3d5c795 100644
3535
- ENDIF(NOT ZLIB_FOUND)
3636
- INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
3737
+ SET(ZLIB_LIBRARIES zlib::zlibstatic)
38+
+ ELSEIF( ZLIB_FOUND )
39+
+ ADD_DEFINITIONS(-DASSIMP_BUILD_NO_OWN_ZLIB)
40+
+ SET(ZLIB_LIBRARIES_LINKED -lz)
3841
+ ELSEIF( EMSCRIPTEN )
3942
+ ADD_DEFINITIONS(-DASSIMP_BUILD_NO_OWN_ZLIB)
4043
+ ADD_LIBRARY(zlibstatic INTERFACE)

0 commit comments

Comments
 (0)