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 EXPORT_MACRO PLUGINDLLEXPORT_PRO
SOURCES SOURCES
ContextualProcessJob.cpp ContextualProcessJob.cpp
LINK_PRIVATE_LIBRARIES
calamares
SHARED_LIB SHARED_LIB
) )

View File

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

View File

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

View File

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

View File

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

View File

@ -21,7 +21,6 @@ if ( KPMcore_FOUND AND Qt5DBus_FOUND AND KF5CoreAddons_FOUND AND KF5Config_FOUND
ResizeFSJob.cpp ResizeFSJob.cpp
LINK_PRIVATE_LIBRARIES LINK_PRIVATE_LIBRARIES
kpmcore kpmcore
calamares
COMPILE_DEFINITIONS ${KPMcore_API_DEFINITIONS} COMPILE_DEFINITIONS ${KPMcore_API_DEFINITIONS}
SHARED_LIB SHARED_LIB
) )

View File

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

View File

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

View File

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

View File

@ -25,8 +25,6 @@ if ( KF5Parts_FOUND AND KF5Service_FOUND )
SOURCES SOURCES
InteractiveTerminalViewStep.cpp InteractiveTerminalViewStep.cpp
InteractiveTerminalPage.cpp InteractiveTerminalPage.cpp
LINK_PRIVATE_LIBRARIES
calamaresui
LINK_LIBRARIES LINK_LIBRARIES
KF5::Service KF5::Service
KF5::Parts KF5::Parts

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,9 +16,7 @@ calamares_add_plugin( netinstall
UI UI
page_netinst.ui page_netinst.ui
LINK_PRIVATE_LIBRARIES LINK_PRIVATE_LIBRARIES
calamaresui
Qt5::Network Qt5::Network
yamlcpp
SHARED_LIB SHARED_LIB
) )
@ -32,6 +30,5 @@ calamares_add_test(
PackageModel.cpp PackageModel.cpp
LIBRARIES LIBRARIES
Qt5::Gui Qt5::Gui
yamlcpp
) )

View File

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

View File

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

View File

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

View File

@ -108,7 +108,6 @@ if ( KPMcore_FOUND AND Qt5DBus_FOUND AND KF5CoreAddons_FOUND AND KF5Config_FOUND
gui/VolumeGroupBaseDialog.ui gui/VolumeGroupBaseDialog.ui
LINK_PRIVATE_LIBRARIES LINK_PRIVATE_LIBRARIES
kpmcore kpmcore
calamaresui
KF5::CoreAddons KF5::CoreAddons
COMPILE_DEFINITIONS ${_partition_defs} COMPILE_DEFINITIONS ${_partition_defs}
SHARED_LIB SHARED_LIB

View File

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

View File

@ -10,8 +10,6 @@ calamares_add_plugin( preservefiles
EXPORT_MACRO PLUGINDLLEXPORT_PRO EXPORT_MACRO PLUGINDLLEXPORT_PRO
SOURCES SOURCES
PreserveFiles.cpp PreserveFiles.cpp
LINK_PRIVATE_LIBRARIES
calamares
# REQUIRES mount # To set the rootMountPoint # REQUIRES mount # To set the rootMountPoint
SHARED_LIB SHARED_LIB
EMERGENCY EMERGENCY

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,8 +3,7 @@
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org> # SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
# SPDX-License-Identifier: BSD-2-Clause # SPDX-License-Identifier: BSD-2-Clause
# #
set( CALA_WEBVIEW_INCLUDE_DIRECTORIES ${PROJECT_BINARY_DIR}/src/libcalamaresui ) set( CALA_WEBVIEW_LINK_LIBRARIES "" )
set( CALA_WEBVIEW_LINK_LIBRARIES calamaresui )
option( WEBVIEW_FORCE_WEBKIT "Always build webview with WebKit instead of WebEngine regardless of Qt version." OFF) option( WEBVIEW_FORCE_WEBKIT "Always build webview with WebKit instead of WebEngine regardless of Qt version." OFF)
@ -46,8 +45,6 @@ else()
endif() endif()
if ( NOT _reason ) if ( NOT _reason )
include_directories( ${CALA_WEBVIEW_INCLUDE_DIRECTORIES} )
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/WebViewConfig.h.in configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/WebViewConfig.h.in
${CMAKE_CURRENT_BINARY_DIR}/WebViewConfig.h ) ${CMAKE_CURRENT_BINARY_DIR}/WebViewConfig.h )

View File

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

View File

@ -14,7 +14,7 @@ endif()
set( _welcome ${CMAKE_CURRENT_SOURCE_DIR}/../welcome ) 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 # DUPLICATED WITH WELCOME MODULE
find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED DBus Network ) find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED DBus Network )
@ -44,19 +44,8 @@ calamares_add_plugin( welcomeq
RESOURCES RESOURCES
welcomeq.qrc welcomeq.qrc
LINK_PRIVATE_LIBRARIES LINK_PRIVATE_LIBRARIES
calamaresui
${CHECKER_LINK_LIBRARIES} ${CHECKER_LINK_LIBRARIES}
Qt5::DBus Qt5::DBus
Qt5::Network Qt5::Network
SHARED_LIB 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 )