diff options
author | saturneric <[email protected]> | 2024-07-29 17:13:39 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-07-29 19:01:25 +0000 |
commit | e6b265c95c3d4e2583118b42a1fe9f5febc56395 (patch) | |
tree | af8129ccbe90dc727e5a0114d7dd70091fe619d7 | |
parent | fix: solve some known issues at ci build configs (diff) | |
download | GpgFrontend-e6b265c95c3d4e2583118b42a1fe9f5febc56395.tar.gz GpgFrontend-e6b265c95c3d4e2583118b42a1fe9f5febc56395.zip |
fix: solve ci issues
-rw-r--r-- | .github/workflows/release-qt5.yml | 8 | ||||
-rw-r--r-- | .github/workflows/release.yml | 7 | ||||
m--------- | modules | 0 | ||||
-rw-r--r-- | src/core/CMakeLists.txt | 36 | ||||
-rw-r--r-- | src/test/CMakeLists.txt | 9 |
5 files changed, 15 insertions, 45 deletions
diff --git a/.github/workflows/release-qt5.yml b/.github/workflows/release-qt5.yml index c0b18701..5dbd2fab 100644 --- a/.github/workflows/release-qt5.yml +++ b/.github/workflows/release-qt5.yml @@ -53,6 +53,7 @@ jobs: pacman --noconfirm -S --needed make texinfo automake pacman --noconfirm -S --needed mingw-w64-x86_64-qt5 mingw-w64-x86_64-angleproject libintl msys2-runtime-devel gettext-devel pacman --noconfirm -S --needed mingw-w64-x86_64-ninja mingw-w64-x86_64-gnupg mingw-w64-x86_64-libarchive + pacman --noconfirm -S --needed mingw-w64-x86_64-gtest if: matrix.os == 'windows-2019' - name: Install Dependence (Linux) @@ -152,16 +153,15 @@ jobs: cd $(echo "/${{github.workspace}}" | sed 's/\\/\//g' | sed 's/://') cd third_party/mimalloc mkdir build && cd build - cmake -G Ninja -DMI_SECURE=ON .. - ninja - sudo ninja install + cmake -G Ninja -DMI_SECURE=ON -DCMAKE_INSTALL_PREFIX=$MSYSTEM_PREFIX .. && ninja + ninja install if: matrix.os == 'windows-2019' - name: Build googletest (Linux) run: | cd ${{github.workspace}}/third_party/googletest mkdir build && cd build - cmake -G Ninja .. + cmake -G Ninja -DBUILD_SHARED_LIBS=ON .. ninja sudo ninja install if: matrix.os == 'ubuntu-20.04' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 27d679be..18d41b8c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -180,16 +180,15 @@ jobs: cd $(echo "/${{github.workspace}}" | sed 's/\\/\//g' | sed 's/://') cd third_party/mimalloc mkdir build && cd build - cmake -G Ninja -DMI_SECURE=ON .. - ninja - sudo ninja install + cmake -G Ninja -DMI_SECURE=ON -DCMAKE_INSTALL_PREFIX=$MSYSTEM_PREFIX .. && ninja + ninja install if: matrix.os == 'windows-2019' - name: Build googletest (Linux) run: | cd ${{github.workspace}}/third_party/googletest mkdir build && cd build - cmake -G Ninja .. + cmake -G Ninja -DBUILD_SHARED_LIBS=ON .. ninja sudo ninja install if: matrix.os == 'ubuntu-20.04' diff --git a/modules b/modules -Subproject 328bf940a1bc2a166d60e558833df6b7bd07669 +Subproject efe066a18f1e6ec36c7a1ebcac80e11a7c1e46d diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 1aeabce3..d5b213ca 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -53,15 +53,6 @@ target_compile_definitions(gpgfrontend_core PUBLIC GF_CORE) # mimalloc (except apple macos) if(NOT APPLE) target_link_libraries(gpgfrontend_core PUBLIC mimalloc) - - # use system installed libraries or install it system wide - if(MINGW AND NOT STABLE_BUILD_FULL_SDK) - set_target_properties(mimalloc - PROPERTIES - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" - ) - endif() endif() # qt-aes @@ -84,28 +75,17 @@ if(MINGW) endif() # configure libarchive -if(NOT MINGW) - if(APPLE) - if(EXISTS "/usr/local/opt/libarchive/include") - set(LibArchive_INCLUDE_DIR "/usr/local/opt/libarchive/include") - else() - set(LibArchive_INCLUDE_DIR "/opt/homebrew/opt/libarchive/include") - endif() - endif() - - find_package(LibArchive REQUIRED) - target_include_directories(gpgfrontend_core PRIVATE ${LibArchive_INCLUDE_DIR}) -else() - # use system installed libraries or install it system wide - if(NOT STABLE_BUILD_FULL_SDK) - set_target_properties(archive - PROPERTIES - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" - ) +if(APPLE) + if(EXISTS "/usr/local/opt/libarchive/include") + set(LibArchive_INCLUDE_DIR "/usr/local/opt/libarchive/include") + else() + set(LibArchive_INCLUDE_DIR "/opt/homebrew/opt/libarchive/include") endif() endif() +find_package(LibArchive REQUIRED) +target_include_directories(gpgfrontend_core PRIVATE ${LibArchive_INCLUDE_DIR}) + # link libarchive target_link_libraries(gpgfrontend_core PRIVATE archive) diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index 79f17ac0..9179f3c0 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -53,15 +53,6 @@ if(XCODE_BUILD) XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "${GPGFRONTEND_XOCDE_CODE_SIGN_IDENTITY}") endif() -# use system installed libraries or install it system wide -if(MINGW AND NOT STABLE_BUILD_FULL_SDK) - set_target_properties(gtest - PROPERTIES - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" - ) -endif() - if(${CMAKE_BUILD_TYPE} STREQUAL "Debug") # lib output path set_target_properties(gpgfrontend_test PROPERTIES |