From 534037f76b87662c77f18e3c796cb7b39e7b890e Mon Sep 17 00:00:00 2001 From: kimkulling Date: Tue, 26 Jan 2021 09:14:06 +0100 Subject: [PATCH] enable own zlib build in ci for windows --- .github/workflows/ccpp.yml | 2 +- code/CMakeLists.txt | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index f29e2e500..2b3cdd0fd 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -88,7 +88,7 @@ jobs: - name: Set Windows specific CMake arguments if: contains(matrix.name, 'windows') id: windows_extra_cmake_args - run: echo "::set-output name=args::-DASSIMP_BUILD_ASSIMP_TOOLS=1 -DASSIMP_BUILD_ASSIMP_VIEW=1" + run: echo "::set-output name=args::-DASSIMP_BUILD_ASSIMP_TOOLS=1 -DASSIMP_BUILD_ASSIMP_VIEW=1 -ASSIMP_BUILD_ZLIB=1" - name: Set Hunter specific CMake arguments if: contains(matrix.name, 'hunter') diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 333c0058d..7a90ae6e0 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -963,7 +963,7 @@ IF(ASSIMP_HUNTER_ENABLED) INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) ELSE() IF ( NOT ASSIMP_BUILD_ZLIB ) - FIND_PACKAGE(ZLIB) + FIND_PACKAGE(ZLIB CONFIG REQUIRED) INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) ELSE() IF( BUILD_SHARED_LIBS) @@ -997,12 +997,12 @@ ELSE() ../contrib/zlib/zutil.c ) INCLUDE_DIRECTORIES(../contrib/zlib/) - set( ASM686 FALSE CACHE INTERNAL "Override ZLIB flag to turn off assembly" FORCE ) - set( AMD64 FALSE CACHE INTERNAL "Override ZLIB flag to turn off assembly" FORCE ) + SET( ASM686 FALSE CACHE INTERNAL "Override ZLIB flag to turn off assembly" FORCE ) + SET( AMD64 FALSE CACHE INTERNAL "Override ZLIB flag to turn off assembly" FORCE ) SOURCE_GROUP( zlib FILES ${zlib_SRCS} ) ENDIF() - ENDIF() + # openddlparser IF(ASSIMP_HUNTER_ENABLED) hunter_add_package(openddlparser) @@ -1295,7 +1295,6 @@ IF (RT_FOUND AND ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC) TARGET_LINK_LIBRARIES(assimp ${RT_LIBRARY}) ENDIF () - INSTALL( TARGETS assimp EXPORT "${TARGETS_EXPORT_NAME}" LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR}