This commit is contained in:
Seth Flynn 2026-06-26 17:11:25 +05:00 committed by GitHub
commit 1beef98dbc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 29 additions and 3 deletions

View file

@ -35,6 +35,12 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_C_STANDARD 11)
include(GenerateExportHeader)
# NOTE: We can't statically link with the MSVC runtime due to GPL restrictions
#
# We also purposefully choose not to use the debug DLL, as that would require
# users of our development builds to install the Windows SDK
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")
add_compile_definitions($<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>)
add_compile_definitions(QT_WARN_DEPRECATED_UP_TO=0x060400)
add_compile_definitions(QT_DISABLE_DEPRECATED_UP_TO=0x060400)
@ -316,9 +322,8 @@ endif()
## NOTE(@getchoo): Never use pkg-config with MSVC since the vcpkg port makes our install bundle fail to find the dll
if(MSVC)
find_path(LIBQRENCODE_INCLUDE_DIR qrencode.h REQUIRED)
find_library(LIBQRENCODE_LIBRARY_RELEASE qrencode REQUIRED)
find_library(LIBQRENCODE_LIBRARY_DEBUG qrencoded)
set(LIBQRENCODE_LIBRARIES optimized ${LIBQRENCODE_LIBRARY_RELEASE} debug ${LIBQRENCODE_LIBRARY_DEBUG})
find_library(LIBQRENCODE_LIBRARY qrencode REQUIRED)
set(LIBQRENCODE_LIBRARIES ${LIBQRENCODE_LIBRARY})
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(libqrencode REQUIRED IMPORTED_TARGET libqrencode)

View file

@ -0,0 +1,10 @@
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
# NOTE: This is the only change we're making to the default target
#
# Avoid using the debug VCRUNTIME. Otherwise, this would introduce the Windows SDK
# as a requirement for testers :(
# We also don't really need the debug versions of our libraries anyways
set(VCPKG_BUILD_TYPE release)

View file

@ -0,0 +1,10 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
# NOTE: This is the only change we're making to the default target
#
# Avoid using the debug VCRUNTIME. Otherwise, this would introduce the Windows SDK
# as a requirement for testers :(
# We also don't really need the debug versions of our libraries anyways
set(VCPKG_BUILD_TYPE release)

View file

@ -1528,6 +1528,7 @@ if(WIN32 OR (UNIX AND APPLE))
COMPONENT bundle
DIRECTORIES
${CMAKE_SYSTEM_LIBRARY_PATH}
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin
${QT_LIBS_DIR}
${QT_LIBEXECS_DIR}
PRE_EXCLUDE_REGEXES