Correctly install configuration files for viewmodules.

main
Teo Mrnjavac 11 years ago
parent ddb6813d26
commit 58b264e0a9

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

Loading…
Cancel
Save