Skip to content

Commit

Permalink
Also glob images and descriptions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ghostkeeper committed Apr 30, 2019
1 parent befa767 commit d4c4188
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand All @@ -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)
Expand Down

0 comments on commit d4c4188

Please sign in to comment.