vcpkg: rework the Qt dependency
- only depend on a subset of `qtbase` - make Linguist a host dependency
This commit is contained in:
@@ -19,9 +19,14 @@ if(QT_STATIC AND MINGW)
|
|||||||
set(CMAKE_PREFIX_PATH "$ENV{MSYSTEM_PREFIX}/qt${QT_MAJOR}-static")
|
set(CMAKE_PREFIX_PATH "$ENV{MSYSTEM_PREFIX}/qt${QT_MAJOR}-static")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(VCPKG_TOOLCHAIN AND VCPKG_HOST_TRIPLET)
|
||||||
|
set(QT_HOST_PATH "${VCPKG_INSTALLED_DIR}/${VCPKG_HOST_TRIPLET}/tools/Qt${QT_MAJOR}")
|
||||||
|
set(QT_HOST_PATH_CMAKE_DIR ${VCPKG_INSTALLED_DIR}/${VCPKG_HOST_TRIPLET})
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
find_package(Qt${QT_MAJOR} COMPONENTS Core Widgets Network OpenGL REQUIRED)
|
find_package(Qt${QT_MAJOR} COMPONENTS Core Widgets Network OpenGL REQUIRED)
|
||||||
find_package(Qt${QT_MAJOR}LinguistTools REQUIRED)
|
|
||||||
# TODO: Is this the correct way to do this, and is it required on any
|
# TODO: Is this the correct way to do this, and is it required on any
|
||||||
# other platforms or with Qt 5?
|
# other platforms or with Qt 5?
|
||||||
if(APPLE AND USE_QT6)
|
if(APPLE AND USE_QT6)
|
||||||
@@ -312,9 +317,7 @@ endif()
|
|||||||
set(QM_FILES)
|
set(QM_FILES)
|
||||||
file(GLOB po_files "${CMAKE_CURRENT_SOURCE_DIR}/languages/*.po")
|
file(GLOB po_files "${CMAKE_CURRENT_SOURCE_DIR}/languages/*.po")
|
||||||
foreach(po_file ${po_files})
|
foreach(po_file ${po_files})
|
||||||
get_target_property(LCONVERT_EXECUTABLE Qt${QT_MAJOR}::lconvert IMPORTED_LOCATION)
|
find_program(LCONVERT_EXECUTABLE lconvert REQUIRED)
|
||||||
get_filename_component(_lconvert_bin_dir "${LCONVERT_EXECUTABLE}" DIRECTORY)
|
|
||||||
find_program(LCONVERT_EXECUTABLE lconvert HINTS "${_lconvert_bin_dir}")
|
|
||||||
|
|
||||||
get_filename_component(PO_FILE_NAME ${po_file} NAME_WE)
|
get_filename_component(PO_FILE_NAME ${po_file} NAME_WE)
|
||||||
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/86box_${PO_FILE_NAME}.qm"
|
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/86box_${PO_FILE_NAME}.qm"
|
||||||
|
24
vcpkg.json
24
vcpkg.json
@@ -14,8 +14,28 @@
|
|||||||
"qt-ui": {
|
"qt-ui": {
|
||||||
"description": "Qt User Interface",
|
"description": "Qt User Interface",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"qtbase",
|
{
|
||||||
"qttranslations"
|
"name": "qtbase",
|
||||||
|
"default-features": false,
|
||||||
|
"features": [
|
||||||
|
"concurrent",
|
||||||
|
"default-features",
|
||||||
|
"gui",
|
||||||
|
"harfbuzz",
|
||||||
|
"network",
|
||||||
|
"vulkan",
|
||||||
|
"widgets",
|
||||||
|
"zstd"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "qttools",
|
||||||
|
"default-features": false,
|
||||||
|
"features": [
|
||||||
|
"linguist"
|
||||||
|
],
|
||||||
|
"host": true
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"munt": {
|
"munt": {
|
||||||
|
Reference in New Issue
Block a user