forked from oerkki/voxelands
Update CMakeLists (based on Minetest's version) and README.md
now it can handle VERSION_EXTRA and some other Minetest CMake options
This commit is contained in:
parent
17e627e8ea
commit
094bfc7957
113
CMakeLists.txt
113
CMakeLists.txt
|
@ -1,41 +1,58 @@
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
if(${CMAKE_VERSION} STREQUAL "2.8.2")
|
# Set policies up to 3.9 since we want to enable the IPO option
|
||||||
# bug http://vtk.org/Bug/view.php?id=11020
|
if(${CMAKE_VERSION} VERSION_LESS 3.9)
|
||||||
message( WARNING "CMake/CPack version 2.8.2 will not create working .deb packages!")
|
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
|
||||||
endif(${CMAKE_VERSION} STREQUAL "2.8.2")
|
else()
|
||||||
|
cmake_policy(VERSION 3.9)
|
||||||
|
endif()
|
||||||
|
|
||||||
# This can be read from ${PROJECT_NAME} after project() is called
|
# This can be read from ${PROJECT_NAME} after project() is called
|
||||||
project(voxelands)
|
project(voxelands)
|
||||||
|
set(PROJECT_NAME_CAPITALIZED "Voxelands")
|
||||||
|
|
||||||
# Also remember to set PROTOCOL_VERSION in clientserver.h when releasing
|
# Also remember to set PROTOCOL_VERSION in clientserver.h when releasing
|
||||||
set(VERSION_MAJOR 1709)
|
set(VERSION_MAJOR 2210)
|
||||||
set(VERSION_MINOR 00)
|
set(VERSION_MINOR 00)
|
||||||
|
set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
|
||||||
|
|
||||||
|
# Change to false for releases
|
||||||
|
set(DEVELOPMENT_BUILD TRUE)
|
||||||
|
|
||||||
set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}")
|
set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}")
|
||||||
|
if(VERSION_EXTRA)
|
||||||
|
set(VERSION_STRING "${VERSION_STRING}-${VERSION_EXTRA}")
|
||||||
|
elseif(DEVELOPMENT_BUILD)
|
||||||
|
set(VERSION_STRING "${VERSION_STRING}-dev")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
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} ***")
|
MESSAGE(STATUS "*** Will build version ${VERSION_STRING} ***")
|
||||||
|
|
||||||
# Configuration options
|
# Configuration options
|
||||||
|
set(DEFAULT_RUN_IN_PLACE FALSE)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(RUN_IN_PLACE 1 CACHE BOOL "Run directly in source directory structure")
|
set(DEFAULT_RUN_IN_PLACE TRUE)
|
||||||
else()
|
|
||||||
set(RUN_IN_PLACE 0 CACHE BOOL "Run directly in source directory structure")
|
|
||||||
endif()
|
endif()
|
||||||
|
set(RUN_IN_PLACE ${DEFAULT_RUN_IN_PLACE} CACHE BOOL
|
||||||
|
"Run directly in source directory structure")
|
||||||
|
|
||||||
set(BUILD_CLIENT 1 CACHE BOOL "Build client")
|
set(BUILD_CLIENT TRUE CACHE BOOL "Build client")
|
||||||
if(WIN32)
|
set(BUILD_SERVER FALSE CACHE BOOL "Build server")
|
||||||
set(BUILD_SERVER 0 CACHE BOOL "Build server")
|
# set(BUILD_UNITTESTS TRUE CACHE BOOL "Build unittests")
|
||||||
else()
|
# set(BUILD_BENCHMARKS FALSE CACHE BOOL "Build benchmarks")
|
||||||
set(BUILD_SERVER 1 CACHE BOOL "Build server")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# conf options for building fresh voxelands.icns from voxelands.svg if a new icon is made.
|
# conf options for building fresh voxelands.icns from voxelands.svg if a new icon is made.
|
||||||
set(REBUILD_ICNS 0 CACHE BOOL "Rebuild icns from voxelands.svg .")
|
set(REBUILD_ICNS FALSE CACHE BOOL "Rebuild icns from voxelands.svg .")
|
||||||
|
|
||||||
set(CPU_OPTS 0 CACHE BOOL "Enable CPU optimizations")
|
set(CPU_OPTS FALSE CACHE BOOL "Enable CPU optimizations")
|
||||||
set(CPUTYPE native CACHE STRING "CPU to optimize for")
|
set(CPUTYPE native CACHE STRING "CPU to optimize for")
|
||||||
set(ENABLE_SSP 1 CACHE BOOL "Enable stack smashing protection")
|
set(ENABLE_SSP TRUE CACHE BOOL "Enable stack smashing protection")
|
||||||
set(ENABLE_SAFESTACK 1 CACHE BOOL "Enable SafeStack if supported (LLVM only)")
|
set(ENABLE_SAFESTACK TRUE CACHE BOOL "Enable SafeStack if supported (LLVM only)")
|
||||||
set(ENABLE_PIE 0 CACHE BOOL "Produce a Position Independent Executable")
|
set(ENABLE_PIE FALSE CACHE BOOL "Produce a Position Independent Executable")
|
||||||
|
|
||||||
if(NOT CMAKE_BUILD_TYPE)
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
# Default to release
|
# Default to release
|
||||||
|
@ -120,25 +137,48 @@ add_subdirectory(src)
|
||||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The Fun-Focused Free Software Voxel World Game")
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The Fun-Focused Free Software Voxel World Game")
|
||||||
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
|
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
|
||||||
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
|
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
|
||||||
set(CPACK_PACKAGE_VENDOR "darkrose")
|
set(CPACK_PACKAGE_VENDOR "rudzik8")
|
||||||
set(CPACK_PACKAGE_CONTACT "Lisa 'darkrose' Milne <lisa@ltmnet.com>")
|
set(CPACK_PACKAGE_CONTACT "Mikita Wisniewski <rudzik8@protonmail.com>")
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
# For some reason these aren't copied otherwise
|
# Include all dynamically linked runtime libaries such as MSVCRxxx.dll
|
||||||
# NOTE: For some reason now it seems to work without these
|
include(InstallRequiredSystemLibraries)
|
||||||
#if(BUILD_CLIENT)
|
|
||||||
# install(FILES bin/voxelands.exe DESTINATION bin)
|
|
||||||
#endif()
|
|
||||||
#if(BUILD_SERVER)
|
|
||||||
# install(FILES bin/voxelands-server.exe DESTINATION bin)
|
|
||||||
#endif()
|
|
||||||
|
|
||||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-win32")
|
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)
|
set(CPACK_GENERATOR ZIP)
|
||||||
|
|
||||||
# This might be needed for some installer
|
else()
|
||||||
#set(CPACK_PACKAGE_EXECUTABLES bin/voxelands.exe "Voxelands" bin/voxelands-server.exe "Voxelands Server")
|
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}")
|
||||||
|
|
||||||
|
set(CPACK_WIX_PRODUCT_ICON "${CMAKE_CURRENT_SOURCE_DIR}/voxelands-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")
|
||||||
|
|
||||||
|
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/doc/gpl-3.0.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)
|
elseif(APPLE)
|
||||||
# TODO
|
# TODO
|
||||||
# see http://cmake.org/Wiki/CMake:CPackPackageGenerators#Bundle_.28OSX_only.29
|
# see http://cmake.org/Wiki/CMake:CPackPackageGenerators#Bundle_.28OSX_only.29
|
||||||
|
@ -156,10 +196,9 @@ else()
|
||||||
set(CPACK_SOURCE_GENERATOR TGZ)
|
set(CPACK_SOURCE_GENERATOR TGZ)
|
||||||
SET ( CPACK_DEBIAN_PACKAGE_SECTION "other" )
|
SET ( CPACK_DEBIAN_PACKAGE_SECTION "other" )
|
||||||
SET ( CPACK_DEBIAN_PACKAGE_PRIORITY "optional" )
|
SET ( CPACK_DEBIAN_PACKAGE_PRIORITY "optional" )
|
||||||
SET ( CPACK_DEBIAN_PACKAGE_MAINTAINER "Lisa Milne <lisa@ltmnet.com>" )
|
SET ( CPACK_DEBIAN_PACKAGE_MAINTAINER "Mikita Wisniewski <rudzik8@protonmail.com>" )
|
||||||
SET ( CPACK_GENERATOR "DEB;RPM" )
|
SET ( CPACK_GENERATOR "DEB;RPM" )
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(CPack)
|
include(CPack)
|
||||||
|
|
||||||
|
|
59
README.md
59
README.md
|
@ -6,13 +6,13 @@ Voxelands is a sandbox construction game based on Minetest, which was inspired b
|
||||||
|
|
||||||
Voxelands requires:
|
Voxelands requires:
|
||||||
* the standard C++ library
|
* the standard C++ library
|
||||||
* irrlicht 1.8 or later
|
* irrlicht
|
||||||
* freetype
|
* freetype
|
||||||
* openAL
|
* openAL
|
||||||
* vorbisfile
|
* vorbisfile
|
||||||
* ogg
|
* ogg
|
||||||
* zlib
|
* zlib
|
||||||
* CMake
|
* cmake
|
||||||
* make
|
* make
|
||||||
* g++ (or other C++ compiler)
|
* g++ (or other C++ compiler)
|
||||||
* bzip2
|
* bzip2
|
||||||
|
@ -59,41 +59,46 @@ Simply run `./bin/voxelands` from any console/terminal.
|
||||||
|
|
||||||
Controls can be set in the Settings tab of the main menu
|
Controls can be set in the Settings tab of the main menu
|
||||||
|
|
||||||
| Button | Action |
|
| Button | Action |
|
||||||
| ------------------ | -------------------------------------- |
|
| ------------------ | --------------------------------------- |
|
||||||
| W, S, A, D | Walk forward backward, left, and right |
|
| W, S, A, D | Walk forward, backward, left, and right |
|
||||||
| Mouse | Look / Aim |
|
| Mouse | Look / Aim |
|
||||||
| Mouse wheel | Change wielded item |
|
| Mouse wheel | Change wielded item |
|
||||||
| 1 through 8 | Change wielded item |
|
| 1 through 8 | Change wielded item |
|
||||||
| Right Mouse Button | Place item |
|
| Right Mouse Button | Place item |
|
||||||
| Left Mouse Button | Dig / Punch / Attack |
|
| Left Mouse Button | Dig / Punch / Attack |
|
||||||
| Shift | Sneak |
|
| Shift | Sneak |
|
||||||
| Space | Jump |
|
| Space | Jump |
|
||||||
| R | Move Up (ladders, swimming, flying) |
|
| R | Move Up (ladders, swimming, flying) |
|
||||||
| F | Move Down (ladders, swimming, flying) |
|
| F | Move Down (ladders, swimming, flying) |
|
||||||
| E | Run |
|
| E | Run |
|
||||||
| I | Enter inventory |
|
| I | Enter inventory |
|
||||||
| Q | Examine pointed block |
|
| Q | Examine pointed block |
|
||||||
| H | Use item in hand |
|
| H | Use item in hand |
|
||||||
| T | Talk / commands |
|
| T | Talk / commands |
|
||||||
| K | Toggle fly mode |
|
| K | Toggle fly mode |
|
||||||
| F1 | Hide / show hud |
|
| F1 | Hide / show hud |
|
||||||
| F2 | Hide / show chat |
|
| F2 | Hide / show chat |
|
||||||
| F3 | Disable / enable fog |
|
| F3 | Disable / enable fog |
|
||||||
| F4 | Disable / enable camera update |
|
| F4 | Disable / enable camera update |
|
||||||
| F5 | Toggle through debug information |
|
| F5 | Toggle through debug information |
|
||||||
| F6 | Toggle through profiler |
|
| F6 | Toggle through profiler |
|
||||||
| F12 | Take a screenshot |
|
| F12 | Take a screenshot |
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
|
||||||
**Code:**
|
**Code:**
|
||||||
|
|
||||||
Voxelands is licensed under the GPLv3 or later.
|
Voxelands is licensed under the GPLv3 or later.
|
||||||
Copyright (c) 2013-2016 Lisa 'darkrose' Milne <lisa@ltmnet.com>
|
Copyright (c) 2013-2016 Lisa 'darkrose' Milne <lisa@ltmnet.com>
|
||||||
|
Copyright (c) 2022-2022 Mikita Wisniewski <rudzik8@protonmail.com>
|
||||||
Forked from Minetest 0.3.x
|
Forked from Minetest 0.3.x
|
||||||
Copyright (c) 2010-2011 Perttu Ahola <celeron55@gmail.com>
|
Copyright (c) 2010-2011 Perttu Ahola <celeron55@gmail.com>
|
||||||
|
|
||||||
|
See commits history for all contributors.
|
||||||
|
|
||||||
**Textures, Sounds, and Models:**
|
**Textures, Sounds, and Models:**
|
||||||
|
|
||||||
This does not apply to texture packs made by others.
|
This does not apply to texture packs made by others.
|
||||||
|
|
||||||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||||
|
|
Loading…
Reference in New Issue