summaryrefslogtreecommitdiffstats
path: root/examples/charts/candlestickchart/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/charts/candlestickchart/CMakeLists.txt')
-rw-r--r--examples/charts/candlestickchart/CMakeLists.txt56
1 files changed, 56 insertions, 0 deletions
diff --git a/examples/charts/candlestickchart/CMakeLists.txt b/examples/charts/candlestickchart/CMakeLists.txt
new file mode 100644
index 00000000..94accdd6
--- /dev/null
+++ b/examples/charts/candlestickchart/CMakeLists.txt
@@ -0,0 +1,56 @@
+# Generated from candlestickchart.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(candlestickchart LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/charts/candlestickchart")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Charts)
+
+qt_add_executable(candlestickchart
+ candlestickdatareader.cpp candlestickdatareader.h
+ main.cpp
+)
+set_target_properties(candlestickchart PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+target_link_libraries(candlestickchart PUBLIC
+ Qt::Charts
+ Qt::Core
+ Qt::Gui
+)
+
+
+# Resources:
+set_source_files_properties("acme_data.txt"
+ PROPERTIES QT_RESOURCE_ALIAS "acme"
+)
+set(candlestickdata_resource_files
+ "acme_data.txt"
+)
+
+qt6_add_resources(candlestickchart "candlestickdata"
+ PREFIX
+ "/"
+ FILES
+ ${candlestickdata_resource_files}
+)
+
+install(TARGETS candlestickchart
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)