fix the MSVC arm build?

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2025-07-18 20:58:15 +03:00
parent 41dc5826da
commit 8ae7927166
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318
2 changed files with 11 additions and 3 deletions

View File

@ -338,7 +338,15 @@ if(Launcher_QT_VERSION_MAJOR EQUAL 6)
endif()
find_package(PkgConfig REQUIRED)
pkg_check_modules(libarchive REQUIRED IMPORTED_TARGET libarchive)
# Find libqrencode
## NOTE(@getchoo): Never use pkg-config with MSVC since the vcpkg port makes our install bundle fail to find the dll
if(PkgConfig_FOUND AND NOT MSVC)
pkg_check_modules(libarchive REQUIRED IMPORTED_TARGET libarchive)
set(LIBARCHIVE_LIBRARY PkgConfig::libarchive)
else()
find_library(LibArchive REQUIRED)
set(LIBARCHIVE_LIBRARY LibArchive::LibArchive)
endif()
if(NOT Launcher_FORCE_BUNDLED_LIBS)
# Find toml++

View File

@ -1332,7 +1332,7 @@ target_link_libraries(Launcher_logic
BuildConfig
Qt${QT_VERSION_MAJOR}::Widgets
qrcodegenerator
PkgConfig::libarchive
${LIBARCHIVE_LIBRARY}
)
if(TARGET PkgConfig::tomlplusplus)
target_link_libraries(Launcher_logic PkgConfig::tomlplusplus)
@ -1433,7 +1433,7 @@ if(Launcher_BUILD_UPDATER)
Qt${QT_VERSION_MAJOR}::Network
${Launcher_QT_LIBS}
cmark::cmark
PkgConfig::libarchive
${LIBARCHIVE_LIBRARY}
)
add_executable("${Launcher_Name}_updater" WIN32 updater/prismupdater/updater_main.cpp)