Skip to content

Commit

Permalink
Build libxml2 and libxslt using CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
triplef committed Oct 25, 2024
1 parent c38b055 commit 5b8125f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 26 deletions.
26 changes: 13 additions & 13 deletions phases/16-libxml2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ fi

. "$ROOT_DIR"/scripts/toolchain.sh

echo -e "\n### Running autogen"
NOCONFIGURE=1 ./autogen.sh

echo -e "\n### Running configure"
./configure \
--host=${ANDROID_TARGET} \
--prefix="${INSTALL_PREFIX}" \
--without-python \
--without-lzma \
--with-icu \
--disable-shared \
`# specify include dir to enable finding libiconv and ICU` \
CFLAGS="${CFLAGS} -I${INSTALL_PREFIX}/include" \
echo -e "\n### Running cmake"
mkdir -p build-${ABI_NAME}
cd build-${ABI_NAME}

${CMAKE} .. \
${CMAKE_OPTIONS} \
-DBUILD_SHARED_LIBS=NO \
-DLIBXML2_WITH_LZMA=NO \
-DLIBXML2_WITH_PYTHON=NO \
-DLIBXML2_WITH_ZLIB=NO \
-DLIBXML2_WITH_TESTS=NO \
-DLIBXML2_WITH_PROGRAMS=NO \
-DLIBXML2_WITH_ICU=YES \

echo -e "\n### Building"
make -j${MAKE_JOBS}
Expand Down
22 changes: 10 additions & 12 deletions phases/17-libxslt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,16 @@ fi

. "$ROOT_DIR"/scripts/toolchain.sh

echo -e "\n### Running autogen"
NOCONFIGURE=1 ./autogen.sh

echo -e "\n### Running configure"
./configure \
--host=${ANDROID_TARGET} \
--prefix="${INSTALL_PREFIX}" \
--without-python \
--without-crypto \
--disable-shared \
`# specify include dir to enable finding libiconv and ICU (from libxml headers)` \
CFLAGS="${CFLAGS} -I${INSTALL_PREFIX}/include" \
echo -e "\n### Running cmake"
mkdir -p build-${ABI_NAME}
cd build-${ABI_NAME}

${CMAKE} .. \
${CMAKE_OPTIONS} \
-DBUILD_SHARED_LIBS=NO \
-DLIBXSLT_WITH_PYTHON=NO \
-DLIBXSLT_WITH_TESTS=NO \
-DLIBXSLT_WITH_PROGRAMS=NO \

echo -e "\n### Building"
make -j${MAKE_JOBS}
Expand Down
1 change: 0 additions & 1 deletion phases/19-libcurl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ ${CMAKE} .. \
-DBUILD_SHARED_LIBS=YES \
-DBUILD_CURL_EXE=NO \
-DCURL_CA_BUNDLE=NONE `# disable CA bundle path, needs to be read at runtime from app bundle` \
-DCMAKE_FIND_ROOT_PATH=${INSTALL_PREFIX} `# make CMake look for OpenSSL in installation directory` \
-DUSE_LIBIDN2=NO `# Prevent accidental detection of an idn2 installation` \
-DBUILD_LIBCURL_DOCS=NO \
-DBUILD_MISC_DOCS=NO \
Expand Down
1 change: 1 addition & 0 deletions scripts/toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ CMAKE_OPTIONS=" \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} \
-DCMAKE_FIND_USE_CMAKE_PATH=false \
-DCMAKE_FIND_ROOT_PATH=${INSTALL_PREFIX} \
-DANDROID_ABI=${ABI_NAME} \
-DANDROID_NDK=${ANDROID_NDK_ROOT} \
-DANDROID_PLATFORM=android-${ANDROID_API_LEVEL} \
Expand Down

0 comments on commit 5b8125f

Please sign in to comment.