diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 242293e..21ed0c2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,7 +28,14 @@ jobs: libxi-dev \ libxrandr-dev \ libgl1-mesa-dev \ - libncurses5 + libncurses5 \ + gcc-13 g++-13 + + - name: Install GCC + if: runner.os == 'Linux' + run: | + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 --slave /usr/bin/g++ g++ /usr/bin/g++-13 --slave /usr/bin/gcov gcov /usr/bin/gcov-13 + sudo update-alternatives --set gcc /usr/bin/gcc-13 - name: Install LLVM and Clang uses: KyleMayes/install-llvm-action@v2 @@ -71,7 +78,7 @@ jobs: VCPKG_ROOT: ${{ github.workspace }}/vcpkg - name: Build - run: cmake --build . --preset ${{ steps.select-preset.outputs.preset }} + run: cmake --build . --preset ${{ steps.select-preset.outputs.preset }} -v env: VCPKG_ROOT: ${{ github.workspace }}/vcpkg diff --git a/CMakeLists.txt b/CMakeLists.txt index ebb9adf..1910646 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,7 +91,7 @@ include(FetchContent) if(UNIX AND NOT APPLE) set(SKIA_REPOSITORY - https://github.com/aseprite/skia/releases/download/m102-861e4743af/Skia-Linux-Release-x64-libc++.zip + https://github.com/aseprite/skia/releases/download/m102-861e4743af/Skia-Linux-Release-x64-libstdc++.zip ) elseif(APPLE) if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "arm64" OR CMAKE_OSX_ARCHITECTURES MATCHES "arm64") @@ -164,7 +164,7 @@ if(APPLE) # Link the .icns file to the target target_sources(blur-gui PRIVATE resources/blur.icns) elseif(UNIX) - target_link_libraries(blur-gui PRIVATE + target_link_libraries(blur-gui PRIVATE X11 Xext Xrandr) diff --git a/CMakePresets.json b/CMakePresets.json index 2ccf07c..6cfa2f3 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -5,8 +5,7 @@ "name": "base", "hidden": true, "cacheVariables": { - "CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake", - "VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/triplets" + "CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" } }, { @@ -44,11 +43,7 @@ }, "cacheVariables": { "CMAKE_C_COMPILER": "clang", - "CMAKE_CXX_COMPILER": "clang++", - "CMAKE_CXX_FLAGS": "-stdlib=libc++", - "CMAKE_EXE_LINKER_FLAGS": "-stdlib=libc++", - "CMAKE_SHARED_LINKER_FLAGS": "-stdlib=libc++", - "VCPKG_TARGET_TRIPLET": "x64-linux-libcxx" + "CMAKE_CXX_COMPILER": "clang++" }, "generator": "Ninja" }, @@ -194,4 +189,4 @@ "jobs": 0 } ] -} \ No newline at end of file +} diff --git a/triplets/x64-linux-libcxx.cmake b/triplets/x64-linux-libcxx.cmake deleted file mode 100644 index 5930bd2..0000000 --- a/triplets/x64-linux-libcxx.cmake +++ /dev/null @@ -1,7 +0,0 @@ -set(VCPKG_TARGET_ARCHITECTURE x64) -set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_LIBRARY_LINKAGE static) - -set(VCPKG_CMAKE_SYSTEM_NAME Linux) -set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -stdlib=libc++") -set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS}") \ No newline at end of file