mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 13:50:12 +08:00
fix: Fix lib include method
This commit is contained in:
parent
85a3e78861
commit
8fdbab3ed4
@ -66,10 +66,15 @@ list(APPEND NKR_EXTERNAL_TARGETS yaml-cpp)
|
||||
find_package(ZXing CONFIG REQUIRED)
|
||||
list(APPEND NKR_EXTERNAL_TARGETS ZXing::ZXing)
|
||||
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/libcpr/cpr.git
|
||||
GIT_TAG 3b15fa82ea74739b574d705fea44959b58142eb8) # Replace with your desired git commit from: https://github.com/libcpr/cpr/releases
|
||||
FetchContent_MakeAvailable(cpr)
|
||||
IF (WIN32)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/libcpr/cpr.git
|
||||
GIT_TAG 3b15fa82ea74739b574d705fea44959b58142eb8)
|
||||
FetchContent_MakeAvailable(cpr)
|
||||
ELSE()
|
||||
find_package(cpr REQUIRED)
|
||||
ENDIF()
|
||||
|
||||
list(APPEND NKR_EXTERNAL_TARGETS cpr::cpr)
|
||||
|
||||
set(QHOTKEY_INSTALL OFF)
|
||||
|
||||
@ -24,7 +24,7 @@ mkdir -p $INSTALL_PREFIX
|
||||
|
||||
#### clean ####
|
||||
clean() {
|
||||
rm -rf dl.zip yaml-* zxing-* protobuf
|
||||
rm -rf dl.zip yaml-* zxing-* protobuf curl cpr
|
||||
}
|
||||
|
||||
#### ZXing v2.2.0 ####
|
||||
@ -71,5 +71,30 @@ ninja && ninja install
|
||||
|
||||
cd ../..
|
||||
|
||||
system_name=$(uname -s)
|
||||
|
||||
# Check if 'NT' is present in the system name
|
||||
if [[ "$system_name" == *"NT"* ]]; then
|
||||
echo "System is likely Windows"
|
||||
else
|
||||
git clone https://github.com/curl/curl.git
|
||||
cd curl
|
||||
git checkout 83bedbd730d62b83744cc26fa0433d3f6e2e4cd6
|
||||
mkdir build && cd build
|
||||
cmake -GNinja .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX
|
||||
ninja && ninja install
|
||||
|
||||
cd ../..
|
||||
|
||||
git clone https://github.com/libcpr/cpr.git
|
||||
cd cpr
|
||||
git checkout 3b15fa82ea74739b574d705fea44959b58142eb8
|
||||
mkdir build && cd build
|
||||
cmake -GNinja .. -DCMAKE_BUILD_TYPE=Release -DCPR_USE_SYSTEM_CURL=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX
|
||||
ninja && ninja install
|
||||
|
||||
cd ../..
|
||||
fi
|
||||
|
||||
####
|
||||
clean
|
||||
|
||||
@ -34,10 +34,3 @@ export EXTRA_QT_PLUGINS="svg;iconengines;"
|
||||
rm linuxdeploy-x86_64.AppImage linuxdeploy-plugin-qt-x86_64.AppImage
|
||||
cd $DEST
|
||||
rm -r ./usr/translations ./usr/bin ./usr/share ./apprun-hooks
|
||||
|
||||
# fix extra libs...
|
||||
mkdir ./usr/lib2
|
||||
ls ./usr/lib/
|
||||
cp ./usr/lib/libQt* ./usr/lib/libxcb-util* ./usr/lib/libicuuc* ./usr/lib/libicui18n* ./usr/lib/libicudata* ./usr/lib/libcpr* ./usr/lib2
|
||||
rm -r ./usr/lib
|
||||
mv ./usr/lib2 ./usr/lib
|
||||
|
||||
Loading…
Reference in New Issue
Block a user