Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 89dbf12e authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

Merge branch 'feature/installwrapping' into develop

parents 9fd8ce17 6db8e4ad
......@@ -8,6 +8,8 @@
src/dtk/dtkConfig.h
wrp/dtkCore
qml/*/qmldir
doc/html
......
......@@ -21,31 +21,38 @@ project(dtkConceptGenerator)
set(CMAKE_AUTOMOC ON)
set(${PROJECT_NAME}_HEADERS
dtkPluginGeneratorPage.h
dtkConceptDefinitionPage.h
dtkConceptGenerator.h
dtkNewConceptPage.h
dtkIntroPage.h
generator.h)
dtkPluginGeneratorPage.h
dtkConceptDefinitionPage.h
dtkConceptGenerator.h
dtkNewConceptPage.h
dtkIntroPage.h
generator.h)
set(${PROJECT_NAME}_SOURCES
dtkPluginGeneratorPage.cpp
dtkConceptDefinitionPage.cpp
dtkConceptGenerator.cpp
dtkNewConceptPage.cpp
dtkIntroPage.cpp
generator.cpp
main.cpp)
dtkPluginGeneratorPage.cpp
dtkConceptDefinitionPage.cpp
dtkConceptGenerator.cpp
dtkNewConceptPage.cpp
dtkIntroPage.cpp
generator.cpp
main.cpp)
set(${PROJECT_NAME}_UI
dtkPluginGeneratorPage.ui
dtkConceptDefinitionPage.ui
dtkNewConceptPage.ui
dtkIntroPage.ui)
dtkPluginGeneratorPage.ui
dtkConceptDefinitionPage.ui
dtkNewConceptPage.ui
dtkIntroPage.ui)
set(${PROJECT_NAME}_RESOURCES
templates.qrc)
set_property(SOURCE ui_dtkPluginGeneratorPage.h PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE ui_dtkConceptDefinitionPage.h PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE ui_dtkNewConceptPage.h PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE ui_dtkIntroPage.h PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE qrc_templates.cpp PROPERTY SKIP_AUTOMOC ON)
## #################################################################
## Build rules
## #################################################################
......
......@@ -10,11 +10,10 @@ project(dtkDistributedDashboard)
## Sources
## #################################################################
set(${PROJECT_NAME}_SOURCES
main.cpp)
set(${PROJECT_NAME}_SOURCES main.cpp)
set(${PROJECT_NAME}_RESOURCES dtkDashboard.qrc)
set(${PROJECT_NAME}_RESOURCES
dtkDashboard.qrc)
set_property(SOURCE qrc_dtkDashboard.cpp PROPERTY SKIP_AUTOMOC ON)
## #################################################################
## Build rules
......@@ -29,8 +28,7 @@ add_executable(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
dtkDistributed
dtkLog
dtkWidgets
)
dtkWidgets)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Network)
......
......@@ -42,15 +42,11 @@ set(CMAKE_MODULE_PATH
set_directory_properties(PROPERTIES TEST_INCLUDE_FILE "@CMAKE_BINARY_DIR@/dtkSetTestEnvironment.cmake")
find_package(Qt5 REQUIRED COMPONENTS Core Concurrent Network Quick Svg Test Widgets Xml NO_DEFAULT_PATH)
set(dtk_MODULE_PATH "@CMAKE_BINARY_DIR@")
set(dtk_INSTALL_DOCS @dtk_INSTALL_DOCS@)
set(dtk_CONFIG_DOCS @dtk_CONFIG_DOCS@)
set(dtk_WRAP_BASE "@CMAKE_BINARY_DIR@/dtk_base.i")
set(dtk_WRAP_CORE "@CMAKE_BINARY_DIR@/dtkCore.i")
set(dtk_WRAP_WIDGETS "@CMAKE_BINARY_DIR@/dtkWidgets.i")
set(dtk_WRAP_QVARIANT "@CMAKE_BINARY_DIR@/QVariant.i")
set(dtk_INSTALL_DOCS "@dtk_INSTALL_DOCS@")
set(dtk_CONFIG_DOCS "@dtk_CONFIG_DOCS@")
set(dtk_WRAP_PREFIX "@CMAKE_SOURCE_DIR@/wrp")
## ###################################################################
## Options
......
......@@ -35,20 +35,12 @@ set(DTK_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
set(dtk_INSTALL_DOCS "@CMAKE_INSTALL_PREFIX@/doc")
set(dtk_WRAP_PREFIX "@CMAKE_INSTALL_PREFIX@/wrp")
include("@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/cmake/dtk/dtkDepends.cmake")
include("@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/cmake/dtk/dtkWrap.cmake")
set_directory_properties(PROPERTIES TEST_INCLUDE_FILE "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/cmake/dtk/dtkSetTestEnvironment.cmake")
find_package(Qt5 REQUIRED COMPONENTS
Core
Concurrent
Network
Quick
Svg
Test
Widgets
Xml)
## ###################################################################
## Options
## ###################################################################
......
......@@ -102,8 +102,6 @@ if(SWIG_FOUND)
"-c++"
"-module" ${name}
${include_dirs}
"-I${PROJECT_SOURCE_DIR}/.."
"-I${PROJECT_SOURCE_DIR}/src"
"-outdir" ${CMAKE_CURRENT_BINARY_DIR}
"-o" ${wrap_output}
${input}
......
......@@ -11,16 +11,18 @@ project(dtkDistributedSlides)
## #################################################################
set(${PROJECT_NAME}_SOURCES
main.cpp)
main.cpp)
set(${PROJECT_NAME}_RESOURCES
dtkDistributedSlides.qrc)
set_property(SOURCE qrc_dtkDistributedSlides.cpp PROPERTY SKIP_AUTOMOC ON)
## #################################################################
## Build rules
## #################################################################
qt5_add_RESOURCES(${PROJECT_NAME}_SOURCES_QRC ${${PROJECT_NAME}_RESOURCES})
qt5_add_RESOURCES(${PROJECT_NAME}_SOURCES_QRC ${${PROJECT_NAME}_RESOURCES})
add_executable(${PROJECT_NAME}
${${PROJECT_NAME}_SOURCES_QRC}
......@@ -28,8 +30,7 @@ add_executable(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
dtkDistributed
dtkLog
)
dtkLog)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Network)
......
......@@ -263,6 +263,8 @@ set(${PROJECT_NAME}_SOURCES
set(${PROJECT_NAME}_RCC dtkComposer.qrc)
set_property(SOURCE qrc_dtkComposer.cpp PROPERTY SKIP_AUTOMOC ON)
## #################################################################
## Build rules
## #################################################################
......
......@@ -78,6 +78,17 @@ set(${PROJECT_NAME}_SOURCES
dtkCorePluginManagerRecorder.cpp
dtkObjectManager.cpp)
set_property(SOURCE sipdtkCorecmodule.cpp PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE sipdtkCoredtkCorePluginBase.cpp PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE sipdtkCoredtkArray1800.cpp PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE sipdtkCoredtkArray2400.cpp PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE sipdtkCoredtkArray3800.cpp PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE sipdtkCoredtkCoreLayerManager.cpp PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE sipdtkCoredtkCorePluginManagerBase.cpp PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE sipdtkCoredtkObjectManager.cpp PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE dtkCore_wrap_python.cpp PROPERTY SKIP_AUTOMOC ON)
## #################################################################
## Deps
## #################################################################
......@@ -116,15 +127,17 @@ if(DTK_BUILD_WRAPPERS)
endif(SIP_FOUND)
if(SWIG_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dtkCore.i ${CMAKE_BINARY_DIR}/dtkCore.i COPYONLY)
set(${PROJECT_NAME}_WRAP_DEPENDS ${${PROJECT_NAME}_WRAP_DEPENDS} ${CMAKE_BINARY_DIR}/dtkCore.i)
if (DTK_WRAPPING_PYTHON AND PYTHONLIBS_FOUND)
dtk_wrap(${PROJECT_NAME} ${PROJECT_NAME}_SOURCES_WRAP dtkcore python ${PROJECT_SOURCE_DIR}/dtkCore.i "${${PROJECT_NAME}_WRAP_DEPENDS}" ".")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dtkCore.i ${CMAKE_SOURCE_DIR}/wrp/dtkCore/dtkCore.i)
dtk_wrap(${PROJECT_NAME} ${PROJECT_NAME}_SOURCES_WRAP dtkcore python ${PROJECT_SOURCE_DIR}/dtkCore.i "${${PROJECT_NAME}_WRAP_DEPENDS}" "${CMAKE_SOURCE_DIR}/src;${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_SOURCE_DIR}/wrp/dtkBase;${CMAKE_SOURCE_DIR}/wrp/QtCore")
endif()
if (DTK_WRAPPING_TCL AND TCL_FOUND)
dtk_wrap(${PROJECT_NAME} ${PROJECT_NAME}_SOURCES_WRAP dtkcore tcl ${PROJECT_SOURCE_DIR}/dtkCore.i "${${PROJECT_NAME}_WRAP_DEPENDS}" ".")
dtk_wrap(${PROJECT_NAME} ${PROJECT_NAME}_SOURCES_WRAP dtkcore tcl ${PROJECT_SOURCE_DIR}/dtkCore.i "${${PROJECT_NAME}_WRAP_DEPENDS}" ".")
endif()
if (DTK_WRAPPING_CSHARP)
......@@ -279,8 +292,6 @@ install(FILES ${${PROJECT_NAME}_HEADERS}
DESTINATION include/${PROJECT_NAME}
COMPONENT core)
install(FILES ${${PROJECT_NAME}_MODULES} DESTINATION modules)
## ###################################################################
## Install rules - targets
## ###################################################################
......@@ -290,5 +301,12 @@ install(TARGETS ${PROJECT_NAME}
COMPONENT core
EXPORT dtkDepends)
## ###################################################################
## Install rules - modules
## ###################################################################
install(FILES ${${PROJECT_NAME}_MODULES} DESTINATION modules)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dtkCore.i DESTINATION wrp/dtkCore/)
######################################################################
### CMakeLists.txt ends here
......@@ -14,8 +14,8 @@
%module(directors="1") dtkcore
%include "../../wrp/dtkBase/dtk_base.i"
%include "../../wrp/QtCore/qrunnable.i"
%include <dtk_base.i>
%include <qrunnable.i>
%{
......
......@@ -34,6 +34,8 @@ set(${PROJECT_NAME}_SOURCES
dtkLogDestination.cpp
dtkLogModel.cpp)
set_property(SOURCE dtkLog_wrap_python.cpp PROPERTY SKIP_AUTOMOC ON)
## #################################################################
## Wrapping
## #################################################################
......@@ -48,7 +50,7 @@ if(DTK_BUILD_WRAPPERS AND SWIG_FOUND)
if (DTK_WRAPPING_PYTHON)
if (PYTHONLIBS_FOUND)
dtk_wrap(${PROJECT_NAME} ${PROJECT_NAME}_SOURCES_WRAP dtklog python ${PROJECT_SOURCE_DIR}/dtkLog.i "${${PROJECT_NAME}_WRAP_DEPENDS}" ".")
dtk_wrap(${PROJECT_NAME} ${PROJECT_NAME}_SOURCES_WRAP dtklog python ${PROJECT_SOURCE_DIR}/dtkLog.i "${${PROJECT_NAME}_WRAP_DEPENDS}" "${CMAKE_SOURCE_DIR}/src;${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_SOURCE_DIR}/wrp/dtkBase;${CMAKE_SOURCE_DIR}/wrp/QtCore")
endif()
endif()
......
......@@ -110,6 +110,18 @@ set(${PROJECT_NAME}_SOURCES_RCC
dtkNotification.qrc
dtkWidgetsTagCloud.qrc)
set_property(SOURCE qrc_dtkNotification.cpp PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE qrc_dtkWidgetsTagCloud.cpp PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE sipdtkWidgetscmodule.cpp PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE sipdtkWidgetsdtkViewController.cpp PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE sipdtkWidgetsdtkViewManager.cpp PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE sipdtkWidgetsdtkViewWidget.cpp PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE sipdtkWidgetsdtkViewLayout.cpp PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE sipdtkWidgetsdtkViewLayoutItem.cpp PROPERTY SKIP_AUTOMOC ON)
set_property(SOURCE dtkWidgets_wrap_python.cpp PROPERTY SKIP_AUTOMOC ON)
## #################################################################
## Wrapping
## #################################################################
......@@ -134,7 +146,7 @@ if(DTK_BUILD_WRAPPERS)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dtkWidgets.i ${CMAKE_BINARY_DIR}/dtkWidgets.i COPYONLY)
if (DTK_WRAPPING_PYTHON AND PYTHONLIBS_FOUND)
dtk_wrap(${PROJECT_NAME} ${PROJECT_NAME}_SOURCES_WRAP dtkwidgets python ${PROJECT_SOURCE_DIR}/dtkWidgets.i "${${PROJECT_NAME}_WRAP_DEPENDS}" ".")
dtk_wrap(${PROJECT_NAME} ${PROJECT_NAME}_SOURCES_WRAP dtkwidgets python ${PROJECT_SOURCE_DIR}/dtkWidgets.i "${${PROJECT_NAME}_WRAP_DEPENDS}" "${CMAKE_SOURCE_DIR}/src;${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_SOURCE_DIR}/wrp/dtkBase;${CMAKE_SOURCE_DIR}/wrp/dtkWidgets;${CMAKE_SOURCE_DIR}/wrp/QtCore;${CMAKE_SOURCE_DIR}/wrp/QtWidgets")
endif()
if (DTK_WRAPPING_TCL AND TCL_FOUND)
dtk_wrap(${PROJECT_NAME} ${PROJECT_NAME}_SOURCES_WRAP dtkwidgets tcl ${PROJECT_SOURCE_DIR}/dtkWidgets.i "${${PROJECT_NAME}_WRAP_DEPENDS}" ".")
......@@ -301,6 +313,9 @@ install(FILES ${${PROJECT_NAME}_HEADERS}
DESTINATION include/${PROJECT_NAME}
COMPONENT widgets)
install(FILES ${${PROJECT_NAME}_MODULES} DESTINATION modules)
install(FILES ${CMAKE_BINARY_DIR}/dtkWidgets.i DESTINATION wrp/dtkWidgets)
## ###################################################################
## Install rules - targets
## ###################################################################
......
/* dtkApplication.h ---
*
* Author: Nicolas Niclausse
* Copyright (C) 2015 - Nicolas Niclausse, Inria.
* Created: 2015/02/04 12:01:21
*/
// Version: $Id$
//
//
/* Commentary:
*
*/
// Commentary:
//
//
/* Change log:
*
*/
// Change Log:
//
//
// Code:
#pragma once
#include <dtkWidgetsExport.h>
#include <dtkLog>
#include <QApplication>
#include <QtCore>
#include <QtWidgets>
class dtkApplicationPrivate;
class DTKWIDGETS_EXPORT dtkApplication: public QApplication
{
public:
dtkApplication(int& argc, char **argv);
dtkApplication(int& argc, char **argv);
virtual ~dtkApplication(void);
public:
......@@ -36,10 +36,11 @@ public:
public:
static dtkApplication *create(int& argc, char *argv[]) {
for (int i = 0; i < argc; i++)
for (int i = 0; i < argc; i++) {
if (!qstrcmp(argv[i], "-nw") || !qstrcmp(argv[i], "--nw") || !qstrcmp(argv[i], "-no-window") || !qstrcmp(argv[i], "--no-window") || !qstrcmp(argv[i], "-h") || !qstrcmp(argv[i], "--help") || !qstrcmp(argv[i], "--version")) {
qputenv("QT_QPA_PLATFORM", QByteArrayLiteral("minimal"));
}
}
return new dtkApplication(argc, argv);
}
......@@ -52,3 +53,5 @@ protected:
dtkApplicationPrivate *d;
};
//
// dtkApplication.h ends here
......@@ -16,10 +16,10 @@
%module dtkwidgets
%include "../../wrp/dtkBase/dtk_base.i"
%include "dtk_base.i"
%include "../../wrp/QtCore/qt_core.i"
%include "../../wrp/QtWidgets/qt_widgets.i"
%include "qt_core.i"
%include "qt_widgets.i"
%{
......
......@@ -12,8 +12,10 @@
##
### Code:
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qt_core.i ${CMAKE_BINARY_DIR}/qt_core.i COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/QVariant.i ${CMAKE_BINARY_DIR}/QVariant.i COPYONLY)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/qt_core.i DESTINATION wrp/QtCore/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/qrunnable.i DESTINATION wrp/QtCore/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/QVariant.i DESTINATION wrp/QtCore/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/QObject.h DESTINATION wrp/QtCore/)
######################################################################
### CMakeLists.txt ends here
......@@ -12,7 +12,11 @@
##
### Code:
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qt_widgets.i ${CMAKE_BINARY_DIR}/qt_widgets.i COPYONLY)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/QBoxLayout.h DESTINATION wrp/QtWidgets/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/QVBoxLayout.h DESTINATION wrp/QtWidgets/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/QLayout.h DESTINATION wrp/QtWidgets/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/QWidget.h DESTINATION wrp/QtWidgets/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/qt_widgets.i DESTINATION wrp/QtWidgets/)
######################################################################
### CMakeLists.txt ends here
......@@ -14,7 +14,7 @@
%module qtwidgets
%include "../QtCore/qt_core.i"
%include "qt_core.i"
%{
......
......@@ -12,7 +12,7 @@
##
### Code:
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dtk_base.i ${CMAKE_BINARY_DIR}/dtk_base.i COPYONLY)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dtk_base.i DESTINATION wrp/dtkBase/)
######################################################################
### CMakeLists.txt ends here
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment