From f7d65091f83abe1cb1a70d6823291df8accbe6ab Mon Sep 17 00:00:00 2001 From: Rafael Reilova Date: Sun, 16 Nov 2014 21:52:24 -0500 Subject: serialize.h: use machine native byte swapping if available, fall-back to previous generic method if not (supported for GCC using endian.h, detection done in cmake) write/readARGB8() - just write 32-bit color in one op, instead of 4 1-byte ops cleanup: removed unneeded buffer init for some serialize-out functions use a #define for the fixed point factor in read/writeF1000() nodemetadata.cpp, nodetimer.cpp optimzation: simpler deserialize node position method staticobject.cpp: cleanup: use util/serialize.h inlines instead of its own de/serialization serialize.cpp: minor optimization/cleanup: avoid generation of unneeded string temporary CMakeLists.txt, cmake_config.h.in: detection of endian.h config.h: added HAVE_ENDIAN_H Commits due to feedback squashed Signed-off-by: Craig Robbins --- src/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b1fd26247..ec6c7fbac 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,6 +2,7 @@ project(minetest) cmake_minimum_required( VERSION 2.6 ) INCLUDE(CheckCSourceRuns) +INCLUDE(CheckIncludeFiles) # Set some random things default to not being visible in the GUI mark_as_advanced(EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH) @@ -313,6 +314,8 @@ if(ENABLE_REDIS) endif(REDIS_LIBRARY AND REDIS_INCLUDE_DIR) endif(ENABLE_REDIS) +CHECK_INCLUDE_FILES(endian.h HAVE_ENDIAN_H) + configure_file( "${PROJECT_SOURCE_DIR}/cmake_config.h.in" "${PROJECT_BINARY_DIR}/cmake_config.h" -- cgit v1.2.3