Skip to content

[needs more work w/ KF5 if desired] Allow to build with Qt6/KF6 #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
cmake_minimum_required(VERSION 3.16)
project(KDbg)
set(QT_MIN_VERSION "5.15.0")
set(KF5_MIN_VERSION "5.84.0")
set(KF_MIN_VERSION "5.89.0")

set(KDBG_VERSION 3.1.0)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kdbg/version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kdbg/version.h)

find_package(ECM REQUIRED NO_MODULE)
find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})

include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(FeatureSummary)

find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Core Widgets
)
if(QT_MAJOR_VERSION EQUAL 6)
find_package(Qt${QT_MAJOR_VERSION}Core5Compat CONFIG REQUIRED)
endif()

find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
find_package(KF${QT_MAJOR_VERSION} ${KF_MIN_VERSION} REQUIRED COMPONENTS
I18n
Config
CoreAddons
Expand Down
19 changes: 12 additions & 7 deletions kdbg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,21 @@ IF (HAVE_LIB_UTIL)
ENDIF (HAVE_LIB_UTIL)

target_link_libraries(kdbg
KF5::I18n
KF5::ConfigCore
KF5::CoreAddons
KF5::IconThemes
KF5::XmlGui
KF5::WindowSystem
KF${QT_MAJOR_VERSION}::I18n
KF${QT_MAJOR_VERSION}::ConfigCore
KF${QT_MAJOR_VERSION}::CoreAddons
KF${QT_MAJOR_VERSION}::IconThemes
KF${QT_MAJOR_VERSION}::WindowSystem
KF${QT_MAJOR_VERSION}::XmlGui
${LIB_UTIL}
)
if(QT_MAJOR_VERSION EQUAL 6)
target_link_libraries(kdbg
Qt::Core5Compat
)
endif()

install(TARGETS kdbg ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES kdbg.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES kdbgrc DESTINATION ${KDE_INSTALL_CONFDIR})
install(FILES kdbgui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kdbg)
install(FILES kdbgui.rc DESTINATION ${KDE_INSTALL_KXMLGUIDIR}/kdbg)
Loading