Commit 999a178a authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

fix dependencies: remove dtkMathSupport and dtkCoreSupport dep in composer, add cmake

messages when dependencies are not met. fixes #12 #13 #14
parent 9400b0c6
......@@ -25,7 +25,6 @@ set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTA
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
target_link_libraries(${PROJECT_NAME}
dtkCoreSupport
dtkComposer
dtkDistributed
dtkLog
......
......@@ -21,9 +21,6 @@
#include <dtkCore>
#include <dtkWidgets>
#include <dtkCoreSupport/dtkPluginManager.h>
#include <dtkCoreSupport/dtkAbstractProcessFactory.h>
#include <QtConcurrent>
int main(int argc, char **argv)
......@@ -134,6 +131,5 @@ int main(int argc, char **argv)
qApp->exec();
}
}
dtkPluginManager::instance()->uninitialize();
}
......@@ -14,6 +14,14 @@
project(dtkComposer)
if(DTK_BUILD_COMPOSER AND NOT DTK_BUILD_WIDGETS)
message(SEND_ERROR "You can't select \"DTK_BUILD_COMPOSER\" because it's dependencies (DTK_BUILD_WIDGETS) were not met")
endif()
if(DTK_BUILD_COMPOSER AND NOT DTK_BUILD_DISTRIBUTED)
message(SEND_ERROR "You can't select \"DTK_BUILD_COMPOSER\" because it's dependencies (DTK_BUILD_DISTRIBUTED) were not met")
endif()
## #################################################################
## Input
## #################################################################
......@@ -279,8 +287,7 @@ target_link_libraries(${PROJECT_NAME} dtkMeta)
target_link_libraries(${PROJECT_NAME} dtkWidgets)
target_link_libraries(${PROJECT_NAME} dtkDistributed)
target_link_libraries(${PROJECT_NAME} dtkMathSupport)
target_link_libraries(${PROJECT_NAME} dtkCoreSupport)
target_link_libraries(${PROJECT_NAME} dtkMath)
## #################################################################
## Export header file
......
......@@ -40,8 +40,8 @@
#include "dtkComposerNodeLeaf.h"
#include "dtkComposerNodeMetaData.h"
#include <dtkMathSupport/dtkGraph.h>
#include <dtkMathSupport/dtkGraphEdge.h>
#include <dtkMath/dtkGraph.h>
#include <dtkMath/dtkGraphEdge.h>
#include <dtkLog/dtkLogger.h>
......
......@@ -21,7 +21,7 @@
#include <QtCore>
#include <dtkMathSupport/dtkGraphEdge.h>
#include <dtkMath/dtkGraphEdge.h>
#include "dtkComposerGraphNode.h"
class dtkComposerGraphEdgePrivate;
......
......@@ -29,7 +29,7 @@
#endif
#include <dtkLog/dtkLogger.h>
#include <dtkMathSupport/dtkGraph.h>
#include <dtkMath/dtkGraph.h>
class dtkComposerGraphNodeBeginPrivate
{
......
......@@ -17,9 +17,6 @@
#include "dtkComposerViewLayoutItem.h"
#include "dtkComposerViewWidget.h"
#include <dtkCoreSupport/dtkAbstractView.h>
#include <dtkCoreSupport/dtkAbstractViewFactory.h>
#include <QtWidgets>
// /////////////////////////////////////////////////////////////////
......@@ -575,7 +572,7 @@ void dtkComposerViewLayoutItem::unsplit(void)
} else {
qDebug() << DTK_PRETTY_FUNCTION << "Unhandled case.";
qDebug() << Q_FUNC_INFO << "Unhandled case.";
}
......
......@@ -14,6 +14,18 @@
project(dtkComposerSupport)
if(DTK_BUILD_SUPPORT_COMPOSER AND NOT DTK_BUILD_SUPPORT_GUI)
message(SEND_ERROR "You can't select \"DTK_BUILD_SUPPORT_COMPOSER\" because it's dependencies (DTK_BUILD_SUPPORT_GUI) were not met")
endif()
if(DTK_BUILD_SUPPORT_COMPOSER AND NOT DTK_BUILD_SUPPORT_CONTAINER)
message(SEND_ERROR "You can't select \"DTK_BUILD_SUPPORT_COMPOSER\" because it's dependencies (DTK_BUILD_SUPPORT_CONTAINER) were not met")
endif()
if(DTK_BUILD_SUPPORT_COMPOSER AND NOT DTK_BUILD_WIDGETS)
message(SEND_ERROR "You can't select \"DTK_BUILD_SUPPORT_COMPOSER\" because it's dependencies (DTK_BUILD_WIDGETS) were not met")
endif()
## #################################################################
## Sources
## #################################################################
......@@ -401,7 +413,7 @@ add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_SOURCES_QRC})
target_link_libraries(${PROJECT_NAME}
dtkMathSupport
dtkMath
dtkContainerSupport
dtkCoreSupport
dtkGuiSupport
......
......@@ -23,7 +23,7 @@
#include <dtkLog>
#include <dtkMathSupport/dtkGraph.h>
#include <dtkMath/dtkGraph.h>
#include <dtkWidgets/dtkNotification.h>
#include <QtCore>
......
......@@ -48,8 +48,8 @@
#include <dtkLog>
#include <dtkMathSupport/dtkGraph.h>
#include <dtkMathSupport/dtkGraphEdge.h>
#include <dtkMath/dtkGraph.h>
#include <dtkMath/dtkGraphEdge.h>
// /////////////////////////////////////////////////////////////////
// dtkComposerGraphPrivate
......
......@@ -23,7 +23,7 @@
#include <QtCore>
#include <QtWidgets>
#include <dtkMathSupport/dtkGraphEdge.h>
#include <dtkMath/dtkGraphEdge.h>
#include "dtkComposerGraphNode.h"
class dtkComposerGraphEdgePrivate;
......
......@@ -31,7 +31,7 @@
#include <dtkLog>
#include <dtkMathSupport/dtkGraph.h>
#include <dtkMath/dtkGraph.h>
class dtkComposerGraphNodeBeginPrivate
{
......
......@@ -14,6 +14,10 @@
project(dtkContainerSupport)
if(DTK_BUILD_SUPPORT_CONTAINER AND NOT DTK_BUILD_SUPPORT_CORE)
message(SEND_ERROR "You can't select \"DTK_BUILD_SUPPORT_CONTAINER\" because it's dependencies (DTK_BUILD_SUPPORT_CORE) were not met")
endif()
## #################################################################
## Sources
## #################################################################
......
......@@ -14,6 +14,12 @@
project(dtkCoreSupport)
if(DTK_BUILD_SUPPORT_CORE AND NOT DTK_BUILD_SUPPORT_MATH)
message(SEND_ERROR "You can't select \"DTK_BUILD_SUPPORT_CORE\" because it's dependencies (DTK_BUILD_SUPPORT_MATH) were not met")
endif()
## #################################################################
## Sources
## #################################################################
......
......@@ -3,6 +3,10 @@
project(dtkGuiSupport)
if(DTK_BUILD_SUPPORT_GUI AND NOT DTK_BUILD_SUPPORT_CORE)
message(SEND_ERROR "You can't select \"DTK_BUILD_SUPPORT_GUI\" because it's dependencies (DTK_BUILD_SUPPORT_CORE) were not met")
endif()
## #################################################################
## Sources
## #################################################################
......
......@@ -20,6 +20,10 @@ project(dtkMath)
## #################################################################
set(${PROJECT_NAME}_HEADERS
dtkGraph
dtkGraph.h
dtkGraphEdge
dtkGraphEdge.h
dtkMath
dtkMath.h
dtkMathArray.h
......@@ -30,6 +34,8 @@ set(${PROJECT_NAME}_HEADERS
dtkMatrix.tpp)
set(${PROJECT_NAME}_SOURCES
dtkGraph.cpp
dtkGraphEdge.cpp
dtkMath.cpp
dtkMathArray.cpp
dtkMatrix.cpp)
......
......@@ -15,14 +15,14 @@
#pragma once
#include "dtkMathSupportExport.h"
#include "dtkMathExport.h"
#include <QtCore>
class dtkGraphEdge;
class dtkGraphPrivate;
class DTKMATHSUPPORT_EXPORT dtkGraph : public QObject
class DTKMATH_EXPORT dtkGraph : public QObject
{
Q_OBJECT
......
......@@ -15,14 +15,14 @@
#pragma once
#include "dtkMathSupportExport.h"
#include "dtkMathExport.h"
#include <QtCore>
class dtkGraph;
class dtkGraphEdgePrivate;
class DTKMATHSUPPORT_EXPORT dtkGraphEdge
class DTKMATH_EXPORT dtkGraphEdge
{
public:
dtkGraphEdge(void);
......
......@@ -7,8 +7,6 @@ project(dtkMathSupport)
## #################################################################
set(${PROJECT_NAME}_HEADERS
dtkGraph.h
dtkGraphEdge.h
dtkMath.h
dtkMath.tpp
dtkMatrix.h
......@@ -23,8 +21,6 @@ set(${PROJECT_NAME}_HEADERS
dtkVector3D.tpp)
set(${PROJECT_NAME}_SOURCES
dtkGraph.cpp
dtkGraphEdge.cpp
dtkMath.cpp
dtkMatrix.cpp)
......
......@@ -15,6 +15,18 @@
project(dtkPlotSupport)
## #################################################################
## Dependencies
## #################################################################
if(DTK_BUILD_SUPPORT_PLOT AND NOT DTK_BUILD_SUPPORT_GUI)
message(SEND_ERROR "You can't select \"DTK_BUILD_SUPPORT_PLOT\" because it's dependencies (DTK_BUILD_SUPPORT_GUI) were not met")
endif()
if(DTK_BUILD_SUPPORT_PLOT AND NOT DTK_BUILD_WIDGETS)
message(SEND_ERROR "You can't select \"DTK_BUILD_SUPPORT_PLOT\" because it's dependencies (DTK_BUILD_WIDGETS) were not met")
endif()
find_package(Qwt 6 REQUIRED)
if(QWT_FOUND)
......
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