Add proper QResrouce system to libcalamaresui, finish up prepare checks

This also adds ImageRegistry, a SVG cache, a bunch of utility functions
for shared pixmaps in CalamaresUtilsGui and renames several qrc files
in viewmodules.
This commit is contained in:
Teo Mrnjavac 2014-08-26 15:18:30 +02:00
parent 0404413b05
commit d97bb47f09
26 changed files with 470 additions and 16 deletions

View file

@ -5,7 +5,7 @@ function( calamares_add_plugin )
# parse arguments ( name needs to be saved before passing ARGN into the macro )
set( NAME ${ARGV0} )
set( options NO_INSTALL SHARED_LIB )
set( oneValueArgs NAME TYPE EXPORT_MACRO )
set( oneValueArgs NAME TYPE EXPORT_MACRO RESOURCES )
set( multiValueArgs SOURCES UI LINK_LIBRARIES COMPILE_DEFINITIONS )
cmake_parse_arguments( PLUGIN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
set( PLUGIN_NAME ${NAME} )
@ -30,6 +30,9 @@ function( calamares_add_plugin )
if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_CONFIG_FILE}" )
message( " ${Green}CONFIGURATION_FILE:${ColorReset} ${PLUGIN_CONFIG_FILE} => ${PLUGIN_DATA_DESTINATION}" )
endif()
if( PLUGIN_RESOURCES )
message( " ${Green}RESOURCES:${ColorReset} ${PLUGIN_RESOURCES}" )
endif()
message( "" )
endif()
# create target name once for convenience
@ -65,6 +68,10 @@ function( calamares_add_plugin )
list( APPEND calamares_add_library_args "INSTALL_BINDIR" "${PLUGIN_DESTINATION}" )
if( PLUGIN_RESOURCES )
list( APPEND calamares_add_library_args "RESOURCES" "${PLUGIN_RESOURCES}" )
endif()
calamares_add_library( ${calamares_add_library_args} )
configure_file( ${PLUGIN_DESC_FILE} ${PLUGIN_DESC_FILE} COPYONLY )