From d4c41888c6b7caa1e8c000f91b0b4336b0e72bfb Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 1 May 2019 01:10:41 +0200 Subject: [PATCH] Also glob images and descriptions We want to glob these, because adding a new description should be as trivial as possible. So in this case, we just need to add a new json file and if necessary some images, run CMake again and package. We won't need to type anything in the CMake file. That's just busywork. --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d0e40821..320ab9caf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,6 +68,8 @@ set(installed_paths_resources_qml_SidebarSettingTemplates "") foreach(f IN LISTS installed_files_resources_qml_SidebarSettingTemplates) list(APPEND installed_paths_resources_qml_SidebarSettingTemplates ${CMAKE_CURRENT_SOURCE_DIR}/resources/qml/SidebarSettingTemplates/${f}) endforeach() +file(GLOB installed_paths_resources_descriptions ${CMAKE_CURRENT_SOURCE_DIR}/resources/descriptions/*) +file(GLOB installed_paths_resources_images ${CMAKE_CURRENT_SOURCE_DIR}/resources/images/*) #Find out where to install this thing. if(WIN32) @@ -95,6 +97,8 @@ install(FILES ${installed_paths_resources_icons} DESTINATION SettingsGuide/resou install(FILES ${installed_paths_resources_qml} DESTINATION SettingsGuide/resources/qml) install(FILES ${installed_paths_resources_qml_SidebarSettings} DESTINATION SettingsGuide/resources/qml/SidebarSettings) install(FILES ${installed_paths_resources_qml_SidebarSettingTemplates} DESTINATION SettingsGuide/resources/qml/SidebarSettingTemplates) +install(FILES ${installed_paths_resources_descriptions} DESTINATION SettingsGuide/resources/descriptions) +install(FILES ${installed_paths_resources_images} DESTINATION SettingsGuide/resources/images) #Packing this into a .curapackage file. add_custom_target(pack COMMAND "") #Packs for all supported SDK versions. @@ -104,6 +108,8 @@ foreach(sdk_version ${SETTINGSGUIDE_SUPPORTED_SDKS}) file(COPY ${installed_paths_resources_qml} DESTINATION pack${sdk_version}/files/plugins/SettingsGuide/resources/qml) file(COPY ${installed_paths_resources_qml_SidebarSettings} DESTINATION pack${sdk_version}/files/plugins/SettingsGuide/resources/qml/SidebarSettings) file(COPY ${installed_paths_resources_qml_SidebarSettingTemplates} DESTINATION pack${sdk_version}/files/plugins/SettingsGuide/resources/qml/SidebarSettingTemplates) + file(COPY ${installed_paths_resources_descriptions} DESTINATION pack${sdk_version}/files/plugins/SettingsGuide/resources/descriptions) + file(COPY ${installed_paths_resources_images} DESTINATION pack${sdk_version}/files/plugins/SettingsGuide/resources/images) file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/[Content_Types].xml" DESTINATION pack${sdk_version}) file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/_rels" DESTINATION pack${sdk_version}) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/package.json.in" pack${sdk_version}/package.json)