1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
Link to system qcustomplot instead of bundled one.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -390,17 +390,12 @@
messagereplydialog.ui
)
-set (qcp_CXXSRCS
- qcustomplot-source/qcustomplot.cpp
- )
-
set (all_CXXSRCS
${wsjt_CXXSRCS}
${wsjt_qt_CXXSRCS}
${wsjt_qtmm_CXXSRCS}
${js8_CXXSRCS}
${wsjtx_CXXSRCS}
- ${qcp_CXXSRCS}
)
set (all_C_and_CXXSRCS
@@ -835,16 +830,15 @@
endif (APPLE)
endif (${OPENMP_FOUND} OR APPLE)
-# build a library for the QCustomPlot widget
-add_library (qcp STATIC ${qcp_CXXSRCS})
-target_include_directories (qcp PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/qcustomplot-source>)
-target_link_libraries (qcp Qt5::Widgets Qt5::PrintSupport)
-
# build a library of package Qt functionality
add_library (wsjt_qt STATIC ${wsjt_qt_CXXSRCS} ${wsjt_qt_GENUISRCS} ${GENAXSRCS})
# set wsjtx_udp exports to static variants
target_compile_definitions (wsjt_qt PUBLIC UDP_STATIC_DEFINE)
-target_link_libraries (wsjt_qt qcp Qt5::Widgets Qt5::Network)
+
+# FRusconi build against the system libqcustomplot2.1 / Qt5
+find_package(QCustomPlot REQUIRED)
+
+target_link_libraries (wsjt_qt QCustomPlot::QCustomPlot Qt5::Widgets Qt5::Network)
target_include_directories (wsjt_qt BEFORE PRIVATE ${hamlib_INCLUDE_DIRS})
if (WIN32)
target_link_libraries (wsjt_qt Qt5::AxContainer Qt5::AxBase)
|