From d718793163828be2138bc34ef3af05a52dc4f770 Mon Sep 17 00:00:00 2001 From: Charlie Gettys Date: Wed, 27 Mar 2019 11:43:21 -0400 Subject: [PATCH] Fix change to CMakeLists.txt change CMakeLists.txt to use add_definitions instead of add_compile_definitions on old versions of cmake --- code/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 38a97f2a5..a10c0bd28 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -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} )