CMake: Use find_package for qtsparkle

This commit is contained in:
Jonas Kvinge
2025-01-12 03:56:22 +01:00
parent 8a9db5440d
commit e5b6c5959f
2 changed files with 3 additions and 3 deletions

View File

@@ -273,7 +273,7 @@ endif()
if(WIN32)
find_package(getopt-win REQUIRED)
if(USE_QTSPARKLE)
pkg_check_modules(QTSPARKLE REQUIRED IMPORTED_TARGET qtsparkle-qt${QT_VERSION_MAJOR})
find_package(qtsparkle-qt${QT_VERSION_MAJOR} REQUIRED)
set(HAVE_QTSPARKLE ON)
endif()
endif()
@@ -1518,7 +1518,7 @@ target_link_libraries(strawberry_lib PUBLIC
$<$<BOOL:${HAVE_AUDIOCD}>:PkgConfig::LIBCDIO>
$<$<BOOL:${HAVE_MTP}>:PkgConfig::LIBMTP>
$<$<BOOL:${HAVE_GPOD}>:PkgConfig::LIBGPOD PkgConfig::GDK_PIXBUF>
$<$<BOOL:${HAVE_QTSPARKLE}>:PkgConfig::QTSPARKLE>
$<$<BOOL:${HAVE_QTSPARKLE}>:qtsparkle-qt${QT_VERSION_MAJOR}::qtsparkle>
$<$<BOOL:${WIN32}>:dsound dwmapi getopt-win::getopt>
$<$<BOOL:${MSVC}>:WindowsApp>
${SINGLEAPPLICATION_LIBRARIES}

View File

@@ -290,7 +290,7 @@ int main(int argc, char *argv[]) {
translations->LoadTranslation(u"strawberry"_s, QDir::currentPath(), language);
# ifdef HAVE_QTSPARKLE
//qtsparkle::LoadTranslations(language);
qtsparkle::LoadTranslations(language);
# endif
#endif