Fix change to CMakeLists.txt

change CMakeLists.txt to use add_definitions instead of add_compile_definitions on old versions of cmake
This commit is contained in:
Charlie Gettys
2019-03-27 11:43:21 -04:00
committed by GitHub
parent 769dd42b73
commit d718793163

View File

@@ -865,7 +865,13 @@ SET( ziplib_SRCS
../contrib/zip/src/zip.c
../contrib/zip/src/zip.h
)
add_compile_definitions(MINIZ_USE_UNALIGNED_LOADS_AND_STORES 0)
# 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} )