Update CMakeLists.txt

This commit is contained in:
Alex Spataru 2024-11-20 16:12:35 -05:00 committed by GitHub
parent 99a1ca1706
commit e0b4a80edf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -282,12 +282,20 @@ install(
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
) )
set(deploy_tool_options_arg "")
if(APPLE)
set(deploy_tool_options_arg --hardened-runtime)
elseif(WIN32)
set(deploy_tool_options_arg --compiler-runtime --release)
endif()
qt_generate_deploy_qml_app_script( qt_generate_deploy_qml_app_script(
TARGET ${PROJECT_EXECUTABLE} TARGET ${PROJECT_EXECUTABLE}
OUTPUT_SCRIPT deploy_script OUTPUT_SCRIPT deploy_script
MACOS_BUNDLE_POST_BUILD MACOS_BUNDLE_POST_BUILD
NO_UNSUPPORTED_PLATFORM_ERROR NO_UNSUPPORTED_PLATFORM_ERROR
DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
DEPLOY_TOOL_OPTIONS ${deploy_tool_options_arg}
) )
install(SCRIPT ${deploy_script}) install(SCRIPT ${deploy_script})