diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2022-06-06 22:03:57 +0200 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2022-06-08 20:06:12 +0200 |
commit | d5d61d18c89af3f6743b7c56774eebdfdcc87b2c (patch) | |
tree | b4299c1af7e194e9083d4de1bce382102ea46e95 /src/qt/CMakeLists.txt | |
download | OFQT-d5d61d18c89af3f6743b7c56774eebdfdcc87b2c.tar.gz OFQT-d5d61d18c89af3f6743b7c56774eebdfdcc87b2c.zip |
Release 0.1.00.1.0
Diffstat (limited to 'src/qt/CMakeLists.txt')
-rw-r--r-- | src/qt/CMakeLists.txt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt new file mode 100644 index 0000000..c0566d9 --- /dev/null +++ b/src/qt/CMakeLists.txt @@ -0,0 +1,34 @@ +SET(FRONTEND_NAME "OFQT") +enable_language(CXX) + +find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets Gui REQUIRED) +find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets Gui REQUIRED) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +list(APPEND + QT_SOURCES + ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mainwindow.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mainwindow.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/settings.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/settings.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/workers.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/workers.hpp + + ${CMAKE_CURRENT_SOURCE_DIR}/mainwindow.ui + ${CMAKE_CURRENT_SOURCE_DIR}/assets.qrc +) + +if(WIN32) + string(REPLACE "." "," CMAKE_PROJECT_COMMAVERSION ${CMAKE_PROJECT_VERSION}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/assets/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY) + list(APPEND QT_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/version.rc) +endif() + +add_executable(${FRONTEND_NAME} WIN32 ${QT_SOURCES}) +target_link_libraries(${FRONTEND_NAME} PRIVATE libofqt) +target_link_libraries(${FRONTEND_NAME} PRIVATE Qt${QT_VERSION_MAJOR}::Widgets) +set_property(TARGET ${FRONTEND_NAME} PROPERTY CXX_STANDARD 11) |