From 03e621f4a2f03afa1fccb363c698e05c5be15d9c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 26 Jul 2021 14:55:12 +0200 Subject: [PATCH] Modules: clean up linking - do not link (explicitly) to Calamares libraries, the CMake functions do that automatically. - while here, tidy and remove commented-out-bits - while here, remove unneeded includes --- src/modules/contextualprocess/CMakeLists.txt | 2 -- src/modules/dracutlukscfg/CMakeLists.txt | 2 -- src/modules/dummycpp/CMakeLists.txt | 2 -- src/modules/finished/CMakeLists.txt | 1 - src/modules/finishedq/CMakeLists.txt | 1 - src/modules/fsresizer/CMakeLists.txt | 1 - src/modules/hostinfo/CMakeLists.txt | 2 -- src/modules/initcpio/CMakeLists.txt | 2 -- src/modules/initramfs/CMakeLists.txt | 2 -- src/modules/interactiveterminal/CMakeLists.txt | 2 -- src/modules/keyboard/CMakeLists.txt | 2 -- src/modules/keyboardq/CMakeLists.txt | 2 -- src/modules/license/CMakeLists.txt | 2 -- src/modules/locale/CMakeLists.txt | 1 - src/modules/localeq/CMakeLists.txt | 1 - src/modules/luksbootkeyfile/CMakeLists.txt | 2 -- src/modules/machineid/CMakeLists.txt | 2 -- src/modules/netinstall/CMakeLists.txt | 3 --- src/modules/notesqml/CMakeLists.txt | 2 -- src/modules/oemid/CMakeLists.txt | 1 - src/modules/packagechooser/CMakeLists.txt | 1 - src/modules/partition/CMakeLists.txt | 1 - src/modules/plasmalnf/CMakeLists.txt | 1 - src/modules/preservefiles/CMakeLists.txt | 2 -- src/modules/removeuser/CMakeLists.txt | 2 -- src/modules/shellprocess/CMakeLists.txt | 2 -- src/modules/summary/CMakeLists.txt | 2 -- src/modules/tracking/CMakeLists.txt | 2 -- src/modules/users/CMakeLists.txt | 1 - src/modules/usersq/CMakeLists.txt | 1 - src/modules/webview/CMakeLists.txt | 5 +---- src/modules/welcome/CMakeLists.txt | 1 - src/modules/welcomeq/CMakeLists.txt | 13 +------------ 33 files changed, 2 insertions(+), 67 deletions(-) diff --git a/src/modules/contextualprocess/CMakeLists.txt b/src/modules/contextualprocess/CMakeLists.txt index 113b504db..0798407ab 100644 --- a/src/modules/contextualprocess/CMakeLists.txt +++ b/src/modules/contextualprocess/CMakeLists.txt @@ -8,8 +8,6 @@ calamares_add_plugin( contextualprocess EXPORT_MACRO PLUGINDLLEXPORT_PRO SOURCES ContextualProcessJob.cpp - LINK_PRIVATE_LIBRARIES - calamares SHARED_LIB ) diff --git a/src/modules/dracutlukscfg/CMakeLists.txt b/src/modules/dracutlukscfg/CMakeLists.txt index dd9faf9d4..aaa7a8c17 100644 --- a/src/modules/dracutlukscfg/CMakeLists.txt +++ b/src/modules/dracutlukscfg/CMakeLists.txt @@ -8,8 +8,6 @@ calamares_add_plugin( dracutlukscfg EXPORT_MACRO PLUGINDLLEXPORT_PRO SOURCES DracutLuksCfgJob.cpp - LINK_PRIVATE_LIBRARIES - calamares SHARED_LIB NO_CONFIG ) diff --git a/src/modules/dummycpp/CMakeLists.txt b/src/modules/dummycpp/CMakeLists.txt index e199d5027..2916b4d67 100644 --- a/src/modules/dummycpp/CMakeLists.txt +++ b/src/modules/dummycpp/CMakeLists.txt @@ -8,7 +8,5 @@ calamares_add_plugin( dummycpp EXPORT_MACRO PLUGINDLLEXPORT_PRO SOURCES DummyCppJob.cpp - LINK_PRIVATE_LIBRARIES - calamares SHARED_LIB ) diff --git a/src/modules/finished/CMakeLists.txt b/src/modules/finished/CMakeLists.txt index b4d59db8f..619f6d8b0 100644 --- a/src/modules/finished/CMakeLists.txt +++ b/src/modules/finished/CMakeLists.txt @@ -17,7 +17,6 @@ calamares_add_plugin( finished UI FinishedPage.ui LINK_PRIVATE_LIBRARIES - calamaresui Qt5::DBus SHARED_LIB ) diff --git a/src/modules/finishedq/CMakeLists.txt b/src/modules/finishedq/CMakeLists.txt index 5b3793a6f..facc2d691 100644 --- a/src/modules/finishedq/CMakeLists.txt +++ b/src/modules/finishedq/CMakeLists.txt @@ -26,7 +26,6 @@ calamares_add_plugin( finishedq RESOURCES finishedq.qrc LINK_PRIVATE_LIBRARIES - calamaresui Qt5::DBus SHARED_LIB ) diff --git a/src/modules/fsresizer/CMakeLists.txt b/src/modules/fsresizer/CMakeLists.txt index 17b72b68a..6e9a87907 100644 --- a/src/modules/fsresizer/CMakeLists.txt +++ b/src/modules/fsresizer/CMakeLists.txt @@ -21,7 +21,6 @@ if ( KPMcore_FOUND AND Qt5DBus_FOUND AND KF5CoreAddons_FOUND AND KF5Config_FOUND ResizeFSJob.cpp LINK_PRIVATE_LIBRARIES kpmcore - calamares COMPILE_DEFINITIONS ${KPMcore_API_DEFINITIONS} SHARED_LIB ) diff --git a/src/modules/hostinfo/CMakeLists.txt b/src/modules/hostinfo/CMakeLists.txt index cdf5857e6..8ceae0798 100644 --- a/src/modules/hostinfo/CMakeLists.txt +++ b/src/modules/hostinfo/CMakeLists.txt @@ -28,8 +28,6 @@ calamares_add_plugin( hostinfo EXPORT_MACRO PLUGINDLLEXPORT_PRO SOURCES HostInfoJob.cpp - LINK_PRIVATE_LIBRARIES - calamares SHARED_LIB NO_CONFIG ) diff --git a/src/modules/initcpio/CMakeLists.txt b/src/modules/initcpio/CMakeLists.txt index e8d90e7fa..d4b4e8b43 100644 --- a/src/modules/initcpio/CMakeLists.txt +++ b/src/modules/initcpio/CMakeLists.txt @@ -8,8 +8,6 @@ calamares_add_plugin( initcpio EXPORT_MACRO PLUGINDLLEXPORT_PRO SOURCES InitcpioJob.cpp - LINK_PRIVATE_LIBRARIES - calamares SHARED_LIB ) diff --git a/src/modules/initramfs/CMakeLists.txt b/src/modules/initramfs/CMakeLists.txt index b8bcc9681..9937b7fb4 100644 --- a/src/modules/initramfs/CMakeLists.txt +++ b/src/modules/initramfs/CMakeLists.txt @@ -8,8 +8,6 @@ calamares_add_plugin( initramfs EXPORT_MACRO PLUGINDLLEXPORT_PRO SOURCES InitramfsJob.cpp - LINK_PRIVATE_LIBRARIES - calamares SHARED_LIB ) diff --git a/src/modules/interactiveterminal/CMakeLists.txt b/src/modules/interactiveterminal/CMakeLists.txt index fea99a5dd..20aee8257 100644 --- a/src/modules/interactiveterminal/CMakeLists.txt +++ b/src/modules/interactiveterminal/CMakeLists.txt @@ -25,8 +25,6 @@ if ( KF5Parts_FOUND AND KF5Service_FOUND ) SOURCES InteractiveTerminalViewStep.cpp InteractiveTerminalPage.cpp - LINK_PRIVATE_LIBRARIES - calamaresui LINK_LIBRARIES KF5::Service KF5::Parts diff --git a/src/modules/keyboard/CMakeLists.txt b/src/modules/keyboard/CMakeLists.txt index 32e9a0592..fe341cef0 100644 --- a/src/modules/keyboard/CMakeLists.txt +++ b/src/modules/keyboard/CMakeLists.txt @@ -18,8 +18,6 @@ calamares_add_plugin( keyboard KeyboardPage.ui RESOURCES keyboard.qrc - LINK_PRIVATE_LIBRARIES - calamaresui SHARED_LIB ) diff --git a/src/modules/keyboardq/CMakeLists.txt b/src/modules/keyboardq/CMakeLists.txt index cc1e7e2c3..2b0577aa7 100644 --- a/src/modules/keyboardq/CMakeLists.txt +++ b/src/modules/keyboardq/CMakeLists.txt @@ -23,7 +23,5 @@ calamares_add_plugin( keyboardq ${_keyboard}/keyboardwidget/keyboardglobal.cpp RESOURCES keyboardq.qrc - LINK_PRIVATE_LIBRARIES - calamaresui SHARED_LIB ) diff --git a/src/modules/license/CMakeLists.txt b/src/modules/license/CMakeLists.txt index baaf34b43..0cd838799 100644 --- a/src/modules/license/CMakeLists.txt +++ b/src/modules/license/CMakeLists.txt @@ -14,7 +14,5 @@ calamares_add_plugin( license LicenseWidget.cpp UI LicensePage.ui - LINK_PRIVATE_LIBRARIES - calamaresui SHARED_LIB ) diff --git a/src/modules/locale/CMakeLists.txt b/src/modules/locale/CMakeLists.txt index 3802f92b2..29b7fe813 100644 --- a/src/modules/locale/CMakeLists.txt +++ b/src/modules/locale/CMakeLists.txt @@ -31,7 +31,6 @@ calamares_add_plugin( locale RESOURCES locale.qrc LINK_PRIVATE_LIBRARIES - calamaresui Qt5::Network ${geoip_libs} yamlcpp diff --git a/src/modules/localeq/CMakeLists.txt b/src/modules/localeq/CMakeLists.txt index 55c16091c..ee3f07314 100644 --- a/src/modules/localeq/CMakeLists.txt +++ b/src/modules/localeq/CMakeLists.txt @@ -43,7 +43,6 @@ calamares_add_plugin( localeq RESOURCES localeq.qrc LINK_PRIVATE_LIBRARIES - calamaresui Qt5::Network SHARED_LIB ) diff --git a/src/modules/luksbootkeyfile/CMakeLists.txt b/src/modules/luksbootkeyfile/CMakeLists.txt index 1782e7e0e..6e98af468 100644 --- a/src/modules/luksbootkeyfile/CMakeLists.txt +++ b/src/modules/luksbootkeyfile/CMakeLists.txt @@ -8,8 +8,6 @@ calamares_add_plugin( luksbootkeyfile EXPORT_MACRO PLUGINDLLEXPORT_PRO SOURCES LuksBootKeyFileJob.cpp - LINK_PRIVATE_LIBRARIES - calamares SHARED_LIB NO_CONFIG ) diff --git a/src/modules/machineid/CMakeLists.txt b/src/modules/machineid/CMakeLists.txt index 360c0cc8a..0ab035ab4 100644 --- a/src/modules/machineid/CMakeLists.txt +++ b/src/modules/machineid/CMakeLists.txt @@ -9,8 +9,6 @@ calamares_add_plugin( machineid SOURCES MachineIdJob.cpp Workers.cpp - LINK_PRIVATE_LIBRARIES - calamares SHARED_LIB ) diff --git a/src/modules/netinstall/CMakeLists.txt b/src/modules/netinstall/CMakeLists.txt index 6b7270db1..f31ac6d79 100644 --- a/src/modules/netinstall/CMakeLists.txt +++ b/src/modules/netinstall/CMakeLists.txt @@ -16,9 +16,7 @@ calamares_add_plugin( netinstall UI page_netinst.ui LINK_PRIVATE_LIBRARIES - calamaresui Qt5::Network - yamlcpp SHARED_LIB ) @@ -32,6 +30,5 @@ calamares_add_test( PackageModel.cpp LIBRARIES Qt5::Gui - yamlcpp ) diff --git a/src/modules/notesqml/CMakeLists.txt b/src/modules/notesqml/CMakeLists.txt index a5edc7d04..5eab06663 100644 --- a/src/modules/notesqml/CMakeLists.txt +++ b/src/modules/notesqml/CMakeLists.txt @@ -15,7 +15,5 @@ calamares_add_plugin( notesqml NotesQmlViewStep.cpp RESOURCES notesqml.qrc - LINK_PRIVATE_LIBRARIES - calamaresui SHARED_LIB ) diff --git a/src/modules/oemid/CMakeLists.txt b/src/modules/oemid/CMakeLists.txt index 68a1b653e..af7fe1ff7 100644 --- a/src/modules/oemid/CMakeLists.txt +++ b/src/modules/oemid/CMakeLists.txt @@ -12,7 +12,6 @@ calamares_add_plugin( oemid UI OEMPage.ui LINK_PRIVATE_LIBRARIES - calamaresui Qt5::Widgets SHARED_LIB ) diff --git a/src/modules/packagechooser/CMakeLists.txt b/src/modules/packagechooser/CMakeLists.txt index f08658037..d2e6ff118 100644 --- a/src/modules/packagechooser/CMakeLists.txt +++ b/src/modules/packagechooser/CMakeLists.txt @@ -55,7 +55,6 @@ calamares_add_plugin( packagechooser UI page_package.ui LINK_PRIVATE_LIBRARIES - calamaresui ${_extra_libraries} SHARED_LIB ) diff --git a/src/modules/partition/CMakeLists.txt b/src/modules/partition/CMakeLists.txt index 26d4ffae7..96378d98d 100644 --- a/src/modules/partition/CMakeLists.txt +++ b/src/modules/partition/CMakeLists.txt @@ -108,7 +108,6 @@ if ( KPMcore_FOUND AND Qt5DBus_FOUND AND KF5CoreAddons_FOUND AND KF5Config_FOUND gui/VolumeGroupBaseDialog.ui LINK_PRIVATE_LIBRARIES kpmcore - calamaresui KF5::CoreAddons COMPILE_DEFINITIONS ${_partition_defs} SHARED_LIB diff --git a/src/modules/plasmalnf/CMakeLists.txt b/src/modules/plasmalnf/CMakeLists.txt index 3a85d9598..8ae205aed 100644 --- a/src/modules/plasmalnf/CMakeLists.txt +++ b/src/modules/plasmalnf/CMakeLists.txt @@ -44,7 +44,6 @@ if ( KF5Plasma_FOUND AND KF5Package_FOUND ) UI page_plasmalnf.ui LINK_PRIVATE_LIBRARIES - calamaresui KF5::Package KF5::Plasma SHARED_LIB diff --git a/src/modules/preservefiles/CMakeLists.txt b/src/modules/preservefiles/CMakeLists.txt index d19645089..820c50a2b 100644 --- a/src/modules/preservefiles/CMakeLists.txt +++ b/src/modules/preservefiles/CMakeLists.txt @@ -10,8 +10,6 @@ calamares_add_plugin( preservefiles EXPORT_MACRO PLUGINDLLEXPORT_PRO SOURCES PreserveFiles.cpp - LINK_PRIVATE_LIBRARIES - calamares # REQUIRES mount # To set the rootMountPoint SHARED_LIB EMERGENCY diff --git a/src/modules/removeuser/CMakeLists.txt b/src/modules/removeuser/CMakeLists.txt index cf4243e7d..7663b3472 100644 --- a/src/modules/removeuser/CMakeLists.txt +++ b/src/modules/removeuser/CMakeLists.txt @@ -8,7 +8,5 @@ calamares_add_plugin( removeuser EXPORT_MACRO PLUGINDLLEXPORT_PRO SOURCES RemoveUserJob.cpp - LINK_PRIVATE_LIBRARIES - calamares SHARED_LIB ) diff --git a/src/modules/shellprocess/CMakeLists.txt b/src/modules/shellprocess/CMakeLists.txt index 448be0625..ff6008d13 100644 --- a/src/modules/shellprocess/CMakeLists.txt +++ b/src/modules/shellprocess/CMakeLists.txt @@ -8,8 +8,6 @@ calamares_add_plugin( shellprocess EXPORT_MACRO PLUGINDLLEXPORT_PRO SOURCES ShellProcessJob.cpp - LINK_PRIVATE_LIBRARIES - calamares SHARED_LIB ) diff --git a/src/modules/summary/CMakeLists.txt b/src/modules/summary/CMakeLists.txt index 57dc731cb..2c30dc31a 100644 --- a/src/modules/summary/CMakeLists.txt +++ b/src/modules/summary/CMakeLists.txt @@ -11,8 +11,6 @@ calamares_add_plugin( summary SummaryViewStep.cpp SummaryPage.cpp UI - LINK_PRIVATE_LIBRARIES - calamaresui SHARED_LIB NO_CONFIG ) diff --git a/src/modules/tracking/CMakeLists.txt b/src/modules/tracking/CMakeLists.txt index fe0b315e3..a878961b0 100644 --- a/src/modules/tracking/CMakeLists.txt +++ b/src/modules/tracking/CMakeLists.txt @@ -15,8 +15,6 @@ calamares_add_plugin( tracking page_trackingstep.ui RESOURCES page_trackingstep.qrc - LINK_PRIVATE_LIBRARIES - calamaresui SHARED_LIB ) diff --git a/src/modules/users/CMakeLists.txt b/src/modules/users/CMakeLists.txt index 2772a6b39..8203ecf08 100644 --- a/src/modules/users/CMakeLists.txt +++ b/src/modules/users/CMakeLists.txt @@ -71,7 +71,6 @@ calamares_add_plugin( users users.qrc LINK_PRIVATE_LIBRARIES users_internal - calamaresui ${CRYPT_LIBRARIES} ${USER_EXTRA_LIB} SHARED_LIB diff --git a/src/modules/usersq/CMakeLists.txt b/src/modules/usersq/CMakeLists.txt index 583a3384b..8465b0246 100644 --- a/src/modules/usersq/CMakeLists.txt +++ b/src/modules/usersq/CMakeLists.txt @@ -50,7 +50,6 @@ calamares_add_plugin( usersq usersq.qrc LINK_PRIVATE_LIBRARIES users_internal - calamaresui ${CRYPT_LIBRARIES} ${USER_EXTRA_LIB} Qt5::DBus diff --git a/src/modules/webview/CMakeLists.txt b/src/modules/webview/CMakeLists.txt index 8de5e690c..54e1d18b0 100644 --- a/src/modules/webview/CMakeLists.txt +++ b/src/modules/webview/CMakeLists.txt @@ -3,8 +3,7 @@ # SPDX-FileCopyrightText: 2020 Adriaan de Groot # SPDX-License-Identifier: BSD-2-Clause # -set( CALA_WEBVIEW_INCLUDE_DIRECTORIES ${PROJECT_BINARY_DIR}/src/libcalamaresui ) -set( CALA_WEBVIEW_LINK_LIBRARIES calamaresui ) +set( CALA_WEBVIEW_LINK_LIBRARIES "" ) option( WEBVIEW_FORCE_WEBKIT "Always build webview with WebKit instead of WebEngine regardless of Qt version." OFF) @@ -46,8 +45,6 @@ else() endif() if ( NOT _reason ) - include_directories( ${CALA_WEBVIEW_INCLUDE_DIRECTORIES} ) - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/WebViewConfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/WebViewConfig.h ) diff --git a/src/modules/welcome/CMakeLists.txt b/src/modules/welcome/CMakeLists.txt index a468af102..924062652 100644 --- a/src/modules/welcome/CMakeLists.txt +++ b/src/modules/welcome/CMakeLists.txt @@ -37,7 +37,6 @@ calamares_add_plugin( welcome RESOURCES welcome.qrc LINK_PRIVATE_LIBRARIES - calamaresui ${CHECKER_LINK_LIBRARIES} Qt5::DBus Qt5::Network diff --git a/src/modules/welcomeq/CMakeLists.txt b/src/modules/welcomeq/CMakeLists.txt index c9cafe7a8..b6f950dad 100644 --- a/src/modules/welcomeq/CMakeLists.txt +++ b/src/modules/welcomeq/CMakeLists.txt @@ -14,7 +14,7 @@ endif() set( _welcome ${CMAKE_CURRENT_SOURCE_DIR}/../welcome ) -include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ${CMAKE_CURRENT_SOURCE_DIR}/../../libcalamares ${_welcome} ) +include_directories( ${_welcome} ) # DUPLICATED WITH WELCOME MODULE find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED DBus Network ) @@ -44,19 +44,8 @@ calamares_add_plugin( welcomeq RESOURCES welcomeq.qrc LINK_PRIVATE_LIBRARIES - calamaresui ${CHECKER_LINK_LIBRARIES} Qt5::DBus Qt5::Network SHARED_LIB ) - -# add_executable( welcomeqmltest qmlmain.cpp Config.cpp WelcomeQmlViewStep.cpp ${CHECKER_SOURCES} ) -# target_link_libraries( welcomeqmltest PRIVATE calamaresui Qt5::Core Qt5::Network Qt5::DBus ${CHECKER_LINK_LIBRARIES}) -# set_target_properties( welcomeqmltest -# PROPERTIES -# ENABLE_EXPORTS TRUE -# RUNTIME_OUTPUT_NAME welcomeqmltest -# ) -# calamares_automoc( welcomeqmltest ) -# calamares_autouic( welcomeqmltest )