Skip to content

Commit

Permalink
[73_13] tune cmake and cpr on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
da-liii authored Jan 16, 2024
1 parent 8048f4f commit 6d3cc8c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd_research_on_ubuntu_22_04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y gcc \
qt6-base-dev libqt6svg6-dev qt6-image-formats-plugins fonts-noto-cjk \
libcurl4-openssl-dev libfreetype-dev fakeroot debhelper libgit2-dev zlib1g-dev \
libssl-dev
libssl-dev cmake
- uses: actions/checkout@v3
with:
fetch-depth: 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-xmake-archlinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
sudo pacman -Syyu --noconfirm --needed
sudo pacman -S --noconfirm --needed qt6-base qt6-svg libpng zlib \
libjpeg curl python libxext xmake unzip noto-fonts-cjk \
fontconfig libgit2 freetype2 openssl git mimalloc
fontconfig libgit2 freetype2 openssl git mimalloc cmake
- uses: actions/checkout@v3
with:
fetch-depth: 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-xmake-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y gcc \
fonts-noto-cjk libcurl4-openssl-dev libfreetype-dev \
${{matrix.qt_pkg}} libgit2-dev zlib1g-dev libssl-dev
${{matrix.qt_pkg}} libgit2-dev zlib1g-dev libssl-dev cmake
- uses: actions/checkout@v3
with:
fetch-depth: 1
Expand Down
8 changes: 0 additions & 8 deletions xmake-requires.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@
},
version = "3.26.4"
},
["cpr#31fecfc4"] = {
repo = {
branch = "master",
commit = "e0d3bd857f8fcfbebf985c1a5dc52287597babbd",
url = "https://github.com/xmake-io/xmake-repo.git"
},
version = "1.8.3"
},
["freetype#31fecfc4"] = {
repo = {
branch = "master",
Expand Down
16 changes: 6 additions & 10 deletions xmake/packages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,14 @@ local QT6_VERSION = "6.5.3"
local QTIFW_VERSION = "4.6.0"
local LOLLY_VERSION = "1.3.17"
local TBOX_VERSION = "1.7.5"
if is_plat("linux") and using_pacman () then
local CPR_VERSION = "1.10.5"
else
local CPR_VERSION = "1.8.3"
end
local CPR_VERSION = "1.10.5"
local CURL_VERSION = "8.4.0"
local PDFHUMMUS_VERSION = "4.6.2"
local FREETYPE_VERSION = "2.12.1"
local LIBPNG_VERSION = "1.6.37"
local LIBJPEG_VERSION = "v9e"
local LIBICONV_VERSION = "1.17"
local LIBGIT2_VERSION = "1.7.1"
local CMAKE_VERSION = "3.26.4"

-- https://xmake.io/#/manual/package_dependencies?id=inherit-package-configuration
package("lolly")
Expand Down Expand Up @@ -89,7 +84,11 @@ function add_requires_of_mogan()
add_requires("lolly", {system=false})
tbox_configs = {hash=true, ["force-utf8"]=true}
add_requireconfs("lolly.tbox", {version = TBOX_VERSION, configs=tbox_configs, system = false, override=true})
add_requireconfs("lolly.cpr", {version = CPR_VERSION, system = false, override=true})
if is_plat("linux") and linuxos.name() == "uos" then
add_requireconfs("lolly.cpr", {version = "1.8.3", system = false, override=true})
else
add_requireconfs("lolly.cpr", {version = CPR_VERSION, system = false, override=true})
end

-- package: libcurl
if is_plat("linux") and using_apt() then
Expand All @@ -100,7 +99,6 @@ function add_requires_of_mogan()
add_requireconfs("lolly.cpr.libcurl", {system = true, override=true})
else
add_requireconfs("lolly.cpr.libcurl", {version = CURL_VERSION, system = false, override=true})
add_requireconfs("lolly.cpr.libcurl.cmake", {version = CMAKE_VERSION, system = false, override=true})
end

-- package: fontconfig
Expand All @@ -116,7 +114,6 @@ function add_requires_of_mogan()
set_configvar("PDFHUMMUS_VERSION", PDFHUMMUS_VERSION)
if not is_plat("wasm") then
add_requires("pdfhummus "..PDFHUMMUS_VERSION, {system=false,configs={libpng=true,libjpeg=true}})
add_requireconfs("pdfhummus.cmake", {version = CMAKE_VERSION, system = false, override=true})
end

-- package: libpng
Expand Down Expand Up @@ -167,7 +164,6 @@ function add_requires_of_mogan()
add_requires("apt::libgit2-dev", {alias="libgit2"})
elseif not is_plat("wasm") then
add_requires("libgit2 "..LIBGIT2_VERSION, {system=false})
add_requireconfs("libgit2.cmake", {version = CMAKE_VERSION, system = false, override=true})
end

if is_plat ("linux") and using_apt() then
Expand Down

0 comments on commit 6d3cc8c

Please sign in to comment.