From 4835ebd79674e29e9558a946b3f4684cfa9227a4 Mon Sep 17 00:00:00 2001 From: Sani7 Date: Tue, 31 Oct 2023 17:33:09 +0100 Subject: [PATCH] Add cmakelists --- CMakeLists.txt | 4 ++++ examples/CMakeLists.txt | 0 playground/CMakeLists.txt | 0 src/CMakeLists.txt | 32 ++++++++++++++++++++++++++++++++ tests/CMakeLists.txt | 0 5 files changed, 36 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 examples/CMakeLists.txt create mode 100644 playground/CMakeLists.txt create mode 100644 src/CMakeLists.txt create mode 100644 tests/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..0e3729b --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,4 @@ +add_subdirectory(examples) +add_subdirectory(playground) +add_subdirectory(src) +add_subdirectory(tests) \ No newline at end of file diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 0000000..e69de29 diff --git a/playground/CMakeLists.txt b/playground/CMakeLists.txt new file mode 100644 index 0000000..e69de29 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..80717ef --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,32 @@ +set(CMAKE_PREFIX_PATH "~/Qt/6.4.3/gcc_64/bin/" CACHE PATH "Path to Qt") + +find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Concurrent OpenGLWidgets PrintSupport Svg Widgets) +find_package(Qt6 REQUIRED COMPONENTS Concurrent Core OpenGLWidgets PrintSupport Svg Widgets) + +qt_add_library(qwt STATIC) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +target_include_directories(qwt + PUBLIC + ${CMAKE_CURRENT_LIST_DIR}/ + ${PROJECT_BINARY_DIR} +) + +file(GLOB_RECURSE TEST_SOURCES "*.cpp") +target_sources(qwt + PRIVATE + ${TEST_SOURCES} +) + +target_link_libraries(qwt + PUBLIC + Qt6::Core + Qt6::OpenGLWidgets + PRIVATE + Qt6::Concurrent + Qt6::PrintSupport + Qt6::Svg +) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..e69de29