1
0
Fork 0
minetest-engine-multicraft2/CMakeLists.txt

366 lines
13 KiB
CMake
Raw Permalink Normal View History

fix package , fix ci build, tune cmake flags and rules * tune up gitlab ci: * remove package part cos we have obs service * add feladora 38 and feladora 37 too * remove winbuntu 14, add debian 11, 12, winbuntu 17, 20, 22 * use minenux minetest repo game (seems not work) * remove non buildable stages.. only build and package shit win * set multicraft as prefix path and artifacts * back cmake in list new behaviour for blacklist locales * gitlab ci buil for debian 8 using backports on jsoncpp * solved https://github.com/minetest/minetest/issues/6567 * solved https://github.com/minetest/minetest/issues/7681 * cmake fixed to minimum supported and c++11 standar able * close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/51 * allow distro hardening and cflags env close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/55 * Fix no locales being generated when APPLY_LOCALE_BLACKLIST=0 * Fix linking with Postgres libs: * closes https://github.com/minetest/minetest/issues/12149 * closes https://github.com/minetest/minetest/issues/11219 * PostgreSQL fallback code missed the includes https://github.com/minetest/minetest/issues/11219 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * https://github.com/minetest/minetest/commit/3e2145d662d26443e96ac7191eda093c85c6f2bc * integrates https://github.com/minetest/minetest/pull/11215 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * backported https://github.com/minetest/minetest/commit/998e4820c982c0ea9d257c15f93f1f21d85d6327 * tune up windoser build scripts for multicraft: * fix build paths builds script due repo change name * fix winbuntu image fosal and fix missing deploy for win shit package * use SSE registers for FP operations on i386 for modern gcc platforms only * only use if related are given, by example 32bit using gcc compilers/stdlibs becouse of the long time bugs around those errors by desing, its not about to crash the engine.. its about to permits to hacked clients (either players or the client program per se) making predictable results, so predictable results permits to catch securit issues! * floating point problems are only on modern gcc and modern platform arches, raising problems like bad calculations positions.. a long time bug reported at https://git.minetest.land/Mineclonia/Mineclonia/issues/201 and addressed at https://github.com/minetest/minetest/issues/11742#issuecomment-994444462 with enought explanations but not accepted byt stupid developers.. now years later.. the problems were solved and reconiced as big bug! A workaround were proposed at https://github.com/minetest/minetest/pull/12389/files but never accepted (included in this repository), cos was superset by https://github.com/minetest/minetest/commit/8ff3fadba033dbc686c4f834811f0744099fedfb * closes https://codeberg.org/minenux/minetest-engine-multicraft2/issues/57
2023-09-15 19:16:25 -07:00
cmake_minimum_required(VERSION 2.6)
cmake_policy(SET CMP0025 OLD)
# This can be read from ${PROJECT_NAME} after project() is called
2020-08-25 00:59:52 -07:00
project(multicraft)
set(PROJECT_NAME_CAPITALIZED "MultiCraft")
fix package , fix ci build, tune cmake flags and rules * tune up gitlab ci: * remove package part cos we have obs service * add feladora 38 and feladora 37 too * remove winbuntu 14, add debian 11, 12, winbuntu 17, 20, 22 * use minenux minetest repo game (seems not work) * remove non buildable stages.. only build and package shit win * set multicraft as prefix path and artifacts * back cmake in list new behaviour for blacklist locales * gitlab ci buil for debian 8 using backports on jsoncpp * solved https://github.com/minetest/minetest/issues/6567 * solved https://github.com/minetest/minetest/issues/7681 * cmake fixed to minimum supported and c++11 standar able * close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/51 * allow distro hardening and cflags env close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/55 * Fix no locales being generated when APPLY_LOCALE_BLACKLIST=0 * Fix linking with Postgres libs: * closes https://github.com/minetest/minetest/issues/12149 * closes https://github.com/minetest/minetest/issues/11219 * PostgreSQL fallback code missed the includes https://github.com/minetest/minetest/issues/11219 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * https://github.com/minetest/minetest/commit/3e2145d662d26443e96ac7191eda093c85c6f2bc * integrates https://github.com/minetest/minetest/pull/11215 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * backported https://github.com/minetest/minetest/commit/998e4820c982c0ea9d257c15f93f1f21d85d6327 * tune up windoser build scripts for multicraft: * fix build paths builds script due repo change name * fix winbuntu image fosal and fix missing deploy for win shit package * use SSE registers for FP operations on i386 for modern gcc platforms only * only use if related are given, by example 32bit using gcc compilers/stdlibs becouse of the long time bugs around those errors by desing, its not about to crash the engine.. its about to permits to hacked clients (either players or the client program per se) making predictable results, so predictable results permits to catch securit issues! * floating point problems are only on modern gcc and modern platform arches, raising problems like bad calculations positions.. a long time bug reported at https://git.minetest.land/Mineclonia/Mineclonia/issues/201 and addressed at https://github.com/minetest/minetest/issues/11742#issuecomment-994444462 with enought explanations but not accepted byt stupid developers.. now years later.. the problems were solved and reconiced as big bug! A workaround were proposed at https://github.com/minetest/minetest/pull/12389/files but never accepted (included in this repository), cos was superset by https://github.com/minetest/minetest/commit/8ff3fadba033dbc686c4f834811f0744099fedfb * closes https://codeberg.org/minenux/minetest-engine-multicraft2/issues/57
2023-09-15 19:16:25 -07:00
# check compatible compileer must be after project definition and set flags, assume if C++ is installed also CC is installed
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
endif()
if (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
elseif (CMAKE_C_COMPILER_VERSION VERSION_EQUAL 4.6)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu1x")
else()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
endif()
message(STATUS "using gnu compiler")
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++1y")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
endif()
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 3.5)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
endif()
message(STATUS "using clang compiler")
else()
if (CMAKE_VERSION VERSION_GREATER 3.0)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 11)
else()
if(APPLE)
# Fix behavior of CMAKE_CXX_STANDARD when targeting macOS.
if (POLICY CMP0025)
cmake_policy(SET CMP0025 NEW)
endif ()
endif ()
endif()
message(STATUS "using default installed compiler")
endif()
# Also remember to set PROTOCOL_VERSION in network/networkprotocol.h when releasing
2020-08-25 00:59:52 -07:00
set(VERSION_MAJOR 2)
set(VERSION_MINOR 0)
set(VERSION_PATCH 5)
set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
# Change to false for releases
2020-07-09 13:04:20 -07:00
set(DEVELOPMENT_BUILD FALSE)
fix package , fix ci build, tune cmake flags and rules * tune up gitlab ci: * remove package part cos we have obs service * add feladora 38 and feladora 37 too * remove winbuntu 14, add debian 11, 12, winbuntu 17, 20, 22 * use minenux minetest repo game (seems not work) * remove non buildable stages.. only build and package shit win * set multicraft as prefix path and artifacts * back cmake in list new behaviour for blacklist locales * gitlab ci buil for debian 8 using backports on jsoncpp * solved https://github.com/minetest/minetest/issues/6567 * solved https://github.com/minetest/minetest/issues/7681 * cmake fixed to minimum supported and c++11 standar able * close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/51 * allow distro hardening and cflags env close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/55 * Fix no locales being generated when APPLY_LOCALE_BLACKLIST=0 * Fix linking with Postgres libs: * closes https://github.com/minetest/minetest/issues/12149 * closes https://github.com/minetest/minetest/issues/11219 * PostgreSQL fallback code missed the includes https://github.com/minetest/minetest/issues/11219 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * https://github.com/minetest/minetest/commit/3e2145d662d26443e96ac7191eda093c85c6f2bc * integrates https://github.com/minetest/minetest/pull/11215 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * backported https://github.com/minetest/minetest/commit/998e4820c982c0ea9d257c15f93f1f21d85d6327 * tune up windoser build scripts for multicraft: * fix build paths builds script due repo change name * fix winbuntu image fosal and fix missing deploy for win shit package * use SSE registers for FP operations on i386 for modern gcc platforms only * only use if related are given, by example 32bit using gcc compilers/stdlibs becouse of the long time bugs around those errors by desing, its not about to crash the engine.. its about to permits to hacked clients (either players or the client program per se) making predictable results, so predictable results permits to catch securit issues! * floating point problems are only on modern gcc and modern platform arches, raising problems like bad calculations positions.. a long time bug reported at https://git.minetest.land/Mineclonia/Mineclonia/issues/201 and addressed at https://github.com/minetest/minetest/issues/11742#issuecomment-994444462 with enought explanations but not accepted byt stupid developers.. now years later.. the problems were solved and reconiced as big bug! A workaround were proposed at https://github.com/minetest/minetest/pull/12389/files but never accepted (included in this repository), cos was superset by https://github.com/minetest/minetest/commit/8ff3fadba033dbc686c4f834811f0744099fedfb * closes https://codeberg.org/minenux/minetest-engine-multicraft2/issues/57
2023-09-15 19:16:25 -07:00
set(ENABLE_UPDATE_CHECKER FALSE CACHE BOOL
"Whether to enable update checks by default")
set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
if(VERSION_EXTRA)
fix package , fix ci build, tune cmake flags and rules * tune up gitlab ci: * remove package part cos we have obs service * add feladora 38 and feladora 37 too * remove winbuntu 14, add debian 11, 12, winbuntu 17, 20, 22 * use minenux minetest repo game (seems not work) * remove non buildable stages.. only build and package shit win * set multicraft as prefix path and artifacts * back cmake in list new behaviour for blacklist locales * gitlab ci buil for debian 8 using backports on jsoncpp * solved https://github.com/minetest/minetest/issues/6567 * solved https://github.com/minetest/minetest/issues/7681 * cmake fixed to minimum supported and c++11 standar able * close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/51 * allow distro hardening and cflags env close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/55 * Fix no locales being generated when APPLY_LOCALE_BLACKLIST=0 * Fix linking with Postgres libs: * closes https://github.com/minetest/minetest/issues/12149 * closes https://github.com/minetest/minetest/issues/11219 * PostgreSQL fallback code missed the includes https://github.com/minetest/minetest/issues/11219 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * https://github.com/minetest/minetest/commit/3e2145d662d26443e96ac7191eda093c85c6f2bc * integrates https://github.com/minetest/minetest/pull/11215 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * backported https://github.com/minetest/minetest/commit/998e4820c982c0ea9d257c15f93f1f21d85d6327 * tune up windoser build scripts for multicraft: * fix build paths builds script due repo change name * fix winbuntu image fosal and fix missing deploy for win shit package * use SSE registers for FP operations on i386 for modern gcc platforms only * only use if related are given, by example 32bit using gcc compilers/stdlibs becouse of the long time bugs around those errors by desing, its not about to crash the engine.. its about to permits to hacked clients (either players or the client program per se) making predictable results, so predictable results permits to catch securit issues! * floating point problems are only on modern gcc and modern platform arches, raising problems like bad calculations positions.. a long time bug reported at https://git.minetest.land/Mineclonia/Mineclonia/issues/201 and addressed at https://github.com/minetest/minetest/issues/11742#issuecomment-994444462 with enought explanations but not accepted byt stupid developers.. now years later.. the problems were solved and reconiced as big bug! A workaround were proposed at https://github.com/minetest/minetest/pull/12389/files but never accepted (included in this repository), cos was superset by https://github.com/minetest/minetest/commit/8ff3fadba033dbc686c4f834811f0744099fedfb * closes https://codeberg.org/minenux/minetest-engine-multicraft2/issues/57
2023-09-15 19:16:25 -07:00
set(VERSION_STRING "${VERSION_STRING}-${VERSION_EXTRA}")
elseif(DEVELOPMENT_BUILD)
set(VERSION_STRING "${VERSION_STRING}-dev")
endif()
2011-01-08 09:35:14 -08:00
if (CMAKE_BUILD_TYPE STREQUAL Debug)
# Append "-debug" to version string
set(VERSION_STRING "${VERSION_STRING}-debug")
endif()
message(STATUS "*** Will build version ${VERSION_STRING} ***")
# Configuration options
set(DEFAULT_RUN_IN_PLACE FALSE)
2011-01-09 07:28:31 -08:00
if(WIN32)
set(DEFAULT_RUN_IN_PLACE TRUE)
2011-01-09 07:28:31 -08:00
endif()
set(RUN_IN_PLACE ${DEFAULT_RUN_IN_PLACE} CACHE BOOL
"Run directly in source directory structure")
set(BUILD_CLIENT TRUE CACHE BOOL "Build client")
set(BUILD_SERVER FALSE CACHE BOOL "Build server")
2020-09-04 11:07:19 -07:00
set(BUILD_UNITTESTS FALSE CACHE BOOL "Build unittests")
set(WARN_ALL TRUE CACHE BOOL "Enable -Wall for Release build")
2011-01-08 14:49:32 -08:00
if(NOT CMAKE_BUILD_TYPE)
# Default to release
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type: Debug or Release" FORCE)
endif()
# Included stuff
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
# This is done here so that relative search paths are more reasonable
find_package(Irrlicht)
# Installation
if(WIN32)
set(SHAREDIR ".")
set(BINDIR "bin")
set(DOCDIR "doc")
set(EXAMPLE_CONF_DIR ".")
set(LOCALEDIR "locale")
elseif(APPLE)
set(BUNDLE_NAME ${PROJECT_NAME}.app)
set(BUNDLE_PATH "${BUNDLE_NAME}")
set(BINDIR ${BUNDLE_NAME}/Contents/MacOS)
set(SHAREDIR ${BUNDLE_NAME}/Contents/Resources)
set(DOCDIR "${SHAREDIR}/${PROJECT_NAME}")
set(EXAMPLE_CONF_DIR ${DOCDIR})
set(LOCALEDIR "${SHAREDIR}/locale")
elseif(UNIX) # Linux, BSD etc
if(RUN_IN_PLACE)
set(SHAREDIR ".")
set(BINDIR "bin")
set(DOCDIR "doc")
set(EXAMPLE_CONF_DIR ".")
set(MANDIR "unix/man")
set(XDG_APPS_DIR "unix/applications")
2017-01-17 07:26:21 -08:00
set(APPDATADIR "unix/metainfo")
set(ICONDIR "unix/icons")
set(LOCALEDIR "locale")
else()
set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}")
2012-07-23 05:23:33 -07:00
set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin")
set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}")
2012-07-23 05:23:33 -07:00
set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man")
set(EXAMPLE_CONF_DIR ${DOCDIR})
2012-07-23 05:23:33 -07:00
set(XDG_APPS_DIR "${CMAKE_INSTALL_PREFIX}/share/applications")
2017-01-17 07:26:21 -08:00
set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/metainfo")
2012-07-23 05:23:33 -07:00
set(ICONDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale")
endif()
endif()
2012-07-23 05:23:33 -07:00
set(CUSTOM_SHAREDIR "" CACHE STRING "Directory to install data files into")
if(NOT CUSTOM_SHAREDIR STREQUAL "")
set(SHAREDIR "${CUSTOM_SHAREDIR}")
message(STATUS "Using SHAREDIR=${SHAREDIR}")
endif()
2012-07-23 05:23:33 -07:00
set(CUSTOM_BINDIR "" CACHE STRING "Directory to install binaries into")
if(NOT CUSTOM_BINDIR STREQUAL "")
set(BINDIR "${CUSTOM_BINDIR}")
message(STATUS "Using BINDIR=${BINDIR}")
endif()
2012-07-23 05:23:33 -07:00
set(CUSTOM_DOCDIR "" CACHE STRING "Directory to install documentation into")
if(NOT CUSTOM_DOCDIR STREQUAL "")
set(DOCDIR "${CUSTOM_DOCDIR}")
if(NOT RUN_IN_PLACE)
set(EXAMPLE_CONF_DIR ${DOCDIR})
endif()
2012-07-23 05:23:33 -07:00
message(STATUS "Using DOCDIR=${DOCDIR}")
endif()
2012-07-23 05:23:33 -07:00
set(CUSTOM_MANDIR "" CACHE STRING "Directory to install manpages into")
if(NOT CUSTOM_MANDIR STREQUAL "")
set(MANDIR "${CUSTOM_MANDIR}")
message(STATUS "Using MANDIR=${MANDIR}")
endif()
2012-07-23 05:23:33 -07:00
set(CUSTOM_EXAMPLE_CONF_DIR "" CACHE STRING "Directory to install example config file into")
if(NOT CUSTOM_EXAMPLE_CONF_DIR STREQUAL "")
set(EXAMPLE_CONF_DIR "${CUSTOM_EXAMPLE_CONF_DIR}")
message(STATUS "Using EXAMPLE_CONF_DIR=${EXAMPLE_CONF_DIR}")
endif()
2012-07-23 05:23:33 -07:00
set(CUSTOM_XDG_APPS_DIR "" CACHE STRING "Directory to install .desktop files into")
if(NOT CUSTOM_XDG_APPS_DIR STREQUAL "")
set(XDG_APPS_DIR "${CUSTOM_XDG_APPS_DIR}")
message(STATUS "Using XDG_APPS_DIR=${XDG_APPS_DIR}")
endif()
2012-07-23 05:23:33 -07:00
set(CUSTOM_ICONDIR "" CACHE STRING "Directory to install icons into")
if(NOT CUSTOM_ICONDIR STREQUAL "")
set(ICONDIR "${CUSTOM_ICONDIR}")
message(STATUS "Using ICONDIR=${ICONDIR}")
endif()
set(CUSTOM_LOCALEDIR "" CACHE STRING "Directory to install l10n files into")
2012-07-23 05:23:33 -07:00
if(NOT CUSTOM_LOCALEDIR STREQUAL "")
set(LOCALEDIR "${CUSTOM_LOCALEDIR}")
message(STATUS "Using LOCALEDIR=${LOCALEDIR}")
endif()
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/builtin" DESTINATION "${SHAREDIR}")
if(RUN_IN_PLACE)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/mods/mods_here.txt" DESTINATION "${SHAREDIR}/mods")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/textures/texture_packs_here.txt" DESTINATION "${SHAREDIR}/textures")
endif()
fix package , fix ci build, tune cmake flags and rules * tune up gitlab ci: * remove package part cos we have obs service * add feladora 38 and feladora 37 too * remove winbuntu 14, add debian 11, 12, winbuntu 17, 20, 22 * use minenux minetest repo game (seems not work) * remove non buildable stages.. only build and package shit win * set multicraft as prefix path and artifacts * back cmake in list new behaviour for blacklist locales * gitlab ci buil for debian 8 using backports on jsoncpp * solved https://github.com/minetest/minetest/issues/6567 * solved https://github.com/minetest/minetest/issues/7681 * cmake fixed to minimum supported and c++11 standar able * close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/51 * allow distro hardening and cflags env close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/55 * Fix no locales being generated when APPLY_LOCALE_BLACKLIST=0 * Fix linking with Postgres libs: * closes https://github.com/minetest/minetest/issues/12149 * closes https://github.com/minetest/minetest/issues/11219 * PostgreSQL fallback code missed the includes https://github.com/minetest/minetest/issues/11219 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * https://github.com/minetest/minetest/commit/3e2145d662d26443e96ac7191eda093c85c6f2bc * integrates https://github.com/minetest/minetest/pull/11215 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * backported https://github.com/minetest/minetest/commit/998e4820c982c0ea9d257c15f93f1f21d85d6327 * tune up windoser build scripts for multicraft: * fix build paths builds script due repo change name * fix winbuntu image fosal and fix missing deploy for win shit package * use SSE registers for FP operations on i386 for modern gcc platforms only * only use if related are given, by example 32bit using gcc compilers/stdlibs becouse of the long time bugs around those errors by desing, its not about to crash the engine.. its about to permits to hacked clients (either players or the client program per se) making predictable results, so predictable results permits to catch securit issues! * floating point problems are only on modern gcc and modern platform arches, raising problems like bad calculations positions.. a long time bug reported at https://git.minetest.land/Mineclonia/Mineclonia/issues/201 and addressed at https://github.com/minetest/minetest/issues/11742#issuecomment-994444462 with enought explanations but not accepted byt stupid developers.. now years later.. the problems were solved and reconiced as big bug! A workaround were proposed at https://github.com/minetest/minetest/pull/12389/files but never accepted (included in this repository), cos was superset by https://github.com/minetest/minetest/commit/8ff3fadba033dbc686c4f834811f0744099fedfb * closes https://codeberg.org/minenux/minetest-engine-multicraft2/issues/57
2023-09-15 19:16:25 -07:00
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/games/minetest" DESTINATION "${SHAREDIR}/games/"
COMPONENT "SUBGAME_MINETEST_GAME" OPTIONAL PATTERN ".git*" EXCLUDE )
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/games/devtest" DESTINATION "${SHAREDIR}/games/"
COMPONENT "SUBGAME_MINIMAL" OPTIONAL PATTERN ".git*" EXCLUDE )
2015-03-13 04:09:58 -07:00
if(BUILD_CLIENT)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/client/shaders" DESTINATION "${SHAREDIR}/client")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/textures/base/pack" DESTINATION "${SHAREDIR}/textures/base")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/fonts" DESTINATION "${SHAREDIR}")
if(RUN_IN_PLACE)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/clientmods" DESTINATION "${SHAREDIR}")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/client/serverlist" DESTINATION "${SHAREDIR}/client")
endif()
endif()
install(FILES "README.md" DESTINATION "${DOCDIR}" COMPONENT "Docs")
install(FILES "doc/lua_api.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
install(FILES "doc/client_lua_api.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
install(FILES "doc/menu_lua_api.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
install(FILES "doc/texture_packs.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
install(FILES "doc/world_format.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
2020-08-25 00:59:52 -07:00
install(FILES "multicraft.conf.example" DESTINATION "${EXAMPLE_CONF_DIR}")
2014-06-26 11:30:22 -07:00
if(UNIX AND NOT APPLE)
fix package , fix ci build, tune cmake flags and rules * tune up gitlab ci: * remove package part cos we have obs service * add feladora 38 and feladora 37 too * remove winbuntu 14, add debian 11, 12, winbuntu 17, 20, 22 * use minenux minetest repo game (seems not work) * remove non buildable stages.. only build and package shit win * set multicraft as prefix path and artifacts * back cmake in list new behaviour for blacklist locales * gitlab ci buil for debian 8 using backports on jsoncpp * solved https://github.com/minetest/minetest/issues/6567 * solved https://github.com/minetest/minetest/issues/7681 * cmake fixed to minimum supported and c++11 standar able * close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/51 * allow distro hardening and cflags env close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/55 * Fix no locales being generated when APPLY_LOCALE_BLACKLIST=0 * Fix linking with Postgres libs: * closes https://github.com/minetest/minetest/issues/12149 * closes https://github.com/minetest/minetest/issues/11219 * PostgreSQL fallback code missed the includes https://github.com/minetest/minetest/issues/11219 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * https://github.com/minetest/minetest/commit/3e2145d662d26443e96ac7191eda093c85c6f2bc * integrates https://github.com/minetest/minetest/pull/11215 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * backported https://github.com/minetest/minetest/commit/998e4820c982c0ea9d257c15f93f1f21d85d6327 * tune up windoser build scripts for multicraft: * fix build paths builds script due repo change name * fix winbuntu image fosal and fix missing deploy for win shit package * use SSE registers for FP operations on i386 for modern gcc platforms only * only use if related are given, by example 32bit using gcc compilers/stdlibs becouse of the long time bugs around those errors by desing, its not about to crash the engine.. its about to permits to hacked clients (either players or the client program per se) making predictable results, so predictable results permits to catch securit issues! * floating point problems are only on modern gcc and modern platform arches, raising problems like bad calculations positions.. a long time bug reported at https://git.minetest.land/Mineclonia/Mineclonia/issues/201 and addressed at https://github.com/minetest/minetest/issues/11742#issuecomment-994444462 with enought explanations but not accepted byt stupid developers.. now years later.. the problems were solved and reconiced as big bug! A workaround were proposed at https://github.com/minetest/minetest/pull/12389/files but never accepted (included in this repository), cos was superset by https://github.com/minetest/minetest/commit/8ff3fadba033dbc686c4f834811f0744099fedfb * closes https://codeberg.org/minenux/minetest-engine-multicraft2/issues/57
2023-09-15 19:16:25 -07:00
install(FILES "doc/minetest.6" DESTINATION "${MANDIR}/man6" RENAME "${PROJECT_NAME}.6")
install(FILES "doc/minetest.6" DESTINATION "${MANDIR}/man6" RENAME "${PROJECT_NAME}server.6")
install(FILES "misc/net.minetest.minetest.desktop" DESTINATION "${XDG_APPS_DIR}" RENAME "net.minetest.${PROJECT_NAME}.desktop")
2017-01-17 07:26:21 -08:00
install(FILES "misc/net.minetest.minetest.appdata.xml" DESTINATION "${APPDATADIR}")
fix package , fix ci build, tune cmake flags and rules * tune up gitlab ci: * remove package part cos we have obs service * add feladora 38 and feladora 37 too * remove winbuntu 14, add debian 11, 12, winbuntu 17, 20, 22 * use minenux minetest repo game (seems not work) * remove non buildable stages.. only build and package shit win * set multicraft as prefix path and artifacts * back cmake in list new behaviour for blacklist locales * gitlab ci buil for debian 8 using backports on jsoncpp * solved https://github.com/minetest/minetest/issues/6567 * solved https://github.com/minetest/minetest/issues/7681 * cmake fixed to minimum supported and c++11 standar able * close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/51 * allow distro hardening and cflags env close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/55 * Fix no locales being generated when APPLY_LOCALE_BLACKLIST=0 * Fix linking with Postgres libs: * closes https://github.com/minetest/minetest/issues/12149 * closes https://github.com/minetest/minetest/issues/11219 * PostgreSQL fallback code missed the includes https://github.com/minetest/minetest/issues/11219 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * https://github.com/minetest/minetest/commit/3e2145d662d26443e96ac7191eda093c85c6f2bc * integrates https://github.com/minetest/minetest/pull/11215 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * backported https://github.com/minetest/minetest/commit/998e4820c982c0ea9d257c15f93f1f21d85d6327 * tune up windoser build scripts for multicraft: * fix build paths builds script due repo change name * fix winbuntu image fosal and fix missing deploy for win shit package * use SSE registers for FP operations on i386 for modern gcc platforms only * only use if related are given, by example 32bit using gcc compilers/stdlibs becouse of the long time bugs around those errors by desing, its not about to crash the engine.. its about to permits to hacked clients (either players or the client program per se) making predictable results, so predictable results permits to catch securit issues! * floating point problems are only on modern gcc and modern platform arches, raising problems like bad calculations positions.. a long time bug reported at https://git.minetest.land/Mineclonia/Mineclonia/issues/201 and addressed at https://github.com/minetest/minetest/issues/11742#issuecomment-994444462 with enought explanations but not accepted byt stupid developers.. now years later.. the problems were solved and reconiced as big bug! A workaround were proposed at https://github.com/minetest/minetest/pull/12389/files but never accepted (included in this repository), cos was superset by https://github.com/minetest/minetest/commit/8ff3fadba033dbc686c4f834811f0744099fedfb * closes https://codeberg.org/minenux/minetest-engine-multicraft2/issues/57
2023-09-15 19:16:25 -07:00
install(FILES "misc/multicraft-xorg-icon-128.png" DESTINATION "${ICONDIR}/hicolor/128x128/apps" RENAME "${PROJECT_NAME}.png")
endif()
if(APPLE)
fix package , fix ci build, tune cmake flags and rules * tune up gitlab ci: * remove package part cos we have obs service * add feladora 38 and feladora 37 too * remove winbuntu 14, add debian 11, 12, winbuntu 17, 20, 22 * use minenux minetest repo game (seems not work) * remove non buildable stages.. only build and package shit win * set multicraft as prefix path and artifacts * back cmake in list new behaviour for blacklist locales * gitlab ci buil for debian 8 using backports on jsoncpp * solved https://github.com/minetest/minetest/issues/6567 * solved https://github.com/minetest/minetest/issues/7681 * cmake fixed to minimum supported and c++11 standar able * close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/51 * allow distro hardening and cflags env close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/55 * Fix no locales being generated when APPLY_LOCALE_BLACKLIST=0 * Fix linking with Postgres libs: * closes https://github.com/minetest/minetest/issues/12149 * closes https://github.com/minetest/minetest/issues/11219 * PostgreSQL fallback code missed the includes https://github.com/minetest/minetest/issues/11219 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * https://github.com/minetest/minetest/commit/3e2145d662d26443e96ac7191eda093c85c6f2bc * integrates https://github.com/minetest/minetest/pull/11215 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * backported https://github.com/minetest/minetest/commit/998e4820c982c0ea9d257c15f93f1f21d85d6327 * tune up windoser build scripts for multicraft: * fix build paths builds script due repo change name * fix winbuntu image fosal and fix missing deploy for win shit package * use SSE registers for FP operations on i386 for modern gcc platforms only * only use if related are given, by example 32bit using gcc compilers/stdlibs becouse of the long time bugs around those errors by desing, its not about to crash the engine.. its about to permits to hacked clients (either players or the client program per se) making predictable results, so predictable results permits to catch securit issues! * floating point problems are only on modern gcc and modern platform arches, raising problems like bad calculations positions.. a long time bug reported at https://git.minetest.land/Mineclonia/Mineclonia/issues/201 and addressed at https://github.com/minetest/minetest/issues/11742#issuecomment-994444462 with enought explanations but not accepted byt stupid developers.. now years later.. the problems were solved and reconiced as big bug! A workaround were proposed at https://github.com/minetest/minetest/pull/12389/files but never accepted (included in this repository), cos was superset by https://github.com/minetest/minetest/commit/8ff3fadba033dbc686c4f834811f0744099fedfb * closes https://codeberg.org/minenux/minetest-engine-multicraft2/issues/57
2023-09-15 19:16:25 -07:00
install(FILES "misc/minetest-icon.icns" DESTINATION "${SHAREDIR}" RENAME "${PROJECT_NAME}-icon.icns")
install(FILES "misc/Info.plist" DESTINATION "${BUNDLE_PATH}/Contents")
endif()
# Library pack
find_package(GMP REQUIRED)
find_package(Json REQUIRED)
find_package(Lua REQUIRED)
add_subdirectory(lib/luautf8)
2022-01-08 07:42:49 -08:00
add_subdirectory(lib/luachacha)
# JsonCPP doesn't compile well on GCC 4.8
if(NOT ENABLE_SYSTEM_JSONCPP)
set(GCC_MINIMUM_VERSION "4.9")
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "${GCC_MINIMUM_VERSION}")
message(FATAL_ERROR "Insufficient gcc version, found ${CMAKE_CXX_COMPILER_VERSION}. "
"Version ${GCC_MINIMUM_VERSION} or higher is required.")
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "${CLANG_MINIMUM_VERSION}")
message(FATAL_ERROR "Insufficient clang version, found ${CMAKE_CXX_COMPILER_VERSION}. "
"Version ${CLANG_MINIMUM_VERSION} or higher is required.")
endif()
endif()
# Subdirectories
2011-01-08 09:35:14 -08:00
# Be sure to add all relevant definitions above this
add_subdirectory(src)
# CPack
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A free open-source voxel game engine with easy modding and game creation.")
2011-01-08 09:35:14 -08:00
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
set(CPACK_PACKAGE_VENDOR "celeron55")
2011-01-09 07:28:31 -08:00
set(CPACK_PACKAGE_CONTACT "Perttu Ahola <celeron55@gmail.com>")
include(CPackComponent)
cpack_add_component(Docs
DISPLAY_NAME "Documentation"
DESCRIPTION "Documentation about Minetest and Minetest modding"
)
cpack_add_component(SUBGAME_MINETEST_GAME
fix package , fix ci build, tune cmake flags and rules * tune up gitlab ci: * remove package part cos we have obs service * add feladora 38 and feladora 37 too * remove winbuntu 14, add debian 11, 12, winbuntu 17, 20, 22 * use minenux minetest repo game (seems not work) * remove non buildable stages.. only build and package shit win * set multicraft as prefix path and artifacts * back cmake in list new behaviour for blacklist locales * gitlab ci buil for debian 8 using backports on jsoncpp * solved https://github.com/minetest/minetest/issues/6567 * solved https://github.com/minetest/minetest/issues/7681 * cmake fixed to minimum supported and c++11 standar able * close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/51 * allow distro hardening and cflags env close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/55 * Fix no locales being generated when APPLY_LOCALE_BLACKLIST=0 * Fix linking with Postgres libs: * closes https://github.com/minetest/minetest/issues/12149 * closes https://github.com/minetest/minetest/issues/11219 * PostgreSQL fallback code missed the includes https://github.com/minetest/minetest/issues/11219 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * https://github.com/minetest/minetest/commit/3e2145d662d26443e96ac7191eda093c85c6f2bc * integrates https://github.com/minetest/minetest/pull/11215 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * backported https://github.com/minetest/minetest/commit/998e4820c982c0ea9d257c15f93f1f21d85d6327 * tune up windoser build scripts for multicraft: * fix build paths builds script due repo change name * fix winbuntu image fosal and fix missing deploy for win shit package * use SSE registers for FP operations on i386 for modern gcc platforms only * only use if related are given, by example 32bit using gcc compilers/stdlibs becouse of the long time bugs around those errors by desing, its not about to crash the engine.. its about to permits to hacked clients (either players or the client program per se) making predictable results, so predictable results permits to catch securit issues! * floating point problems are only on modern gcc and modern platform arches, raising problems like bad calculations positions.. a long time bug reported at https://git.minetest.land/Mineclonia/Mineclonia/issues/201 and addressed at https://github.com/minetest/minetest/issues/11742#issuecomment-994444462 with enought explanations but not accepted byt stupid developers.. now years later.. the problems were solved and reconiced as big bug! A workaround were proposed at https://github.com/minetest/minetest/pull/12389/files but never accepted (included in this repository), cos was superset by https://github.com/minetest/minetest/commit/8ff3fadba033dbc686c4f834811f0744099fedfb * closes https://codeberg.org/minenux/minetest-engine-multicraft2/issues/57
2023-09-15 19:16:25 -07:00
DISPLAY_NAME "Minetest"
DESCRIPTION "The default game bundled in the Minetest engine. Mainly used as a modding base."
GROUP "Games"
)
cpack_add_component(SUBGAME_MINIMAL
DISPLAY_NAME "Development Test"
DESCRIPTION "A basic testing environment used for engine development and sometimes for testing mods."
DISABLED #DISABLED does not mean it is disabled, and is just not selected by default.
GROUP "Games"
)
cpack_add_component_group(Subgames
DESCRIPTION "Games for the Minetest engine."
)
if(WIN32)
# Include all dynamically linked runtime libaries such as MSVCRxxx.dll
include(InstallRequiredSystemLibraries)
if(RUN_IN_PLACE)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-win64")
else()
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-win32")
endif()
set(CPACK_GENERATOR ZIP)
else()
set(CPACK_GENERATOR WIX)
set(CPACK_PACKAGE_NAME "${PROJECT_NAME_CAPITALIZED}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY ".")
set(CPACK_PACKAGE_EXECUTABLES ${PROJECT_NAME} "${PROJECT_NAME_CAPITALIZED}")
set(CPACK_CREATE_DESKTOP_LINKS ${PROJECT_NAME})
set(CPACK_PACKAGING_INSTALL_PREFIX "/${PROJECT_NAME_CAPITALIZED}")
2020-08-25 00:59:52 -07:00
set(CPACK_WIX_PRODUCT_ICON "${CMAKE_CURRENT_SOURCE_DIR}/misc/multicraft-icon.ico")
# Supported languages can be found at
# http://wixtoolset.org/documentation/manual/v3/wixui/wixui_localization.html
#set(CPACK_WIX_CULTURES "ar-SA,bg-BG,ca-ES,hr-HR,cs-CZ,da-DK,nl-NL,en-US,et-EE,fi-FI,fr-FR,de-DE")
set(CPACK_WIX_UI_BANNER "${CMAKE_CURRENT_SOURCE_DIR}/misc/CPACK_WIX_UI_BANNER.BMP")
set(CPACK_WIX_UI_DIALOG "${CMAKE_CURRENT_SOURCE_DIR}/misc/CPACK_WIX_UI_DIALOG.BMP")
2020-08-25 00:59:52 -07:00
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/doc/lgpl-2.1.txt")
# The correct way would be to include both x32 and x64 into one installer
# and install the appropriate one.
# CMake does not support that, so there are two separate GUID's
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CPACK_WIX_UPGRADE_GUID "745A0FB3-5552-44CA-A587-A91C397CCC56")
else()
set(CPACK_WIX_UPGRADE_GUID "814A2E2D-2779-4BBD-9ACD-FC3BD51FBBA2")
endif()
endif()
elseif(APPLE)
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
2011-01-08 14:49:32 -08:00
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-osx")
set(CPACK_GENERATOR ZIP)
else()
2011-01-08 14:49:32 -08:00
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-linux")
set(CPACK_GENERATOR TGZ)
set(CPACK_SOURCE_GENERATOR TGZ)
endif()
include(CPack)
# Add a target to generate API documentation with Doxygen
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in
${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile @ONLY)
add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
endif()
fix package , fix ci build, tune cmake flags and rules * tune up gitlab ci: * remove package part cos we have obs service * add feladora 38 and feladora 37 too * remove winbuntu 14, add debian 11, 12, winbuntu 17, 20, 22 * use minenux minetest repo game (seems not work) * remove non buildable stages.. only build and package shit win * set multicraft as prefix path and artifacts * back cmake in list new behaviour for blacklist locales * gitlab ci buil for debian 8 using backports on jsoncpp * solved https://github.com/minetest/minetest/issues/6567 * solved https://github.com/minetest/minetest/issues/7681 * cmake fixed to minimum supported and c++11 standar able * close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/51 * allow distro hardening and cflags env close https://codeberg.org/minenux/minetest-engine-multicraft2/issues/55 * Fix no locales being generated when APPLY_LOCALE_BLACKLIST=0 * Fix linking with Postgres libs: * closes https://github.com/minetest/minetest/issues/12149 * closes https://github.com/minetest/minetest/issues/11219 * PostgreSQL fallback code missed the includes https://github.com/minetest/minetest/issues/11219 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * https://github.com/minetest/minetest/commit/3e2145d662d26443e96ac7191eda093c85c6f2bc * integrates https://github.com/minetest/minetest/pull/11215 * https://github.com/minetest/minetest/commit/a24899bf2dcd58916922d671ee8761448b6876e5 * backported https://github.com/minetest/minetest/commit/998e4820c982c0ea9d257c15f93f1f21d85d6327 * tune up windoser build scripts for multicraft: * fix build paths builds script due repo change name * fix winbuntu image fosal and fix missing deploy for win shit package * use SSE registers for FP operations on i386 for modern gcc platforms only * only use if related are given, by example 32bit using gcc compilers/stdlibs becouse of the long time bugs around those errors by desing, its not about to crash the engine.. its about to permits to hacked clients (either players or the client program per se) making predictable results, so predictable results permits to catch securit issues! * floating point problems are only on modern gcc and modern platform arches, raising problems like bad calculations positions.. a long time bug reported at https://git.minetest.land/Mineclonia/Mineclonia/issues/201 and addressed at https://github.com/minetest/minetest/issues/11742#issuecomment-994444462 with enought explanations but not accepted byt stupid developers.. now years later.. the problems were solved and reconiced as big bug! A workaround were proposed at https://github.com/minetest/minetest/pull/12389/files but never accepted (included in this repository), cos was superset by https://github.com/minetest/minetest/commit/8ff3fadba033dbc686c4f834811f0744099fedfb * closes https://codeberg.org/minenux/minetest-engine-multicraft2/issues/57
2023-09-15 19:16:25 -07:00