diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index e184e7c30..40e2d5e0c 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -44,12 +44,18 @@ CHECK_OUT_OF_SOURCE() # To be able to specify a different deployment target on Mac OS X : # export MACOSX_DEPLOYMENT_TARGET=10.6 +IF(CMAKE_VERSION VERSION_GREATER "2.8.10") + STRING(TIMESTAMP CURRENT_YEAR "%Y") +ELSE() + SET(CURRENT_YEAR "2016") +ENDIF() + CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(RyzomCore CXX C) SET(NL_VERSION_MAJOR 0) SET(NL_VERSION_MINOR 12) SET(NL_VERSION_PATCH 0) -SET(YEAR "2004-2015") +SET(YEAR "2004-${CURRENT_YEAR}") SET(AUTHOR "Winchgate and The Ryzom Core Community") SET(RYZOM_VERSION_MAJOR 2) @@ -122,13 +128,17 @@ ENDIF(WITH_LIBXML2_ICONV) IF(WITH_STATIC) # libxml2 could need winsock2 library - SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${WINSOCK2_LIB}) + IF(WINSOCK2_LIB) + SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${WINSOCK2_LIB}) + ENDIF() - # on Mac OS X libxml2 requires iconv and liblzma - IF(APPLE) - FIND_PACKAGE(LibLZMA REQUIRED) - SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES}) - ENDIF(APPLE) + IF(UNIX) + # under Linux and OS X, recent libxml2 versions are linked against liblzma + FIND_PACKAGE(LibLZMA) + IF(LIBLZMA_LIBRARIES) + SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES}) + ENDIF() + ENDIF() ENDIF(WITH_STATIC) INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/PCHSupport.cmake) diff --git a/code/nel/src/3d/driver/opengl/CMakeLists.txt b/code/nel/src/3d/driver/opengl/CMakeLists.txt index 18b4886ed..edff05d2a 100644 --- a/code/nel/src/3d/driver/opengl/CMakeLists.txt +++ b/code/nel/src/3d/driver/opengl/CMakeLists.txt @@ -1,16 +1,18 @@ -FIND_PACKAGE(OpenGL REQUIRED) - IF(NOT WIN32) IF(APPLE) FIND_LIBRARY(CARBON NAMES Carbon) FIND_LIBRARY(COCOA NAMES Cocoa) + FIND_PACKAGE(OpenGL REQUIRED) ELSE() SET(OLD_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) SET(CMAKE_FIND_LIBRARY_SUFFIXES .so) FIND_PACKAGE(X11) FIND_PACKAGE(XF86VidMode) + FIND_PACKAGE(OpenGL REQUIRED) SET(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_CMAKE_FIND_LIBRARY_SUFFIXES}) ENDIF() +ELSE() + FIND_PACKAGE(OpenGL REQUIRED) ENDIF() FILE(GLOB SRC *.cpp *.h *.def *.rc) diff --git a/code/nel/tools/3d/panoply_preview/main_window.h b/code/nel/tools/3d/panoply_preview/main_window.h index 3e3d2f025..1d864249b 100644 --- a/code/nel/tools/3d/panoply_preview/main_window.h +++ b/code/nel/tools/3d/panoply_preview/main_window.h @@ -21,6 +21,12 @@ // STL includes // Qt includes +#include + +#ifdef Q_COMPILER_RVALUE_REFS +#undef Q_COMPILER_RVALUE_REFS +#endif + #include // NeL includes diff --git a/code/nel/tools/3d/panoply_preview/panoply_preview.h b/code/nel/tools/3d/panoply_preview/panoply_preview.h index 9fbe2bad3..794a223f8 100644 --- a/code/nel/tools/3d/panoply_preview/panoply_preview.h +++ b/code/nel/tools/3d/panoply_preview/panoply_preview.h @@ -21,6 +21,12 @@ // STL includes // Qt includes +#include + +#ifdef Q_COMPILER_RVALUE_REFS +#undef Q_COMPILER_RVALUE_REFS +#endif + #include #include #include diff --git a/code/nel/tools/3d/panoply_preview/tool_main.cpp b/code/nel/tools/3d/panoply_preview/tool_main.cpp index d1e08205f..8cf0eec63 100644 --- a/code/nel/tools/3d/panoply_preview/tool_main.cpp +++ b/code/nel/tools/3d/panoply_preview/tool_main.cpp @@ -26,6 +26,12 @@ #endif // Qt includes +#include + +#ifdef Q_COMPILER_RVALUE_REFS +#undef Q_COMPILER_RVALUE_REFS +#endif + #include #include #include diff --git a/code/nel/tools/3d/shared_widgets/command_log.cpp b/code/nel/tools/3d/shared_widgets/command_log.cpp index d7b9ee735..fda28dd2a 100644 --- a/code/nel/tools/3d/shared_widgets/command_log.cpp +++ b/code/nel/tools/3d/shared_widgets/command_log.cpp @@ -100,7 +100,7 @@ void CCommandLog::doDisplay(const CLog::TDisplayInfo& args, const char *message) std::string str = NLMISC::CWindowDisplayer::stringifyMessage(args, message); - tSigDisplay(color, str.substr(0, str.size() - 1).c_str()); + emit tSigDisplay(color, QString::fromUtf8(str.substr(0, str.size() - 1).c_str())); } void CCommandLog::tSlotDisplay(const QColor &c, const QString &text) @@ -115,9 +115,8 @@ void CCommandLog::returnPressed() if (text.isEmpty()) return; - std::string cmd = text.toLocal8Bit().data(); - execCommand(cmd); - if (m_Func) m_Func(cmd); + emit execCommand(text); + if (m_Func) m_Func(text.toUtf8().constData()); m_CommandInput->clear(); } @@ -148,10 +147,12 @@ void CCommandLogDisplayer::doDisplay(const NLMISC::CLog::TDisplayInfo& args, con CCommandLog::doDisplay(args, message); } -void CCommandLogDisplayer::execCommandLog(const std::string &cmd) +void CCommandLogDisplayer::execCommandLog(const QString &cmd) { - m_Log.displayRawNL("> %s", cmd.c_str()); - ICommand::execute(cmd, m_Log); + std::string str = cmd.toUtf8().constData(); + + m_Log.displayRawNL("> %s", str.c_str()); + ICommand::execute(str, m_Log); } } /* namespace NLQT */ diff --git a/code/nel/tools/3d/shared_widgets/command_log.h b/code/nel/tools/3d/shared_widgets/command_log.h index d92f84b72..16bc21c9d 100644 --- a/code/nel/tools/3d/shared_widgets/command_log.h +++ b/code/nel/tools/3d/shared_widgets/command_log.h @@ -34,6 +34,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // STL includes // Qt includes +#include + +#ifdef Q_COMPILER_RVALUE_REFS +#undef Q_COMPILER_RVALUE_REFS +#endif + #include #include #include @@ -64,7 +70,7 @@ public: signals: void tSigDisplay(const QColor &c, const QString &text); - void execCommand(const std::string &cmd); + void execCommand(const QString &cmd); private slots: void returnPressed(); @@ -93,7 +99,7 @@ protected: virtual void doDisplay(const NLMISC::CLog::TDisplayInfo& args, const char *message); private slots: - void execCommandLog(const std::string &cmd); + void execCommandLog(const QString &cmd); private: NLMISC::CLog m_Log;