Skip to content

Commit

Permalink
Use cmake option instead of -fPIC
Browse files Browse the repository at this point in the history
  • Loading branch information
horror-proton committed Nov 11, 2023
1 parent a16e8e4 commit 5322e16
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions maa-assistant-arknights-git/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ source=("MaaAssistantArknights::git+$url.git#branch=dev"
md5sums=('SKIP'
'SKIP')

CXXFLAGS="$CXXFLAGS -fmacro-prefix-map=$srcdir=/usr/src/debug/${pkgname%-git}"

pkgver() {
cd "$srcdir/MaaAssistantArknights"
printf "%s" "$(git describe --long --tags --match='v*' | rev | sed 's/-//3' | rev | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g')"
Expand All @@ -41,10 +43,10 @@ build() {
cd "$srcdir"
CXXFLAGS="$CXXFLAGS -fmacro-prefix-map=$srcdir=/usr/src/debug/${pkgname%-git}"

CXXFLAGS="$CXXFLAGS -fPIC" \
cmake -B build-fastdeploy -S FastDeploy \
-DCMAKE_BUILD_TYPE=None \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_INSTALL_PREFIX="$srcdir"/installed/usr
cmake --build build-fastdeploy

Expand All @@ -53,7 +55,9 @@ build() {

cd "$srcdir"

CXXFLAGS="$CXXFLAGS -isystem /usr/include/onnxruntime/core/session -isystem $srcdir/installed/usr/include" \
CXXFLAGS="$CXXFLAGS \
-isystem /usr/include/onnxruntime/core/session \
-isystem $srcdir/installed/usr/include" \
cmake -B build -S MaaAssistantArknights \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_PREFIX_PATH="$srcdir"/installed/usr \
Expand Down

0 comments on commit 5322e16

Please sign in to comment.