cmake update

make examples, playground and tests buildable
This commit is contained in:
2026-01-03 20:03:07 +01:00
parent dec98086e6
commit 0040196561
23 changed files with 104 additions and 2661 deletions

View File

@@ -0,0 +1,34 @@
find_package(Qt6 REQUIRED COMPONENTS Widgets)
file(GLOB SUBDIRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/*")
foreach(SUBDIR ${SUBDIRS})
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR})
file(GLOB SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}/*.h")
if(SOURCES)
add_executable(${SUBDIR} ${SOURCES})
target_include_directories(${SUBDIR} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR} ${PROJECT_BINARY_DIR}/)
target_compile_definitions(${SUBDIR}
PRIVATE
"QWT_MOC_INCLUDE"
)
set_target_properties(
${SUBDIR}
PROPERTIES
AUTOMOC ON
)
target_link_libraries(${SUBDIR} qwt Qt${QT_VERSION_MAJOR}::Widgets)
if(NOT QWT_BUILD_EXAMPLES)
set_target_properties(${SUBDIR} PROPERTIES
EXCLUDE_FROM_ALL TRUE
EXCLUDE_FROM_DEFAULT_BUILD TRUE # mainly for Visual Studio
)
endif()
endif()
endif()
endforeach()

View File

@@ -1,70 +0,0 @@
######################################################################
# Qwt Examples - Copyright (C) 2002 Uwe Rathmann
# This file may be used under the terms of the 3-clause BSD License
######################################################################
QWT_ROOT = $${PWD}/..
include( $${QWT_ROOT}/qwtconfig.pri )
include( $${QWT_ROOT}/qwtbuild.pri )
include( $${QWT_ROOT}/qwtfunctions.pri )
QWT_OUT_ROOT = $${OUT_PWD}/../..
TEMPLATE = app
INCLUDEPATH += $${QWT_ROOT}/src
DEPENDPATH += $${QWT_ROOT}/src
INCLUDEPATH += $${QWT_ROOT}/classincludes
DEPENDPATH += $${QWT_ROOT}/classincludes
!debug_and_release {
DESTDIR = $${QWT_OUT_ROOT}/examples/bin
}
else {
CONFIG(debug, debug|release) {
DESTDIR = $${QWT_OUT_ROOT}/examples/bin_debug
}
else {
DESTDIR = $${QWT_OUT_ROOT}/examples/bin
}
}
QMAKE_RPATHDIR *= $${QWT_OUT_ROOT}/lib
qwtAddLibrary($${QWT_OUT_ROOT}/lib, qwt)
greaterThan(QT_MAJOR_VERSION, 4) {
QT += printsupport
QT += concurrent
}
contains(QWT_CONFIG, QwtOpenGL ) {
QT += opengl
greaterThan(QT_MAJOR_VERSION, 5) {
QT += openglwidgets
}
}
else {
DEFINES += QWT_NO_OPENGL
}
contains(QWT_CONFIG, QwtSvg) {
QT += svg
}
else {
DEFINES += QWT_NO_SVG
}
contains(QWT_CONFIG, QwtDll) {
DEFINES += QT_DLL QWT_DLL
}

View File

@@ -1,54 +0,0 @@
######################################################################
# Qwt Examples - Copyright (C) 2002 Uwe Rathmann
# This file may be used under the terms of the 3-clause BSD License
######################################################################
include( $${PWD}/../qwtconfig.pri )
TEMPLATE = subdirs
contains(QWT_CONFIG, QwtPlot) {
SUBDIRS += \
animation \
barchart \
cpuplot \
curvedemo \
distrowatch \
friedberg \
itemeditor \
legends \
stockchart \
simpleplot \
sinusplot \
realtime \
refreshtest \
scatterplot \
spectrogram \
rasterview \
tvplot
contains(QWT_CONFIG, QwtWidgets) {
SUBDIRS += \
bode \
splineeditor \
oscilloscope
}
contains(QWT_CONFIG, QwtPolar) {
SUBDIRS += \
polardemo \
polarspectrogram \
}
}
contains(QWT_CONFIG, QwtWidgets) {
SUBDIRS += \
sysinfo \
radio \
dials \
controls
}