mirror of
https://github.com/itay-grudev/SingleApplication.git
synced 2024-11-15 12:15:43 +08:00
Improve Windows link library dependency
Fixes an error when building with CMAKE_LINK_LIBRARIES_ONLY_TARGETS enabled.
This commit is contained in:
parent
14e9d14675
commit
aed93910db
@ -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})
|
||||
|
Loading…
Reference in New Issue
Block a user