mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-22 14:56:13 +00:00
Merge with develop
This commit is contained in:
parent
061bed6635
commit
c53133e7f2
5 changed files with 32 additions and 10 deletions
|
@ -27,6 +27,19 @@ ELSE()
|
|||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
MACRO(APPEND_DEFINITION _NAME _VAL)
|
||||
# value is not empty
|
||||
IF(${_VAL})
|
||||
IF(CMAKE_VERSION VERSION_LESS "2.8.12")
|
||||
# don't support logical expressions, append definition
|
||||
LIST(APPEND ${_NAME} "-D${_VAL}")
|
||||
ELSE()
|
||||
# support logical expressions, use them
|
||||
LIST(APPEND ${_NAME} "$<$<BOOL:${_VAL}>:-D$<JOIN:${_VAL},-D>>")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
# Set PCH_FLAGS for common flags, PCH_ARCH_XXX_FLAGS for specific archs flags and PCH_ARCHS for archs
|
||||
MACRO(PCH_SET_COMPILE_FLAGS _target)
|
||||
SET(PCH_FLAGS)
|
||||
|
@ -77,28 +90,28 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
|||
GET_DIRECTORY_PROPERTY(DEFINITIONS COMPILE_DEFINITIONS)
|
||||
IF(DEFINITIONS)
|
||||
FOREACH(item ${DEFINITIONS})
|
||||
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
||||
APPEND_DEFINITION(GLOBAL_DEFINITIONS ${item})
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
|
||||
GET_DIRECTORY_PROPERTY(DEFINITIONS COMPILE_DEFINITIONS_${_UPPER_BUILD})
|
||||
IF(DEFINITIONS)
|
||||
FOREACH(item ${DEFINITIONS})
|
||||
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
||||
APPEND_DEFINITION(GLOBAL_DEFINITIONS ${item})
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
|
||||
GET_DIRECTORY_PROPERTY(DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS)
|
||||
IF(DEFINITIONS)
|
||||
FOREACH(item ${DEFINITIONS})
|
||||
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
||||
APPEND_DEFINITION(GLOBAL_DEFINITIONS ${item})
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
|
||||
GET_DIRECTORY_PROPERTY(DEFINITIONS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS_${_UPPER_BUILD})
|
||||
IF(DEFINITIONS)
|
||||
FOREACH(item ${DEFINITIONS})
|
||||
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
||||
APPEND_DEFINITION(GLOBAL_DEFINITIONS ${item})
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
|
||||
|
@ -122,14 +135,14 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
|||
GET_TARGET_PROPERTY(DEFINITIONS ${_target} COMPILE_DEFINITIONS)
|
||||
IF(DEFINITIONS)
|
||||
FOREACH(item ${DEFINITIONS})
|
||||
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
||||
APPEND_DEFINITION(GLOBAL_DEFINITIONS ${item})
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
|
||||
GET_TARGET_PROPERTY(DEFINITIONS ${_target} COMPILE_DEFINITIONS_${_UPPER_BUILD})
|
||||
IF(DEFINITIONS)
|
||||
FOREACH(item ${DEFINITIONS})
|
||||
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
||||
APPEND_DEFINITION(GLOBAL_DEFINITIONS ${item})
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
|
||||
|
@ -151,7 +164,7 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
|||
|
||||
IF(_DEFINITIONS)
|
||||
FOREACH(item ${_DEFINITIONS})
|
||||
LIST(APPEND GLOBAL_DEFINITIONS "$<$<BOOL:${item}>:-D$<JOIN:${item},-D>>")
|
||||
APPEND_DEFINITION(GLOBAL_DEFINITIONS ${item})
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
|
|
@ -171,6 +171,11 @@ public:
|
|||
*/
|
||||
static bool getContentString (std::string &result, xmlNodePtr node);
|
||||
|
||||
/**
|
||||
* Release meory used by libxml2, to only call before exit.
|
||||
*/
|
||||
static void releaseLibXml();
|
||||
|
||||
private:
|
||||
|
||||
/// From IStream
|
||||
|
|
|
@ -103,13 +103,11 @@ void CIXml::release ()
|
|||
// Free it
|
||||
xmlClearParserCtxt (_Parser);
|
||||
xmlFreeParserCtxt (_Parser);
|
||||
// commented due to the bug #857 xmlCleanupParser ();
|
||||
|
||||
_Parser = NULL;
|
||||
}
|
||||
|
||||
// Not initialized
|
||||
_Parser = NULL;
|
||||
_CurrentElement = NULL;
|
||||
_CurrentNode = NULL;
|
||||
_PushBegin = false;
|
||||
|
@ -1143,6 +1141,11 @@ bool CIXml::getContentString (std::string &result, xmlNodePtr node)
|
|||
|
||||
// ***************************************************************************
|
||||
|
||||
void CIXml::releaseLibXml()
|
||||
{
|
||||
xmlCleanupParser();
|
||||
}
|
||||
|
||||
} // NLMISC
|
||||
|
||||
#endif // NL_DONT_USE_EXTERNAL_CODE
|
||||
|
|
|
@ -70,7 +70,7 @@ bool CNelExport::exportSWT(const std::string &sPath, std::vector<INode*>& vectNo
|
|||
}
|
||||
}
|
||||
|
||||
if (aSWNodes.size())
|
||||
if (!aSWNodes.empty())
|
||||
{
|
||||
CSkeletonWeight sw;
|
||||
COFile file;
|
||||
|
|
|
@ -664,6 +664,7 @@ void release()
|
|||
NLGUI::CDBManager::release();
|
||||
CWidgetManager::release();
|
||||
CViewRenderer::release();
|
||||
CIXml::releaseLibXml();
|
||||
|
||||
#if FINAL_VERSION
|
||||
// openURL ("http://ryzom.com/exit/");
|
||||
|
|
Loading…
Reference in a new issue