Merge pull request #174 from triplef/patch-1

Improve Windows link library dependency
This commit is contained in:
Itay Grudev 2023-09-17 16:23:49 +03:00 committed by GitHub
commit d815ce3bf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 4 deletions

View File

@ -54,6 +54,9 @@ jobs:
with:
version: ${{ matrix.qt_version }}
- name: Setup MSVC environment for QMake
uses: ilammy/msvc-dev-cmd@v1
- name: Build library with CMake
run: |
cmake . ${{ matrix.additional_arguments }}
@ -83,9 +86,6 @@ jobs:
cmake . ${{ matrix.additional_arguments }}
cmake --build .
- name: Setup MSVC environment for QMake
uses: ilammy/msvc-dev-cmd@v1
- name: Build basic example with QMake
working-directory: examples/basic/
run: |

View File

@ -1,5 +1,9 @@
# Changelog
## 3.4.1
* Improved Windows advapi32 link library dependency. - _Frederik Seiffert_
## 3.4.0
* Provide API for blocking sendMessage. - _Christoph Cullmann_

View File

@ -38,7 +38,9 @@ endif()
target_link_libraries(${PROJECT_NAME} PUBLIC ${QT_LIBRARIES})
if(WIN32)
target_link_libraries(${PROJECT_NAME} PRIVATE advapi32)
find_library(advapi32_LIBRARY advapi32 REQUIRED)
mark_as_advanced(advapi32_LIBRARY)
target_link_libraries(${PROJECT_NAME} PRIVATE ${advapi32_LIBRARY})
endif()
target_compile_definitions(${PROJECT_NAME} PUBLIC QAPPLICATION_CLASS=${QAPPLICATION_CLASS})