Update CMakeLists.txt

This commit is contained in:
tooomm 2025-05-29 23:45:02 +02:00 committed by GitHub
parent b64ef36e43
commit f3f92bca9c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -151,7 +151,7 @@ if(UNIX)
install(TARGETS oracle BUNDLE DESTINATION ./) install(TARGETS oracle BUNDLE DESTINATION ./)
else() else()
# Assume linux # Assume Linux
install(TARGETS oracle RUNTIME DESTINATION bin/) install(TARGETS oracle RUNTIME DESTINATION bin/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/oracle.png DESTINATION ${ICONDIR}/hicolor/48x48/apps) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/oracle.png DESTINATION ${ICONDIR}/hicolor/48x48/apps)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/oracle.svg DESTINATION ${ICONDIR}/hicolor/scalable/apps) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/oracle.svg DESTINATION ${ICONDIR}/hicolor/scalable/apps)
@ -205,17 +205,17 @@ Translations = Resources/translations\")
endif() endif()
if(WIN32) if(WIN32)
# these needs to be relative to CMAKE_INSTALL_PREFIX # These needs to be relative to CMAKE_INSTALL_PREFIX
set(plugin_dest_dir Plugins) set(plugin_dest_dir Plugins)
set(qtconf_dest_dir .) set(qtconf_dest_dir .)
list(APPEND libSearchDirs ${QT_LIBRARY_DIR}) list(APPEND libSearchDirs ${QT_LIBRARY_DIR})
install( # install(
DIRECTORY "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${CMAKE_BUILD_TYPE}/" # DIRECTORY "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${CMAKE_BUILD_TYPE}/"
DESTINATION ./ # DESTINATION ./
FILES_MATCHING # FILES_MATCHING
PATTERN "*.dll" # PATTERN "*.dll"
) # )
# Qt plugins: iconengines, platforms, styles, tls (Qt6) # Qt plugins: iconengines, platforms, styles, tls (Qt6)
install( install(
@ -288,3 +288,15 @@ endif()
if(Qt6_FOUND) if(Qt6_FOUND)
qt6_finalize_target(oracle) qt6_finalize_target(oracle)
endif() endif()
if(WIN32)
install(CODE "
include(BundleUtilities)
set(BU_CHMOD_BUNDLE_ITEMS ON)
fixup_bundle(
\"\${CMAKE_INSTALL_PREFIX}/Oracle.exe\"
\"\"
\"\${CMAKE_INSTALL_PREFIX}\"
)
")
endif()