Skip to content

Commit

Permalink
fix tinyxml wrong dependence (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
drelaptop authored Nov 13, 2018
1 parent 222e67f commit fbf754a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 0 additions & 2 deletions tinyxml2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,3 @@ set_target_properties(${target_name}
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
FOLDER "External"
)

# TOCHECK, "tinyxml2.h" depend on cocos platform headers ""platform/CCPlatformMacros.h"", why?
18 changes: 15 additions & 3 deletions tinyxml2/tinyxml2.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,21 @@ distribution.
#ifndef TINYXML2_INCLUDED
#define TINYXML2_INCLUDED

// #include "platform/CCPlatformConfig.h"
// #include "platform/CCPlatformMacros.h"
#define CC_DLL
// external "tinyxml2.h" shouldn't depend on cocos internal headers "CCPlatformMacros.h"
#if defined(_MSC_VER)
# if defined(CC_STATIC)
# define CC_DLL
# else
# if defined(_USRDLL)
# define CC_DLL __declspec(dllexport)
# else /* use a DLL library */
# define CC_DLL __declspec(dllimport)
# endif
# endif
#else
# define CC_DLL
#endif


#if defined(ANDROID_NDK) || defined(__BORLANDC__) || (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY)
# include <ctype.h>
Expand Down

0 comments on commit fbf754a

Please sign in to comment.