From e6421832fbf0a199b791481ab19eb19eda90d978 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Thu, 27 May 2021 16:17:14 +0200 Subject: [PATCH] Just install one qtwebengine_locales (en-US.pak) to shut up the warning, simplify install commands --- src/openstudio_app/CMakeLists.txt | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/openstudio_app/CMakeLists.txt b/src/openstudio_app/CMakeLists.txt index e2d028d35..72ca9bcb7 100644 --- a/src/openstudio_app/CMakeLists.txt +++ b/src/openstudio_app/CMakeLists.txt @@ -224,7 +224,11 @@ elseif( UNIX ) COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources} $/resources/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_100} $/resources/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_200} $/resources/ - COMMAND ${CMAKE_COMMAND} -E copy_directory ${QT_INSTALL_DIR}/translations $/translations/ + #COMMAND ${CMAKE_COMMAND} -E copy_directory ${QT_INSTALL_DIR}/translations $/translations/ + # Copying just one locale is enough to shut the annoying console warning... + COMMAND ${CMAKE_COMMAND} -E make_directory $/translations/ + COMMAND ${CMAKE_COMMAND} -E make_directory $/translations/qtwebengine_locales + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${QT_INSTALL_DIR}/translations/qtwebengine_locales/en-US.pak $/translations/qtwebengine_locales/ ) # TODO: not sure if chrpath is needed @@ -268,7 +272,11 @@ elseif( WIN32 ) COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources} $/resources/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_100} $/resources/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_200} $/resources/ - COMMAND ${CMAKE_COMMAND} -E copy_directory ${QT_INSTALL_DIR}/translations $/translations/ + #COMMAND ${CMAKE_COMMAND} -E copy_directory ${QT_INSTALL_DIR}/translations $/translations/ + # Copying just one locale is enough to shut the annoying console warning... + COMMAND ${CMAKE_COMMAND} -E make_directory $/translations/ + COMMAND ${CMAKE_COMMAND} -E make_directory $/translations/qtwebengine_locales + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${QT_INSTALL_DIR}/translations/qtwebengine_locales/en-US.pak $/translations/qtwebengine_locales/ ) add_custom_command(TARGET ${target_name} @@ -344,12 +352,13 @@ endif() if( NOT APPLE ) install(FILES $/qt.conf DESTINATION bin COMPONENT OpenStudioApp) - install(DIRECTORY ${QT_INSTALL_DIR}/translations DESTINATION bin COMPONENT OpenStudioApp) - - install(FILES ${icudtl} DESTINATION bin/resources COMPONENT OpenStudioApp ) - install(FILES ${qweb_resources} DESTINATION bin/resources COMPONENT OpenStudioApp ) - install(FILES ${qweb_resources_100} DESTINATION bin/resources COMPONENT OpenStudioApp ) - install(FILES ${qweb_resources_200} DESTINATION bin/resources COMPONENT OpenStudioApp ) + # install(DIRECTORY ${QT_INSTALL_DIR}/translations DESTINATION bin COMPONENT OpenStudioApp) + install(DIRECTORY $/translations/ DESTINATION bin/translations/ COMPONENT OpenStudioApp) + install(DIRECTORY $/resources/ DESTINATION bin/resources/ COMPONENT OpenStudioApp) + # install(FILES ${icudtl} DESTINATION bin/resources COMPONENT OpenStudioApp )/translatio + # install(FILES ${qweb_resources} DESTINATION bin/resources COMPONENT OpenStudioApp ) + # install(FILES ${qweb_resources_100} DESTINATION bin/resources COMPONENT OpenStudioApp ) + # install(FILES ${qweb_resources_200} DESTINATION bin/resources COMPONENT OpenStudioApp ) if(WIN32) install(TARGETS OpenStudioApp DESTINATION bin COMPONENT OpenStudioApp )