From 862b2b8cb98422c5fd67912ba863f8910a25f725 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Thu, 10 May 2012 22:17:04 +0200 Subject: [PATCH] Created NELGUI library, moved the GUI event descriptors there. --- code/CMakeModules/nel.cmake | 1 + code/nel/include/nel/CMakeLists.txt | 4 ++++ code/nel/include/nel/gui/CMakeLists.txt | 3 +++ .../include/nel/gui}/event_descriptor.h | 0 code/nel/src/CMakeLists.txt | 4 ++++ code/nel/src/gui/CMakeLists.txt | 14 ++++++++++++++ .../src/gui}/event_descriptor.cpp | 5 ++--- code/ryzom/client/src/CMakeLists.txt | 1 + code/ryzom/client/src/interface_v3/ctrl_base.h | 2 +- .../src/interface_v3/input_handler_manager.h | 2 +- code/ryzom/client/src/r2/editor.cpp | 2 +- code/ryzom/client/src/r2/tool.cpp | 2 +- 12 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 code/nel/include/nel/gui/CMakeLists.txt rename code/{ryzom/client/src/interface_v3 => nel/include/nel/gui}/event_descriptor.h (100%) create mode 100644 code/nel/src/gui/CMakeLists.txt rename code/{ryzom/client/src/interface_v3 => nel/src/gui}/event_descriptor.cpp (92%) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index e6bf57101..f54fae8d1 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -274,6 +274,7 @@ MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS) ### OPTION(WITH_NET "Build NLNET" ON ) OPTION(WITH_3D "Build NL3D" ON ) + OPTION(WITH_GUI "Build GUI" ON ) OPTION(WITH_PACS "Build NLPACS" ON ) OPTION(WITH_GEORGES "Build NLGEORGES" ON ) OPTION(WITH_LIGO "Build NLLIGO" ON ) diff --git a/code/nel/include/nel/CMakeLists.txt b/code/nel/include/nel/CMakeLists.txt index 9e2d5586c..5f2bca43c 100644 --- a/code/nel/include/nel/CMakeLists.txt +++ b/code/nel/include/nel/CMakeLists.txt @@ -4,6 +4,10 @@ IF(WITH_3D) SUBDIRS(3d) ENDIF(WITH_3D) +IF(WITH_GUI) + ADD_SUBDIRECTORY(gui) +ENDIF(WITH_GUI) + IF(WITH_GEORGES) SUBDIRS(georges) ENDIF(WITH_GEORGES) diff --git a/code/nel/include/nel/gui/CMakeLists.txt b/code/nel/include/nel/gui/CMakeLists.txt new file mode 100644 index 000000000..ba66d4451 --- /dev/null +++ b/code/nel/include/nel/gui/CMakeLists.txt @@ -0,0 +1,3 @@ +FILE(GLOB HEADERS *.h) + +INSTALL(FILES ${HEADERS} DESTINATION include/nel/gui COMPONENT headers) diff --git a/code/ryzom/client/src/interface_v3/event_descriptor.h b/code/nel/include/nel/gui/event_descriptor.h similarity index 100% rename from code/ryzom/client/src/interface_v3/event_descriptor.h rename to code/nel/include/nel/gui/event_descriptor.h diff --git a/code/nel/src/CMakeLists.txt b/code/nel/src/CMakeLists.txt index 4bf260c13..2f1099e60 100644 --- a/code/nel/src/CMakeLists.txt +++ b/code/nel/src/CMakeLists.txt @@ -4,6 +4,10 @@ IF(WITH_3D) ADD_SUBDIRECTORY(3d) ENDIF(WITH_3D) +IF(WITH_GUI) + ADD_SUBDIRECTORY(gui) +ENDIF(WITH_GUI) + IF(WITH_GEORGES) ADD_SUBDIRECTORY(georges) ENDIF(WITH_GEORGES) diff --git a/code/nel/src/gui/CMakeLists.txt b/code/nel/src/gui/CMakeLists.txt new file mode 100644 index 000000000..5359c1130 --- /dev/null +++ b/code/nel/src/gui/CMakeLists.txt @@ -0,0 +1,14 @@ +FILE(GLOB SRC *.cpp *.h) +FILE(GLOB HEADERS ../../include/nel/gui/*.h) + +NL_TARGET_LIB(nelgui ${HEADERS} ${SRC}) + +SET_TARGET_PROPERTIES(nelgui PROPERTIES LINK_INTERFACE_LIBRARIES "") +NL_DEFAULT_PROPS(nelgui "NeL, Library: NeL GUI") +NL_ADD_RUNTIME_FLAGS(nelgui) + +NL_ADD_LIB_SUFFIX(nelgui) + +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + INSTALL(TARGETS nelgui LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) diff --git a/code/ryzom/client/src/interface_v3/event_descriptor.cpp b/code/nel/src/gui/event_descriptor.cpp similarity index 92% rename from code/ryzom/client/src/interface_v3/event_descriptor.cpp rename to code/nel/src/gui/event_descriptor.cpp index 2e72c69c2..f91f078bf 100644 --- a/code/ryzom/client/src/interface_v3/event_descriptor.cpp +++ b/code/nel/src/gui/event_descriptor.cpp @@ -16,9 +16,8 @@ -#include "stdpch.h" - -#include "event_descriptor.h" +#include "nel/misc/events.h" +#include "nel/gui/event_descriptor.h" void CEventDescriptorKey::init(const NLMISC::CEventKey &ev) { diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index 3971fb98f..4cd9373fc 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -81,6 +81,7 @@ TARGET_LINK_LIBRARIES(ryzom_client nelligo nelgeorges nel3d + nelgui nelsound ryzom_clientsheets ryzom_gameshare diff --git a/code/ryzom/client/src/interface_v3/ctrl_base.h b/code/ryzom/client/src/interface_v3/ctrl_base.h index bf0f5f10c..b88716c53 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_base.h +++ b/code/ryzom/client/src/interface_v3/ctrl_base.h @@ -21,7 +21,7 @@ #include "nel/misc/types_nl.h" #include "view_base.h" -#include "event_descriptor.h" +#include "nel/gui/event_descriptor.h" class CCtrlBase : public CViewBase { diff --git a/code/ryzom/client/src/interface_v3/input_handler_manager.h b/code/ryzom/client/src/interface_v3/input_handler_manager.h index 7f0cc1c1c..23a5afeb5 100644 --- a/code/ryzom/client/src/interface_v3/input_handler_manager.h +++ b/code/ryzom/client/src/interface_v3/input_handler_manager.h @@ -24,7 +24,7 @@ #include #include #include -#include "event_descriptor.h" +#include "nel/gui/event_descriptor.h" /** diff --git a/code/ryzom/client/src/r2/editor.cpp b/code/ryzom/client/src/r2/editor.cpp index 1c355ca8a..e831cf8a2 100644 --- a/code/ryzom/client/src/r2/editor.cpp +++ b/code/ryzom/client/src/r2/editor.cpp @@ -54,7 +54,7 @@ #include "../entities.h" #include "../events_listener.h" #include "../interface_v3/group_list.h" -#include "../interface_v3/event_descriptor.h" +#include "nel/gui/event_descriptor.h" #include "../interface_v3/group_tree.h" #include "../client_cfg.h" #include "../interface_v3/lua_ihm.h" diff --git a/code/ryzom/client/src/r2/tool.cpp b/code/ryzom/client/src/r2/tool.cpp index 6f8861929..94854fd51 100644 --- a/code/ryzom/client/src/r2/tool.cpp +++ b/code/ryzom/client/src/r2/tool.cpp @@ -21,7 +21,7 @@ #include "r2_config.h" // #include "../interface_v3/interface_manager.h" -#include "../interface_v3/event_descriptor.h" +#include "nel/gui/event_descriptor.h" #include "../motion/user_controls.h" #include "../global.h" #include "../entities.h"