cmake_minimum_required(VERSION 3.22)
project(plottapp)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -pthread")
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed
set(CMAKE_AUTOMOC ON)
# Find the QtWidgets libraries
find_package(Qt6Widgets CONFIG REQUIRED)
find_package(Qt6Charts)
include_directories(/usr/local/qwt-6.2.0/include) # works
set(CUSTOM_LIBRARY_PATH /usr/local/qwt-6.2.0/lib) # does not work
set(CMAKE_PREFIX_PATH /usr/local/qwt-6.2.0/lib) # does not work
set(plottapp_SRC
main.cpp
plottapp.cpp
mslider.cpp
etc.
etc.
)
qt6_wrap_ui(plottapp_SRC plottapp.ui)
add_executable(plottapp ${plottapp_SRC})
target_link_libraries(plottapp Qt6::Widgets Qt6::Charts qwt ) # <-- Chokes on qwt here
# Install the executable
install(TARGETS plottapp DESTINATION bin)