Use FindQwt.cmake script

This commit is contained in:
2024-11-07 14:35:57 +01:00
parent ac69d25003
commit 91a09ad771
4 changed files with 171 additions and 21 deletions

View File

@@ -50,19 +50,6 @@ FetchContent_Declare(
FetchContent_MakeAvailable(pybind11)
# Add QWT Dependency:
find_library(QWT_LIBRARY NAMES "qwt" "qwt-qt5" PATHS
"$ENV{QWT_HOME}/lib"
"/opt/homebrew/opt/qwt-qt5/lib"
)
find_path(QWT_INCLUDE_DIRS NAMES "qwt_plot.h" PATHS
"$ENV{QWT_HOME}/include"
"/usr/include/qwt-qt5"
"/usr/include/qwt"
"/opt/homebrew/opt/qwt-qt5/include"
"/opt/homebrew/opt/qwt-qt5/lib/qwt.framework/Headers"
)
# Add QT Library:
if (APPLE)
set(Qt5_DIR "/opt/homebrew/opt/qt@5/lib/cmake/Qt5")
@@ -73,6 +60,9 @@ set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Add QWT Dependency:
find_package(Qwt REQUIRED)
add_executable(TraceAnalyzer
businessObjects/commentmodel.cpp
businessObjects/configmodels.cpp
@@ -112,16 +102,15 @@ add_executable(TraceAnalyzer
target_include_directories(TraceAnalyzer
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${QWT_INCLUDE_DIRS}
)
target_link_libraries(TraceAnalyzer
PRIVATE
DRAMSys::config
pybind11::embed
${QWT_LIBRARY}
Qt5::Widgets
Qt5::Sql
DRAMSys::config
Qwt::Qwt
)
set(DRAMSYS_TRACE_ANALYZER_EXTENSION_DIR "${CMAKE_SOURCE_DIR}/extensions/apps/traceAnalyzer")