From de121beaac542ca9b2f882be9f0771ad9d41af08 Mon Sep 17 00:00:00 2001 From: Syping Date: Mon, 11 Mar 2024 03:45:48 +0100 Subject: [PATCH] rename DPPAsExternalProject to DPPStaticBundle - remove potential DPP AVX dependency --- .github/workflows/windows.yml | 2 +- CMakeLists.txt | 6 +++--- README.md | 2 +- cmake/{DPPAsExternalProject.cmake => DPPStaticBundle.cmake} | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) rename cmake/{DPPAsExternalProject.cmake => DPPStaticBundle.cmake} (99%) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 2c5f6d4..6d876a1 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -23,7 +23,7 @@ jobs: - name: Cloning uses: actions/checkout@v4 - name: Configure CMake - run: cmake -B dtranslatebot-build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_EXE_LINKER_FLAGS="-static -lc++" -DWITH_DPP_AS_EXTERNAL_PROJECT=TRUE -GNinja + run: cmake -B dtranslatebot-build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_EXE_LINKER_FLAGS="-static -lc++" -DWITH_DPP_STATIC_BUNDLE=TRUE -GNinja - name: Download and build OpenSSL run: cmake --build dtranslatebot-build --config ${{env.BUILD_TYPE}} --target OpenSSL - name: Download and build zlib diff --git a/CMakeLists.txt b/CMakeLists.txt index e09803d..66ca3cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,9 +64,9 @@ if (WITH_BOOST) endif() # D++ Discord API Library for Bots -option(WITH_DPP_AS_EXTERNAL_PROJECT "Build with DPP as External Project" OFF) -if (WITH_DPP_AS_EXTERNAL_PROJECT) - include(DPPAsExternalProject) +option(WITH_DPP_STATIC_BUNDLE "Build with DPP Static Bundle" OFF) +if (WITH_DPP_STATIC_BUNDLE) + include(DPPStaticBundle) else() find_package(DPP REQUIRED) endif() diff --git a/README.md b/README.md index 1c79c3a..199f5f8 100644 --- a/README.md +++ b/README.md @@ -24,5 +24,5 @@ sudo cmake --install dtranslatebot-build ##### Optional CMake flags `-DWITH_BOOST=TRUE` -`-DWITH_DPP_AS_EXTERNAL_PROJECT=TRUE` +`-DWITH_DPP_STATIC_BUNDLE=TRUE` `-DWITH_SYSTEMD=TRUE` diff --git a/cmake/DPPAsExternalProject.cmake b/cmake/DPPStaticBundle.cmake similarity index 99% rename from cmake/DPPAsExternalProject.cmake rename to cmake/DPPStaticBundle.cmake index 921de46..23304eb 100644 --- a/cmake/DPPAsExternalProject.cmake +++ b/cmake/DPPStaticBundle.cmake @@ -77,6 +77,7 @@ ExternalProject_Add(DPP URL https://github.com/Syping/DPP/archive/dcd00001dfa145a03f80a0ad5317bc3e63252ead.tar.gz URL_HASH SHA256=42ff04b13a384591e819c100c4f40e12e31c8076769c168631eef85a8eeb0be3 CMAKE_ARGS + -DAVX_TYPE=AVX0 -DBUILD_SHARED_LIBS=OFF -DBUILD_VOICE_SUPPORT=OFF ${CMAKE_PASSTHROUGH_ARGS}