diff --git a/code/nel/src/logic/CMakeLists.txt b/code/nel/src/logic/CMakeLists.txt index a82158ec0..1d4691a40 100644 --- a/code/nel/src/logic/CMakeLists.txt +++ b/code/nel/src/logic/CMakeLists.txt @@ -13,6 +13,10 @@ NL_ADD_LIB_SUFFIX(nellogic) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(nellogic ${CMAKE_CURRENT_SOURCE_DIR}/stdlogic.h ${CMAKE_CURRENT_SOURCE_DIR}/stdlogic.cpp) +ENDIF(WITH_PCH) + IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) INSTALL(TARGETS nellogic LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT libraries) ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) diff --git a/code/nel/src/logic/logic_condition.cpp b/code/nel/src/logic/logic_condition.cpp index 13879467a..2afe26ad6 100644 --- a/code/nel/src/logic/logic_condition.cpp +++ b/code/nel/src/logic/logic_condition.cpp @@ -15,12 +15,14 @@ // along with this program. If not, see . -#include "nel/misc/o_xml.h" - +#include "stdlogic.h" #include "nel/logic/logic_condition.h" + #include "nel/logic/logic_variable.h" #include "nel/logic/logic_state_machine.h" +#include "nel/misc/o_xml.h" + using namespace NLMISC; using namespace std; diff --git a/code/nel/src/logic/logic_event.cpp b/code/nel/src/logic/logic_event.cpp index 191196d00..5410c7ed9 100644 --- a/code/nel/src/logic/logic_event.cpp +++ b/code/nel/src/logic/logic_event.cpp @@ -15,7 +15,9 @@ // along with this program. If not, see . +#include "stdlogic.h" #include "nel/logic/logic_event.h" + #include "nel/logic/logic_state_machine.h" #include "nel/net/service.h" diff --git a/code/nel/src/logic/logic_state_machine.cpp b/code/nel/src/logic/logic_state_machine.cpp index 94a8c6587..ff99255d2 100644 --- a/code/nel/src/logic/logic_state_machine.cpp +++ b/code/nel/src/logic/logic_state_machine.cpp @@ -15,6 +15,7 @@ // along with this program. If not, see . +#include "stdlogic.h" #include "nel/logic/logic_state_machine.h" #include "nel/net/service.h" diff --git a/code/nel/src/logic/logic_variable.cpp b/code/nel/src/logic/logic_variable.cpp index e3093e4a4..601fd3929 100644 --- a/code/nel/src/logic/logic_variable.cpp +++ b/code/nel/src/logic/logic_variable.cpp @@ -15,9 +15,11 @@ // along with this program. If not, see . -#include "nel/logic/logic_state_machine.h" +#include "stdlogic.h" #include "nel/logic/logic_variable.h" +#include "nel/logic/logic_state_machine.h" + using namespace std; using namespace NLMISC; diff --git a/code/nel/src/logic/stdlogic.cpp b/code/nel/src/logic/stdlogic.cpp new file mode 100644 index 000000000..57bae9095 --- /dev/null +++ b/code/nel/src/logic/stdlogic.cpp @@ -0,0 +1,17 @@ +// NeL - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#include "stdlogic.h" diff --git a/code/nel/src/logic/stdlogic.h b/code/nel/src/logic/stdlogic.h new file mode 100644 index 000000000..67c7231c1 --- /dev/null +++ b/code/nel/src/logic/stdlogic.h @@ -0,0 +1,41 @@ +// NeL - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +#ifndef NL_STDMISC_H +#define NL_STDMISC_H + +#include +#include +#include +#include + +#include + +#ifdef NL_OS_WINDOWS +# define WIN32_LEAN_AND_MEAN +# define _WIN32_WINDOWS 0x0500 +# ifndef _WIN32_WINNT +# define _WIN32_WINNT 0x0500 +# endif +# ifndef NL_COMP_MINGW +# define WINVER 0x0500 +# define NOMINMAX +# endif +# include +# include +#endif + +#endif // NL_STDMISC_H