diff options
-rw-r--r-- | .github/workflows/build.yml | 2 | ||||
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | cmake/Modules/MinetestFindIrrlichtHeaders.cmake | 26 | ||||
-rw-r--r-- | util/ci/common.sh | 3 |
5 files changed, 14 insertions, 26 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 70340d82d..1717a282d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -132,7 +132,7 @@ jobs: - name: Install deps run: | source ./util/ci/common.sh - install_linux_deps --old-irr clang-9 + install_linux_deps clang-9 - name: Build prometheus-cpp run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index d8dd85af6..09e3dcccd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,7 +78,6 @@ if(NOT "${IRRLICHTMT_BUILD_DIR}" STREQUAL "") # IrrlichtMtConfig.cmake message(FATAL_ERROR "Could not find IrrlichtMtConfig.cmake in ${IRRLICHTMT_BUILD_DIR}/cmake.") endif() -# This is done here so that relative search paths are more reasonable elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/lib/irrlichtmt") message(STATUS "Using user-provided IrrlichtMt at subdirectory 'lib/irrlichtmt'") if(BUILD_CLIENT) @@ -108,9 +107,9 @@ else() include(MinetestFindIrrlichtHeaders) if(NOT IRRLICHT_INCLUDE_DIR) - message(FATAL_ERROR "Irrlicht or IrrlichtMt headers are required to build the server, but none found.\n${explanation_msg}") + message(FATAL_ERROR "IrrlichtMt headers are required to build the server, but none found.\n${explanation_msg}") endif() - message(STATUS "Found Irrlicht headers: ${IRRLICHT_INCLUDE_DIR}") + message(STATUS "Found IrrlichtMt headers: ${IRRLICHT_INCLUDE_DIR}") add_library(IrrlichtMt::IrrlichtMt INTERFACE IMPORTED) # Note that we can't use target_include_directories() since that doesn't work for IMPORTED targets before CMake 3.11 set_target_properties(IrrlichtMt::IrrlichtMt PROPERTIES @@ -223,8 +223,8 @@ Run it: - You can disable the client build by specifying `-DBUILD_CLIENT=FALSE`. - You can select between Release and Debug build by `-DCMAKE_BUILD_TYPE=<Debug or Release>`. - Debug build is slower, but gives much more useful output in a debugger. -- If you build a bare server you don't need to have the Irrlicht or IrrlichtMt library installed. - - In that case use `-DIRRLICHT_INCLUDE_DIR=/some/where/irrlicht/include`. +- If you build a bare server you don't need to compile IrrlichtMt, just the headers suffice. + - In that case use `-DIRRLICHT_INCLUDE_DIR=/some/where/irrlichtmt/include`. - Minetest will use the IrrlichtMt package that is found first, given by the following order: 1. Specified `IRRLICHTMT_BUILD_DIR` CMake variable diff --git a/cmake/Modules/MinetestFindIrrlichtHeaders.cmake b/cmake/Modules/MinetestFindIrrlichtHeaders.cmake index d33b296d0..e434b582f 100644 --- a/cmake/Modules/MinetestFindIrrlichtHeaders.cmake +++ b/cmake/Modules/MinetestFindIrrlichtHeaders.cmake @@ -1,21 +1,13 @@ -# Locate Irrlicht or IrrlichtMt headers on system. +# Locate IrrlichtMt headers on system. -foreach(libname IN ITEMS IrrlichtMt Irrlicht) - string(TOLOWER "${libname}" libname2) - - find_path(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h - DOC "Path to the directory with IrrlichtMt includes" - PATHS - /usr/local/include/${libname2} - /usr/include/${libname2} - /system/develop/headers/${libname2} #Haiku - PATH_SUFFIXES "include/${libname2}" - ) - - if(IRRLICHT_INCLUDE_DIR) - break() - endif() -endforeach() +find_path(IRRLICHT_INCLUDE_DIR NAMES irrlicht.h + DOC "Path to the directory with IrrlichtMt includes" + PATHS + /usr/local/include/irrlichtmt + /usr/include/irrlichtmt + /system/develop/headers/irrlichtmt #Haiku + PATH_SUFFIXES "include/irrlichtmt" +) # Handholding for users if(IRRLICHT_INCLUDE_DIR AND (NOT IS_DIRECTORY "${IRRLICHT_INCLUDE_DIR}" OR diff --git a/util/ci/common.sh b/util/ci/common.sh index 16327ec30..27034b4fb 100644 --- a/util/ci/common.sh +++ b/util/ci/common.sh @@ -9,9 +9,6 @@ install_linux_deps() { if [[ "$1" == "--no-irr" ]]; then shift - elif [[ "$1" == "--old-irr" ]]; then - shift - pkgs+=(libirrlicht-dev) else wget "https://github.com/minetest/irrlicht/releases/download/1.9.0mt6/ubuntu-bionic.tar.gz" sudo tar -xaf ubuntu-bionic.tar.gz -C /usr/local |