source: calamares/trunk/fuentes/src/qml/calamares/CMakeLists.txt @ 7538

Last change on this file since 7538 was 7538, checked in by kbut, 13 months ago

sync with github

File size: 1.3 KB
Line 
1file( GLOB SUBDIRECTORIES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*" )
2
3# Iterate over all the subdirectories which have a qmldir file, copy them over to the build dir,
4# and install them into share/calamares/qml/calamares
5foreach( SUBDIRECTORY ${SUBDIRECTORIES} )
6    if( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}"
7        AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/qmldir" )
8
9        set( QML_DIR share/calamares/qml )
10        set( QML_MODULE_DESTINATION ${QML_DIR}/calamares/${SUBDIRECTORY} )
11
12        # We glob all the files inside the subdirectory, and we make sure they are
13        # synced with the bindir structure and installed.
14        file( GLOB QML_MODULE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY} "${SUBDIRECTORY}/*" )
15        foreach( QML_MODULE_FILE ${QML_MODULE_FILES} )
16            if( NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}/${QML_MODULE_FILE} )
17                configure_file( ${SUBDIRECTORY}/${QML_MODULE_FILE} ${SUBDIRECTORY}/${QML_MODULE_FILE} COPYONLY )
18
19                install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${QML_MODULE_FILE}
20                         DESTINATION ${QML_MODULE_DESTINATION} )
21            endif()
22        endforeach()
23
24        message( "-- ${BoldYellow}Configured QML module: ${BoldRed}calamares.${SUBDIRECTORY}${ColorReset}" )
25
26    endif()
27endforeach()
Note: See TracBrowser for help on using the repository browser.