qtk/src/app/CMakeLists.txt

79 lines
2.8 KiB
CMake
Raw Normal View History

################################################################################
## 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 ##
################################################################################
################################################################################
# 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
qtkwidget.cpp
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
)
2023-01-03 03:18:53 +00:00
set(
QTK_PLUGIN_LIBRARY_HEADERS
qtkwidget.h
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(
qtk_plugin_library PRIVATE
2023-01-03 03:18:53 +00:00
"${QTK_PLUGIN_LIBRARY_SOURCES}"
"${QTK_PLUGIN_LIBRARY_HEADERS}"
)
target_link_libraries(qtk_plugin_library PUBLIC Qt6::UiPlugin qtk_library)
################################################################################
# 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
widgetplugincollection.cpp widgetplugincollection.h
widgetplugin.cpp widgetplugin.h
)
target_link_libraries(qtk_collection PUBLIC qtk_plugin_library)
################################################################################
# Final Qtk Application
################################################################################
2023-01-03 03:18:53 +00:00
set(
QTK_APP_SOURCES
qtkscene.cpp qtkscene.h
main.cpp
)
2023-01-15 21:04:48 +00:00
qt6_add_big_resources(QTK_APP_SOURCES "${QTK_RESOURCES}/resources.qrc")
configure_file(
2023-01-03 03:18:53 +00:00
resources.h.in
"${CMAKE_CURRENT_BINARY_DIR}/resources.h"
@ONLY
)
qt_add_executable(qtk_app ${QTK_APP_SOURCES})
target_link_libraries(qtk_app PRIVATE qtk_plugin_library)
2023-01-03 03:18:53 +00:00
set_target_properties(
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}
)