Skip to content

Commit

Permalink
CMakeLists.txt: commented out miniz to avoid a link error, as a versi…
Browse files Browse the repository at this point in the history
…on of it already exists in HARFANG.
  • Loading branch information
astrofra committed Jun 14, 2021
1 parent a9b29ab commit c1120a4
Showing 1 changed file with 21 additions and 23 deletions.
44 changes: 21 additions & 23 deletions code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -933,26 +933,27 @@ ELSE()
SOURCE_GROUP(Contrib\\unzip FILES ${unzip_SRCS})
ENDIF()

# zip (https://github.com/kuba--/zip)
IF(ASSIMP_HUNTER_ENABLED)
hunter_add_package(zip)
find_package(zip CONFIG REQUIRED)
ELSE()
SET( ziplib_SRCS
../contrib/zip/src/miniz.h
../contrib/zip/src/zip.c
../contrib/zip/src/zip.h
)

# TODO if cmake required version has been updated to >3.12.0, collapse this to the second case only
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
add_definitions(-DMINIZ_USE_UNALIGNED_LOADS_AND_STORES=0)
else()
add_compile_definitions(MINIZ_USE_UNALIGNED_LOADS_AND_STORES=0)
endif()

SOURCE_GROUP( ziplib FILES ${ziplib_SRCS} )
ENDIF()
# HARFANG: miniz already exists in harfang
## zip (https://github.com/kuba--/zip)
#IF(ASSIMP_HUNTER_ENABLED)
# hunter_add_package(zip)
# find_package(zip CONFIG REQUIRED)
#ELSE()
# SET( ziplib_SRCS
# ../contrib/zip/src/miniz.h
# ../contrib/zip/src/zip.c
# ../contrib/zip/src/zip.h
# )
#
# # TODO if cmake required version has been updated to >3.12.0, collapse this to the second case only
# if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
# add_definitions(-DMINIZ_USE_UNALIGNED_LOADS_AND_STORES=0)
# else()
# add_compile_definitions(MINIZ_USE_UNALIGNED_LOADS_AND_STORES=0)
# endif()
#
# SOURCE_GROUP( ziplib FILES ${ziplib_SRCS} )
#ENDIF()

# openddlparser
IF(ASSIMP_HUNTER_ENABLED)
Expand Down Expand Up @@ -1137,9 +1138,6 @@ ELSE()
TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror)
ENDIF()

# adds C_FLAGS required to compile zip.c on old GCC 4.x compiler
TARGET_COMPILE_FEATURES(assimp PUBLIC c_std_99)

TARGET_INCLUDE_DIRECTORIES ( assimp PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../include>
Expand Down

0 comments on commit c1120a4

Please sign in to comment.