Skip to content

Commit

Permalink
feat(ci): use libstdc++ to build linux
Browse files Browse the repository at this point in the history
  • Loading branch information
f0e committed Dec 3, 2024
1 parent 6d575ce commit 2567427
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 19 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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)
Expand Down
11 changes: 3 additions & 8 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
{
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -194,4 +189,4 @@
"jobs": 0
}
]
}
}
7 changes: 0 additions & 7 deletions triplets/x64-linux-libcxx.cmake

This file was deleted.

0 comments on commit 2567427

Please sign in to comment.