[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:
parent
e507a23795
commit
b167d8da03
@ -10,20 +10,17 @@
|
||||
# (non-GUI) jobs.
|
||||
#
|
||||
|
||||
add_definitions( -DDLLEXPORT_PRO )
|
||||
include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||
add_definitions(-DDLLEXPORT_PRO)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/CalamaresConfig.h.in
|
||||
${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}/CalamaresVersionX.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersionX.h )
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CalamaresConfig.h.in ${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}/CalamaresVersionX.h.in ${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersionX.h)
|
||||
|
||||
set( OPTIONAL_PRIVATE_LIBRARIES "" )
|
||||
set( OPTIONAL_PUBLIC_LIBRARIES "" )
|
||||
set(OPTIONAL_PRIVATE_LIBRARIES "")
|
||||
set(OPTIONAL_PUBLIC_LIBRARIES "")
|
||||
|
||||
set( libSources
|
||||
set(libSources
|
||||
CppJob.cpp
|
||||
GlobalStorage.cpp
|
||||
Job.cpp
|
||||
@ -31,13 +28,11 @@ set( libSources
|
||||
JobQueue.cpp
|
||||
ProcessJob.cpp
|
||||
Settings.cpp
|
||||
|
||||
# GeoIP services
|
||||
geoip/Interface.cpp
|
||||
geoip/GeoIPFixed.cpp
|
||||
geoip/GeoIPJSON.cpp
|
||||
geoip/Handler.cpp
|
||||
|
||||
# Locale-data service
|
||||
locale/Global.cpp
|
||||
locale/Lookup.cpp
|
||||
@ -46,7 +41,6 @@ set( libSources
|
||||
locale/TranslatableString.cpp
|
||||
locale/Translation.cpp
|
||||
locale/TranslationsModel.cpp
|
||||
|
||||
# Modules
|
||||
modulesystem/Config.cpp
|
||||
modulesystem/Descriptor.cpp
|
||||
@ -55,19 +49,15 @@ set( libSources
|
||||
modulesystem/Preset.cpp
|
||||
modulesystem/RequirementsChecker.cpp
|
||||
modulesystem/RequirementsModel.cpp
|
||||
|
||||
# Network service
|
||||
network/Manager.cpp
|
||||
|
||||
# Packages service
|
||||
packages/Globals.cpp
|
||||
|
||||
# Partition service
|
||||
partition/Global.cpp
|
||||
partition/Mount.cpp
|
||||
partition/PartitionSize.cpp
|
||||
partition/Sync.cpp
|
||||
|
||||
# Utility service
|
||||
utils/CalamaresUtilsSystem.cpp
|
||||
utils/CommandList.cpp
|
||||
@ -87,20 +77,16 @@ set( libSources
|
||||
### OPTIONAL Automount support (requires dbus)
|
||||
#
|
||||
#
|
||||
if( Qt5DBus_FOUND)
|
||||
list( APPEND libSources partition/AutoMount.cpp )
|
||||
list( APPEND OPTIONAL_PRIVATE_LIBRARIES Qt5::DBus )
|
||||
if(Qt5DBus_FOUND)
|
||||
list(APPEND libSources partition/AutoMount.cpp)
|
||||
list(APPEND OPTIONAL_PRIVATE_LIBRARIES Qt5::DBus)
|
||||
endif()
|
||||
|
||||
### OPTIONAL Python support
|
||||
#
|
||||
#
|
||||
if( WITH_PYTHON )
|
||||
list( APPEND libSources
|
||||
PythonHelper.cpp
|
||||
PythonJob.cpp
|
||||
PythonJobApi.cpp
|
||||
)
|
||||
if(WITH_PYTHON)
|
||||
list(APPEND libSources PythonHelper.cpp PythonJob.cpp PythonJobApi.cpp)
|
||||
|
||||
include_directories(${PYTHON_INCLUDE_DIRS})
|
||||
link_directories(${PYTHON_LIBRARIES})
|
||||
@ -108,48 +94,48 @@ if( WITH_PYTHON )
|
||||
include_directories(${Boost_INCLUDE_DIRS})
|
||||
link_directories(${Boost_LIBRARY_DIRS})
|
||||
|
||||
list( APPEND OPTIONAL_PRIVATE_LIBRARIES
|
||||
${PYTHON_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
)
|
||||
list(APPEND OPTIONAL_PRIVATE_LIBRARIES ${PYTHON_LIBRARIES} ${Boost_LIBRARIES})
|
||||
endif()
|
||||
|
||||
### OPTIONAL GeoIP XML support
|
||||
#
|
||||
#
|
||||
find_package(Qt5 COMPONENTS Xml)
|
||||
if( Qt5Xml_FOUND )
|
||||
list( APPEND libSources geoip/GeoIPXML.cpp )
|
||||
list( APPEND OPTIONAL_PUBLIC_LIBRARIES Qt5::Network Qt5::Xml )
|
||||
if(Qt5Xml_FOUND)
|
||||
list(APPEND libSources geoip/GeoIPXML.cpp)
|
||||
list(APPEND OPTIONAL_PUBLIC_LIBRARIES Qt5::Network Qt5::Xml)
|
||||
endif()
|
||||
|
||||
### OPTIONAL KPMcore support
|
||||
#
|
||||
#
|
||||
include( KPMcoreHelper )
|
||||
include(KPMcoreHelper)
|
||||
|
||||
if ( KPMcore_FOUND )
|
||||
find_package( Qt5 REQUIRED DBus ) # Needed for KPMCore
|
||||
find_package( KF5 REQUIRED I18n WidgetsAddons ) # Needed for KPMCore
|
||||
if(KPMcore_FOUND)
|
||||
find_package(Qt5 REQUIRED DBus) # Needed for KPMCore
|
||||
find_package(KF5 REQUIRED I18n WidgetsAddons) # Needed for KPMCore
|
||||
|
||||
foreach ( d ${KPMcore_API_DEFINITIONS} )
|
||||
add_definitions( -D${d} )
|
||||
foreach(d ${KPMcore_API_DEFINITIONS})
|
||||
add_definitions(-D${d})
|
||||
endforeach()
|
||||
include_directories( ${KPMCORE_INCLUDE_DIR} )
|
||||
list( APPEND libSources
|
||||
include_directories(${KPMCORE_INCLUDE_DIR})
|
||||
list(
|
||||
APPEND
|
||||
libSources
|
||||
partition/FileSystem.cpp
|
||||
partition/KPMManager.cpp
|
||||
partition/PartitionIterator.cpp
|
||||
partition/PartitionQuery.cpp
|
||||
)
|
||||
list( APPEND OPTIONAL_PRIVATE_LIBRARIES kpmcore )
|
||||
list(APPEND OPTIONAL_PRIVATE_LIBRARIES kpmcore)
|
||||
endif()
|
||||
|
||||
### LIBRARY
|
||||
#
|
||||
#
|
||||
add_library( calamares SHARED ${libSources} )
|
||||
set_target_properties( calamares
|
||||
add_library(calamares SHARED ${libSources})
|
||||
set_target_properties(
|
||||
calamares
|
||||
PROPERTIES
|
||||
VERSION ${CALAMARES_VERSION_SHORT}
|
||||
SOVERSION ${CALAMARES_VERSION_SHORT}
|
||||
@ -157,14 +143,10 @@ set_target_properties( calamares
|
||||
)
|
||||
calamares_automoc( calamares )
|
||||
|
||||
target_link_libraries( calamares
|
||||
LINK_PRIVATE
|
||||
${OPTIONAL_PRIVATE_LIBRARIES}
|
||||
LINK_PUBLIC
|
||||
yamlcpp::yamlcpp
|
||||
Qt5::Core
|
||||
KF5::CoreAddons
|
||||
${OPTIONAL_PUBLIC_LIBRARIES}
|
||||
target_link_libraries(
|
||||
calamares
|
||||
LINK_PRIVATE ${OPTIONAL_PRIVATE_LIBRARIES}
|
||||
LINK_PUBLIC yamlcpp::yamlcpp Qt5::Core ${OPTIONAL_PUBLIC_LIBRARIES}
|
||||
)
|
||||
|
||||
add_library(Calamares::calamares ALIAS calamares)
|
||||
@ -172,155 +154,129 @@ add_library(Calamares::calamares ALIAS calamares)
|
||||
### Installation
|
||||
#
|
||||
#
|
||||
install( TARGETS calamares
|
||||
install(
|
||||
TARGETS calamares
|
||||
EXPORT Calamares
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
|
||||
# Make symlink lib/calamares/libcalamares.so to lib/libcalamares.so.VERSION so
|
||||
# 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\" )
|
||||
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
|
||||
file( GLOB rootHeaders "*.h" )
|
||||
file(GLOB rootHeaders "*.h")
|
||||
install(
|
||||
FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/CalamaresConfig.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersion.h
|
||||
${rootHeaders}
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/CalamaresConfig.h ${CMAKE_CURRENT_BINARY_DIR}/CalamaresVersion.h ${rootHeaders}
|
||||
DESTINATION include/libcalamares
|
||||
)
|
||||
# Install each subdir-worth of header files
|
||||
foreach( subdir geoip locale modulesystem network partition utils )
|
||||
file( GLOB subdir_headers "${subdir}/*.h" )
|
||||
install( FILES ${subdir_headers} DESTINATION include/libcalamares/${subdir} )
|
||||
foreach(subdir geoip locale modulesystem network partition utils)
|
||||
file(GLOB subdir_headers "${subdir}/*.h")
|
||||
install(FILES ${subdir_headers} DESTINATION include/libcalamares/${subdir})
|
||||
endforeach()
|
||||
|
||||
|
||||
### TESTING
|
||||
#
|
||||
#
|
||||
calamares_add_test(
|
||||
libcalamarestest
|
||||
SOURCES
|
||||
Tests.cpp
|
||||
)
|
||||
calamares_add_test(libcalamarestest SOURCES Tests.cpp)
|
||||
|
||||
calamares_add_test(
|
||||
libcalamaresgeoiptest
|
||||
SOURCES
|
||||
geoip/GeoIPTests.cpp
|
||||
${geoip_src}
|
||||
)
|
||||
calamares_add_test(libcalamaresgeoiptest SOURCES geoip/GeoIPTests.cpp ${geoip_src})
|
||||
|
||||
function ( calamares_qrc_translations basename )
|
||||
set( NAME ${ARGV0} )
|
||||
set( options "" )
|
||||
set( oneValueArgs SUBDIRECTORY OUTPUT_VARIABLE )
|
||||
set( multiValueArgs LANGUAGES )
|
||||
cmake_parse_arguments( _qrt "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
||||
function(calamares_qrc_translations basename)
|
||||
set(NAME ${ARGV0})
|
||||
set(options "")
|
||||
set(oneValueArgs SUBDIRECTORY OUTPUT_VARIABLE)
|
||||
set(multiValueArgs LANGUAGES)
|
||||
cmake_parse_arguments(_qrt "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
if( NOT _qrt_OUTPUT_VARIABLE )
|
||||
set( _qrt_OUTPUT_VARIABLE "qrc_translations_${basename}" )
|
||||
if(NOT _qrt_OUTPUT_VARIABLE)
|
||||
set(_qrt_OUTPUT_VARIABLE "qrc_translations_${basename}")
|
||||
endif()
|
||||
|
||||
set( translations_qrc_infile ${CMAKE_CURRENT_BINARY_DIR}/${basename}.qrc )
|
||||
set( translations_qrc_outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${basename}.cxx )
|
||||
set(translations_qrc_infile ${CMAKE_CURRENT_BINARY_DIR}/${basename}.qrc)
|
||||
set(translations_qrc_outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${basename}.cxx)
|
||||
|
||||
# Must use this variable name because of the @ substitution
|
||||
set( calamares_i18n_qrc_content "" )
|
||||
set( calamares_i18n_ts_filelist "" )
|
||||
foreach( lang ${_qrt_LANGUAGES} )
|
||||
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" )
|
||||
set(calamares_i18n_qrc_content "")
|
||||
set(calamares_i18n_ts_filelist "")
|
||||
foreach(lang ${_qrt_LANGUAGES})
|
||||
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"
|
||||
)
|
||||
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})
|
||||
|
||||
# Run the resource compiler (rcc_options should already be set)
|
||||
add_custom_command(
|
||||
OUTPUT ${translations_qrc_outfile}
|
||||
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}
|
||||
DEPENDS ${QM_FILES}
|
||||
)
|
||||
|
||||
set( ${_qrt_OUTPUT_VARIABLE} ${translations_qrc_outfile} PARENT_SCOPE )
|
||||
set(${_qrt_OUTPUT_VARIABLE} ${translations_qrc_outfile} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
calamares_qrc_translations( localetest OUTPUT_VARIABLE localetest_qrc SUBDIRECTORY testdata LANGUAGES nl )
|
||||
calamares_add_test(
|
||||
libcalamareslocaletest
|
||||
SOURCES
|
||||
locale/Tests.cpp
|
||||
${localetest_qrc}
|
||||
)
|
||||
calamares_add_test(libcalamareslocaletest SOURCES locale/Tests.cpp ${localetest_qrc})
|
||||
|
||||
calamares_add_test(
|
||||
libcalamaresmodulesystemtest
|
||||
SOURCES
|
||||
modulesystem/Tests.cpp
|
||||
)
|
||||
calamares_add_test(libcalamaresmodulesystemtest SOURCES modulesystem/Tests.cpp)
|
||||
|
||||
calamares_add_test(
|
||||
libcalamaresnetworktest
|
||||
SOURCES
|
||||
network/Tests.cpp
|
||||
)
|
||||
calamares_add_test(libcalamaresnetworktest SOURCES network/Tests.cpp)
|
||||
|
||||
calamares_add_test(
|
||||
libcalamarespackagestest
|
||||
SOURCES
|
||||
packages/Tests.cpp
|
||||
)
|
||||
calamares_add_test(libcalamarespackagestest SOURCES packages/Tests.cpp)
|
||||
|
||||
calamares_add_test(
|
||||
libcalamarespartitiontest
|
||||
SOURCES
|
||||
partition/Global.cpp
|
||||
partition/Tests.cpp
|
||||
LIBRARIES
|
||||
${OPTIONAL_PRIVATE_LIBRARIES}
|
||||
SOURCES partition/Global.cpp partition/Tests.cpp
|
||||
LIBRARIES ${OPTIONAL_PRIVATE_LIBRARIES}
|
||||
)
|
||||
|
||||
if( KPMcore_FOUND )
|
||||
if(KPMcore_FOUND)
|
||||
calamares_add_test(
|
||||
libcalamarespartitionkpmtest
|
||||
SOURCES
|
||||
partition/KPMTests.cpp
|
||||
LIBRARIES
|
||||
${OPTIONAL_PRIVATE_LIBRARIES}
|
||||
SOURCES partition/KPMTests.cpp
|
||||
LIBRARIES ${OPTIONAL_PRIVATE_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
|
||||
calamares_add_test(
|
||||
libcalamaresutilstest
|
||||
SOURCES
|
||||
utils/Tests.cpp
|
||||
utils/Runner.cpp
|
||||
)
|
||||
|
||||
calamares_add_test(
|
||||
libcalamaresutilspathstest
|
||||
SOURCES
|
||||
utils/TestPaths.cpp
|
||||
)
|
||||
calamares_add_test(libcalamaresutilstest SOURCES utils/Tests.cpp utils/Runner.cpp)
|
||||
|
||||
calamares_add_test(libcalamaresutilspathstest SOURCES utils/TestPaths.cpp)
|
||||
|
||||
# This is not an actual test, it's a test / demo application
|
||||
# for experimenting with GeoIP.
|
||||
add_executable( test_geoip geoip/test_geoip.cpp ${geoip_src} )
|
||||
target_link_libraries( test_geoip Calamares::calamares Qt5::Network yamlcpp::yamlcpp )
|
||||
add_executable(test_geoip geoip/test_geoip.cpp ${geoip_src})
|
||||
target_link_libraries(test_geoip Calamares::calamares Qt5::Network yamlcpp::yamlcpp)
|
||||
calamares_automoc( test_geoip )
|
||||
|
||||
if ( Qt5DBus_FOUND )
|
||||
add_executable( test_automount partition/calautomount.cpp )
|
||||
target_link_libraries( test_automount Calamares::calamares Qt5::DBus )
|
||||
if(Qt5DBus_FOUND)
|
||||
add_executable(test_automount partition/calautomount.cpp)
|
||||
target_link_libraries(test_automount Calamares::calamares Qt5::DBus)
|
||||
endif()
|
||||
|
@ -8,24 +8,21 @@
|
||||
# view modules, view steps, widgets, and branding.
|
||||
|
||||
# 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/ModuleFactory.cpp
|
||||
modulesystem/ModuleManager.cpp
|
||||
modulesystem/ProcessJobModule.cpp
|
||||
modulesystem/ViewModule.cpp
|
||||
|
||||
utils/CalamaresUtilsGui.cpp
|
||||
utils/ImageRegistry.cpp
|
||||
utils/Paste.cpp
|
||||
|
||||
viewpages/BlankViewStep.cpp
|
||||
viewpages/ExecutionViewStep.cpp
|
||||
viewpages/Slideshow.cpp
|
||||
viewpages/ViewStep.cpp
|
||||
|
||||
widgets/ClickableLabel.cpp
|
||||
widgets/ErrorDialog.cpp
|
||||
widgets/FixedAspectRatioLabel.cpp
|
||||
@ -33,7 +30,6 @@ set( calamaresui_SOURCES
|
||||
widgets/TranslationFix.cpp
|
||||
widgets/WaitingWidget.cpp
|
||||
${CMAKE_SOURCE_DIR}/3rdparty/waitingspinnerwidget.cpp
|
||||
|
||||
Branding.cpp
|
||||
ViewManager.cpp
|
||||
)
|
||||
@ -43,20 +39,15 @@ mark_thirdparty_code(
|
||||
${CMAKE_SOURCE_DIR}/3rdparty/waitingspinnerwidget.cpp
|
||||
)
|
||||
|
||||
if( WITH_PYTHON )
|
||||
list( APPEND calamaresui_SOURCES
|
||||
modulesystem/PythonJobModule.cpp
|
||||
)
|
||||
if(WITH_PYTHON)
|
||||
list(APPEND calamaresui_SOURCES modulesystem/PythonJobModule.cpp)
|
||||
endif()
|
||||
|
||||
if( WITH_QML )
|
||||
list( APPEND calamaresui_SOURCES
|
||||
utils/Qml.cpp
|
||||
viewpages/QmlViewStep.cpp
|
||||
)
|
||||
if(WITH_QML)
|
||||
list(APPEND calamaresui_SOURCES utils/Qml.cpp viewpages/QmlViewStep.cpp)
|
||||
endif()
|
||||
|
||||
calamares_add_library( calamaresui
|
||||
calamares_add_library(calamaresui
|
||||
SOURCES ${calamaresui_SOURCES}
|
||||
EXPORT_MACRO UIDLLEXPORT_PRO
|
||||
LINK_LIBRARIES
|
||||
@ -67,17 +58,17 @@ calamares_add_library( calamaresui
|
||||
utils/ErrorDialog/ErrorDialog.ui
|
||||
VERSION ${CALAMARES_VERSION_SHORT}
|
||||
)
|
||||
target_link_libraries( calamaresui PRIVATE yamlcpp::yamlcpp )
|
||||
if( KF5CoreAddons_FOUND AND KF5CoreAddons_VERSION VERSION_GREATER_EQUAL 5.58 )
|
||||
target_compile_definitions( calamaresui PRIVATE WITH_KOSRelease )
|
||||
target_link_libraries(calamaresui PRIVATE yamlcpp::yamlcpp)
|
||||
if(KF5CoreAddons_FOUND AND KF5CoreAddons_VERSION VERSION_GREATER_EQUAL 5.58)
|
||||
target_compile_definitions(calamaresui PRIVATE WITH_KOSRelease)
|
||||
target_link_libraries(calamaresui PRIVATE KF5::CoreAddons)
|
||||
endif()
|
||||
if( WITH_QML )
|
||||
target_link_libraries( calamaresui PUBLIC Qt5::QuickWidgets )
|
||||
if(WITH_QML)
|
||||
target_link_libraries(calamaresui PUBLIC Qt5::QuickWidgets)
|
||||
endif()
|
||||
|
||||
add_library(Calamares::calamaresui ALIAS calamaresui)
|
||||
|
||||
|
||||
### Installation
|
||||
#
|
||||
#
|
||||
@ -86,24 +77,12 @@ add_library(Calamares::calamaresui ALIAS calamaresui)
|
||||
# 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(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} )
|
||||
foreach(subdir modulesystem utils viewpages widgets)
|
||||
file(GLOB subdir_headers "${subdir}/*.h")
|
||||
install(FILES ${subdir_headers} DESTINATION include/libcalamares/${subdir})
|
||||
endforeach()
|
||||
|
||||
calamares_add_test(
|
||||
test_libcalamaresuipaste
|
||||
SOURCES
|
||||
utils/TestPaste.cpp
|
||||
utils/Paste.cpp
|
||||
LIBRARIES
|
||||
calamaresui
|
||||
)
|
||||
calamares_add_test(test_libcalamaresuipaste SOURCES utils/TestPaste.cpp utils/Paste.cpp LIBRARIES calamaresui)
|
||||
|
Loading…
Reference in New Issue
Block a user