[libcalamares,ui] Make KF5::CoreAddons explicit

- libcalamares doesn't need it anymore, because it ported away
  from KPluginLoader,
- libcalamaresui does need it, because of KMacroExpander.
This commit is contained in:
Adriaan de Groot 2022-02-08 16:13:40 +01:00
parent e507a23795
commit b167d8da03
2 changed files with 119 additions and 184 deletions

View File

@ -10,20 +10,17 @@
# (non-GUI) jobs. # (non-GUI) jobs.
# #
add_definitions( -DDLLEXPORT_PRO ) add_definitions(-DDLLEXPORT_PRO)
include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ) include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/CalamaresConfig.h.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CalamaresConfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/CalamaresConfig.h)
${CMAKE_CURRENT_BINARY_DIR}/CalamaresConfig.h ) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CalamaresVersion.h.in ${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersion.h)
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/CalamaresVersion.h.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CalamaresVersionX.h.in ${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersionX.h)
${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersion.h )
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/CalamaresVersionX.h.in
${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersionX.h )
set( OPTIONAL_PRIVATE_LIBRARIES "" ) set(OPTIONAL_PRIVATE_LIBRARIES "")
set( OPTIONAL_PUBLIC_LIBRARIES "" ) set(OPTIONAL_PUBLIC_LIBRARIES "")
set( libSources set(libSources
CppJob.cpp CppJob.cpp
GlobalStorage.cpp GlobalStorage.cpp
Job.cpp Job.cpp
@ -31,13 +28,11 @@ set( libSources
JobQueue.cpp JobQueue.cpp
ProcessJob.cpp ProcessJob.cpp
Settings.cpp Settings.cpp
# GeoIP services # GeoIP services
geoip/Interface.cpp geoip/Interface.cpp
geoip/GeoIPFixed.cpp geoip/GeoIPFixed.cpp
geoip/GeoIPJSON.cpp geoip/GeoIPJSON.cpp
geoip/Handler.cpp geoip/Handler.cpp
# Locale-data service # Locale-data service
locale/Global.cpp locale/Global.cpp
locale/Lookup.cpp locale/Lookup.cpp
@ -46,7 +41,6 @@ set( libSources
locale/TranslatableString.cpp locale/TranslatableString.cpp
locale/Translation.cpp locale/Translation.cpp
locale/TranslationsModel.cpp locale/TranslationsModel.cpp
# Modules # Modules
modulesystem/Config.cpp modulesystem/Config.cpp
modulesystem/Descriptor.cpp modulesystem/Descriptor.cpp
@ -55,19 +49,15 @@ set( libSources
modulesystem/Preset.cpp modulesystem/Preset.cpp
modulesystem/RequirementsChecker.cpp modulesystem/RequirementsChecker.cpp
modulesystem/RequirementsModel.cpp modulesystem/RequirementsModel.cpp
# Network service # Network service
network/Manager.cpp network/Manager.cpp
# Packages service # Packages service
packages/Globals.cpp packages/Globals.cpp
# Partition service # Partition service
partition/Global.cpp partition/Global.cpp
partition/Mount.cpp partition/Mount.cpp
partition/PartitionSize.cpp partition/PartitionSize.cpp
partition/Sync.cpp partition/Sync.cpp
# Utility service # Utility service
utils/CalamaresUtilsSystem.cpp utils/CalamaresUtilsSystem.cpp
utils/CommandList.cpp utils/CommandList.cpp
@ -87,20 +77,16 @@ set( libSources
### OPTIONAL Automount support (requires dbus) ### OPTIONAL Automount support (requires dbus)
# #
# #
if( Qt5DBus_FOUND) if(Qt5DBus_FOUND)
list( APPEND libSources partition/AutoMount.cpp ) list(APPEND libSources partition/AutoMount.cpp)
list( APPEND OPTIONAL_PRIVATE_LIBRARIES Qt5::DBus ) list(APPEND OPTIONAL_PRIVATE_LIBRARIES Qt5::DBus)
endif() endif()
### OPTIONAL Python support ### OPTIONAL Python support
# #
# #
if( WITH_PYTHON ) if(WITH_PYTHON)
list( APPEND libSources list(APPEND libSources PythonHelper.cpp PythonJob.cpp PythonJobApi.cpp)
PythonHelper.cpp
PythonJob.cpp
PythonJobApi.cpp
)
include_directories(${PYTHON_INCLUDE_DIRS}) include_directories(${PYTHON_INCLUDE_DIRS})
link_directories(${PYTHON_LIBRARIES}) link_directories(${PYTHON_LIBRARIES})
@ -108,48 +94,48 @@ if( WITH_PYTHON )
include_directories(${Boost_INCLUDE_DIRS}) include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS}) link_directories(${Boost_LIBRARY_DIRS})
list( APPEND OPTIONAL_PRIVATE_LIBRARIES list(APPEND OPTIONAL_PRIVATE_LIBRARIES ${PYTHON_LIBRARIES} ${Boost_LIBRARIES})
${PYTHON_LIBRARIES}
${Boost_LIBRARIES}
)
endif() endif()
### OPTIONAL GeoIP XML support ### OPTIONAL GeoIP XML support
# #
# #
find_package(Qt5 COMPONENTS Xml) find_package(Qt5 COMPONENTS Xml)
if( Qt5Xml_FOUND ) if(Qt5Xml_FOUND)
list( APPEND libSources geoip/GeoIPXML.cpp ) list(APPEND libSources geoip/GeoIPXML.cpp)
list( APPEND OPTIONAL_PUBLIC_LIBRARIES Qt5::Network Qt5::Xml ) list(APPEND OPTIONAL_PUBLIC_LIBRARIES Qt5::Network Qt5::Xml)
endif() endif()
### OPTIONAL KPMcore support ### OPTIONAL KPMcore support
# #
# #
include( KPMcoreHelper ) include(KPMcoreHelper)
if ( KPMcore_FOUND ) if(KPMcore_FOUND)
find_package( Qt5 REQUIRED DBus ) # Needed for KPMCore find_package(Qt5 REQUIRED DBus) # Needed for KPMCore
find_package( KF5 REQUIRED I18n WidgetsAddons ) # Needed for KPMCore find_package(KF5 REQUIRED I18n WidgetsAddons) # Needed for KPMCore
foreach ( d ${KPMcore_API_DEFINITIONS} ) foreach(d ${KPMcore_API_DEFINITIONS})
add_definitions( -D${d} ) add_definitions(-D${d})
endforeach() endforeach()
include_directories( ${KPMCORE_INCLUDE_DIR} ) include_directories(${KPMCORE_INCLUDE_DIR})
list( APPEND libSources list(
APPEND
libSources
partition/FileSystem.cpp partition/FileSystem.cpp
partition/KPMManager.cpp partition/KPMManager.cpp
partition/PartitionIterator.cpp partition/PartitionIterator.cpp
partition/PartitionQuery.cpp partition/PartitionQuery.cpp
) )
list( APPEND OPTIONAL_PRIVATE_LIBRARIES kpmcore ) list(APPEND OPTIONAL_PRIVATE_LIBRARIES kpmcore)
endif() endif()
### LIBRARY ### LIBRARY
# #
# #
add_library( calamares SHARED ${libSources} ) add_library(calamares SHARED ${libSources})
set_target_properties( calamares set_target_properties(
calamares
PROPERTIES PROPERTIES
VERSION ${CALAMARES_VERSION_SHORT} VERSION ${CALAMARES_VERSION_SHORT}
SOVERSION ${CALAMARES_VERSION_SHORT} SOVERSION ${CALAMARES_VERSION_SHORT}
@ -157,14 +143,10 @@ set_target_properties( calamares
) )
calamares_automoc( calamares ) calamares_automoc( calamares )
target_link_libraries( calamares target_link_libraries(
LINK_PRIVATE calamares
${OPTIONAL_PRIVATE_LIBRARIES} LINK_PRIVATE ${OPTIONAL_PRIVATE_LIBRARIES}
LINK_PUBLIC LINK_PUBLIC yamlcpp::yamlcpp Qt5::Core ${OPTIONAL_PUBLIC_LIBRARIES}
yamlcpp::yamlcpp
Qt5::Core
KF5::CoreAddons
${OPTIONAL_PUBLIC_LIBRARIES}
) )
add_library(Calamares::calamares ALIAS calamares) add_library(Calamares::calamares ALIAS calamares)
@ -172,155 +154,129 @@ add_library(Calamares::calamares ALIAS calamares)
### Installation ### Installation
# #
# #
install( TARGETS calamares install(
TARGETS calamares
EXPORT Calamares EXPORT Calamares
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} DESTINATION ${CMAKE_INSTALL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE
DESTINATION ${CMAKE_INSTALL_LIBDIR}
) )
# Make symlink lib/calamares/libcalamares.so to lib/libcalamares.so.VERSION so # Make symlink lib/calamares/libcalamares.so to lib/libcalamares.so.VERSION so
# lib/calamares can be used as module path for the Python interpreter. # lib/calamares can be used as module path for the Python interpreter.
install( CODE " install(
CODE
"
file( MAKE_DIRECTORY \"\$ENV{DESTDIR}/${CMAKE_INSTALL_FULL_LIBDIR}/calamares\" ) file( MAKE_DIRECTORY \"\$ENV{DESTDIR}/${CMAKE_INSTALL_FULL_LIBDIR}/calamares\" )
execute_process( COMMAND \"${CMAKE_COMMAND}\" -E create_symlink ../libcalamares.so.${CALAMARES_VERSION_SHORT} libcalamares.so WORKING_DIRECTORY \"\$ENV{DESTDIR}/${CMAKE_INSTALL_FULL_LIBDIR}/calamares\" ) execute_process( COMMAND \"${CMAKE_COMMAND}\" -E create_symlink ../libcalamares.so.${CALAMARES_VERSION_SHORT} libcalamares.so WORKING_DIRECTORY \"\$ENV{DESTDIR}/${CMAKE_INSTALL_FULL_LIBDIR}/calamares\" )
") "
)
# Install header files # Install header files
file( GLOB rootHeaders "*.h" ) file(GLOB rootHeaders "*.h")
install( install(
FILES FILES ${CMAKE_CURRENT_BINARY_DIR}/CalamaresConfig.h ${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersion.h ${rootHeaders}
${CMAKE_CURRENT_BINARY_DIR}/CalamaresConfig.h
${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersion.h
${rootHeaders}
DESTINATION include/libcalamares DESTINATION include/libcalamares
) )
# Install each subdir-worth of header files # 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
# #
# #
calamares_add_test( calamares_add_test(libcalamarestest SOURCES Tests.cpp)
libcalamarestest
SOURCES
Tests.cpp
)
calamares_add_test( calamares_add_test(libcalamaresgeoiptest SOURCES geoip/GeoIPTests.cpp ${geoip_src})
libcalamaresgeoiptest
SOURCES
geoip/GeoIPTests.cpp
${geoip_src}
)
function ( calamares_qrc_translations basename ) function(calamares_qrc_translations basename)
set( NAME ${ARGV0} ) set(NAME ${ARGV0})
set( options "" ) set(options "")
set( oneValueArgs SUBDIRECTORY OUTPUT_VARIABLE ) set(oneValueArgs SUBDIRECTORY OUTPUT_VARIABLE)
set( multiValueArgs LANGUAGES ) set(multiValueArgs LANGUAGES)
cmake_parse_arguments( _qrt "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) cmake_parse_arguments(_qrt "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if( NOT _qrt_OUTPUT_VARIABLE ) if(NOT _qrt_OUTPUT_VARIABLE)
set( _qrt_OUTPUT_VARIABLE "qrc_translations_${basename}" ) set(_qrt_OUTPUT_VARIABLE "qrc_translations_${basename}")
endif() endif()
set( translations_qrc_infile ${CMAKE_CURRENT_BINARY_DIR}/${basename}.qrc ) set(translations_qrc_infile ${CMAKE_CURRENT_BINARY_DIR}/${basename}.qrc)
set( translations_qrc_outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${basename}.cxx ) set(translations_qrc_outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${basename}.cxx)
# Must use this variable name because of the @ substitution # Must use this variable name because of the @ substitution
set( calamares_i18n_qrc_content "" ) set(calamares_i18n_qrc_content "")
set( calamares_i18n_ts_filelist "" ) set(calamares_i18n_ts_filelist "")
foreach( lang ${_qrt_LANGUAGES} ) foreach(lang ${_qrt_LANGUAGES})
string( APPEND calamares_i18n_qrc_content "<file>${basename}_${lang}.qm</file>" ) string(APPEND calamares_i18n_qrc_content "<file>${basename}_${lang}.qm</file>")
list( APPEND calamares_i18n_ts_filelist "${CMAKE_CURRENT_SOURCE_DIR}/${_qrt_SUBDIRECTORY}/${basename}_${lang}.ts" ) list(
APPEND
calamares_i18n_ts_filelist
"${CMAKE_CURRENT_SOURCE_DIR}/${_qrt_SUBDIRECTORY}/${basename}_${lang}.ts"
)
endforeach() endforeach()
configure_file( ${CMAKE_SOURCE_DIR}/lang/calamares_i18n.qrc.in ${translations_qrc_infile} @ONLY ) configure_file(${CMAKE_SOURCE_DIR}/lang/calamares_i18n.qrc.in ${translations_qrc_infile} @ONLY)
qt5_add_translation(QM_FILES ${calamares_i18n_ts_filelist}) qt5_add_translation(QM_FILES ${calamares_i18n_ts_filelist})
# Run the resource compiler (rcc_options should already be set) # Run the resource compiler (rcc_options should already be set)
add_custom_command( add_custom_command(
OUTPUT ${translations_qrc_outfile} OUTPUT ${translations_qrc_outfile}
COMMAND "${Qt5Core_RCC_EXECUTABLE}" COMMAND "${Qt5Core_RCC_EXECUTABLE}"
ARGS ${rcc_options} --format-version 1 -name ${basename} -o ${translations_qrc_outfile} ${translations_qrc_infile} ARGS
${rcc_options}
--format-version
1
-name
${basename}
-o
${translations_qrc_outfile}
${translations_qrc_infile}
MAIN_DEPENDENCY ${translations_qrc_infile} MAIN_DEPENDENCY ${translations_qrc_infile}
DEPENDS ${QM_FILES} DEPENDS ${QM_FILES}
) )
set( ${_qrt_OUTPUT_VARIABLE} ${translations_qrc_outfile} PARENT_SCOPE ) set(${_qrt_OUTPUT_VARIABLE} ${translations_qrc_outfile} PARENT_SCOPE)
endfunction() endfunction()
calamares_qrc_translations( localetest OUTPUT_VARIABLE localetest_qrc SUBDIRECTORY testdata LANGUAGES nl ) calamares_qrc_translations( localetest OUTPUT_VARIABLE localetest_qrc SUBDIRECTORY testdata LANGUAGES nl )
calamares_add_test( calamares_add_test(libcalamareslocaletest SOURCES locale/Tests.cpp ${localetest_qrc})
libcalamareslocaletest
SOURCES
locale/Tests.cpp
${localetest_qrc}
)
calamares_add_test( calamares_add_test(libcalamaresmodulesystemtest SOURCES modulesystem/Tests.cpp)
libcalamaresmodulesystemtest
SOURCES
modulesystem/Tests.cpp
)
calamares_add_test( calamares_add_test(libcalamaresnetworktest SOURCES network/Tests.cpp)
libcalamaresnetworktest
SOURCES
network/Tests.cpp
)
calamares_add_test( calamares_add_test(libcalamarespackagestest SOURCES packages/Tests.cpp)
libcalamarespackagestest
SOURCES
packages/Tests.cpp
)
calamares_add_test( calamares_add_test(
libcalamarespartitiontest libcalamarespartitiontest
SOURCES SOURCES partition/Global.cpp partition/Tests.cpp
partition/Global.cpp LIBRARIES ${OPTIONAL_PRIVATE_LIBRARIES}
partition/Tests.cpp
LIBRARIES
${OPTIONAL_PRIVATE_LIBRARIES}
) )
if( KPMcore_FOUND ) if(KPMcore_FOUND)
calamares_add_test( calamares_add_test(
libcalamarespartitionkpmtest libcalamarespartitionkpmtest
SOURCES SOURCES partition/KPMTests.cpp
partition/KPMTests.cpp LIBRARIES ${OPTIONAL_PRIVATE_LIBRARIES}
LIBRARIES
${OPTIONAL_PRIVATE_LIBRARIES}
) )
endif() endif()
calamares_add_test( calamares_add_test(libcalamaresutilstest SOURCES utils/Tests.cpp utils/Runner.cpp)
libcalamaresutilstest
SOURCES
utils/Tests.cpp
utils/Runner.cpp
)
calamares_add_test(
libcalamaresutilspathstest
SOURCES
utils/TestPaths.cpp
)
calamares_add_test(libcalamaresutilspathstest SOURCES utils/TestPaths.cpp)
# This is not an actual test, it's a test / demo application # This is not an actual test, it's a test / demo application
# for experimenting with GeoIP. # for experimenting with GeoIP.
add_executable( test_geoip geoip/test_geoip.cpp ${geoip_src} ) add_executable(test_geoip geoip/test_geoip.cpp ${geoip_src})
target_link_libraries( test_geoip Calamares::calamares Qt5::Network yamlcpp::yamlcpp ) target_link_libraries(test_geoip Calamares::calamares Qt5::Network yamlcpp::yamlcpp)
calamares_automoc( test_geoip ) calamares_automoc( test_geoip )
if ( Qt5DBus_FOUND ) if(Qt5DBus_FOUND)
add_executable( test_automount partition/calautomount.cpp ) add_executable(test_automount partition/calautomount.cpp)
target_link_libraries( test_automount Calamares::calamares Qt5::DBus ) target_link_libraries(test_automount Calamares::calamares Qt5::DBus)
endif() endif()

View File

@ -8,24 +8,21 @@
# view modules, view steps, widgets, and branding. # view modules, view steps, widgets, and branding.
# The UI libs use the non-UI library # The UI libs use the non-UI library
include_directories( ${CMAKE_SOURCE_DIR}/src/libcalamares ${CMAKE_BINARY_DIR}/src/libcalamares ${CMAKE_SOURCE_DIR} ) include_directories(${CMAKE_SOURCE_DIR}/src/libcalamares ${CMAKE_BINARY_DIR}/src/libcalamares ${CMAKE_SOURCE_DIR})
set( calamaresui_SOURCES set(calamaresui_SOURCES
modulesystem/CppJobModule.cpp modulesystem/CppJobModule.cpp
modulesystem/ModuleFactory.cpp modulesystem/ModuleFactory.cpp
modulesystem/ModuleManager.cpp modulesystem/ModuleManager.cpp
modulesystem/ProcessJobModule.cpp modulesystem/ProcessJobModule.cpp
modulesystem/ViewModule.cpp modulesystem/ViewModule.cpp
utils/CalamaresUtilsGui.cpp utils/CalamaresUtilsGui.cpp
utils/ImageRegistry.cpp utils/ImageRegistry.cpp
utils/Paste.cpp utils/Paste.cpp
viewpages/BlankViewStep.cpp viewpages/BlankViewStep.cpp
viewpages/ExecutionViewStep.cpp viewpages/ExecutionViewStep.cpp
viewpages/Slideshow.cpp viewpages/Slideshow.cpp
viewpages/ViewStep.cpp viewpages/ViewStep.cpp
widgets/ClickableLabel.cpp widgets/ClickableLabel.cpp
widgets/ErrorDialog.cpp widgets/ErrorDialog.cpp
widgets/FixedAspectRatioLabel.cpp widgets/FixedAspectRatioLabel.cpp
@ -33,7 +30,6 @@ set( calamaresui_SOURCES
widgets/TranslationFix.cpp widgets/TranslationFix.cpp
widgets/WaitingWidget.cpp widgets/WaitingWidget.cpp
${CMAKE_SOURCE_DIR}/3rdparty/waitingspinnerwidget.cpp ${CMAKE_SOURCE_DIR}/3rdparty/waitingspinnerwidget.cpp
Branding.cpp Branding.cpp
ViewManager.cpp ViewManager.cpp
) )
@ -43,20 +39,15 @@ mark_thirdparty_code(
${CMAKE_SOURCE_DIR}/3rdparty/waitingspinnerwidget.cpp ${CMAKE_SOURCE_DIR}/3rdparty/waitingspinnerwidget.cpp
) )
if( WITH_PYTHON ) if(WITH_PYTHON)
list( APPEND calamaresui_SOURCES list(APPEND calamaresui_SOURCES modulesystem/PythonJobModule.cpp)
modulesystem/PythonJobModule.cpp
)
endif() endif()
if( WITH_QML ) if(WITH_QML)
list( APPEND calamaresui_SOURCES list(APPEND calamaresui_SOURCES utils/Qml.cpp viewpages/QmlViewStep.cpp)
utils/Qml.cpp
viewpages/QmlViewStep.cpp
)
endif() endif()
calamares_add_library( calamaresui calamares_add_library(calamaresui
SOURCES ${calamaresui_SOURCES} SOURCES ${calamaresui_SOURCES}
EXPORT_MACRO UIDLLEXPORT_PRO EXPORT_MACRO UIDLLEXPORT_PRO
LINK_LIBRARIES LINK_LIBRARIES
@ -67,17 +58,17 @@ calamares_add_library( calamaresui
utils/ErrorDialog/ErrorDialog.ui utils/ErrorDialog/ErrorDialog.ui
VERSION ${CALAMARES_VERSION_SHORT} VERSION ${CALAMARES_VERSION_SHORT}
) )
target_link_libraries( calamaresui PRIVATE yamlcpp::yamlcpp ) target_link_libraries(calamaresui PRIVATE yamlcpp::yamlcpp)
if( KF5CoreAddons_FOUND AND KF5CoreAddons_VERSION VERSION_GREATER_EQUAL 5.58 ) if(KF5CoreAddons_FOUND AND KF5CoreAddons_VERSION VERSION_GREATER_EQUAL 5.58)
target_compile_definitions( calamaresui PRIVATE WITH_KOSRelease ) target_compile_definitions(calamaresui PRIVATE WITH_KOSRelease)
target_link_libraries(calamaresui PRIVATE KF5::CoreAddons)
endif() endif()
if( WITH_QML ) if(WITH_QML)
target_link_libraries( calamaresui PUBLIC Qt5::QuickWidgets ) target_link_libraries(calamaresui PUBLIC Qt5::QuickWidgets)
endif() endif()
add_library(Calamares::calamaresui ALIAS calamaresui) add_library(Calamares::calamaresui ALIAS calamaresui)
### Installation ### Installation
# #
# #
@ -86,24 +77,12 @@ add_library(Calamares::calamaresui ALIAS calamaresui)
# where libcalamares and libcalamaresui live in different branches, # where libcalamares and libcalamaresui live in different branches,
# we're going to glom it all together in the installed headers location. # we're going to glom it all together in the installed headers location.
install( install(FILES Branding.h ViewManager.h DESTINATION include/libcalamares)
FILES
Branding.h
ViewManager.h
DESTINATION include/libcalamares
)
# Install each subdir-worth of header files # Install each subdir-worth of header files
foreach( subdir modulesystem utils viewpages widgets ) foreach(subdir modulesystem utils viewpages widgets)
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()
calamares_add_test( calamares_add_test(test_libcalamaresuipaste SOURCES utils/TestPaste.cpp utils/Paste.cpp LIBRARIES calamaresui)
test_libcalamaresuipaste
SOURCES
utils/TestPaste.cpp
utils/Paste.cpp
LIBRARIES
calamaresui
)