fix Could not find advapi32_LIBRARY (#183)

This commit is contained in:
SZinedine 2024-02-04 12:04:38 +01:00
parent 448a7b525f
commit 934e8d34cd

View File

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