From 320a9dd33a06c29deae680a6764738a700acc88a Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Mon, 16 Jun 2014 15:30:35 +0200 Subject: [PATCH] Had to move the Nel3DWidget library to the core plugin, because Nel can only be used statically at this point. Which makes using the separate Nel3DWidget library inparctical. --- code/studio/src/CMakeLists.txt | 1 - code/studio/src/Nel3DWidget/CMakeLists.txt | 36 ------------------- code/studio/src/plugins/core/CMakeLists.txt | 8 ++++- .../core}/Nel3DWidget/nel3d_widget.cpp | 0 .../core}/Nel3DWidget/nel3d_widget.h | 8 ++--- .../src/plugins/gui_editor/CMakeLists.txt | 1 - .../src/plugins/gui_editor/nelgui_ctrl.cpp | 2 +- 7 files changed, 10 insertions(+), 46 deletions(-) delete mode 100644 code/studio/src/Nel3DWidget/CMakeLists.txt rename code/studio/src/{ => plugins/core}/Nel3DWidget/nel3d_widget.cpp (100%) rename code/studio/src/{ => plugins/core}/Nel3DWidget/nel3d_widget.h (92%) diff --git a/code/studio/src/CMakeLists.txt b/code/studio/src/CMakeLists.txt index 8670f516f..9bc071bf2 100644 --- a/code/studio/src/CMakeLists.txt +++ b/code/studio/src/CMakeLists.txt @@ -1,5 +1,4 @@ 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( ${QT_USE_FILE} ) diff --git a/code/studio/src/Nel3DWidget/CMakeLists.txt b/code/studio/src/Nel3DWidget/CMakeLists.txt deleted file mode 100644 index 55b4b2a80..000000000 --- a/code/studio/src/Nel3DWidget/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -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} ) diff --git a/code/studio/src/plugins/core/CMakeLists.txt b/code/studio/src/plugins/core/CMakeLists.txt index 964f95b11..2c21c9b58 100644 --- a/code/studio/src/plugins/core/CMakeLists.txt +++ b/code/studio/src/plugins/core/CMakeLists.txt @@ -4,6 +4,11 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${QT_INCLUDES}) FILE(GLOB SRC *.cpp *.h) +SET( SRC ${SRC} + ${CMAKE_CURRENT_SOURCE_DIR}/Nel3DWidget/nel3d_widget.h + ${CMAKE_CURRENT_SOURCE_DIR}/Nel3DWidget/nel3d_widget.cpp + ) + SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.h ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_manager.h ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h) @@ -22,6 +27,7 @@ SET(OVQT_CORE_PLUGIN_HDR search_paths_settings_page.h general_settings_page.h plugin_view_dialog.h + ${CMAKE_CURRENT_SOURCE_DIR}/Nel3DWidget/nel3d_widget.h ) SET(OVQT_CORE_PLUGIN_UIS settings_dialog.ui @@ -47,7 +53,7 @@ SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC}) ADD_LIBRARY(studio_plugin_core SHARED ${SRC} ${OVQT_CORE_PLUGIN_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_CORE_PLUGIN_RC_SRCS} ${OVQT_CORE_PLUGIN_UI_HDRS}) -TARGET_LINK_LIBRARIES(studio_plugin_core nelmisc ${QT_LIBRARIES}) +TARGET_LINK_LIBRARIES(studio_plugin_core nelmisc nel3d ${QT_LIBRARIES}) NL_DEFAULT_PROPS(studio_plugin_core "Tools: Studio Plugin: Core") NL_ADD_RUNTIME_FLAGS(studio_plugin_core) diff --git a/code/studio/src/Nel3DWidget/nel3d_widget.cpp b/code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp similarity index 100% rename from code/studio/src/Nel3DWidget/nel3d_widget.cpp rename to code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.cpp diff --git a/code/studio/src/Nel3DWidget/nel3d_widget.h b/code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h similarity index 92% rename from code/studio/src/Nel3DWidget/nel3d_widget.h rename to code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h index d3e6c3ae1..9cbf474bc 100644 --- a/code/studio/src/Nel3DWidget/nel3d_widget.h +++ b/code/studio/src/plugins/core/Nel3DWidget/nel3d_widget.h @@ -22,11 +22,7 @@ #include "nel/misc/types_nl.h" #include -#if defined( N3DW_LIB ) -#define N3DW_EXPORT Q_DECL_EXPORT -#else -#define N3DW_EXPORT Q_DECL_IMPORT -#endif +#include "../core_global.h" namespace NL3D { @@ -35,7 +31,7 @@ namespace NL3D } /// Nel 3D interface to Qt -class N3DW_EXPORT Nel3DWidget : public QWidget +class CORE_EXPORT Nel3DWidget : public QWidget { Q_OBJECT public: diff --git a/code/studio/src/plugins/gui_editor/CMakeLists.txt b/code/studio/src/plugins/gui_editor/CMakeLists.txt index 5adf618d0..0c13c4cd6 100644 --- a/code/studio/src/plugins/gui_editor/CMakeLists.txt +++ b/code/studio/src/plugins/gui_editor/CMakeLists.txt @@ -77,7 +77,6 @@ TARGET_LINK_LIBRARIES( ${QT_QTOPENGL_LIBRARY} ${LIBXML2_LIBRARIES} qt_property_browser - nel3dwidget ) NL_DEFAULT_PROPS(studio_plugin_gui_editor "Tools: Studio Plugin: GUI Editor") diff --git a/code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp b/code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp index b2cf67ea2..03f784944 100644 --- a/code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp +++ b/code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp @@ -30,7 +30,7 @@ #include #include "editor_selection_watcher.h" -#include "../../Nel3DWidget/nel3d_widget.h" +#include "../core/Nel3DWidget/nel3d_widget.h" namespace GUIEditor {