From 511d735dc957934280d63e53bd636df9d78bb249 Mon Sep 17 00:00:00 2001 From: sfb Date: Tue, 31 May 2011 09:28:10 -0500 Subject: [PATCH 1/7] Changed: Starting to change the zone manager to handle loading, saving and displaying zones. --- .../zone_painter/zone_painter_plugin.cpp | 2 ++ .../zone_painter/zone_painter_plugin.h | 21 ++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.cpp index 7b8237ccb..9ccfb9053 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.cpp @@ -19,6 +19,8 @@ namespace Plugin { + NLMISC_SAFE_SINGLETON_IMPL(CZoneManager) + ZonePainterPlugin::~ZonePainterPlugin() { Q_FOREACH(QObject *obj, _autoReleaseObjects) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.h index 0d5b9296a..2c1dff53e 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/zone_painter/zone_painter_plugin.h @@ -7,10 +7,12 @@ #include "zone_painter_main_window.h" // NeL includes -#include "nel/misc/app_context.h" +#include +#include #include #include #include +#include // Qt includes #include @@ -29,16 +31,15 @@ class IPluginSpec; namespace Plugin { - class CZoneManager { + class CZoneManager + { + NLMISC_SAFE_SINGLETON_DECL(CZoneManager) public: - NL3D::CZone zone; - - std::string getZoneInfo() { - NL3D::CZone zone; - zone.getNumPatchs(); - - return ""; - } + //m_painterLandscape = static_cast + + private: + NL3D::CLandscapeModel *m_painterLandscape; + NL3D::CZone *m_currentZone; }; class ZonePainterPlugin : public QObject, public ExtensionSystem::IPlugin From 4ab971d2fe3b9aa1823328d946d3f1dfa395f25f Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 7 Jun 2011 15:58:18 +0200 Subject: [PATCH 2/7] Changed: #878 Fix typos in comments/code --- code/nel/include/nel/3d/scene_group.h | 4 ++-- code/nel/tools/3d/file_info/main.cpp | 6 +++--- code/nel/tools/misc/bnp_make/main.cpp | 10 +++++----- code/nel/tools/misc/lock/lock.cpp | 2 +- code/ryzom/client/src/login_patch.cpp | 2 +- code/ryzom/server/src/ai_service/commands.cpp | 9 ++++++--- 6 files changed, 18 insertions(+), 15 deletions(-) diff --git a/code/nel/include/nel/3d/scene_group.h b/code/nel/include/nel/3d/scene_group.h index 9b4f8d792..d587f23d9 100644 --- a/code/nel/include/nel/3d/scene_group.h +++ b/code/nel/include/nel/3d/scene_group.h @@ -107,7 +107,7 @@ public: bool Visible; /// Precomputed Lighting. - // If true (false by default), then the instance don't cast shadow (used by ig_lighter.exe). + // If true (false by default), then the instance don't cast shadow (used by ig_lighter). bool DontCastShadow; // If true (false by default), then the instance's lighting will not be precomputed. bool AvoidStaticLightPreCompute; @@ -120,7 +120,7 @@ public: * If 0xFF => take Ambient of the sun. */ uint8 LocalAmbientId; - /** if true (false by default), the instance don't cast shadow, but ONLY FOR ig_lighter.exe (ig_lighter_lib) + /** if true (false by default), the instance don't cast shadow, but ONLY FOR ig_lighter (ig_lighter_lib) * (zone_lighter and zone_ig_lighter ignore it). * This is a special trick for the "Matis Serre" where the exterior mesh cast shadow in the interior, but * is not visible in the interior in realTime because of cluster clipping.... omg :( diff --git a/code/nel/tools/3d/file_info/main.cpp b/code/nel/tools/3d/file_info/main.cpp index 4a14a43c9..306a7fc74 100644 --- a/code/nel/tools/3d/file_info/main.cpp +++ b/code/nel/tools/3d/file_info/main.cpp @@ -331,9 +331,9 @@ void displayInfoFileInStream(FILE *logStream, const char *fileName, const set const& args) NLMISC::CIFile file(NLMISC::CPath::lookup(args[2])); vector lines; - while (!file.eof()) { + while (!file.eof()) + { const size_t bufferSize = 4*1024; char buffer[bufferSize]; file.getline(buffer, bufferSize); @@ -1844,7 +1845,8 @@ NLMISC_COMMAND(getInfo,"display returned values of buffered commands","") { CLogStringWriter stringWriter(&log); - FOREACHC(strIt, vector, bufferedRetStrings) { + FOREACHC(strIt, vector, bufferedRetStrings) + { stringWriter.append(*strIt); } @@ -2995,7 +2997,8 @@ NLMISC_COMMAND(simulateBug, "simulate an old AIS bug; command is one of 'list', initBugSimulationTexts(); log.displayNL("Bug simulations"); log.displayNL("Id|Description |State"); - for (int i=0; i Date: Wed, 8 Jun 2011 10:14:14 +0200 Subject: [PATCH 3/7] Changed: #878 Fix typos in comments/code --- code/nel/src/3d/driver/opengl/CMakeLists.txt | 1 + .../tools/leveldesign/named_items_2_csv/named_items_2_csv.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/CMakeLists.txt b/code/nel/src/3d/driver/opengl/CMakeLists.txt index 25216998c..6fdecab71 100644 --- a/code/nel/src/3d/driver/opengl/CMakeLists.txt +++ b/code/nel/src/3d/driver/opengl/CMakeLists.txt @@ -1,4 +1,5 @@ FILE(GLOB SRC *.cpp *.h *.def) + IF(APPLE) FILE(GLOB MAC_SRC mac/*.h mac/*.m mac/*.mm mac/*.cpp) SET(SRC ${SRC} ${MAC_SRC}) diff --git a/code/ryzom/tools/leveldesign/named_items_2_csv/named_items_2_csv.cpp b/code/ryzom/tools/leveldesign/named_items_2_csv/named_items_2_csv.cpp index cb00d20a0..5dee56474 100644 --- a/code/ryzom/tools/leveldesign/named_items_2_csv/named_items_2_csv.cpp +++ b/code/ryzom/tools/leveldesign/named_items_2_csv/named_items_2_csv.cpp @@ -21,8 +21,8 @@ named2csv: convert named_items.txt to .csv format and convert it back to named_items.txt after changes. - use: named2csv.exe named_items.txt filter.script (to generate a .csv based on filter) - named2csv.exe named_items.txt named_items.csv (to modify .txt with .csv) + use: named2csv named_items.txt filter.script (to generate a .csv based on filter) + named2csv named_items.txt named_items.csv (to modify .txt with .csv) */ From e4fba623dcc47a331c5fba2cdaec0cb2274b3f43 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 8 Jun 2011 10:14:48 +0200 Subject: [PATCH 4/7] Fixed: Bad font default size --- code/ryzom/client/src/interface_v3/group_html.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/ryzom/client/src/interface_v3/group_html.cpp b/code/ryzom/client/src/interface_v3/group_html.cpp index b0e94ca6c..30c089aae 100644 --- a/code/ryzom/client/src/interface_v3/group_html.cpp +++ b/code/ryzom/client/src/interface_v3/group_html.cpp @@ -878,6 +878,10 @@ void CGroupHTML::beginElement (uint element_number, const BOOL *present, const c fromString(value[HTML_FONT_SIZE], fontsize); _FontSize.push_back(fontsize); } + else + { + _FontSize.push_back(_FontSize.empty() ? TextFontSize : _FontSize.back()); + } } break; case HTML_BR: From 0f63f569699a66d79fe4d752479e1853e1630186 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 8 Jun 2011 10:15:16 +0200 Subject: [PATCH 5/7] Changed: Replaced NLMISC::strlwr by NLMISC::toLower --- code/ryzom/client/src/interface_v3/ctrl_text_button.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/ctrl_text_button.cpp b/code/ryzom/client/src/interface_v3/ctrl_text_button.cpp index d2191a4eb..1e8c7c07b 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_text_button.cpp +++ b/code/ryzom/client/src/interface_v3/ctrl_text_button.cpp @@ -86,8 +86,7 @@ bool CCtrlTextButton::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_normal" ); if (prop) { - string TxName = (const char *) prop; - TxName = strlwr(TxName); + string TxName = toLower(std::string((const char *) prop)); _TextureIdNormal[0].setTexture((TxName+"_l.tga").c_str()); _TextureIdNormal[1].setTexture((TxName+"_m.tga").c_str()); _TextureIdNormal[2].setTexture((TxName+"_r.tga").c_str()); @@ -96,8 +95,7 @@ bool CCtrlTextButton::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_pushed" ); if (prop) { - string TxName = (const char *) prop; - TxName = strlwr(TxName); + string TxName = toLower(std::string((const char *) prop)); _TextureIdPushed[0].setTexture((TxName+"_l.tga").c_str()); _TextureIdPushed[1].setTexture((TxName+"_m.tga").c_str()); _TextureIdPushed[2].setTexture((TxName+"_r.tga").c_str()); @@ -106,8 +104,7 @@ bool CCtrlTextButton::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) prop = (char*) xmlGetProp( cur, (xmlChar*)"tx_over" ); if (prop) { - string TxName = (const char *) prop; - TxName = strlwr(TxName); + string TxName = toLower(std::string((const char *) prop)); _TextureIdOver[0].setTexture((TxName+"_l.tga").c_str()); _TextureIdOver[1].setTexture((TxName+"_m.tga").c_str()); _TextureIdOver[2].setTexture((TxName+"_r.tga").c_str()); From 74c2952c320241727b7bdae9a2c927767640e49b Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 8 Jun 2011 10:16:44 +0200 Subject: [PATCH 6/7] Changed: #1275 Create an OpenGL ES driver --- .../opengl/driver_opengl_extension_def.h | 63 ++++++++++++++++--- .../opengl/driver_opengl_vertex_buffer_hard.h | 9 ++- 2 files changed, 62 insertions(+), 10 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h b/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h index decd4a0c5..c1ecfe8c0 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension_def.h @@ -20,22 +20,67 @@ #include "nel/misc/types_nl.h" -#ifdef NL_OS_MAC -# define GL_GLEXT_LEGACY -# include -# include "mac/glext.h" +#ifdef USE_OPENGLES +# include +# include #else -# include -# include // Please download it from http://www.opengl.org/registry/ -# if defined(NL_OS_WINDOWS) -# include -# endif +# ifdef NL_OS_MAC +# define GL_GLEXT_LEGACY +# include +# include "mac/glext.h" +# else +# include +# include +# if defined(NL_OS_WINDOWS) +# include +# endif +# endif #endif #ifdef __cplusplus extern "C" { #endif +#ifdef USE_OPENGLES +// OES_mapbuffer +//============== +typedef void* (APIENTRY * NEL_PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRY * NEL_PFNGLUNMAPBUFFEROESPROC) (GLenum target); +typedef void (APIENTRY * NEL_PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void** params); + +typedef void (APIENTRY * NEL_PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); + +// GL_OES_framebuffer_object +//================================== +typedef GLboolean (APIENTRY * NEL_PFNGLISRENDERBUFFEROESPROC) (GLuint renderbuffer); +typedef void (APIENTRY * NEL_PFNGLBINDRENDERBUFFEROESPROC) (GLenum target, GLuint renderbuffer); +typedef void (APIENTRY * NEL_PFNGLDELETERENDERBUFFERSOESPROC) (GLsizei n, const GLuint* renderbuffers); +typedef void (APIENTRY * NEL_PFNGLGENRENDERBUFFERSOESPROC) (GLsizei n, GLuint* renderbuffers); +typedef void (APIENTRY * NEL_PFNGLRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRY * NEL_PFNGLGETRENDERBUFFERPARAMETERIVOESPROC) (GLenum target, GLenum pname, GLint* params); +typedef GLboolean (APIENTRY * NEL_PFNGLISFRAMEBUFFEROESPROC) (GLuint framebuffer); +typedef void (APIENTRY * NEL_PFNGLBINDFRAMEBUFFEROESPROC) (GLenum target, GLuint framebuffer); +typedef void (APIENTRY * NEL_PFNGLDELETEFRAMEBUFFERSOESPROC) (GLsizei n, const GLuint* framebuffers); +typedef void (APIENTRY * NEL_PFNGLGENFRAMEBUFFERSOESPROC) (GLsizei n, GLuint* framebuffers); +typedef GLenum (APIENTRY * NEL_PFNGLCHECKFRAMEBUFFERSTATUSOESPROC) (GLenum target); +typedef void (APIENTRY * NEL_PFNGLFRAMEBUFFERRENDERBUFFEROESPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRY * NEL_PFNGLFRAMEBUFFERTEXTURE2DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRY * NEL_PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC) (GLenum target, GLenum attachment, GLenum pname, GLint* params); +typedef void (APIENTRY * NEL_PFNGLGENERATEMIPMAPOESPROC) (GLenum target); + +// GL_OES_texture_cube_map +//================================== +typedef void (APIENTRY * NEL_PFNGLTEXGENFOESPROC) (GLenum coord, GLenum pname, GLfloat param); +typedef void (APIENTRY * NEL_PFNGLTEXGENFVOESPROC) (GLenum coord, GLenum pname, const GLfloat *params); +typedef void (APIENTRY * NEL_PFNGLTEXGENIOESPROC) (GLenum coord, GLenum pname, GLint param); +typedef void (APIENTRY * NEL_PFNGLTEXGENIVOESPROC) (GLenum coord, GLenum pname, const GLint *params); +typedef void (APIENTRY * NEL_PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param); +typedef void (APIENTRY * NEL_PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params); +typedef void (APIENTRY * NEL_PFNGLGETTEXGENFVOESPROC) (GLenum coord, GLenum pname, GLfloat *params); +typedef void (APIENTRY * NEL_PFNGLGETTEXGENIVOESPROC) (GLenum coord, GLenum pname, GLint *params); +typedef void (APIENTRY * NEL_PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params); +#endif + // *************************************************************************** // *************************************************************************** // The NEL Functions Typedefs. diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.h b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.h index a2b7111f4..da454c558 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_buffer_hard.h @@ -113,7 +113,7 @@ protected: bool _Invalid; }; - +#ifndef USE_OPENGLES // *************************************************************************** // *************************************************************************** @@ -456,6 +456,8 @@ public: #endif }; +#endif + // *************************************************************************** // *************************************************************************** // ARB_vertex_buffer_object implementation @@ -553,6 +555,11 @@ private: CVertexArrayRangeARB *_VertexArrayRange; CVertexBuffer::TPreferredMemory _MemType; void *_VertexPtr; // pointer on current datas. Null if not locked +#ifdef USE_OPENGLES + uint8 *_Buffer; + uint32 _BufferSize; + uint32 _LastBufferSize; +#endif // if buffer has been invalidated, returns a dummy memory block and silently fails rendering std::vector _DummyVB; // for use by CVertexArrayRangeARB From b7eefef4847f37dd7b5a802fbd77567eabcd64bd Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 8 Jun 2011 11:46:11 +0200 Subject: [PATCH 7/7] Changed: #1177 VS 2010 does not work under CMake --- code/CMakeLists.txt | 32 ++-------------------- code/CMakeModules/FindExternal.cmake | 10 ++++++- code/CMakeModules/nel.cmake | 41 ++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 31 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index eaaede806..630ff4414 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -90,27 +90,11 @@ NL_CONFIGURE_CHECKS() #----------------------------------------------------------------------------- #Platform specifics +SETUP_EXTERNAL() + IF(WIN32) - INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake) SET(WINSOCK2_LIB ws2_32.lib) - FIND_PACKAGE(External REQUIRED) - - IF(${CMAKE_MAKE_PROGRAM} MATCHES "Common7") - # convert IDE fullpath to VC++ path - STRING(REGEX REPLACE "Common7/IDE/.+" "VC" VC_DIR ${CMAKE_MAKE_PROGRAM}) - ELSE(${CMAKE_MAKE_PROGRAM} MATCHES "Common7") - IF(${CMAKE_CXX_COMPILER} MATCHES "VC") - # convert compiler fullpath to VC++ path - STRING(REGEX REPLACE "VC/bin/.+" "VC" VC_DIR ${CMAKE_CXX_COMPILER}) - ELSE(${CMAKE_CXX_COMPILER} MATCHES "VC") - # Hack for Visual C++ 2010 - GET_FILENAME_COMPONENT(VC_ROOT_PATH "[HKEY_CURRENT_USER\\Software\\Microsoft\\VCExpress\\10.0_Config;InstallDir]" ABSOLUTE) - # convert IDE fullpath to VC++ path - STRING(REGEX REPLACE "Common7/.*" "VC" VC_DIR ${VC_ROOT_PATH}) - ENDIF(${CMAKE_CXX_COMPILER} MATCHES "VC") - ENDIF(${CMAKE_MAKE_PROGRAM} MATCHES "Common7") - IF(WITH_MFC) FIND_PACKAGE(CustomMFC REQUIRED) ENDIF(WITH_MFC) @@ -134,18 +118,6 @@ IF(WITH_STATIC) ENDIF(APPLE) ENDIF(WITH_STATIC) -IF(WITH_STLPORT) - FIND_PACKAGE(STLport REQUIRED) - INCLUDE_DIRECTORIES(${STLPORT_INCLUDE_DIR}) - IF(WIN32) - SET(VC_INCLUDE_DIR "${VC_DIR}/include") - - FIND_PACKAGE(WindowsSDK REQUIRED) - # use VC++ and Windows SDK include paths - INCLUDE_DIRECTORIES(${VC_INCLUDE_DIR} ${WINSDK_INCLUDE_DIR}) - ENDIF(WIN32) -ENDIF(WITH_STLPORT) - INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/PCHSupport.cmake) IF(FINAL_VERSION) diff --git a/code/CMakeModules/FindExternal.cmake b/code/CMakeModules/FindExternal.cmake index 436997d99..fae4af92d 100644 --- a/code/CMakeModules/FindExternal.cmake +++ b/code/CMakeModules/FindExternal.cmake @@ -3,6 +3,7 @@ # The following values are defined # EXTERNAL_PATH - where to find external # EXTERNAL_INCLUDE_PATH - where to find external includes +# EXTERNAL_BINARY_PATH - where to find external binaries # EXTERNAL_LIBRARY_PATH - where to find external libraries # EXTERNAL_FOUND - True if the external libraries are available @@ -34,6 +35,13 @@ IF(EXTERNAL_PATH) SET(EXTERNAL_FOUND TRUE) SET(EXTERNAL_INCLUDE_PATH "${EXTERNAL_PATH}/include") + # Using 32 or 64 bits binaries + IF(TARGET_X64) + SET(EXTERNAL_BINARY_PATH "${EXTERNAL_PATH}/bin64") + ELSE(TARGET_X64) + SET(EXTERNAL_BINARY_PATH "${EXTERNAL_PATH}/bin") + ENDIF(TARGET_X64) + # Using 32 or 64 bits libraries IF(TARGET_X64) SET(EXTERNAL_LIBRARY_PATH "${EXTERNAL_PATH}/lib64") @@ -61,4 +69,4 @@ ELSE(EXTERNAL_FOUND) ENDIF(External_FIND_REQUIRED) ENDIF(EXTERNAL_FOUND) -MARK_AS_ADVANCED(EXTERNAL_INCLUDE_PATH EXTERNAL_LIBRARY_PATH) +MARK_AS_ADVANCED(EXTERNAL_INCLUDE_PATH EXTERNAL_BINARY_PATH EXTERNAL_LIBRARY_PATH) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index 220e4132d..fbd70c842 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -496,3 +496,44 @@ MACRO(RYZOM_SETUP_PREFIX_PATHS) ENDIF(NOT RYZOM_GAMES_PREFIX) ENDMACRO(RYZOM_SETUP_PREFIX_PATHS) + +MACRO(SETUP_EXTERNAL) + IF(WIN32) + FIND_PACKAGE(External REQUIRED) + + INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake) + IF(MSVC10) + GET_FILENAME_COMPONENT(VC_ROOT_DIR "[HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\10.0_Config;InstallDir]" ABSOLUTE) + # VC_ROOT_DIR is set to "registry" when a key is not found + IF(VC_ROOT_DIR MATCHES "registry") + GET_FILENAME_COMPONENT(VC_ROOT_DIR "[HKEY_CURRENT_USER\\Software\\Microsoft\\VCExpress\\10.0_Config;InstallDir]" ABSOLUTE) + IF(VC_ROOT_DIR MATCHES "registry") + MESSAGE(FATAL_ERROR "Unable to find VC++ 2010 directory!") + ENDIF(VC_ROOT_DIR MATCHES "registry") + ENDIF(VC_ROOT_DIR MATCHES "registry") + # convert IDE fullpath to VC++ path + STRING(REGEX REPLACE "Common7/.*" "VC" VC_DIR ${VC_ROOT_DIR}) + ELSE(MSVC10) + IF(${CMAKE_MAKE_PROGRAM} MATCHES "Common7") + # convert IDE fullpath to VC++ path + STRING(REGEX REPLACE "Common7/.*" "VC" VC_DIR ${CMAKE_MAKE_PROGRAM}) + ELSE(${CMAKE_MAKE_PROGRAM} MATCHES "Common7") + # convert compiler fullpath to VC++ path + STRING(REGEX REPLACE "VC/bin/.+" "VC" VC_DIR ${CMAKE_CXX_COMPILER}) + ENDIF(${CMAKE_MAKE_PROGRAM} MATCHES "Common7") + ENDIF(MSVC10) + ENDIF(WIN32) + + IF(WITH_STLPORT) + FIND_PACKAGE(STLport REQUIRED) + INCLUDE_DIRECTORIES(${STLPORT_INCLUDE_DIR}) + IF(WIN32) + SET(VC_INCLUDE_DIR "${VC_DIR}/include") + + FIND_PACKAGE(WindowsSDK REQUIRED) + # use VC++ and Windows SDK include paths + INCLUDE_DIRECTORIES(${VC_INCLUDE_DIR} ${WINSDK_INCLUDE_DIR}) + ENDIF(WIN32) + ENDIF(WITH_STLPORT) + +ENDMACRO(SETUP_EXTERNAL)