File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -21,5 +21,3 @@ set_target_properties(${target_name}
21
21
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR} /lib"
22
22
FOLDER "External"
23
23
)
24
-
25
- # TOCHECK, "tinyxml2.h" depend on cocos platform headers ""platform/CCPlatformMacros.h"", why?
Original file line number Diff line number Diff line change @@ -24,9 +24,21 @@ distribution.
24
24
#ifndef TINYXML2_INCLUDED
25
25
#define TINYXML2_INCLUDED
26
26
27
- // #include "platform/CCPlatformConfig.h"
28
- // #include "platform/CCPlatformMacros.h"
29
- #define CC_DLL
27
+ // external "tinyxml2.h" shouldn't depend on cocos internal headers "CCPlatformMacros.h"
28
+ #if defined(_MSC_VER)
29
+ # if defined(CC_STATIC)
30
+ # define CC_DLL
31
+ # else
32
+ # if defined(_USRDLL)
33
+ # define CC_DLL __declspec (dllexport)
34
+ # else /* use a DLL library */
35
+ # define CC_DLL __declspec (dllimport)
36
+ # endif
37
+ # endif
38
+ #else
39
+ # define CC_DLL
40
+ #endif
41
+
30
42
31
43
#if defined(ANDROID_NDK) || defined(__BORLANDC__) || (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY)
32
44
# include < ctype.h>
You can’t perform that action at this time.
0 commit comments