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)
endif(REDIS_LIBRARY AND REDIS_INCLUDE_DIR)
endif(ENABLE_REDIS)
+CHECK_INCLUDE_FILES(endian.h HAVE_ENDIAN_H)
+if(NOT HAVE_ENDIAN_H)
+ set(HAVE_ENDIAN_H 0)
+endif(NOT HAVE_ENDIAN_H)
+
configure_file(
"${PROJECT_SOURCE_DIR}/cmake_config.h.in"
"${PROJECT_BINARY_DIR}/cmake_config.h"
mapblock.cpp
mapgen.cpp
mapgen_singlenode.cpp
+ mapgen_v5.cpp
mapgen_v6.cpp
mapgen_v7.cpp
mapnode.cpp
convert_json.cpp
drawscene.cpp
filecache.cpp
+ fontengine.cpp
game.cpp
guiChatConsole.cpp
guiEngine.cpp
shader.cpp
sky.cpp
tile.cpp
+ wieldmesh.cpp
${minetest_SCRIPT_SRCS}
)
list(SORT minetest_SRCS)
endif(HAS_UNUSED_BUT_SET_VARIABLE_WARNING)
endif()
+ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ # clang does not understand __extern_always_inline but libc headers use it
+ set(OTHER_FLAGS "${OTHER_FLAGS} \"-D__extern_always_inline=extern __always_inline\"")
+ endif()
+
if(MINGW)
set(OTHER_FLAGS "-mthreads -fexceptions")
endif()