From 687f27726cd40a2f09302a6592ba04608c4b0fc1 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Tue, 17 Sep 2019 13:29:14 +0200 Subject: [PATCH] Fixed endianness check for cmake Signed-off-by: Markus Engel --- build-cmake/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build-cmake/CMakeLists.txt b/build-cmake/CMakeLists.txt index bc1728f..1a3ebc3 100644 --- a/build-cmake/CMakeLists.txt +++ b/build-cmake/CMakeLists.txt @@ -17,7 +17,9 @@ TEST_BIG_ENDIAN(WORDS_BIGENDIAN) SET(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") ADD_DEFINITIONS(-DPACKAGE_VERSION="${PACKAGE_VERSION}") ADD_DEFINITIONS(-DPACKAGE_STRING="${PACKAGE_STRING}") -ADD_DEFINITIONS(-DWORDS_BIGENDIAN=${WORDS_BIGENDIAN}) +if (${WORDS_BIGENDIAN}) + ADD_DEFINITIONS(-DWORDS_BIGENDIAN) +endif() if(MSVC) # using Visual Studio C++