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-31 16:12:38 +00:00
|
|
|
# Useful unsupported scenarios:
|
|
|
|
# - When cross compiling we might want to build the tools only
|
|
|
|
# - Suppressing
|
|
|
|
|
|
|
|
option(BUILD_QSKDLL "Build libs ( not plugins ) as shared library" ON)
|
|
|
|
option(BUILD_QML_EXPORT "Exporting QSkinny to QML" ON)
|
2022-11-04 13:19:30 +00:00
|
|
|
|
2023-03-31 15:10:06 +00:00
|
|
|
option(BUILD_TOOLS "Build qskinny tools" ON)
|
2023-03-31 16:12:38 +00:00
|
|
|
option(BUILD_INPUTCONTEXT "Build virtual keyboard support" ON)
|
2023-03-31 15:10:06 +00:00
|
|
|
option(BUILD_EXAMPLES "Build qskinny examples" ON)
|
|
|
|
option(BUILD_PLAYGROUND "Build qskinny playground" ON)
|
2023-03-30 12:03:59 +00:00
|
|
|
|
2023-03-31 16:12:38 +00:00
|
|
|
# we actually want to use cmake_dependent_option - minimum cmake version ??
|
|
|
|
|
|
|
|
option( BUILD_SVG2QVG_STANDALONE "Build svg2qvg without qskinny library dependency" ON )
|
|
|
|
if( NOT BUILD_TOOLS )
|
|
|
|
set( BUILD_SVG2QVG_STANDALONE OFF )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if( NOT BUILD_INPUTCONTEXT )
|
|
|
|
set( ENABLE_PINYIN OFF )
|
|
|
|
set( ENABLE_HUNSPELL OFF )
|
|
|
|
endif()
|
|
|
|
|
2023-03-31 15:10:06 +00:00
|
|
|
option(ENABLE_ENSURE_SKINS "Examples will load skins manually, when not finding plugins" ON)
|
2023-03-31 16:12:38 +00:00
|
|
|
if ( NOT ( BUILD_EXAMPLES OR BUILD_PLAYGROUND ) )
|
|
|
|
set( ENABLE_ENSURE_SKINS OFF )
|
|
|
|
endif()
|
2023-03-30 12:03:59 +00:00
|
|
|
|
2023-03-31 15:10:06 +00:00
|
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
2023-03-30 12:03:59 +00:00
|
|
|
|
2023-03-31 15:10:06 +00:00
|
|
|
#set(CMAKE_FIND_DEBUG_MODE TRUE)
|
2023-03-30 12:03:59 +00:00
|
|
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
|
|
|
|
2023-03-31 15:10:06 +00:00
|
|
|
include("QskFindQt")
|
|
|
|
include("QskAutogen")
|
2023-03-30 12:03:59 +00:00
|
|
|
include("QskBuild")
|
|
|
|
|
2022-09-28 21:49:30 +00:00
|
|
|
add_subdirectory(src)
|
|
|
|
add_subdirectory(skins)
|
2023-03-31 16:12:38 +00:00
|
|
|
|
|
|
|
if(BUILD_QML_EXPORT)
|
|
|
|
add_subdirectory(qmlexport)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(BUILD_INPUTCONTEXT)
|
|
|
|
add_subdirectory(inputcontext)
|
|
|
|
endif()
|
2023-03-31 15:10:06 +00:00
|
|
|
|
|
|
|
if(BUILD_EXAMPLES OR BUILD_EXAMPLES)
|
|
|
|
add_subdirectory(support)
|
|
|
|
endif()
|
|
|
|
|
2023-03-31 16:12:38 +00:00
|
|
|
if(BUILD_TOOLS)
|
2023-03-31 15:10:06 +00:00
|
|
|
add_subdirectory(tools)
|
|
|
|
endif()
|
2023-03-30 12:03:59 +00:00
|
|
|
|
2022-10-31 10:20:32 +00:00
|
|
|
if(BUILD_EXAMPLES)
|
|
|
|
add_subdirectory(examples)
|
|
|
|
endif()
|
2023-03-31 15:10:06 +00:00
|
|
|
|
2022-10-31 10:20:32 +00:00
|
|
|
if(BUILD_PLAYGROUND)
|
|
|
|
add_subdirectory(playground)
|
|
|
|
endif()
|