Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
KCalc
Commits
59e11756
Commit
59e11756
authored
Jan 19, 2022
by
Laurent Montel
Browse files
Adapt build system for building against qt6
parent
40e6c899
Pipeline
#125547
passed with stage
in 1 minute and 35 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
59e11756
...
...
@@ -8,7 +8,7 @@ set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE
project
(
kcalc VERSION
${
RELEASE_SERVICE_VERSION
}
)
set
(
QT_MIN_VERSION
"5.15.0"
)
set
(
KF5_MIN_VERSION
"5.
85
.0"
)
set
(
KF5_MIN_VERSION
"5.
90
.0"
)
find_package
(
ECM
${
KF5_MIN_VERSION
}
REQUIRED NO_MODULE
)
set
(
CMAKE_MODULE_PATH
${
ECM_MODULE_PATH
}
)
...
...
@@ -30,10 +30,13 @@ ecm_setup_version(${RELEASE_SERVICE_VERSION} VARIABLE_PREFIX KCALC
VERSION_HEADER
"
${
CMAKE_CURRENT_BINARY_DIR
}
/kcalc_version.h"
)
find_package
(
Qt
5
${
QT_MIN_VERSION
}
CONFIG REQUIRED COMPONENTS
find_package
(
Qt
${
QT_MAJOR_VERSION
}
${
QT_MIN_VERSION
}
CONFIG REQUIRED COMPONENTS
Core
Widgets
)
if
(
QT_MAJOR_VERSION STREQUAL
"6"
)
find_package
(
Qt6Core5Compat
)
endif
()
find_package
(
KF5
${
KF5_MIN_VERSION
}
REQUIRED COMPONENTS
CoreAddons
...
...
@@ -134,8 +137,8 @@ endif()
target_link_libraries
(
kcalc
Qt::Core
Qt::Widgets
Qt
${
QT_MAJOR_VERSION
}
::Core
Qt
${
QT_MAJOR_VERSION
}
::Widgets
KF5::CoreAddons
KF5::ConfigWidgets
KF5::GuiAddons
...
...
knumber/CMakeLists.txt
View file @
59e11756
...
...
@@ -17,6 +17,9 @@ add_library(knumber STATIC
target_include_directories
(
knumber PUBLIC
${
CMAKE_BINARY_DIR
}
${
GMP_INCLUDE_DIR
}
)
target_link_libraries
(
knumber PUBLIC Qt::Core PRIVATE
${
GMP_LIBRARIES
}
${
MPFR_LIBRARIES
}
)
target_link_libraries
(
knumber PUBLIC Qt
${
QT_MAJOR_VERSION
}
::Core PRIVATE
${
GMP_LIBRARIES
}
${
MPFR_LIBRARIES
}
)
if
(
QT_MAJOR_VERSION STREQUAL
"6"
)
target_link_libraries
(
knumber PRIVATE Qt6::Core5Compat
)
endif
()
add_subdirectory
(
tests
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment