Commit 9618d4ee authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas
Browse files

several cmake fixes for dtkWidgets + mv dtkDistributedSlave app to dtkDistributedGuiApplication

parent 5b884cfc
......@@ -387,6 +387,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/dtkMath)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/dtkMeta)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/dtkScript)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/dtkTest)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/dtkWidgets)
## ###################################################################
## Input
......
......@@ -29,6 +29,7 @@ target_link_libraries(${PROJECT_NAME}
dtkCore
dtkDistributed
dtkLog
dtkWidgets
)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
......
......@@ -18,6 +18,7 @@
#include <dtkDistributed>
#include <dtkLog>
#include <dtkWidgets/dtkDistributedGuiApplication.h>
#include <QtCore>
......@@ -58,7 +59,7 @@ public:
int main(int argc, char **argv)
{
dtkDistributedApplication *app = dtkDistributed::create(argc, argv);
dtkDistributedGuiApplication *app = dtkDistributedGuiApplication::create(argc, argv);
app->setApplicationName("dtkDistributedSlave");
app->setApplicationVersion("1.0.0");
app->setOrganizationName("inria");
......
......@@ -31,7 +31,6 @@ set(dtk_INCLUDE_DIRS
"@CMAKE_CURRENT_SOURCE_DIR@/src/dtkMath"
"@CMAKE_CURRENT_SOURCE_DIR@/src/dtkMeta"
"@CMAKE_CURRENT_SOURCE_DIR@/src/dtkTest"
"@CMAKE_CURRENT_SOURCE_DIR@/src/dtkWidgets"
"@CMAKE_CURRENT_BINARY_DIR@")
include("@CMAKE_BINARY_DIR@/dtkDepends.cmake")
......@@ -80,5 +79,10 @@ if(DTK_BUILD_COMPOSER)
"@CMAKE_CURRENT_SOURCE_DIR@/src/dtkComposer")
endif(DTK_BUILD_COMPOSER)
if(DTK_BUILD_WIDGETS)
set(dtk_INCLUDE_DIRS ${dtk_INCLUDE_DIRS}
"@CMAKE_CURRENT_SOURCE_DIR@/src/dtkWidgets")
endif(DTK_BUILD_WIDGETS)
######################################################################
### dtkConfig.cmake.in ends here
......@@ -81,6 +81,11 @@ if(DTK_BUILD_COMPOSER)
"@CMAKE_INSTALL_PREFIX@/include/dtkComposer")
endif(DTK_BUILD_COMPOSER)
if(DTK_BUILD_WIDGETS)
set(dtk_INCLUDE_DIRS ${dtk_INCLUDE_DIRS}
"@CMAKE_INSTALL_PREFIX@/include/dtkWidgets")
endif(DTK_BUILD_WIDGETS)
## ###################################################################
## Always full RPATH
## ###################################################################
......
......@@ -29,6 +29,7 @@ static const QString DTK_INSTALL_PREFIX = "@CMAKE_INSTALL_PREFIX@";
#cmakedefine DTK_BUILD_DISTRIBUTED
#cmakedefine DTK_BUILD_SCRIPT
#cmakedefine DTK_BUILD_WRAPPERS
#cmakedefine DTK_BUILD_WIDGETS
#cmakedefine DTK_BUILD_SUPPORT_CORE
#cmakedefine DTK_BUILD_SUPPORT_COMPOSER
......
......@@ -30,6 +30,7 @@ set(${PROJECT_NAME}_HEADERS
dtkPropertyEditor.h
dtkPropertyEditorFactory.h
dtkToolBox.h
dtkWidgets
dtkWidgetsLogView.h
dtkWidgetsLogView_p.h
dtkWidgetsPlugin.h
......@@ -87,6 +88,7 @@ add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_HEADERS})
target_link_libraries(${PROJECT_NAME}
dtkCore
dtkLog
dtkDistributed)
......
......@@ -35,6 +35,16 @@ public:
virtual void spawn(QMap<QString, QString> options = QMap<QString, QString>() );
virtual void unspawn(void);
public:
static dtkDistributedGuiApplication *create(int &argc, char *argv[])
{
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 dtkDistributedGuiApplication(argc, argv);
}
public:
bool isMaster(void);
dtkDistributedCommunicator *communicator(void);
......
#include "dtkApplication.h"
#include "dtkDistributedGuiApplication.h"
#include "dtkCoreWidgetFactory.h"
#include "dtkToolBox.h.h"
#include "dtkToolBox.h"
#include "dtkWidgetsPlugin.h"
#include "dtkWidgetsTag.h"
#include "dtkWidgetsTagCloud.h"
......
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