more build options ( completely untested for the moment )
This commit is contained in:
parent
3fd951ab1c
commit
bf4ab34ad8
|
@ -5,17 +5,34 @@ project(QSkinny
|
||||||
HOMEPAGE_URL "https://github.com/uwerat/qskinny"
|
HOMEPAGE_URL "https://github.com/uwerat/qskinny"
|
||||||
VERSION 999.99.9)
|
VERSION 999.99.9)
|
||||||
|
|
||||||
option(BUILD_QSKDLL
|
# Useful unsupported scenarios:
|
||||||
"Build qskinny as shared library" ON)
|
# - 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)
|
||||||
|
|
||||||
option(BUILD_TOOLS "Build qskinny tools" ON)
|
option(BUILD_TOOLS "Build qskinny tools" ON)
|
||||||
|
option(BUILD_INPUTCONTEXT "Build virtual keyboard support" ON)
|
||||||
option(BUILD_EXAMPLES "Build qskinny examples" ON)
|
option(BUILD_EXAMPLES "Build qskinny examples" ON)
|
||||||
option(BUILD_PLAYGROUND "Build qskinny playground" ON)
|
option(BUILD_PLAYGROUND "Build qskinny playground" ON)
|
||||||
option(BUILD_SVG2QVG_STANDALONE "Build svg2qvg without qskinny library dependency" ON)
|
|
||||||
|
|
||||||
option(ENABLE_PINYIN "UNIX: Enable romanization system for standard mandarin chinese" OFF)
|
# we actually want to use cmake_dependent_option - minimum cmake version ??
|
||||||
option(ENABLE_HUNSPELL "UNIX: Enable spell checker" OFF)
|
|
||||||
|
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()
|
||||||
|
|
||||||
option(ENABLE_ENSURE_SKINS "Examples will load skins manually, when not finding plugins" ON)
|
option(ENABLE_ENSURE_SKINS "Examples will load skins manually, when not finding plugins" ON)
|
||||||
|
if ( NOT ( BUILD_EXAMPLES OR BUILD_PLAYGROUND ) )
|
||||||
|
set( ENABLE_ENSURE_SKINS OFF )
|
||||||
|
endif()
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
|
@ -28,14 +45,20 @@ include("QskBuild")
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
add_subdirectory(skins)
|
add_subdirectory(skins)
|
||||||
add_subdirectory(inputcontext)
|
|
||||||
add_subdirectory(qmlexport)
|
if(BUILD_QML_EXPORT)
|
||||||
|
add_subdirectory(qmlexport)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(BUILD_INPUTCONTEXT)
|
||||||
|
add_subdirectory(inputcontext)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(BUILD_EXAMPLES OR BUILD_EXAMPLES)
|
if(BUILD_EXAMPLES OR BUILD_EXAMPLES)
|
||||||
add_subdirectory(support)
|
add_subdirectory(support)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_TOLLS)
|
if(BUILD_TOOLS)
|
||||||
add_subdirectory(tools)
|
add_subdirectory(tools)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -73,8 +73,13 @@ function(qsk_example EXAMPLE_NAME)
|
||||||
# not all examples need this one. TODO ...
|
# not all examples need this one. TODO ...
|
||||||
target_link_libraries(${TARGET_NAME} PRIVATE qsktestsupport)
|
target_link_libraries(${TARGET_NAME} PRIVATE qsktestsupport)
|
||||||
|
|
||||||
# only needed, when having QML files, autodetection might be possible
|
if( BUILD_QML_EXPORT )
|
||||||
target_link_libraries(${TARGET_NAME} PRIVATE qskqmlexport)
|
# Only needed, when having QML files. Autodetections is possible
|
||||||
|
# by looking into all '*.qrc' files ( rcc --list *.qrc ) for *.qml
|
||||||
|
# entries TODO ...
|
||||||
|
|
||||||
|
target_link_libraries(${TARGET_NAME} PRIVATE qskqmlexport)
|
||||||
|
endif()
|
||||||
|
|
||||||
# for examples with subdirectories
|
# for examples with subdirectories
|
||||||
target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR})
|
target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR})
|
||||||
|
|
|
@ -16,7 +16,7 @@ set(CMAKE_C_VISIBILITY_PRESET hidden)
|
||||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
||||||
|
|
||||||
ADD_DEFINITIONS(-DQT_NO_KEYWORDS)
|
add_compile_definitions(QT_NO_KEYWORDS)
|
||||||
|
|
||||||
if ("pedantic" IN_LIST CONFIG)
|
if ("pedantic" IN_LIST CONFIG)
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#c++
|
|
||||||
add_subdirectory(desktop)
|
add_subdirectory(desktop)
|
||||||
add_subdirectory(gallery)
|
add_subdirectory(gallery)
|
||||||
add_subdirectory(layouts)
|
add_subdirectory(layouts)
|
||||||
|
@ -10,9 +9,10 @@ add_subdirectory(thumbnails)
|
||||||
add_subdirectory(tabview)
|
add_subdirectory(tabview)
|
||||||
add_subdirectory(iotdashboard)
|
add_subdirectory(iotdashboard)
|
||||||
|
|
||||||
#qml
|
if( BUILD_QML_EXPORT )
|
||||||
add_subdirectory(boxes)
|
add_subdirectory(boxes)
|
||||||
add_subdirectory(buttons)
|
add_subdirectory(buttons)
|
||||||
add_subdirectory(frames)
|
add_subdirectory(frames)
|
||||||
add_subdirectory(glabels)
|
add_subdirectory(glabels)
|
||||||
add_subdirectory(messageboxQml)
|
add_subdirectory(messageboxQml)
|
||||||
|
endif()
|
||||||
|
|
|
@ -3,11 +3,17 @@ add_subdirectory(dials)
|
||||||
add_subdirectory(dialogbuttons)
|
add_subdirectory(dialogbuttons)
|
||||||
add_subdirectory(gradients)
|
add_subdirectory(gradients)
|
||||||
add_subdirectory(invoker)
|
add_subdirectory(invoker)
|
||||||
add_subdirectory(inputpanel)
|
|
||||||
add_subdirectory(images)
|
|
||||||
add_subdirectory(shadows)
|
add_subdirectory(shadows)
|
||||||
add_subdirectory(shapes)
|
add_subdirectory(shapes)
|
||||||
|
|
||||||
|
if (BUILD_INPUTCONTEXT)
|
||||||
|
add_subdirectory(inputpanel)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (BUILD_QML_EXPORT)
|
||||||
|
add_subdirectory(images)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (QT_VERSION_MAJOR VERSION_LESS 6)
|
if (QT_VERSION_MAJOR VERSION_LESS 6)
|
||||||
if(TARGET Qt::WebEngine)
|
if(TARGET Qt::WebEngine)
|
||||||
add_subdirectory(webview)
|
add_subdirectory(webview)
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
list(APPEND RESOURCES shapes.qrc)
|
|
||||||
|
|
||||||
list(APPEND HEADERS
|
list(APPEND HEADERS
|
||||||
ShapeItem.h
|
ShapeItem.h
|
||||||
GeometricShape.h
|
GeometricShape.h
|
||||||
|
@ -13,4 +11,12 @@ list(APPEND SOURCES
|
||||||
Window.cpp
|
Window.cpp
|
||||||
main.cpp)
|
main.cpp)
|
||||||
|
|
||||||
|
if( BUILD_QML_EXPORT )
|
||||||
|
list(APPEND RESOURCES shapes.qrc)
|
||||||
|
endif()
|
||||||
|
|
||||||
qsk_example(shapes)
|
qsk_example(shapes)
|
||||||
|
|
||||||
|
if( BUILD_QML_EXPORT )
|
||||||
|
target_compile_definitions(shapes PRIVATE NO_QML)
|
||||||
|
endif()
|
||||||
|
|
|
@ -7,12 +7,14 @@
|
||||||
#include "GeometricShape.h"
|
#include "GeometricShape.h"
|
||||||
#include "Stroke.h"
|
#include "Stroke.h"
|
||||||
|
|
||||||
#include <QskQml.h>
|
|
||||||
#include <QskObjectCounter.h>
|
#include <QskObjectCounter.h>
|
||||||
|
|
||||||
#include <SkinnyShortcut.h>
|
#include <SkinnyShortcut.h>
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
|
|
||||||
|
#ifndef NO_QML
|
||||||
|
|
||||||
|
#include <QskQml.h>
|
||||||
#include <QQmlApplicationEngine>
|
#include <QQmlApplicationEngine>
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
|
@ -44,6 +46,8 @@ static bool doQml( int argc, char* argv[] )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
int main( int argc, char* argv[] )
|
int main( int argc, char* argv[] )
|
||||||
{
|
{
|
||||||
#ifdef ITEM_STATISTICS
|
#ifdef ITEM_STATISTICS
|
||||||
|
@ -53,6 +57,7 @@ int main( int argc, char* argv[] )
|
||||||
QGuiApplication app( argc, argv );
|
QGuiApplication app( argc, argv );
|
||||||
SkinnyShortcut::enable( SkinnyShortcut::AllShortcuts );
|
SkinnyShortcut::enable( SkinnyShortcut::AllShortcuts );
|
||||||
|
|
||||||
|
#ifndef NO_QML
|
||||||
if ( doQml( argc, argv ) )
|
if ( doQml( argc, argv ) )
|
||||||
{
|
{
|
||||||
qDebug() << "Running QML";
|
qDebug() << "Running QML";
|
||||||
|
@ -66,7 +71,7 @@ int main( int argc, char* argv[] )
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
else
|
#endif
|
||||||
{
|
{
|
||||||
qDebug() << "Running C++";
|
qDebug() << "Running C++";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue