Moved the Nel 3d widget into it's own library.

--HG--
branch : gsoc2014-dfighter
This commit is contained in:
dfighter1985 2014-06-15 22:22:01 +02:00
parent dde63ceb31
commit b4eac44a9d
6 changed files with 46 additions and 3 deletions

View file

@ -1,4 +1,5 @@
ADD_SUBDIRECTORY(3rdparty) ADD_SUBDIRECTORY(3rdparty)
ADD_SUBDIRECTORY(Nel3DWidget)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${LIBXML2_INCLUDE_DIR} ${NEL_INCLUDE_DIR} ${QT_INCLUDES}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${LIBXML2_INCLUDE_DIR} ${NEL_INCLUDE_DIR} ${QT_INCLUDES})
INCLUDE( ${QT_USE_FILE} ) INCLUDE( ${QT_USE_FILE} )

View file

@ -0,0 +1,36 @@
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${QT_INCLUDES}
)
INCLUDE( ${QT_USE_FILE} )
FILE(GLOB SRC *.cpp *.h)
SET(NEL3DWIDGET_HDR
nel3d_widget.h
)
SET(QT_USE_QTGUI TRUE)
QT4_WRAP_CPP( NEL3DWIDGET_MOC_SRC ${NEL3DWIDGET_HDR} )
SOURCE_GROUP(QtGeneratedMocSrc FILES ${NEL3DWIDGET_MOC_SRC} )
SOURCE_GROUP("Nel 3D Widget files" FILES ${SRC})
ADD_LIBRARY(nel3dwidget SHARED
${SRC}
${NEL3DWIDGET_MOC_SRC}
)
TARGET_LINK_LIBRARIES( nel3dwidget
nelmisc
nel3d
${QT_LIBRARIES}
)
NL_DEFAULT_PROPS(nel3dwidget "Nel3D Qt Widget")
NL_ADD_RUNTIME_FLAGS(nel3dwidget)
NL_ADD_LIB_SUFFIX(nel3dwidget)
ADD_DEFINITIONS( -DN3DW_LIB -DQT_DLL -DQT_SHARED ${QT_DEFINITIONS} )

View file

@ -22,6 +22,12 @@
#include "nel/misc/types_nl.h" #include "nel/misc/types_nl.h"
#include <string> #include <string>
#if defined( N3DW_LIB )
#define N3DW_EXPORT Q_DECL_EXPORT
#else
#define N3DW_EXPORT Q_DECL_IMPORT
#endif
namespace NL3D namespace NL3D
{ {
class UDriver; class UDriver;
@ -29,7 +35,7 @@ namespace NL3D
} }
/// Nel 3D interface to Qt /// Nel 3D interface to Qt
class Nel3DWidget : public QWidget class N3DW_EXPORT Nel3DWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:

View file

@ -24,7 +24,6 @@ SET(OVQT_PLUGIN_GUI_EDITOR_HDR
action_editor.h action_editor.h
property_browser_ctrl.h property_browser_ctrl.h
project_window.h project_window.h
nel3d_widget.h
nelgui_ctrl.h nelgui_ctrl.h
new_property_widget.h new_property_widget.h
new_widget_widget.h new_widget_widget.h
@ -78,6 +77,7 @@ TARGET_LINK_LIBRARIES(
${QT_QTOPENGL_LIBRARY} ${QT_QTOPENGL_LIBRARY}
${LIBXML2_LIBRARIES} ${LIBXML2_LIBRARIES}
qt_property_browser qt_property_browser
nel3dwidget
) )
NL_DEFAULT_PROPS(studio_plugin_gui_editor "Tools: Studio Plugin: GUI Editor") NL_DEFAULT_PROPS(studio_plugin_gui_editor "Tools: Studio Plugin: GUI Editor")

View file

@ -30,7 +30,7 @@
#include <QTimerEvent> #include <QTimerEvent>
#include "editor_selection_watcher.h" #include "editor_selection_watcher.h"
#include "nel3d_widget.h" #include "../../Nel3DWidget/nel3d_widget.h"
namespace GUIEditor namespace GUIEditor
{ {