51 lines
1.1 KiB
CMake
51 lines
1.1 KiB
CMake
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
|
|
|
set(META_PROJECT_TYPE application)
|
|
set(META_GUI_OPTIONAL false)
|
|
|
|
# add project files
|
|
set(WIDGETS_HEADER_FILES
|
|
mainwindow.h
|
|
webpage.h
|
|
)
|
|
set(WIDGETS_SRC_FILES
|
|
main.cpp
|
|
mainwindow.cpp
|
|
webpage.cpp
|
|
)
|
|
|
|
set(ICON_FILES
|
|
../resources/icons/hicolor/scalable/apps/${META_PROJECT_NAME}.svg
|
|
)
|
|
|
|
# find c++utilities
|
|
find_package(c++utilities${CONFIGURATION_PACKAGE_SUFFIX} 5.0.0 REQUIRED)
|
|
use_cpp_utilities()
|
|
|
|
# find qtutilities
|
|
find_package(qtutilities${CONFIGURATION_PACKAGE_SUFFIX} 6.0.0 REQUIRED)
|
|
use_qt_utilities()
|
|
|
|
# find repoindex
|
|
find_package(librepoindex ${META_APP_VERSION} REQUIRED)
|
|
use_librepoindex()
|
|
|
|
# add Qt modules which can currently not be detected automatically
|
|
list(APPEND ADDITIONAL_QT_MODULES Network)
|
|
|
|
# suffix the target to avoid conflict with cli target
|
|
set(TARGET_SUFFIX "-gui")
|
|
|
|
# include modules to apply configuration
|
|
include(BasicConfig)
|
|
include(QtGuiConfig)
|
|
include(QtWebViewProviderConfig)
|
|
include(QtConfig)
|
|
include(WindowsResources)
|
|
include(AppTarget)
|
|
include(ShellCompletion)
|
|
include(ConfigHeader)
|
|
|
|
# create desktop file using previously defined meta data
|
|
add_desktop_file()
|