Skip to content

Commit ea61ce1

Browse files
author
Charles PIGNEROL
committed
Version 1.4.3. FindQwt.cmake manages Qwt dependencies to Qt.
1 parent 9b69f7f commit ea61ce1

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

cmake/FindQwt.cmake

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,26 @@ set (QWT_TARGET "qwt::qwt")
148148

149149
if (NOT TARGET qwt::qwt)
150150
add_library (${QWT_TARGET} SHARED IMPORTED)
151+
152+
# Ajout dépendances Qt 5 ou 6 (issues des fichiers tests de qwt 6.2.0) :
153+
include (${GUIToolkitsVariables_CMAKE_DIR}/common_qt.cmake)
154+
find_package (Qt${QT_MAJOR}Widgets ${QT_MAJOR} REQUIRED NO_CMAKE_SYSTEM_PATH)
155+
find_package (Qt${QT_MAJOR}Concurrent ${QT_MAJOR} REQUIRED NO_CMAKE_SYSTEM_PATH)
156+
find_package (Qt${QT_MAJOR}PrintSupport ${QT_MAJOR} REQUIRED NO_CMAKE_SYSTEM_PATH)
157+
find_package (Qt${QT_MAJOR}Svg ${QT_MAJOR} NO_CMAKE_SYSTEM_PATH)
158+
find_package (Qt${QT_MAJOR}OpenGL ${QT_MAJOR} NO_CMAKE_SYSTEM_PATH)
159+
set (QWT_QT_LINKED_LIBRARIES "Qt${QT_MAJOR}::Widgets;Qt${QT_MAJOR}::Concurrent;Qt${QT_MAJOR}::PrintSupport")
160+
if (Qt5Svg_FOUND)
161+
list (APPEND QWT_QT_LINKED_LIBRARIES "Qt${QT_MAJOR}::Svg")
162+
endif (Qt5Svg_FOUND)
163+
if (Qt5OpenGL_FOUND)
164+
list (APPEND QWT_QT_LINKED_LIBRARIES "Qt${QT_MAJOR}::OpenGL")
165+
endif (Qt5OpenGL_FOUND)
166+
151167
set_target_properties (qwt::qwt PROPERTIES
152168
INTERFACE_INCLUDE_DIRECTORIES ${QWT_INCLUDE_DIR}
153169
IMPORTED_LOCATION ${QWT_LIBRARIES}
170+
INTERFACE_LINK_LIBRARIES "${QWT_QT_LINKED_LIBRARIES}"
154171
# INTERFACE_LINK_LIBRARIES ${QWT_LIBRARIES} # A priori on y met plutôt les dépendances, par exemple les libs Qt*.
155172
)
156173
endif (NOT TARGET qwt::qwt)

cmake/version.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
set (GUI_TOOLKITS_VARIABLES_MAJOR_VERSION "1")
66
set (GUI_TOOLKITS_VARIABLES_MINOR_VERSION "4")
7-
set (GUI_TOOLKITS_VARIABLES_RELEASE_VERSION "2")
7+
set (GUI_TOOLKITS_VARIABLES_RELEASE_VERSION "3")
88
set (GUI_TOOLKITS_VARIABLES_VERSION ${GUI_TOOLKITS_VARIABLES_MAJOR_VERSION}.${GUI_TOOLKITS_VARIABLES_MINOR_VERSION}.${GUI_TOOLKITS_VARIABLES_RELEASE_VERSION})

versions.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Version 1.4.3 : 12/01/24
2+
===============
3+
4+
FindQwt.cmake gère les dépendances de Qwt à Qt.
5+
6+
17
Version 1.4.1/1.4.2 : 13/12/23
28
=====================
39

0 commit comments

Comments
 (0)