[libcalamaresui] Install libcalamaresui headers

- All the headers go to relevant subdirs, but we don't keep
  libcalamares and libcalamaresui apart.
- While here, remove unused variable from libcalamares CMake
This commit is contained in:
Adriaan de Groot 2020-06-10 16:43:34 +02:00
parent 23c93904df
commit dc0ed24f1a
2 changed files with 27 additions and 2 deletions

View File

@ -177,6 +177,9 @@ target_link_libraries( calamares
${OPTIONAL_PUBLIC_LIBRARIES} ${OPTIONAL_PUBLIC_LIBRARIES}
) )
### Installation
#
#
install( TARGETS calamares install( TARGETS calamares
EXPORT Calamares EXPORT Calamares
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
@ -193,19 +196,19 @@ install( CODE "
# Install header files # Install header files
file( GLOB rootHeaders "*.h" ) file( GLOB rootHeaders "*.h" )
file( GLOB utilsHeaders "utils/*.h" )
install( install(
FILES FILES
${CMAKE_CURRENT_BINARY_DIR}/CalamaresConfig.h ${CMAKE_CURRENT_BINARY_DIR}/CalamaresConfig.h
${rootHeaders} ${rootHeaders}
DESTINATION include/libcalamares DESTINATION include/libcalamares
) )
# Install each subdir-worth of header files
foreach( subdir geoip locale modulesystem network partition utils ) foreach( subdir geoip locale modulesystem network partition utils )
file( GLOB subdir_headers "${subdir}/*.h" ) file( GLOB subdir_headers "${subdir}/*.h" )
install( FILES ${subdir_headers} DESTINATION include/libcalamares/${subdir} ) install( FILES ${subdir_headers} DESTINATION include/libcalamares/${subdir} )
endforeach() endforeach()
### TESTING ### TESTING
# #
# #

View File

@ -83,3 +83,25 @@ endif()
if( WITH_QML ) if( WITH_QML )
target_link_libraries( calamaresui PUBLIC Qt5::QuickWidgets ) target_link_libraries( calamaresui PUBLIC Qt5::QuickWidgets )
endif() endif()
### Installation
#
#
# The library is already installed through calamares_add_library(),
# so we only need to do headers. Unlike the Calamares source tree,
# where libcalamares and libcalamaresui live in different branches,
# we're going to glom it all together in the installed headers location.
install(
FILES
Branding.h
ViewManager.h
DESTINATION include/libcalamares
)
# Install each subdir-worth of header files
foreach( subdir modulesystem utils viewpages widgets )
file( GLOB subdir_headers "${subdir}/*.h" )
install( FILES ${subdir_headers} DESTINATION include/libcalamares/${subdir} )
endforeach()