diff options
author | saturneric <[email protected]> | 2024-07-29 19:24:23 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-07-29 19:24:23 +0000 |
commit | f8d638b7b9a73ed6921ac3e1ba2f63e53f820e11 (patch) | |
tree | 8ffa82e33522de03974d6d0289aa831b4fd6ebdf | |
parent | Merge branch 'develop' of ssh://ssh.git.bktus.com:2222/GpgFrontend/GpgFronten... (diff) | |
parent | fix: solve ci issues (diff) | |
download | GpgFrontend-f8d638b7b9a73ed6921ac3e1ba2f63e53f820e11.tar.gz GpgFrontend-f8d638b7b9a73ed6921ac3e1ba2f63e53f820e11.zip |
Merge branch 'develop' of github.com:saturneric/GpgFrontend into develop
-rw-r--r-- | .github/workflows/release-qt5.yml | 8 | ||||
-rw-r--r-- | .github/workflows/release.yml | 7 | ||||
-rw-r--r-- | src/core/CMakeLists.txt | 36 | ||||
-rw-r--r-- | src/test/CMakeLists.txt | 9 |
4 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/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 |