From 4634461c1d90ba85c8ac5fe2f5834f03d646e0e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Kapu=C5=9Bci=C5=84ski?= Date: Mon, 3 Apr 2023 00:01:30 +0200 Subject: [PATCH] Added vcpkg manifest file --- .github/workflows/build.yml | 6 ++--- CMakeLists.txt | 3 --- src/CMakeLists.txt | 20 ---------------- vcpkg.json | 48 +++++++++++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+), 26 deletions(-) create mode 100644 vcpkg.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 945845b4..e03248f2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -98,11 +98,11 @@ jobs: - name: Install Colobot dependencies uses: lukka/run-vcpkg@v7 with: - vcpkgGitCommitId: 'e809a42f87565e803b2178a0c11263f462d1800a' + vcpkgGitCommitId: '716c3524a54f1f50a25d16a4cdd360f5a7fcc150' vcpkgTriplet: ${{ matrix.vcpkg_triplet }} - vcpkgArguments: 'boost-system boost-filesystem boost-regex boost-lexical-cast boost-bimap boost-algorithm boost-property-tree boost-optional boost-range sdl2 sdl2-ttf sdl2-image glew libpng libwebp tiff gettext libsndfile libvorbis libogg openal-soft physfs mpg123' + setupOnly: true # SHA-256 hash of the list of packages above, for caching purposes - appendedCacheKey: '84402d9834b06a1b571e0fda32a791915777d47a394a1469d4773322bd71614b' + appendedCacheKey: '56a81d2ed18a506e5ce5cf4dc4e6ed9874bba3905ed5e9b073ea717a0663db0a' - name: Install external tools working-directory: ${{ github.workspace }} run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fe4357d..203b8dda 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -330,9 +330,6 @@ endif() find_package(SndFile REQUIRED) -find_package(mpg123 QUIET) -find_package(mp3lame QUIET) - if(NOT ASSERTS) add_definitions(-DNDEBUG) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2f78e100..f1cd79c8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -493,20 +493,6 @@ target_link_libraries(colobotbase PUBLIC SndFile::sndfile ) -if(mpg123_FOUND) - target_link_libraries(colobotbase PUBLIC - MPG123::libmpg123 - MPG123::libout123 - MPG123::libsyn123 - ) -endif() - -if(mp3lame_FOUND) - target_link_libraries(colobotbase PUBLIC - mp3lame::mp3lame - ) -endif() - # Optional libraries if(OPENAL_SOUND) target_sources(colobotbase PRIVATE @@ -536,9 +522,6 @@ if(PLATFORM_WINDOWS) find_package(Intl REQUIRED) find_library(BZ2_LIBRARY NAMES bz2) - find_library(JPEG_LIBRARY NAMES jpeg) - find_library(TIFF_LIBRARY NAMES tiff) - find_library(LZMA_LIBRARY NAMES lzma) find_library(FREETYPE_LIBRARY NAMES freetype) find_library(ICONV_LIBRARY NAMES iconv) find_library(CHARSET_LIBRARY NAMES charset) @@ -548,10 +531,7 @@ if(PLATFORM_WINDOWS) target_link_libraries(colobotbase PUBLIC Gettext::Intl - ${JPEG_LIBRARY} - ${TIFF_LIBRARY} ${BZ2_LIBRARY} - ${LZMA_LIBRARY} ${FREETYPE_LIBRARY} ${ICONV_LIBRARY} ${CHARSET_LIBRARY} diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 00000000..673c5935 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,48 @@ +{ + "name": "colobot", + "version-string": "0.1.0", + "builtin-baseline": "e809a42f87565e803b2178a0c11263f462d1800a", + "dependencies": [ + "boost-system", + "boost-filesystem", + "boost-regex", + "boost-lexical-cast", + "boost-bimap", + "boost-algorithm", + "boost-property-tree", + "boost-optional", + "boost-range", + "sdl2", + { + "name": "sdl2-image", + "default-features": false + }, + { + "name": "sdl2-ttf", + "default-features": false + }, + "glew", + "libpng", + "gettext", + { + "name": "libsndfile", + "default-features": false, + "features": [ "external-libs" ] + }, + { + "name": "freetype", + "default-features": false + }, + "libvorbis", + "libogg", + "opus", + "openal-soft", + "physfs", + "zlib" + ], + "overrides": [ + { + "name": "zlib", "version": "1.2.13" + } + ] +}