2022-10-27 17:01:10 +00:00
|
|
|
cmake_minimum_required(VERSION 3.16.3)
|
2022-09-28 21:49:30 +00:00
|
|
|
|
2023-03-30 12:03:59 +00:00
|
|
|
project(QSkinny
|
2023-03-30 16:19:46 +00:00
|
|
|
LANGUAGES C CXX
|
2023-03-30 12:03:59 +00:00
|
|
|
HOMEPAGE_URL "https://github.com/uwerat/qskinny"
|
|
|
|
VERSION 999.99.9)
|
2022-09-28 21:49:30 +00:00
|
|
|
|
2023-03-30 12:03:59 +00:00
|
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
2022-09-28 21:49:30 +00:00
|
|
|
|
2023-03-30 12:03:59 +00:00
|
|
|
#set(CMAKE_FIND_DEBUG_MODE TRUE)
|
2022-11-04 13:19:30 +00:00
|
|
|
|
2022-12-20 14:23:59 +00:00
|
|
|
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
|
2023-03-30 12:03:59 +00:00
|
|
|
|
|
|
|
if ( QT_FOUND )
|
|
|
|
message(STATUS "Found Qt ${QT_VERSION} ${_qt_cmake_dir}")
|
|
|
|
|
|
|
|
if(QT_VERSION VERSION_LESS "5.15.0")
|
|
|
|
message(FATAL_ERROR "Couldn't find any Qt >= 5.15 !")
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "Couldn't find any Qt package !")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Note, that modules might be found in different places.
|
|
|
|
# f.e. when having Qt installations that have only been built
|
|
|
|
# with a subset of modules
|
|
|
|
|
|
|
|
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Gui OpenGL Quick )
|
|
|
|
find_package(Qt${QT_VERSION_MAJOR} OPTIONAL_COMPONENTS Svg)
|
|
|
|
|
|
|
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
|
|
|
|
|
|
|
include("QskBuild")
|
|
|
|
|
2022-11-03 15:48:04 +00:00
|
|
|
# optional package hunspell
|
2022-11-04 13:19:30 +00:00
|
|
|
if(NOT LINUX AND ENABLE_HUNSPELL)
|
2022-11-03 15:48:04 +00:00
|
|
|
message(WARNING "Feature 'hunspell' only available for UNIX!")
|
|
|
|
unset(ENABLE_HUNSPELL CACHE)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# optional package pinyin
|
2022-11-04 13:19:30 +00:00
|
|
|
if(NOT LINUX AND ENABLE_PINYIN)
|
2022-11-03 15:48:04 +00:00
|
|
|
message(WARNING "Feature 'pinyin' only available for UNIX!")
|
|
|
|
unset(ENABLE_PINYIN CACHE)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(ENABLE_HUNSPELL)
|
2023-03-30 12:03:59 +00:00
|
|
|
include("QSkinnyOptionalHunspell")
|
2022-11-03 15:48:04 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(ENABLE_PINYIN)
|
2023-03-30 12:03:59 +00:00
|
|
|
include("QSkinnyOptionalPinyin")
|
2022-11-03 15:48:04 +00:00
|
|
|
endif()
|
|
|
|
|
2022-09-28 21:49:30 +00:00
|
|
|
add_subdirectory(src)
|
|
|
|
add_subdirectory(skins)
|
2022-09-28 22:06:44 +00:00
|
|
|
add_subdirectory(inputcontext)
|
2022-09-28 21:49:30 +00:00
|
|
|
add_subdirectory(qmlexport)
|
|
|
|
add_subdirectory(tools)
|
|
|
|
add_subdirectory(support)
|
2023-03-30 12:03:59 +00:00
|
|
|
|
2022-10-31 10:20:32 +00:00
|
|
|
if(BUILD_EXAMPLES)
|
|
|
|
add_subdirectory(examples)
|
|
|
|
endif()
|
|
|
|
if(BUILD_PLAYGROUND)
|
|
|
|
add_subdirectory(playground)
|
|
|
|
endif()
|