diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 3b46ec37c6..1aa7e17ccb 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -75,6 +75,9 @@ jobs: - compiler: gcc cxxcompiler: g++ libsdl: libsdl1.2-dev + - compiler: gcc + cxxcompiler: g++ + extra-cmake-parameters: -DOPTION_DEDICATED=ON runs-on: ubuntu-20.04 env: @@ -97,7 +100,6 @@ jobs: libfontconfig-dev \ libicu-dev \ liblzma-dev \ - libzstd-dev \ liblzo2-dev \ ${{ matrix.libsdl }} \ zlib1g-dev \ @@ -130,7 +132,7 @@ jobs: cd build echo "::group::CMake" - cmake .. + cmake .. ${{ matrix.extra-cmake-parameters }} echo "::endgroup::" echo "::group::Build" @@ -170,7 +172,7 @@ jobs: uses: actions/cache@v2 with: path: /usr/local/share/vcpkg/installed - key: ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}-1 # Increase the number whenever dependencies are modified + key: ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}-0 # Increase the number whenever dependencies are modified restore-keys: | ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }} @@ -178,7 +180,6 @@ jobs: run: | vcpkg install --triplet=${{ matrix.arch }}-osx \ liblzma \ - zstd \ libpng \ lzo \ zlib \ @@ -253,7 +254,7 @@ jobs: uses: actions/cache@v2 with: path: vcpkg/installed - key: ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}-1 # Increase the number whenever dependencies are modified + key: ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}-0 # Increase the number whenever dependencies are modified restore-keys: | ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }} @@ -262,7 +263,6 @@ jobs: run: | vcpkg install --triplet=${{ matrix.arch }}-windows-static \ liblzma \ - zstd \ libpng \ lzo \ zlib \ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 19a0dc54b6..84e8c17d98 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -297,7 +297,6 @@ jobs: SDL2-devel \ wget \ xz-devel \ - libzstd-devel \ zlib-devel \ # EOF echo "::endgroup::" @@ -413,7 +412,6 @@ jobs: libfluidsynth-dev \ libicu-dev \ liblzma-dev \ - libzstd-dev \ liblzo2-dev \ libsdl2-dev \ lsb-release \ @@ -498,7 +496,7 @@ jobs: uses: actions/cache@v2 with: path: /usr/local/share/vcpkg/installed - key: ${{ steps.key.outputs.image }}-vcpkg-release-1 # Increase the number whenever dependencies are modified + key: ${{ steps.key.outputs.image }}-vcpkg-release-0 # Increase the number whenever dependencies are modified restore-keys: | ${{ steps.key.outputs.image }}-vcpkg-release ${{ steps.key.outputs.image }}-vcpkg-x64 @@ -508,8 +506,6 @@ jobs: vcpkg install \ liblzma:x64-osx \ liblzma:arm64-osx \ - zstd:x64-osx \ - zstd:arm64-osx \ libpng:x64-osx \ libpng:arm64-osx \ lzo:x64-osx \ @@ -703,7 +699,7 @@ jobs: uses: actions/cache@v2 with: path: vcpkg/installed - key: ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}-1 # Increase the number whenever dependencies are modified + key: ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}-0 # Increase the number whenever dependencies are modified restore-keys: | ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }} @@ -712,7 +708,6 @@ jobs: run: | vcpkg install --triplet=${{ matrix.arch }}-windows-static \ liblzma \ - zstd \ libpng \ lzo \ zlib \ @@ -869,7 +864,7 @@ jobs: env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: ${{ secrets.AWS_REGION }} + AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }} - name: Trigger 'New OpenTTD release' uses: peter-evans/repository-dispatch@v1 diff --git a/CMakeLists.txt b/CMakeLists.txt index d4e04c9484..15dd94df58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,28 +120,31 @@ find_package(LZO) find_package(ZSTD 1.4) find_package(PNG) -if(NOT WIN32) - find_package(Allegro) - if(NOT APPLE) - find_package(Freetype) - find_package(SDL2) - if(NOT SDL2_FOUND) - find_package(SDL) +if(NOT OPTION_DEDICATED) + if(NOT WIN32) + find_package(Allegro) + if(NOT APPLE) + find_package(Freetype) + find_package(SDL2) + if(NOT SDL2_FOUND) + find_package(SDL) + endif() + find_package(Fluidsynth) + find_package(Fontconfig) + find_package(ICU OPTIONAL_COMPONENTS i18n lx) endif() - find_package(Fluidsynth) - find_package(Fontconfig) - find_package(ICU OPTIONAL_COMPONENTS i18n lx) - else() - find_package(Iconv) - - find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox) - find_library(AUDIOUNIT_LIBRARY AudioUnit) - find_library(COCOA_LIBRARY Cocoa) - find_library(QUARTZCORE_LIBRARY QuartzCore) endif() endif() +if(APPLE) + find_package(Iconv) -if(NOT EMSCRIPTEN) + find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox) + find_library(AUDIOUNIT_LIBRARY AudioUnit) + find_library(COCOA_LIBRARY Cocoa) + find_library(QUARTZCORE_LIBRARY QuartzCore) +endif() + +if(NOT EMSCRIPTEN AND NOT OPTION_DEDICATED) find_package(OpenGL COMPONENTS OpenGL) endif() @@ -219,7 +222,7 @@ if(MSVC) endif() add_subdirectory(${CMAKE_SOURCE_DIR}/src) -add_subdirectory(${CMAKE_SOURCE_DIR}/media/baseset) +add_subdirectory(${CMAKE_SOURCE_DIR}/media) add_dependencies(openttd find_version) @@ -227,6 +230,7 @@ add_dependencies(openttd target_link_libraries(openttd openttd::languages openttd::settings + openttd::media openttd::basesets openttd::script_api Threads::Threads diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0856d4de0f..82fd721afc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -26,7 +26,6 @@ add_subdirectory(table) add_subdirectory(video) add_subdirectory(widgets) - add_files( viewport_sprite_sorter_sse4.cpp CONDITION SSE_FOUND