Skip to content

Commit 7cf93d9

Browse files
committed
[win,qt6] Add dependencies to install targets
- Bump vcpkg version to pick up Qt 6.5
1 parent 364d0b6 commit 7cf93d9

File tree

4 files changed

+30
-11
lines changed

4 files changed

+30
-11
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ jobs:
2626
- name: Update vcpkg
2727
shell: pwsh
2828
run: |
29-
$vcpkgCommit = '69efe9cc2df0015f0bb2d37d55acde4a75c9a25b'
29+
$vcpkgCommit = '7f52deab66689f912da6d04de105c457d8ba671e'
3030
pushd "$env:VCPKG_INSTALLATION_ROOT"
3131
git fetch --depth=1 origin $vcpkgCommit
3232
git reset --hard $vcpkgCommit
3333
./bootstrap-vcpkg.bat
34-
Add-Content -Path 'triplets\${{matrix.platform}}-windows.cmake' `
35-
-Value 'set(VCPKG_BUILD_TYPE "release")'
34+
Get-ChildItem -Path 'triplets\*-windows*.cmake' | ForEach-Object {
35+
Add-Content -Path $_ -Value 'set(VCPKG_BUILD_TYPE "release")'
36+
}
3637
popd
3738
3839
- name: Setup NuGet Credentials
@@ -52,7 +53,7 @@ jobs:
5253
run: |
5354
vcpkg --triplet=${{matrix.platform}}-windows install --recurse `
5455
cspice eigen3 ffmpeg[x264] fmt freetype gettext icu libepoxy libjpeg-turbo libpng luajit `
55-
qt5-base qtbase qt5compat
56+
qt5-base qtbase qt5compat[core]
5657
5758
- name: Checkout source code
5859
uses: actions/checkout@v3

cmake/CopyDependentDlls.cmake

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ if(NOT DEPS_DEST_DIR)
1414
endif()
1515

1616
file(GET_RUNTIME_DEPENDENCIES
17-
RESOLVED_DEPENDENCIES_VAR resolved_deps
18-
CONFLICTING_DEPENDENCIES_PREFIX conflicts
19-
PRE_EXCLUDE_REGEXES "^api-ms" "^ext-ms-" "^qt"
20-
POST_EXCLUDE_REGEXES ".*system32/.*\\.dll$"
21-
EXECUTABLES "${DEPS_TARGET_FILE}"
22-
DIRECTORIES "${DEPS_EXTRA_DIRS}")
17+
RESOLVED_DEPENDENCIES_VAR resolved_deps
18+
CONFLICTING_DEPENDENCIES_PREFIX conflicts
19+
PRE_EXCLUDE_REGEXES "^api-ms" "^ext-ms-"
20+
POST_EXCLUDE_REGEXES ".*system32/.*\\.dll$"
21+
EXECUTABLES "${DEPS_TARGET_FILE}"
22+
DIRECTORIES "${DEPS_EXTRA_DIRS}"
23+
)
2324

2425
if(DEPS_COPY_TARGET)
2526
process_file("${DEPS_TARGET_FILE}" "${DEPS_DEST_DIR}")

src/celestia/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,15 @@ if (HAVE_MESHOPTIMIZER)
105105
target_link_libraries(celestia meshoptimizer::meshoptimizer)
106106
endif()
107107

108-
install(TARGETS celestia LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} NAMELINK_SKIP)
108+
if(WIN32)
109+
install(TARGETS celestia RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
110+
install(TARGETS celestia RUNTIME_DEPENDENCIES
111+
PRE_EXCLUDE_REGEXES "^api-ms" "^ext-ms-"
112+
POST_EXCLUDE_REGEXES ".*system32/.*\\.dll$"
113+
)
114+
else()
115+
install(TARGETS celestia LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} NAMELINK_SKIP)
116+
endif()
109117

110118
add_subdirectory(gtk)
111119
add_subdirectory(qt5)

src/celestia/qt6/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,13 @@ endif()
4141

4242
install(TARGETS celestia-qt6 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
4343

44+
if(WIN32)
45+
qt6_generate_deploy_app_script(TARGET celestia-qt6
46+
OUTPUT_SCRIPT deploy-celestia-qt6
47+
NO_UNSUPPORTED_PLATFORM_ERROR
48+
NO_TRANSLATIONS
49+
)
50+
install(SCRIPT "${deploy-celestia-qt6}")
51+
endif()
52+
4453
add_subdirectory(data)

0 commit comments

Comments
 (0)