diff --git a/code/nel/src/gui/CMakeLists.txt b/code/nel/src/gui/CMakeLists.txt
index 187f8e008..3f183a2ff 100644
--- a/code/nel/src/gui/CMakeLists.txt
+++ b/code/nel/src/gui/CMakeLists.txt
@@ -6,13 +6,16 @@ FIND_PACKAGE( Luabind REQUIRED )
FILE(GLOB SRC *.cpp *.h)
FILE(GLOB HEADERS ../../include/nel/gui/*.h)
-NL_TARGET_LIB(nelgui ${HEADERS} ${SRC})
+SOURCE_GROUP("include" FILES ${HEADERS})
+SOURCE_GROUP("src" FILES ${SRC})
+
+NL_TARGET_LIB(nelgui ${SRC} ${HEADERS})
SET_TARGET_PROPERTIES(nelgui PROPERTIES LINK_INTERFACE_LIBRARIES "")
NL_DEFAULT_PROPS(nelgui "NeL, Library: NeL GUI")
NL_ADD_RUNTIME_FLAGS(nelgui)
-INCLUDE_DIRECTORIES( ${LUA_INCLUDE_DIR} ${LIBWWW_INCLUDE_DIR})
+INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR} ${LUABIND_INCLUDE_DIR} ${LIBWWW_INCLUDE_DIR})
NL_ADD_LIB_SUFFIX(nelgui)
@@ -28,6 +31,10 @@ TARGET_LINK_LIBRARIES( nelgui
${CURL_LIBRARIES}
)
+IF(WITH_PCH)
+ ADD_NATIVE_PRECOMPILED_HEADER(nelgui ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp)
+ENDIF(WITH_PCH)
+
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/nel/src/gui/action_handler.cpp b/code/nel/src/gui/action_handler.cpp
index 4049f3355..8b0d9c4ee 100644
--- a/code/nel/src/gui/action_handler.cpp
+++ b/code/nel/src/gui/action_handler.cpp
@@ -14,6 +14,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
+
+#include "stdpch.h"
#include "nel/gui/action_handler.h"
#include "nel/gui/group_container_base.h"
#include "nel/gui/interface_property.h"
diff --git a/code/nel/src/gui/ctrl_base.cpp b/code/nel/src/gui/ctrl_base.cpp
index 8cd51f026..f3dcd3712 100644
--- a/code/nel/src/gui/ctrl_base.cpp
+++ b/code/nel/src/gui/ctrl_base.cpp
@@ -14,6 +14,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
+
+#include "stdpch.h"
#include "libxml/globals.h"
#include "nel/misc/debug.h"
#include "nel/misc/xml_auto_ptr.h"
diff --git a/code/nel/src/gui/ctrl_base_button.cpp b/code/nel/src/gui/ctrl_base_button.cpp
index 4c892ecc7..8c74e3bfc 100644
--- a/code/nel/src/gui/ctrl_base_button.cpp
+++ b/code/nel/src/gui/ctrl_base_button.cpp
@@ -15,6 +15,7 @@
// along with this program. If not, see .
+#include "stdpch.h"
#include "nel/gui/ctrl_base_button.h"
#include "nel/misc/xml_auto_ptr.h"
#include "nel/gui/interface_group.h"
diff --git a/code/nel/src/gui/ctrl_button.cpp b/code/nel/src/gui/ctrl_button.cpp
index e4ad08074..571781e11 100644
--- a/code/nel/src/gui/ctrl_button.cpp
+++ b/code/nel/src/gui/ctrl_button.cpp
@@ -14,6 +14,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
+
+#include "stdpch.h"
#include "nel/gui/ctrl_button.h"
#include "nel/misc/xml_auto_ptr.h"
#include "nel/gui/widget_manager.h"
diff --git a/code/nel/src/gui/ctrl_col_pick.cpp b/code/nel/src/gui/ctrl_col_pick.cpp
index 9e0e0e50a..3b5145e20 100644
--- a/code/nel/src/gui/ctrl_col_pick.cpp
+++ b/code/nel/src/gui/ctrl_col_pick.cpp
@@ -15,7 +15,7 @@
// along with this program. If not, see .
-
+#include "stdpch.h"
#include "nel/gui/ctrl_col_pick.h"
#include "nel/misc/xml_auto_ptr.h"
#include "nel/gui/view_renderer.h"
diff --git a/code/nel/src/gui/ctrl_draggable.cpp b/code/nel/src/gui/ctrl_draggable.cpp
index 1bdcd2d72..39872ab18 100644
--- a/code/nel/src/gui/ctrl_draggable.cpp
+++ b/code/nel/src/gui/ctrl_draggable.cpp
@@ -15,6 +15,7 @@
// along with this program. If not, see .
+#include "stdpch.h"
#include "nel/gui/ctrl_draggable.h"
namespace NLGUI
diff --git a/code/nel/src/gui/ctrl_polygon.cpp b/code/nel/src/gui/ctrl_polygon.cpp
index 94615de75..86059087d 100644
--- a/code/nel/src/gui/ctrl_polygon.cpp
+++ b/code/nel/src/gui/ctrl_polygon.cpp
@@ -14,6 +14,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
+
+#include "stdpch.h"
#include "nel/gui/ctrl_polygon.h"
#include "nel/gui/widget_manager.h"
#include "nel/gui/view_renderer.h"
diff --git a/code/nel/src/gui/ctrl_quad.cpp b/code/nel/src/gui/ctrl_quad.cpp
index 26829b19e..47346692c 100644
--- a/code/nel/src/gui/ctrl_quad.cpp
+++ b/code/nel/src/gui/ctrl_quad.cpp
@@ -14,6 +14,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
+
+#include "stdpch.h"
#include "nel/gui/ctrl_quad.h"
#include "nel/gui/interface_group.h"
#include "nel/gui/widget_manager.h"
diff --git a/code/nel/src/gui/ctrl_scroll.cpp b/code/nel/src/gui/ctrl_scroll.cpp
index d7c6a0fe1..f534fc0a1 100644
--- a/code/nel/src/gui/ctrl_scroll.cpp
+++ b/code/nel/src/gui/ctrl_scroll.cpp
@@ -15,6 +15,7 @@
// along with this program. If not, see .
+#include "stdpch.h"
#include "nel/gui/widget_manager.h"
#include "nel/gui/action_handler.h"
#include "nel/gui/interface_group.h"
diff --git a/code/nel/src/gui/ctrl_scroll_base.cpp b/code/nel/src/gui/ctrl_scroll_base.cpp
index cb8c5e7b0..f95cac5d7 100644
--- a/code/nel/src/gui/ctrl_scroll_base.cpp
+++ b/code/nel/src/gui/ctrl_scroll_base.cpp
@@ -14,6 +14,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
+
+#include "stdpch.h"
#include "nel/gui/ctrl_scroll_base.h"
namespace NLGUI
diff --git a/code/nel/src/gui/ctrl_sheet_selection.cpp b/code/nel/src/gui/ctrl_sheet_selection.cpp
index 6093c3438..bdbe0e73d 100644
--- a/code/nel/src/gui/ctrl_sheet_selection.cpp
+++ b/code/nel/src/gui/ctrl_sheet_selection.cpp
@@ -14,6 +14,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
+
+#include "stdpch.h"
#include
#include