mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -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
|
||||
#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
|
||||
#define NotifyCategoryDecl(basename, expcl, exptp) \
|
||||
class expcl NotifyCategoryGetCategory_ ## basename { \
|
||||
@ -134,7 +144,7 @@ INLINE ostream &operator << (ostream &out, NotifyCategoryProxy<GetCategory> &pro
|
||||
NotifyCategoryGetCategory_ ## basename(); \
|
||||
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;
|
||||
#endif
|
||||
|
||||
@ -161,6 +171,7 @@ INLINE ostream &operator << (ostream &out, NotifyCategoryProxy<GetCategory> &pro
|
||||
|
||||
#else
|
||||
#define NotifyCategoryDefName(basename, actual_name, parent_category) \
|
||||
template class NotifyCategoryProxy<NotifyCategoryGetCategory_ ## basename>; \
|
||||
NotifyCategoryProxy<NotifyCategoryGetCategory_ ## basename> basename ## _cat; \
|
||||
static NotifyCategoryGetCategory_ ## basename force_init_ ## basename ## _cat; \
|
||||
NotifyCategoryGetCategory_ ## basename:: \
|
||||
|
@ -1155,7 +1155,8 @@ def CompileCxx(obj,src,opts):
|
||||
if (opt=="ALWAYS") or (opt in opts): cmd += ' -D' + var + '=' + val
|
||||
for x in ipath: cmd += ' -I' + x
|
||||
|
||||
cmd += ' -fvisibility=hidden'
|
||||
if not GetLinkAllStatic():
|
||||
cmd += ' -fvisibility=hidden'
|
||||
|
||||
# Mac-specific flags.
|
||||
if GetTarget() == "darwin":
|
||||
@ -3227,8 +3228,8 @@ if (not RTDIST and not RUNTIME):
|
||||
OPTS=['DIR:dtool/src/test_interrogate']
|
||||
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=COMMON_DTOOL_LIBS_PYSTUB)
|
||||
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'])
|
||||
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user