|
|
|
@ -12,6 +12,7 @@ function( calamares_add_plugin )
|
|
|
|
|
set( PLUGIN_DESTINATION ${CMAKE_INSTALL_LIBDIR}/calamares/modules/${PLUGIN_NAME} )
|
|
|
|
|
set( PLUGIN_DESC_FILE module.desc )
|
|
|
|
|
set( PLUGIN_CONFIG_FILE ${NAME}.conf )
|
|
|
|
|
set( PLUGIN_DATA_DESTINATION share/calamares/modules )
|
|
|
|
|
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )
|
|
|
|
|
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )
|
|
|
|
|
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )
|
|
|
|
@ -25,8 +26,10 @@ function( calamares_add_plugin )
|
|
|
|
|
# message( " ${Green}UI:${ColorReset} ${PLUGIN_UI}" )
|
|
|
|
|
# message( " ${Green}EXPORT_MACRO:${ColorReset} ${PLUGIN_EXPORT_MACRO}" )
|
|
|
|
|
# message( " ${Green}NO_INSTALL:${ColorReset} ${PLUGIN_NO_INSTALL}" )
|
|
|
|
|
# message( " ${Green}CONFIG_FILE:${ColorReset} ${PLUGIN_CONFIG_FILE}" )
|
|
|
|
|
message( " ${Green}PLUGIN_DESTINATION:${ColorReset} ${PLUGIN_DESTINATION}" )
|
|
|
|
|
if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_CONFIG_FILE}" )
|
|
|
|
|
message( " ${Green}CONFIGURATION_FILE:${ColorReset} ${PLUGIN_CONFIG_FILE} => ${PLUGIN_DATA_DESTINATION}" )
|
|
|
|
|
endif()
|
|
|
|
|
message( "" )
|
|
|
|
|
endif()
|
|
|
|
|
# create target name once for convenience
|
|
|
|
@ -68,9 +71,9 @@ function( calamares_add_plugin )
|
|
|
|
|
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_DESC_FILE}
|
|
|
|
|
DESTINATION ${PLUGIN_DESTINATION} )
|
|
|
|
|
|
|
|
|
|
if( EXISTS "${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_CONFIG_FILE}" )
|
|
|
|
|
if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PLUGIN_CONFIG_FILE}" )
|
|
|
|
|
configure_file( ${PLUGIN_CONFIG_FILE} ${PLUGIN_CONFIG_FILE} COPYONLY )
|
|
|
|
|
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_CONFIG_FILE}
|
|
|
|
|
DESTINATION share/calamares/modules )
|
|
|
|
|
DESTINATION ${PLUGIN_DATA_DESTINATION} )
|
|
|
|
|
endif()
|
|
|
|
|
endfunction()
|
|
|
|
|