mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-16 00:34:50 -04:00
Fix mac and static build issues
This commit is contained in:
parent
0eeec6b02f
commit
1088cdedc8
@ -127,6 +127,16 @@ INLINE ostream &operator << (ostream &out, NotifyCategoryProxy<GetCategory> &pro
|
|||||||
|
|
||||||
#ifdef CPPPARSER
|
#ifdef CPPPARSER
|
||||||
#define NotifyCategoryDecl(basename, expcl, exptp)
|
#define NotifyCategoryDecl(basename, expcl, exptp)
|
||||||
|
#elif defined(WIN32_VC)
|
||||||
|
// MSVC's rules for extern template classes differ slightly.
|
||||||
|
#define NotifyCategoryDecl(basename, expcl, exptp) \
|
||||||
|
class expcl NotifyCategoryGetCategory_ ## basename { \
|
||||||
|
public: \
|
||||||
|
NotifyCategoryGetCategory_ ## basename(); \
|
||||||
|
static NotifyCategory *get_category(); \
|
||||||
|
}; \
|
||||||
|
EXPORT_TEMPLATE_CLASS(expcl, exptp, NotifyCategoryProxy<NotifyCategoryGetCategory_ ## basename>); \
|
||||||
|
extern expcl NotifyCategoryProxy<NotifyCategoryGetCategory_ ## basename> basename ## _cat;
|
||||||
#else
|
#else
|
||||||
#define NotifyCategoryDecl(basename, expcl, exptp) \
|
#define NotifyCategoryDecl(basename, expcl, exptp) \
|
||||||
class expcl NotifyCategoryGetCategory_ ## basename { \
|
class expcl NotifyCategoryGetCategory_ ## basename { \
|
||||||
@ -134,7 +144,7 @@ INLINE ostream &operator << (ostream &out, NotifyCategoryProxy<GetCategory> &pro
|
|||||||
NotifyCategoryGetCategory_ ## basename(); \
|
NotifyCategoryGetCategory_ ## basename(); \
|
||||||
static NotifyCategory *get_category(); \
|
static NotifyCategory *get_category(); \
|
||||||
}; \
|
}; \
|
||||||
exptp template class expcl NotifyCategoryProxy<NotifyCategoryGetCategory_ ## basename>; \
|
EXPORT_TEMPLATE_CLASS(expcl, extern, NotifyCategoryProxy<NotifyCategoryGetCategory_ ## basename>); \
|
||||||
extern expcl NotifyCategoryProxy<NotifyCategoryGetCategory_ ## basename> basename ## _cat;
|
extern expcl NotifyCategoryProxy<NotifyCategoryGetCategory_ ## basename> basename ## _cat;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -161,6 +171,7 @@ INLINE ostream &operator << (ostream &out, NotifyCategoryProxy<GetCategory> &pro
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
#define NotifyCategoryDefName(basename, actual_name, parent_category) \
|
#define NotifyCategoryDefName(basename, actual_name, parent_category) \
|
||||||
|
template class NotifyCategoryProxy<NotifyCategoryGetCategory_ ## basename>; \
|
||||||
NotifyCategoryProxy<NotifyCategoryGetCategory_ ## basename> basename ## _cat; \
|
NotifyCategoryProxy<NotifyCategoryGetCategory_ ## basename> basename ## _cat; \
|
||||||
static NotifyCategoryGetCategory_ ## basename force_init_ ## basename ## _cat; \
|
static NotifyCategoryGetCategory_ ## basename force_init_ ## basename ## _cat; \
|
||||||
NotifyCategoryGetCategory_ ## basename:: \
|
NotifyCategoryGetCategory_ ## basename:: \
|
||||||
|
@ -1155,6 +1155,7 @@ def CompileCxx(obj,src,opts):
|
|||||||
if (opt=="ALWAYS") or (opt in opts): cmd += ' -D' + var + '=' + val
|
if (opt=="ALWAYS") or (opt in opts): cmd += ' -D' + var + '=' + val
|
||||||
for x in ipath: cmd += ' -I' + x
|
for x in ipath: cmd += ' -I' + x
|
||||||
|
|
||||||
|
if not GetLinkAllStatic():
|
||||||
cmd += ' -fvisibility=hidden'
|
cmd += ' -fvisibility=hidden'
|
||||||
|
|
||||||
# Mac-specific flags.
|
# Mac-specific flags.
|
||||||
@ -3227,8 +3228,8 @@ if (not RTDIST and not RUNTIME):
|
|||||||
OPTS=['DIR:dtool/src/test_interrogate']
|
OPTS=['DIR:dtool/src/test_interrogate']
|
||||||
TargetAdd('test_interrogate_test_interrogate.obj', opts=OPTS, input='test_interrogate.cxx')
|
TargetAdd('test_interrogate_test_interrogate.obj', opts=OPTS, input='test_interrogate.cxx')
|
||||||
TargetAdd('test_interrogate.exe', input='test_interrogate_test_interrogate.obj')
|
TargetAdd('test_interrogate.exe', input='test_interrogate_test_interrogate.obj')
|
||||||
TargetAdd('test_interrogate.exe', input=COMMON_DTOOL_LIBS_PYSTUB)
|
|
||||||
TargetAdd('test_interrogate.exe', input='libp3interrogatedb.dll')
|
TargetAdd('test_interrogate.exe', input='libp3interrogatedb.dll')
|
||||||
|
TargetAdd('test_interrogate.exe', input=COMMON_DTOOL_LIBS_PYSTUB)
|
||||||
TargetAdd('test_interrogate.exe', opts=['ADVAPI', 'OPENSSL', 'WINSHELL', 'WINGDI', 'WINUSER'])
|
TargetAdd('test_interrogate.exe', opts=['ADVAPI', 'OPENSSL', 'WINSHELL', 'WINGDI', 'WINUSER'])
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user