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
This commit is contained in:
Adriaan de Groot 2021-07-26 14:55:12 +02:00
parent 4d1630bf8b
commit 03e621f4a2
33 changed files with 2 additions and 67 deletions

View File

@ -8,8 +8,6 @@ calamares_add_plugin( contextualprocess
EXPORT_MACRO PLUGINDLLEXPORT_PRO
SOURCES
ContextualProcessJob.cpp
LINK_PRIVATE_LIBRARIES
calamares
SHARED_LIB
)

View File

@ -8,8 +8,6 @@ calamares_add_plugin( dracutlukscfg
EXPORT_MACRO PLUGINDLLEXPORT_PRO
SOURCES
DracutLuksCfgJob.cpp
LINK_PRIVATE_LIBRARIES
calamares
SHARED_LIB
NO_CONFIG
)

View File

@ -8,7 +8,5 @@ calamares_add_plugin( dummycpp
EXPORT_MACRO PLUGINDLLEXPORT_PRO
SOURCES
DummyCppJob.cpp
LINK_PRIVATE_LIBRARIES
calamares
SHARED_LIB
)

View File

@ -17,7 +17,6 @@ calamares_add_plugin( finished
UI
FinishedPage.ui
LINK_PRIVATE_LIBRARIES
calamaresui
Qt5::DBus
SHARED_LIB
)

View File

@ -26,7 +26,6 @@ calamares_add_plugin( finishedq
RESOURCES
finishedq.qrc
LINK_PRIVATE_LIBRARIES
calamaresui
Qt5::DBus
SHARED_LIB
)

View File

@ -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
)

View File

@ -28,8 +28,6 @@ calamares_add_plugin( hostinfo
EXPORT_MACRO PLUGINDLLEXPORT_PRO
SOURCES
HostInfoJob.cpp
LINK_PRIVATE_LIBRARIES
calamares
SHARED_LIB
NO_CONFIG
)

View File

@ -8,8 +8,6 @@ calamares_add_plugin( initcpio
EXPORT_MACRO PLUGINDLLEXPORT_PRO
SOURCES
InitcpioJob.cpp
LINK_PRIVATE_LIBRARIES
calamares
SHARED_LIB
)

View File

@ -8,8 +8,6 @@ calamares_add_plugin( initramfs
EXPORT_MACRO PLUGINDLLEXPORT_PRO
SOURCES
InitramfsJob.cpp
LINK_PRIVATE_LIBRARIES
calamares
SHARED_LIB
)

View File

@ -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

View File

@ -18,8 +18,6 @@ calamares_add_plugin( keyboard
KeyboardPage.ui
RESOURCES
keyboard.qrc
LINK_PRIVATE_LIBRARIES
calamaresui
SHARED_LIB
)

View File

@ -23,7 +23,5 @@ calamares_add_plugin( keyboardq
${_keyboard}/keyboardwidget/keyboardglobal.cpp
RESOURCES
keyboardq.qrc
LINK_PRIVATE_LIBRARIES
calamaresui
SHARED_LIB
)

View File

@ -14,7 +14,5 @@ calamares_add_plugin( license
LicenseWidget.cpp
UI
LicensePage.ui
LINK_PRIVATE_LIBRARIES
calamaresui
SHARED_LIB
)

View File

@ -31,7 +31,6 @@ calamares_add_plugin( locale
RESOURCES
locale.qrc
LINK_PRIVATE_LIBRARIES
calamaresui
Qt5::Network
${geoip_libs}
yamlcpp

View File

@ -43,7 +43,6 @@ calamares_add_plugin( localeq
RESOURCES
localeq.qrc
LINK_PRIVATE_LIBRARIES
calamaresui
Qt5::Network
SHARED_LIB
)

View File

@ -8,8 +8,6 @@ calamares_add_plugin( luksbootkeyfile
EXPORT_MACRO PLUGINDLLEXPORT_PRO
SOURCES
LuksBootKeyFileJob.cpp
LINK_PRIVATE_LIBRARIES
calamares
SHARED_LIB
NO_CONFIG
)

View File

@ -9,8 +9,6 @@ calamares_add_plugin( machineid
SOURCES
MachineIdJob.cpp
Workers.cpp
LINK_PRIVATE_LIBRARIES
calamares
SHARED_LIB
)

View File

@ -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
)

View File

@ -15,7 +15,5 @@ calamares_add_plugin( notesqml
NotesQmlViewStep.cpp
RESOURCES
notesqml.qrc
LINK_PRIVATE_LIBRARIES
calamaresui
SHARED_LIB
)

View File

@ -12,7 +12,6 @@ calamares_add_plugin( oemid
UI
OEMPage.ui
LINK_PRIVATE_LIBRARIES
calamaresui
Qt5::Widgets
SHARED_LIB
)

View File

@ -55,7 +55,6 @@ calamares_add_plugin( packagechooser
UI
page_package.ui
LINK_PRIVATE_LIBRARIES
calamaresui
${_extra_libraries}
SHARED_LIB
)

View File

@ -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

View File

@ -44,7 +44,6 @@ if ( KF5Plasma_FOUND AND KF5Package_FOUND )
UI
page_plasmalnf.ui
LINK_PRIVATE_LIBRARIES
calamaresui
KF5::Package
KF5::Plasma
SHARED_LIB

View File

@ -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

View File

@ -8,7 +8,5 @@ calamares_add_plugin( removeuser
EXPORT_MACRO PLUGINDLLEXPORT_PRO
SOURCES
RemoveUserJob.cpp
LINK_PRIVATE_LIBRARIES
calamares
SHARED_LIB
)

View File

@ -8,8 +8,6 @@ calamares_add_plugin( shellprocess
EXPORT_MACRO PLUGINDLLEXPORT_PRO
SOURCES
ShellProcessJob.cpp
LINK_PRIVATE_LIBRARIES
calamares
SHARED_LIB
)

View File

@ -11,8 +11,6 @@ calamares_add_plugin( summary
SummaryViewStep.cpp
SummaryPage.cpp
UI
LINK_PRIVATE_LIBRARIES
calamaresui
SHARED_LIB
NO_CONFIG
)

View File

@ -15,8 +15,6 @@ calamares_add_plugin( tracking
page_trackingstep.ui
RESOURCES
page_trackingstep.qrc
LINK_PRIVATE_LIBRARIES
calamaresui
SHARED_LIB
)

View File

@ -71,7 +71,6 @@ calamares_add_plugin( users
users.qrc
LINK_PRIVATE_LIBRARIES
users_internal
calamaresui
${CRYPT_LIBRARIES}
${USER_EXTRA_LIB}
SHARED_LIB

View File

@ -50,7 +50,6 @@ calamares_add_plugin( usersq
usersq.qrc
LINK_PRIVATE_LIBRARIES
users_internal
calamaresui
${CRYPT_LIBRARIES}
${USER_EXTRA_LIB}
Qt5::DBus

View File

@ -3,8 +3,7 @@
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
# 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 )

View File

@ -37,7 +37,6 @@ calamares_add_plugin( welcome
RESOURCES
welcome.qrc
LINK_PRIVATE_LIBRARIES
calamaresui
${CHECKER_LINK_LIBRARIES}
Qt5::DBus
Qt5::Network

View File

@ -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 )