diff options
author | ShadowNinja <shadowninja@minetest.net> | 2017-06-03 14:55:10 -0400 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2017-06-03 14:55:10 -0400 |
commit | caecdb681c428c1aab9c0f7eec2570c0460f995c (patch) | |
tree | e5115982ea59bbf2343ba9b35bc4a0cfbb56f407 /src/CMakeLists.txt | |
parent | 81d56b94919dceb7b2e51d70b21a7ca22f852bd5 (diff) | |
parent | 80dc961d24e1964e25d57039ddb2ba639f9f4d22 (diff) | |
download | minetest-caecdb681c428c1aab9c0f7eec2570c0460f995c.tar.gz minetest-caecdb681c428c1aab9c0f7eec2570c0460f995c.tar.bz2 minetest-caecdb681c428c1aab9c0f7eec2570c0460f995c.zip |
Merge 0.4.16 into stable-0.4
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 51 |
1 files changed, 24 insertions, 27 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3aa645df9..7c1a4eee0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -156,26 +156,6 @@ if(ENABLE_FREETYPE) endif() endif(ENABLE_FREETYPE) -# LuaJIT -option(ENABLE_LUAJIT "Enable LuaJIT support" TRUE) -set(USE_LUAJIT FALSE) -if(ENABLE_LUAJIT) - find_package(LuaJIT) - if(LUAJIT_FOUND) - set(USE_LUAJIT TRUE) - endif(LUAJIT_FOUND) -else() - message (STATUS "LuaJIT detection disabled! (ENABLE_LUAJIT=0)") -endif() -if(NOT USE_LUAJIT) - message(STATUS "LuaJIT not found, using bundled Lua.") - set(LUA_LIBRARY "lua") - set(LUA_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lua/src") - add_subdirectory(lua) -endif() - -find_package(GMP REQUIRED) - option(ENABLE_CURSES "Enable ncurses console" TRUE) set(USE_CURSES FALSE) @@ -253,7 +233,6 @@ endif(ENABLE_REDIS) find_package(SQLite3 REQUIRED) -find_package(Json REQUIRED) OPTION(ENABLE_SPATIAL "Enable SpatialIndex AreaStore backend" TRUE) set(USE_SPATIAL FALSE) @@ -284,6 +263,8 @@ if(WIN32) set(PLATFORM_LIBS dbghelp.lib ${PLATFORM_LIBS}) # Surpress some useless warnings add_definitions ( /D "_CRT_SECURE_NO_DEPRECATE" /W1 ) + # Get M_PI to work + add_definitions(/D "_USE_MATH_DEFINES") else() # Probably MinGW = GCC set(PLATFORM_LIBS "") endif() @@ -396,6 +377,7 @@ set(common_SRCS convert_json.cpp craftdef.cpp database-dummy.cpp + database-files.cpp database-leveldb.cpp database-postgresql.cpp database-redis.cpp @@ -406,6 +388,7 @@ set(common_SRCS dungeongen.cpp emerge.cpp environment.cpp + face_position_cache.cpp filesys.cpp genericobject.cpp gettext.cpp @@ -413,6 +396,7 @@ set(common_SRCS inventory.cpp inventorymanager.cpp itemdef.cpp + itemstackmetadata.cpp light.cpp log.cpp map.cpp @@ -428,6 +412,7 @@ set(common_SRCS mapgen_valleys.cpp mapnode.cpp mapsector.cpp + metadata.cpp mg_biome.cpp mg_decoration.cpp mg_ore.cpp @@ -447,10 +432,12 @@ set(common_SRCS quicktune.cpp reflowscan.cpp remoteplayer.cpp + raycast.cpp rollback.cpp rollback_interface.cpp serialization.cpp server.cpp + serverenvironment.cpp serverlist.cpp serverobject.cpp settings.cpp @@ -459,6 +446,7 @@ set(common_SRCS staticobject.cpp subgame.cpp terminal_chat_console.cpp + tileanimation.cpp tool.cpp treegen.cpp version.cpp @@ -506,6 +494,7 @@ set(client_SRCS ${client_irrlicht_changes_SRCS} camera.cpp client.cpp + clientenvironment.cpp clientmap.cpp clientmedia.cpp clientobject.cpp @@ -535,6 +524,7 @@ set(client_SRCS main.cpp mapblock_mesh.cpp mesh.cpp + mesh_generator_thread.cpp minimap.cpp particles.cpp shader.cpp @@ -722,7 +712,11 @@ if(MSVC) # EHa enables SEH exceptions (used for catching segfaults) set(CMAKE_CXX_FLAGS_RELEASE "/EHa /Ox /GL /FD /MT /GS- /Zi /arch:SSE /fp:fast /D NDEBUG /D _HAS_ITERATOR_DEBUGGING=0 /TP") #set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/LTCG /NODEFAULTLIB:\"libcmtd.lib\" /NODEFAULTLIB:\"libcmt.lib\"") - set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/LTCG /DEBUG /OPT:REF /OPT:ICF") + set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/LTCG /INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF") + + + set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup") + set(CMAKE_CXX_FLAGS_SEMIDEBUG "/MDd /Zi /Ob0 /O1 /RTC1") @@ -760,18 +754,22 @@ else() set(OTHER_FLAGS "${OTHER_FLAGS} -mthreads -fexceptions") endif() - set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${RELEASE_WARNING_FLAGS} ${WARNING_FLAGS} ${OTHER_FLAGS} -ffast-math -Wall -pipe -funroll-loops") - if(APPLE) + set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${RELEASE_WARNING_FLAGS} ${WARNING_FLAGS} ${OTHER_FLAGS} -Wall -pipe -funroll-loops") + if(CMAKE_SYSTEM_NAME MATCHES "(Darwin|FreeBSD)") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Os") else() - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -fomit-frame-pointer") - endif(APPLE) + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -ffast-math -fomit-frame-pointer") + endif(CMAKE_SYSTEM_NAME MATCHES "(Darwin|FreeBSD)") set(CMAKE_CXX_FLAGS_SEMIDEBUG "-g -O1 -Wall -Wabi ${WARNING_FLAGS} ${OTHER_FLAGS}") set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wabi ${WARNING_FLAGS} ${OTHER_FLAGS}") if(USE_GPROF) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -pg") endif() + + if(MINGW) + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mwindows") + endif() endif() @@ -887,4 +885,3 @@ endif() if (BUILD_CLIENT AND USE_FREETYPE) add_subdirectory(cguittfont) endif() - |