2022-12-18 14:19:04 +00:00
|
|
|
################################################################################
|
|
|
|
## Project for working with OpenGL and Qt6 widgets ##
|
2023-01-02 03:26:58 +00:00
|
|
|
## ##
|
|
|
|
## Author: Shaun Reed | Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ##
|
|
|
|
## All Content (c) 2023 Shaun Reed, all rights reserved ##
|
2022-12-18 14:19:04 +00:00
|
|
|
################################################################################
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Qtk Widget Library
|
|
|
|
################################################################################
|
|
|
|
# Create a library of widgets used to build Qtk GUI
|
2023-01-03 03:18:53 +00:00
|
|
|
set(
|
|
|
|
QTK_PLUGIN_LIBRARY_SOURCES
|
2023-01-15 00:01:34 +00:00
|
|
|
qtkwidget.cpp
|
2022-12-18 14:19:04 +00:00
|
|
|
debugconsole.cpp debugconsole.ui
|
|
|
|
toolbox.cpp toolbox.ui
|
|
|
|
treeview.cpp treeview.ui
|
2023-02-11 15:01:52 +00:00
|
|
|
qtkmainwindow.cpp qtkmainwindow.h qtkmainwindow.ui
|
2022-12-18 14:19:04 +00:00
|
|
|
)
|
2023-01-03 03:18:53 +00:00
|
|
|
set(
|
|
|
|
QTK_PLUGIN_LIBRARY_HEADERS
|
2023-01-15 00:01:34 +00:00
|
|
|
qtkwidget.h
|
2022-12-18 14:19:04 +00:00
|
|
|
debugconsole.h
|
|
|
|
toolbox.h
|
|
|
|
treeview.h
|
|
|
|
)
|
2023-01-29 18:26:25 +00:00
|
|
|
qt_add_library(qtk_plugin_library STATIC EXCLUDE_FROM_ALL)
|
2023-01-03 03:18:53 +00:00
|
|
|
target_sources(
|
2023-01-15 21:23:26 +00:00
|
|
|
qtk_plugin_library PRIVATE
|
2023-01-03 03:18:53 +00:00
|
|
|
"${QTK_PLUGIN_LIBRARY_SOURCES}"
|
|
|
|
"${QTK_PLUGIN_LIBRARY_HEADERS}"
|
2022-12-18 14:19:04 +00:00
|
|
|
)
|
2023-01-15 21:23:26 +00:00
|
|
|
target_link_libraries(qtk_plugin_library PUBLIC Qt6::UiPlugin qtk_library)
|
2022-12-18 14:19:04 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Qtk Widget Collection Plugin
|
|
|
|
################################################################################
|
|
|
|
# Create a Qt Designer plugin for a collection of widgets from our library.
|
2023-01-29 18:26:25 +00:00
|
|
|
qt_add_plugin(qtk_collection SHARED EXCLUDE_FROM_ALL)
|
2023-01-03 03:18:53 +00:00
|
|
|
target_sources(
|
2023-01-15 21:04:48 +00:00
|
|
|
qtk_collection PRIVATE
|
2022-12-18 14:19:04 +00:00
|
|
|
widgetplugincollection.cpp widgetplugincollection.h
|
|
|
|
widgetplugin.cpp widgetplugin.h
|
|
|
|
)
|
2023-01-15 21:23:26 +00:00
|
|
|
target_link_libraries(qtk_collection PUBLIC qtk_plugin_library)
|
2022-12-18 14:19:04 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Final Qtk Application
|
|
|
|
################################################################################
|
|
|
|
|
2023-01-03 03:18:53 +00:00
|
|
|
set(
|
|
|
|
QTK_APP_SOURCES
|
2023-03-11 15:58:49 +00:00
|
|
|
qtkscene.cpp qtkscene.h
|
2022-12-18 14:19:04 +00:00
|
|
|
main.cpp
|
|
|
|
)
|
2023-01-15 00:01:34 +00:00
|
|
|
|
2023-01-15 21:04:48 +00:00
|
|
|
qt6_add_big_resources(QTK_APP_SOURCES "${QTK_RESOURCES}/resources.qrc")
|
2022-12-18 14:19:04 +00:00
|
|
|
configure_file(
|
2023-01-03 03:18:53 +00:00
|
|
|
resources.h.in
|
2022-12-18 14:19:04 +00:00
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/resources.h"
|
|
|
|
@ONLY
|
|
|
|
)
|
|
|
|
|
2023-03-11 15:58:49 +00:00
|
|
|
qt_add_executable(qtk_app ${QTK_APP_SOURCES})
|
|
|
|
target_link_libraries(qtk_app PRIVATE qtk_plugin_library)
|
2022-12-18 14:19:04 +00:00
|
|
|
|
2023-01-03 03:18:53 +00:00
|
|
|
set_target_properties(
|
2023-03-11 15:58:49 +00:00
|
|
|
qtk_app PROPERTIES
|
2023-01-14 21:33:06 +00:00
|
|
|
WIN32_EXECUTABLE TRUE
|
|
|
|
MACOSX_BUNDLE TRUE
|
2023-01-15 22:50:50 +00:00
|
|
|
MACOSX_BUNDLE_BUNDLE_NAME Qtk
|
|
|
|
MACOSX_BUNDLE_ICON_FILE ${QTK_OSX_ICONS}
|
|
|
|
MACOSX_BUNDLE_GUI_IDENTIFIER ${CMAKE_PROJECT_NAME}
|
|
|
|
MACOSX_BUNDLE_INFO_STRING ${CMAKE_PROJECT_DESCRIPTION}
|
|
|
|
MACOSX_BUNDLE_COPYRIGHT "All Content (c) 2023 Shaun Reed, all rights reserved"
|
2023-01-14 21:33:06 +00:00
|
|
|
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
|
|
|
|
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
2022-12-18 14:19:04 +00:00
|
|
|
)
|