diff --git a/direct/src/deadrec/CMakeLists.txt b/direct/src/deadrec/CMakeLists.txt index 26e745268d..fd373bb05c 100644 --- a/direct/src/deadrec/CMakeLists.txt +++ b/direct/src/deadrec/CMakeLists.txt @@ -7,6 +7,7 @@ set(P3DEADREC_SOURCES smoothMover.cxx) add_library(p3deadrec ${P3DEADREC_HEADERS} ${P3DEADREC_SOURCES}) +set_target_properties(p3deadrec PROPERTIES DEFINE_SYMBOL BUILDING_DIRECT_DEADREC) target_link_libraries(p3deadrec p3directbase p3linmath p3pgraph p3prc) target_interrogate(p3deadrec ALL) diff --git a/direct/src/distributed/CMakeLists.txt b/direct/src/distributed/CMakeLists.txt index a04ba893a4..6b2803a7df 100644 --- a/direct/src/distributed/CMakeLists.txt +++ b/direct/src/distributed/CMakeLists.txt @@ -12,6 +12,7 @@ if(HAVE_PYTHON) cDistributedSmoothNodeBase.cxx) add_library(p3distributed ${P3DISTRIBUTED_HEADERS} ${P3DISTRIBUTED_SOURCES}) + set_target_properties(p3distributed PROPERTIES DEFINE_SYMBOL BUILDING_DIRECT_DISTRIBUTED) set_target_properties(p3distributed PROPERTIES COMPILE_DEFINITIONS WITHIN_PANDA) target_link_libraries(p3distributed p3directbase p3dcparser p3pgraph) target_use_packages(p3distributed PYTHON) diff --git a/direct/src/interval/CMakeLists.txt b/direct/src/interval/CMakeLists.txt index 346222657e..3ac8beea25 100644 --- a/direct/src/interval/CMakeLists.txt +++ b/direct/src/interval/CMakeLists.txt @@ -37,6 +37,7 @@ set(P3INTERVAL_SOURCES composite_sources(p3interval P3INTERVAL_SOURCES) add_library(p3interval ${P3INTERVAL_HEADERS} ${P3INTERVAL_SOURCES}) +set_target_properties(p3interval PROPERTIES DEFINE_SYMBOL BUILDING_DIRECT_INTERVAL) target_link_libraries(p3interval p3directbase p3pstatclient p3pgraph p3chan p3dconfig p3prc) target_interrogate(p3interval ALL) diff --git a/direct/src/showbase/CMakeLists.txt b/direct/src/showbase/CMakeLists.txt index 879a23918e..3e7018fe33 100644 --- a/direct/src/showbase/CMakeLists.txt +++ b/direct/src/showbase/CMakeLists.txt @@ -1,4 +1,5 @@ add_library(p3showbase showBase.cxx showBase.h) +set_target_properties(p3showbase PROPERTIES DEFINE_SYMBOL BUILDING_DIRECT_SHOWBASE) target_link_libraries(p3showbase p3directbase p3express p3event p3chan p3display p3dconfig p3prc) target_interrogate(p3showbase ALL) diff --git a/dtool/src/dconfig/CMakeLists.txt b/dtool/src/dconfig/CMakeLists.txt index 9a4280f7a7..642619c0b9 100644 --- a/dtool/src/dconfig/CMakeLists.txt +++ b/dtool/src/dconfig/CMakeLists.txt @@ -7,6 +7,7 @@ set(P3DCONFIG_SOURCES composite_sources(p3dconfig P3DCONFIG_SOURCES) add_library(p3dconfig ${P3DCONFIG_HEADERS} ${P3DCONFIG_SOURCES}) +set_target_properties(p3dconfig PROPERTIES DEFINE_SYMBOL BUILDING_DTOOL_DCONFIG) target_link_libraries(p3dconfig p3prc) install(TARGETS p3dconfig DESTINATION lib) diff --git a/dtool/src/dtoolbase/CMakeLists.txt b/dtool/src/dtoolbase/CMakeLists.txt index 29605d602e..7e7f1fd3cd 100644 --- a/dtool/src/dtoolbase/CMakeLists.txt +++ b/dtool/src/dtoolbase/CMakeLists.txt @@ -70,6 +70,7 @@ set(P3DTOOLBASE_IGATEEXT composite_sources(p3dtoolbase P3DTOOLBASE_SOURCES) add_library(p3dtoolbase ${P3DTOOLBASE_HEADERS} ${P3DTOOLBASE_SOURCES}) +set_target_properties(p3dtoolbase PROPERTIES DEFINE_SYMBOL BUILDING_DTOOL_DTOOLBASE) # The extensions need py_panda.h and extension.h from interrogatedb target_include_directories(p3dtoolbase PUBLIC $) diff --git a/dtool/src/dtoolutil/CMakeLists.txt b/dtool/src/dtoolutil/CMakeLists.txt index de5e45581d..6b0a72e248 100644 --- a/dtool/src/dtoolutil/CMakeLists.txt +++ b/dtool/src/dtoolutil/CMakeLists.txt @@ -72,6 +72,7 @@ set(P3DTOOLUTIL_IGATEEXT composite_sources(p3dtoolutil P3DTOOLUTIL_SOURCES) add_library(p3dtoolutil ${P3DTOOLUTIL_HEADERS} ${P3DTOOLUTIL_SOURCES}) +set_target_properties(p3dtoolutil PROPERTIES DEFINE_SYMBOL BUILDING_DTOOL_DTOOLUTIL) # The extensions need py_panda.h and extension.h from interrogatedb target_include_directories(p3dtoolutil PUBLIC $) diff --git a/dtool/src/prc/CMakeLists.txt b/dtool/src/prc/CMakeLists.txt index 474680e486..e295f1fa37 100644 --- a/dtool/src/prc/CMakeLists.txt +++ b/dtool/src/prc/CMakeLists.txt @@ -71,6 +71,7 @@ set(P3PRC_IGATEEXT composite_sources(p3prc P3PRC_SOURCES) add_library(p3prc ${P3PRC_HEADERS} ${P3PRC_SOURCES}) +set_target_properties(p3prc PROPERTIES DEFINE_SYMBOL BUILDING_DTOOL_PRC) # The extensions need py_panda.h and extension.h from interrogatedb target_include_directories(p3prc PUBLIC $) diff --git a/panda/metalibs/panda/CMakeLists.txt b/panda/metalibs/panda/CMakeLists.txt index 06ac3b525a..ad9651bca3 100644 --- a/panda/metalibs/panda/CMakeLists.txt +++ b/panda/metalibs/panda/CMakeLists.txt @@ -1,4 +1,3 @@ -add_definitions(-DBUILDING_PANDA) set(PANDA_LINK_TARGETS p3chan p3char p3collide p3cull p3device p3dgraph p3display p3downloader p3dxml p3event p3express p3gobj p3grutil p3gsgbase p3linmath p3mathutil p3nativenet @@ -21,6 +20,7 @@ if(LINK_IN_PHYSX) endif() add_library(panda panda.cxx) +set_target_properties(panda PROPERTIES DEFINE_SYMBOL BUILDING_LIBPANDA) target_link_libraries(panda ${PANDA_LINK_TARGETS}) install(TARGETS panda DESTINATION lib) diff --git a/panda/src/audio/CMakeLists.txt b/panda/src/audio/CMakeLists.txt index b382e1ab8c..ca7f6d941b 100644 --- a/panda/src/audio/CMakeLists.txt +++ b/panda/src/audio/CMakeLists.txt @@ -19,6 +19,7 @@ if(HAVE_AUDIO) composite_sources(p3audio P3AUDIO_SOURCES) add_library(p3audio ${P3AUDIO_HEADERS} ${P3AUDIO_SOURCES}) + set_target_properties(p3audio PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_AUDIO) target_link_libraries(p3audio p3putil p3event p3movies p3linmath) target_interrogate(p3audio ALL) diff --git a/panda/src/audiotraits/CMakeLists.txt b/panda/src/audiotraits/CMakeLists.txt index 52d090e794..9084f8e70d 100644 --- a/panda/src/audiotraits/CMakeLists.txt +++ b/panda/src/audiotraits/CMakeLists.txt @@ -18,6 +18,7 @@ if(HAVE_AUDIO) composite_sources(p3miles_audio P3MILES_SOURCES) include_directories(${MILES_INCLUDE_DIR}) add_library(p3miles_audio ${P3MILES_HEADERS} ${P3MILES_SOURCES}) + set_target_properties(p3miles_audio PROPERTIES DEFINE_SYMBOL BUILDING_MILES_AUDIO) target_link_libraries(p3miles_audio p3audio p3event p3pipeline) target_use_packages(p3miles_audio MILES) @@ -36,6 +37,7 @@ if(HAVE_AUDIO) composite_sources(p3fmod_audio P3FMOD_SOURCES) include_directories(${FMODEX_INCLUDE_DIR}) add_library(p3fmod_audio ${P3FMOD_HEADERS} ${P3FMOD_SOURCES}) + set_target_properties(p3fmod_audio PROPERTIES DEFINE_SYMBOL BUILDING_FMOD_AUDIO) target_link_libraries(p3fmod_audio p3audio p3event) target_use_packages(p3fmod_audio FMODEX) @@ -55,6 +57,7 @@ if(HAVE_AUDIO) composite_sources(p3openal_audio P3OPENAL_SOURCES) include_directories(${OPENAL_INCLUDE_DIR}) add_library(p3openal_audio ${P3OPENAL_HEADERS} ${P3OPENAL_SOURCES}) + set_target_properties(p3openal_audio PROPERTIES DEFINE_SYMBOL BUILDING_OPENAL_AUDIO) target_link_libraries(p3openal_audio p3audio p3event) target_use_packages(p3openal_audio OPENAL) diff --git a/panda/src/chan/CMakeLists.txt b/panda/src/chan/CMakeLists.txt index 2a1522b0d7..add157fd3b 100644 --- a/panda/src/chan/CMakeLists.txt +++ b/panda/src/chan/CMakeLists.txt @@ -54,6 +54,7 @@ set(P3CHAN_SOURCES composite_sources(p3chan P3CHAN_SOURCES) add_library(p3chan ${P3CHAN_HEADERS} ${P3CHAN_SOURCES}) +set_target_properties(p3chan PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_CHAN) target_link_libraries(p3chan p3pgraph) target_interrogate(p3chan ALL) diff --git a/panda/src/char/CMakeLists.txt b/panda/src/char/CMakeLists.txt index fa4af297d2..752ddc2307 100644 --- a/panda/src/char/CMakeLists.txt +++ b/panda/src/char/CMakeLists.txt @@ -20,6 +20,7 @@ set(P3CHAR_SOURCES composite_sources(p3char P3CHAR_SOURCES) add_library(p3char ${P3CHAR_HEADERS} ${P3CHAR_SOURCES}) +set_target_properties(p3char PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_CHAR) target_link_libraries(p3char p3chan) target_interrogate(p3char ALL) diff --git a/panda/src/cocoadisplay/CMakeLists.txt b/panda/src/cocoadisplay/CMakeLists.txt index 90bf13cf95..7d5d5f1bd7 100644 --- a/panda/src/cocoadisplay/CMakeLists.txt +++ b/panda/src/cocoadisplay/CMakeLists.txt @@ -19,6 +19,7 @@ if(APPLE AND HAVE_GL AND HAVE_COCOA) #composite_sources(p3cocoadisplay P3COCOADISPLAY_SOURCES) add_library(p3cocoadisplay ${P3COCOADISPLAY_HEADERS} ${P3COCOADISPLAY_SOURCES}) + set_target_properties(p3cocoadisplay PROPERTIES DEFINE_SYMBOL BUILDING_PANDAGL) target_link_libraries(p3cocoadisplay p3display p3putil p3glgsg) # Frameworks: diff --git a/panda/src/collide/CMakeLists.txt b/panda/src/collide/CMakeLists.txt index e8c511531c..7308b23a8c 100644 --- a/panda/src/collide/CMakeLists.txt +++ b/panda/src/collide/CMakeLists.txt @@ -64,6 +64,7 @@ set(P3COLLIDE_SOURCES composite_sources(p3collide P3COLLIDE_SOURCES) add_library(p3collide ${P3COLLIDE_HEADERS} ${P3COLLIDE_SOURCES}) +set_target_properties(p3collide PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_COLLIDE) target_link_libraries(p3collide p3tform) target_interrogate(p3collide ALL) diff --git a/panda/src/cull/CMakeLists.txt b/panda/src/cull/CMakeLists.txt index 22e0e6d1a9..dc01cb1768 100644 --- a/panda/src/cull/CMakeLists.txt +++ b/panda/src/cull/CMakeLists.txt @@ -22,6 +22,7 @@ set(P3CULL_SOURCES composite_sources(p3cull P3CULL_SOURCES) add_library(p3cull ${P3CULL_HEADERS} ${P3CULL_SOURCES}) +set_target_properties(p3cull PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_CULL) target_link_libraries(p3cull p3pgraph) target_interrogate(p3cull ALL) diff --git a/panda/src/device/CMakeLists.txt b/panda/src/device/CMakeLists.txt index 5e2daf8d23..73cf7a5712 100644 --- a/panda/src/device/CMakeLists.txt +++ b/panda/src/device/CMakeLists.txt @@ -28,6 +28,7 @@ set(P3DEVICE_SOURCES composite_sources(p3device P3DEVICE_SOURCES) add_library(p3device ${P3DEVICE_HEADERS} ${P3DEVICE_SOURCES}) +set_target_properties(p3device PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_DEVICE) target_link_libraries(p3device p3dgraph p3display) target_interrogate(p3device ALL) diff --git a/panda/src/dgraph/CMakeLists.txt b/panda/src/dgraph/CMakeLists.txt index 2be765d73a..a1eaeb484f 100644 --- a/panda/src/dgraph/CMakeLists.txt +++ b/panda/src/dgraph/CMakeLists.txt @@ -13,6 +13,7 @@ set(P3DGRAPH_SOURCES composite_sources(p3dgraph P3DGRAPH_SOURCES) add_library(p3dgraph ${P3DGRAPH_HEADERS} ${P3DGRAPH_SOURCES}) +set_target_properties(p3dgraph PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_DGRAPH) target_link_libraries(p3dgraph p3pgraph) target_interrogate(p3dgraph ALL) diff --git a/panda/src/display/CMakeLists.txt b/panda/src/display/CMakeLists.txt index c4d562692c..3bb1c5d795 100644 --- a/panda/src/display/CMakeLists.txt +++ b/panda/src/display/CMakeLists.txt @@ -88,6 +88,7 @@ endif() composite_sources(p3display P3DISPLAY_SOURCES) add_library(p3display ${P3DISPLAY_HEADERS} ${P3DISPLAY_SOURCES}) +set_target_properties(p3display PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_DISPLAY) target_link_libraries(p3display p3cull p3pgraphnodes) target_interrogate(p3display ALL EXTENSIONS ${P3DISPLAY_IGATEEXT}) diff --git a/panda/src/downloader/CMakeLists.txt b/panda/src/downloader/CMakeLists.txt index f6a4917ba0..63ac5da787 100644 --- a/panda/src/downloader/CMakeLists.txt +++ b/panda/src/downloader/CMakeLists.txt @@ -69,6 +69,7 @@ set(P3DOWNLOADER_IGATEEXT composite_sources(p3downloader P3DOWNLOADER_SOURCES) add_library(p3downloader ${P3DOWNLOADER_HEADERS} ${P3DOWNLOADER_SOURCES}) +set_target_properties(p3downloader PROPERTIES DEFINE_SYMBOL BUILDING_PANDAEXPRESS) target_link_libraries(p3downloader p3express p3pipeline) target_interrogate(p3downloader ALL EXTENSIONS ${P3DOWNLOADER_IGATEEXT}) diff --git a/panda/src/dxml/CMakeLists.txt b/panda/src/dxml/CMakeLists.txt index 1ed083a8e0..8da15454d7 100644 --- a/panda/src/dxml/CMakeLists.txt +++ b/panda/src/dxml/CMakeLists.txt @@ -13,6 +13,7 @@ set(P3DXML_SOURCES composite_sources(p3dxml P3DXML_SOURCES) add_definitions(-DTIXML_USE_STL) add_library(p3dxml ${P3DXML_HEADERS} ${P3DXML_SOURCES}) +set_target_properties(p3dxml PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_DXML) target_link_libraries(p3dxml p3express) target_interrogate(p3dxml ALL) diff --git a/panda/src/egg/CMakeLists.txt b/panda/src/egg/CMakeLists.txt index 08f881044f..0da2748074 100644 --- a/panda/src/egg/CMakeLists.txt +++ b/panda/src/egg/CMakeLists.txt @@ -100,6 +100,7 @@ if(HAVE_EGG) composite_sources(p3egg P3EGG_SOURCES) add_library(p3egg ${P3EGG_HEADERS} ${P3EGG_SOURCES} ${P3EGG_PARSER_SOURCES}) + set_target_properties(p3egg PROPERTIES DEFINE_SYMBOL BUILDING_PANDAEGG) target_link_libraries(p3egg p3prc p3pandabase p3express p3linmath p3mathutil) target_interrogate(p3egg ${P3EGG_HEADERS} ${P3EGG_SOURCES} EXTENSIONS ${P3EGG_IGATEEXT}) diff --git a/panda/src/egg2pg/CMakeLists.txt b/panda/src/egg2pg/CMakeLists.txt index c7b23c8acf..9e0e038476 100644 --- a/panda/src/egg2pg/CMakeLists.txt +++ b/panda/src/egg2pg/CMakeLists.txt @@ -31,6 +31,7 @@ if(HAVE_EGG) composite_sources(p3egg2pg P3EGG2PG_SOURCES) add_library(p3egg2pg ${P3EGG2PG_HEADERS} ${P3EGG2PG_SOURCES}) + set_target_properties(p3egg2pg PROPERTIES DEFINE_SYMBOL BUILDING_PANDAEGG) target_link_libraries(p3egg2pg p3parametrics p3collide p3egg p3pgraph p3chan p3char) target_interrogate(p3egg2pg ALL) diff --git a/panda/src/event/CMakeLists.txt b/panda/src/event/CMakeLists.txt index c29fa3bcd8..3857ceb704 100644 --- a/panda/src/event/CMakeLists.txt +++ b/panda/src/event/CMakeLists.txt @@ -46,6 +46,7 @@ set(P3EVENT_IGATEEXT composite_sources(p3event P3EVENT_SOURCES) add_library(p3event ${P3EVENT_HEADERS} ${P3EVENT_SOURCES}) +set_target_properties(p3event PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_EVENT) target_link_libraries(p3event p3linmath p3pstatclient) target_interrogate(p3event ALL EXTENSIONS ${P3EVENT_IGATEEXT}) diff --git a/panda/src/express/CMakeLists.txt b/panda/src/express/CMakeLists.txt index 7fa891c805..2319c79c81 100644 --- a/panda/src/express/CMakeLists.txt +++ b/panda/src/express/CMakeLists.txt @@ -145,6 +145,7 @@ set(P3EXPRESS_IGATEEXT composite_sources(p3express P3EXPRESS_SOURCES) add_library(p3express ${P3EXPRESS_SOURCES} ${P3EXPRESS_HEADERS}) +set_target_properties(p3express PROPERTIES DEFINE_SYMBOL BUILDING_PANDAEXPRESS) # p3express needs to include from p3interrogatedb for py_panda.h and extension.h target_include_directories(p3express PUBLIC diff --git a/panda/src/ffmpeg/CMakeLists.txt b/panda/src/ffmpeg/CMakeLists.txt index b8a41c2b6e..5b3ae8c396 100644 --- a/panda/src/ffmpeg/CMakeLists.txt +++ b/panda/src/ffmpeg/CMakeLists.txt @@ -19,6 +19,7 @@ if(HAVE_FFMPEG) composite_sources(p3ffmpeg P3FFMPEG_SOURCES) add_library(p3ffmpeg ${P3FFMPEG_HEADERS} ${P3FFMPEG_SOURCES}) + set_target_properties(p3ffmpeg PROPERTIES DEFINE_SYMBOL BUILDING_FFMPEG) target_link_libraries(p3ffmpeg p3movies) target_use_packages(p3ffmpeg FFMPEG SWSCALE SWRESAMPLE) diff --git a/panda/src/framework/CMakeLists.txt b/panda/src/framework/CMakeLists.txt index a2444365a1..3a969ca746 100644 --- a/panda/src/framework/CMakeLists.txt +++ b/panda/src/framework/CMakeLists.txt @@ -47,6 +47,7 @@ endif() composite_sources(p3framework P3FRAMEWORK_SOURCES) add_library(p3framework ${P3FRAMEWORK_HEADERS} ${P3FRAMEWORK_SOURCES}) +set_target_properties(p3framework PROPERTIES DEFINE_SYMBOL BUILDING_FRAMEWORK) target_link_libraries(p3framework ${P3FRAMEWORK_LINK_TARGETS}) install(TARGETS p3framework DESTINATION lib) diff --git a/panda/src/glgsg/CMakeLists.txt b/panda/src/glgsg/CMakeLists.txt index d3c5567281..87192401e4 100644 --- a/panda/src/glgsg/CMakeLists.txt +++ b/panda/src/glgsg/CMakeLists.txt @@ -10,6 +10,7 @@ if(HAVE_GL) composite_sources(p3glgsg P3GLGSG_SOURCES) add_library(p3glgsg ${P3GLGSG_HEADERS} ${P3GLGSG_SOURCES}) + set_target_properties(p3glgsg PROPERTIES DEFINE_SYMBOL BUILDING_PANDAGL) target_link_libraries(p3glgsg p3glstuff p3display ${OPENGL_LIBRARIES}) target_use_packages(p3glgsg CG) diff --git a/panda/src/glxdisplay/CMakeLists.txt b/panda/src/glxdisplay/CMakeLists.txt index b7f6019786..3525402f91 100644 --- a/panda/src/glxdisplay/CMakeLists.txt +++ b/panda/src/glxdisplay/CMakeLists.txt @@ -22,6 +22,7 @@ if(HAVE_GLX) composite_sources(p3glxdisplay P3GLXDISPLAY_SOURCES) add_library(p3glxdisplay ${P3GLXDISPLAY_HEADERS} ${P3GLXDISPLAY_SOURCES}) + set_target_properties(p3glxdisplay PROPERTIES DEFINE_SYMBOL BUILDING_PANDAGL) target_link_libraries(p3glxdisplay p3glgsg p3x11display) install(TARGETS p3glxdisplay DESTINATION lib) diff --git a/panda/src/gobj/CMakeLists.txt b/panda/src/gobj/CMakeLists.txt index e308ba8c6d..5f6a6749c5 100644 --- a/panda/src/gobj/CMakeLists.txt +++ b/panda/src/gobj/CMakeLists.txt @@ -169,6 +169,7 @@ set(P3GOBJ_IGATEEXT composite_sources(p3gobj P3GOBJ_SOURCES) add_library(p3gobj ${P3GOBJ_HEADERS} ${P3GOBJ_SOURCES}) +set_target_properties(p3gobj PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_GOBJ) target_link_libraries(p3gobj p3gsgbase p3pnmimage) target_use_packages(p3gobj ZLIB SQUISH CG) target_interrogate(p3gobj ALL EXTENSIONS ${P3GOBJ_IGATEEXT}) diff --git a/panda/src/grutil/CMakeLists.txt b/panda/src/grutil/CMakeLists.txt index 38c21a3c2c..17cf54ca5c 100644 --- a/panda/src/grutil/CMakeLists.txt +++ b/panda/src/grutil/CMakeLists.txt @@ -39,6 +39,7 @@ set(P3GRUTIL_SOURCES composite_sources(p3grutil P3GRUTIL_SOURCES) add_library(p3grutil ${P3GRUTIL_HEADERS} ${P3GRUTIL_SOURCES}) +set_target_properties(p3grutil PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_GRUTIL) target_link_libraries(p3grutil p3display p3text p3movies) if(HAVE_AUDIO) target_link_libraries(p3grutil p3audio) diff --git a/panda/src/gsgbase/CMakeLists.txt b/panda/src/gsgbase/CMakeLists.txt index 37f54fe4b9..97e492c4ca 100644 --- a/panda/src/gsgbase/CMakeLists.txt +++ b/panda/src/gsgbase/CMakeLists.txt @@ -12,6 +12,7 @@ set(P3GSGBASE_SOURCES composite_sources(p3gsgbase P3GSGBASE_SOURCES) add_library(p3gsgbase ${P3GSGBASE_HEADERS} ${P3GSGBASE_SOURCES}) +set_target_properties(p3gsgbase PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_GSGBASE) target_link_libraries(p3gsgbase p3putil p3linmath) target_interrogate(p3gsgbase ALL) diff --git a/panda/src/linmath/CMakeLists.txt b/panda/src/linmath/CMakeLists.txt index be9d1dcfa5..b2211657ca 100644 --- a/panda/src/linmath/CMakeLists.txt +++ b/panda/src/linmath/CMakeLists.txt @@ -45,6 +45,7 @@ set(P3LINMATH_SOURCES composite_sources(p3linmath P3LINMATH_SOURCES) add_library(p3linmath ${P3LINMATH_HEADERS} ${P3LINMATH_SOURCES}) +set_target_properties(p3linmath PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_LINMATH) target_link_libraries(p3linmath p3express p3pandabase) target_use_packages(p3linmath EIGEN) target_interrogate(p3linmath ALL) diff --git a/panda/src/mathutil/CMakeLists.txt b/panda/src/mathutil/CMakeLists.txt index fcc9f55dea..90fcd5fccd 100644 --- a/panda/src/mathutil/CMakeLists.txt +++ b/panda/src/mathutil/CMakeLists.txt @@ -62,6 +62,7 @@ set(P3MATHUTIL_SOURCES composite_sources(p3mathutil P3MATHUTIL_SOURCES) add_library(p3mathutil ${P3MATHUTIL_HEADERS} ${P3MATHUTIL_SOURCES}) +set_target_properties(p3mathutil PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_MATHUTIL) target_link_libraries(p3mathutil p3event) target_use_packages(p3mathutil FFTW) target_interrogate(p3mathutil ALL) diff --git a/panda/src/movies/CMakeLists.txt b/panda/src/movies/CMakeLists.txt index 21273d25d6..e5dabb63a8 100644 --- a/panda/src/movies/CMakeLists.txt +++ b/panda/src/movies/CMakeLists.txt @@ -43,6 +43,7 @@ set(P3MOVIES_SOURCES composite_sources(p3movies P3MOVIES_SOURCES) add_library(p3movies ${P3MOVIES_HEADERS} ${P3MOVIES_SOURCES}) +set_target_properties(p3movies PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_MOVIES) target_link_libraries(p3movies p3pandabase p3express p3pstatclient p3gobj p3dconfig p3prc) target_interrogate(p3movies ALL) diff --git a/panda/src/nativenet/CMakeLists.txt b/panda/src/nativenet/CMakeLists.txt index ce3cb8191e..8c3a1b4b1f 100644 --- a/panda/src/nativenet/CMakeLists.txt +++ b/panda/src/nativenet/CMakeLists.txt @@ -26,6 +26,7 @@ if(WANT_NATIVE_NET) composite_sources(p3nativenet P3NATIVENET_SOURCES) add_library(p3nativenet ${P3NATIVENET_HEADERS} ${P3NATIVENET_SOURCES}) + set_target_properties(p3nativenet PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_NATIVENET) target_link_libraries(p3nativenet p3express p3pandabase p3downloader) target_interrogate(p3nativenet ALL) diff --git a/panda/src/net/CMakeLists.txt b/panda/src/net/CMakeLists.txt index c119cea610..9a2eca80c9 100644 --- a/panda/src/net/CMakeLists.txt +++ b/panda/src/net/CMakeLists.txt @@ -27,6 +27,7 @@ if(HAVE_NET AND WANT_NATIVE_NET) composite_sources(p3net P3NET_SOURCES) add_library(p3net ${P3NET_HEADERS} ${P3NET_SOURCES}) + set_target_properties(p3net PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_NET) target_link_libraries(p3net p3express p3downloader p3pandabase p3nativenet p3pipeline) target_interrogate(p3net ALL) diff --git a/panda/src/ode/CMakeLists.txt b/panda/src/ode/CMakeLists.txt index b5ed1e9840..edca403ec1 100644 --- a/panda/src/ode/CMakeLists.txt +++ b/panda/src/ode/CMakeLists.txt @@ -82,6 +82,7 @@ if(HAVE_ODE) composite_sources(p3ode P3ODE_SOURCES) add_library(p3ode ${P3ODE_SOURCES} ${P3ODE_HEADERS}) + set_target_properties(p3ode PROPERTIES DEFINE_SYMBOL BUILDING_PANDAODE) set_target_properties(p3ode PROPERTIES COMPILE_DEFINITIONS dSINGLE) target_link_libraries(p3ode p3pgraph p3physics ${ODE_LIBRARY}) target_interrogate(p3ode ${P3ODE_IGATE_SOURCES} EXTENSIONS ${P3ODE_IGATEEXT}) diff --git a/panda/src/osxdisplay/CMakeLists.txt b/panda/src/osxdisplay/CMakeLists.txt index 8727804cdd..ac03c9620d 100644 --- a/panda/src/osxdisplay/CMakeLists.txt +++ b/panda/src/osxdisplay/CMakeLists.txt @@ -11,6 +11,7 @@ if(APPLE AND HAVE_GL AND HAVE_CARBON) composite_sources(p3osxdisplay P3OSXDISPLAY_SOURCES) add_library(p3osxdisplay ${P3OSXDISPLAY_HEADERS} ${P3OSXDISPLAY_SOURCES}) + set_target_properties(p3osxdisplay PROPERTIES DEFINE_SYMBOL BUILDING_PANDAGL) target_link_libraries(p3osxdisplay p3display p3putil p3glgsg) # Frameworks: diff --git a/panda/src/parametrics/CMakeLists.txt b/panda/src/parametrics/CMakeLists.txt index 8e214964c5..6b5e9a0337 100644 --- a/panda/src/parametrics/CMakeLists.txt +++ b/panda/src/parametrics/CMakeLists.txt @@ -35,6 +35,7 @@ set(P3PARAMETRICS_SOURCES composite_sources(p3parametrics P3PARAMETRICS_SOURCES) add_library(p3parametrics ${P3PARAMETRICS_HEADERS} ${P3PARAMETRICS_SOURCES}) +set_target_properties(p3parametrics PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_PARAMETRICS) target_link_libraries(p3parametrics p3pgraph) target_interrogate(p3parametrics ALL) diff --git a/panda/src/particlesystem/CMakeLists.txt b/panda/src/particlesystem/CMakeLists.txt index 75b970d4bd..bbd2818582 100644 --- a/panda/src/particlesystem/CMakeLists.txt +++ b/panda/src/particlesystem/CMakeLists.txt @@ -39,6 +39,7 @@ set(P3PARTICLESYSTEM_SOURCES composite_sources(p3particlesystem P3PARTICLESYSTEM_SOURCES) add_library(p3particlesystem ${P3PARTICLESYSTEM_HEADERS} ${P3PARTICLESYSTEM_SOURCES}) +set_target_properties(p3particlesystem PROPERTIES DEFINE_SYMBOL BUILDING_PANDAPHYSICS) target_link_libraries(p3particlesystem p3pgraph p3physics) target_interrogate(p3particlesystem ALL) diff --git a/panda/src/pgraph/CMakeLists.txt b/panda/src/pgraph/CMakeLists.txt index 7d88a7adca..a6830270ea 100644 --- a/panda/src/pgraph/CMakeLists.txt +++ b/panda/src/pgraph/CMakeLists.txt @@ -218,6 +218,7 @@ set(P3PGRAPH_IGATEEXT composite_sources(p3pgraph P3PGRAPH_SOURCES) add_library(p3pgraph ${P3PGRAPH_HEADERS} ${P3PGRAPH_SOURCES}) +set_target_properties(p3pgraph PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_PGRAPH) target_link_libraries(p3pgraph p3gobj p3event p3gsgbase p3putil p3linmath p3downloader) target_interrogate(p3pgraph ALL EXTENSIONS ${P3PGRAPH_IGATEEXT}) diff --git a/panda/src/pgraphnodes/CMakeLists.txt b/panda/src/pgraphnodes/CMakeLists.txt index b1c745838f..f33280dffe 100644 --- a/panda/src/pgraphnodes/CMakeLists.txt +++ b/panda/src/pgraphnodes/CMakeLists.txt @@ -46,6 +46,7 @@ set(P3PGRAPHNODES_SOURCES composite_sources(p3pgraphnodes P3PGRAPHNODES_SOURCES) add_library(p3pgraphnodes ${P3PGRAPHNODES_HEADERS} ${P3PGRAPHNODES_SOURCES}) +set_target_properties(p3pgraphnodes PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_PGRAPHNODES) target_link_libraries(p3pgraphnodes p3pgraph) target_interrogate(p3pgraphnodes ALL) diff --git a/panda/src/pgui/CMakeLists.txt b/panda/src/pgui/CMakeLists.txt index d7d425a087..129536eaa9 100644 --- a/panda/src/pgui/CMakeLists.txt +++ b/panda/src/pgui/CMakeLists.txt @@ -41,6 +41,7 @@ set(P3PGUI_SOURCES composite_sources(p3pgui P3PGUI_SOURCES) add_library(p3pgui ${P3PGUI_HEADERS} ${P3PGUI_SOURCES}) +set_target_properties(p3pgui PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_PGUI) target_link_libraries(p3pgui p3tform) target_interrogate(p3pgui ALL) diff --git a/panda/src/physics/CMakeLists.txt b/panda/src/physics/CMakeLists.txt index c74b40e6de..06b4f999c6 100644 --- a/panda/src/physics/CMakeLists.txt +++ b/panda/src/physics/CMakeLists.txt @@ -37,6 +37,7 @@ set(P3PHYSICS_SOURCES composite_sources(p3physics P3PHYSICS_SOURCES) add_library(p3physics ${P3PHYSICS_HEADERS} ${P3PHYSICS_SOURCES}) +set_target_properties(p3physics PROPERTIES DEFINE_SYMBOL BUILDING_PANDAPHYSICS) target_link_libraries(p3physics p3pgraph p3linmath p3collide) target_interrogate(p3physics ALL) diff --git a/panda/src/pipeline/CMakeLists.txt b/panda/src/pipeline/CMakeLists.txt index a2c2abb089..a36f01dc1e 100644 --- a/panda/src/pipeline/CMakeLists.txt +++ b/panda/src/pipeline/CMakeLists.txt @@ -129,6 +129,7 @@ set(P3PIPELINE_IGATEEXT composite_sources(p3pipeline P3PIPELINE_SOURCES) add_library(p3pipeline ${P3PIPELINE_HEADERS} ${P3PIPELINE_SOURCES}) +set_target_properties(p3pipeline PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_PIPELINE) target_link_libraries(p3pipeline p3express) target_interrogate(p3pipeline ALL EXTENSIONS ${P3PIPELINE_IGATEEXT}) diff --git a/panda/src/pnmimage/CMakeLists.txt b/panda/src/pnmimage/CMakeLists.txt index 1cf9cc11b3..2865296c74 100644 --- a/panda/src/pnmimage/CMakeLists.txt +++ b/panda/src/pnmimage/CMakeLists.txt @@ -36,6 +36,7 @@ endif() composite_sources(p3pnmimage P3PNMIMAGE_SOURCES) add_library(p3pnmimage ${P3PNMIMAGE_HEADERS} ${P3PNMIMAGE_SOURCES} convert_srgb_sse2.cxx) +set_target_properties(p3pnmimage PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_PNMIMAGE) target_link_libraries(p3pnmimage p3mathutil) target_interrogate(p3pnmimage ALL EXTENSIONS ${P3PNMIMAGE_IGATEEXT}) diff --git a/panda/src/pnmimagetypes/CMakeLists.txt b/panda/src/pnmimagetypes/CMakeLists.txt index 509d13bd11..21e4f98285 100644 --- a/panda/src/pnmimagetypes/CMakeLists.txt +++ b/panda/src/pnmimagetypes/CMakeLists.txt @@ -32,6 +32,7 @@ set(P3PNMIMAGETYPES_SOURCES composite_sources(p3pnmimagetypes P3PNMIMAGETYPES_SOURCES) add_library(p3pnmimagetypes ${P3PNMIMAGETYPES_HEADERS} ${P3PNMIMAGETYPES_SOURCES}) +set_target_properties(p3pnmimagetypes PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_PNMIMAGETYPES) target_link_libraries(p3pnmimagetypes p3pnmimage) target_use_packages(p3pnmimagetypes JPEG TIFF PNG) diff --git a/panda/src/pnmtext/CMakeLists.txt b/panda/src/pnmtext/CMakeLists.txt index cfd2a0f24e..3256654fd8 100644 --- a/panda/src/pnmtext/CMakeLists.txt +++ b/panda/src/pnmtext/CMakeLists.txt @@ -16,6 +16,7 @@ if(HAVE_FREETYPE) composite_sources(p3pnmtext P3PNMTEXT_SOURCES) add_library(p3pnmtext ${P3PNMTEXT_HEADERS} ${P3PNMTEXT_SOURCES}) + set_target_properties(p3pnmtext PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_PNMTEXT) target_link_libraries(p3pnmtext p3parametrics p3pnmimage) target_use_packages(p3pnmtext FREETYPE) target_interrogate(p3pnmtext ALL) diff --git a/panda/src/pstatclient/CMakeLists.txt b/panda/src/pstatclient/CMakeLists.txt index 701913c88a..82572d3def 100644 --- a/panda/src/pstatclient/CMakeLists.txt +++ b/panda/src/pstatclient/CMakeLists.txt @@ -22,6 +22,7 @@ set(P3PSTATCLIENT_SOURCES composite_sources(p3pstatclient P3PSTATCLIENT_SOURCES) add_library(p3pstatclient ${P3PSTATCLIENT_HEADERS} ${P3PSTATCLIENT_SOURCES}) +set_target_properties(p3pstatclient PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_PSTATCLIENT) target_link_libraries(p3pstatclient p3net p3putil p3express) target_interrogate(p3pstatclient ALL) diff --git a/panda/src/putil/CMakeLists.txt b/panda/src/putil/CMakeLists.txt index e79254aa7b..f6071a41f7 100644 --- a/panda/src/putil/CMakeLists.txt +++ b/panda/src/putil/CMakeLists.txt @@ -125,6 +125,7 @@ set(P3PUTIL_IGATEEXT composite_sources(p3putil P3PUTIL_SOURCES) add_library(p3putil ${P3PUTIL_HEADERS} ${P3PUTIL_SOURCES}) +set_target_properties(p3putil PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_PUTIL) target_link_libraries(p3putil p3linmath p3pipeline) target_interrogate(p3putil ALL EXTENSIONS ${P3PUTIL_IGATEEXT}) diff --git a/panda/src/recorder/CMakeLists.txt b/panda/src/recorder/CMakeLists.txt index e5258ba0ee..1409685ab7 100644 --- a/panda/src/recorder/CMakeLists.txt +++ b/panda/src/recorder/CMakeLists.txt @@ -18,6 +18,7 @@ set(P3RECORDER_SOURCES composite_sources(p3recorder P3RECORDER_SOURCES) add_library(p3recorder ${P3RECORDER_HEADERS} ${P3RECORDER_SOURCES}) +set_target_properties(p3recorder PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_RECORDER) target_link_libraries(p3recorder p3dgraph p3downloader) target_interrogate(p3recorder ALL) diff --git a/panda/src/text/CMakeLists.txt b/panda/src/text/CMakeLists.txt index f6a6a9c3a3..0f3ded3729 100644 --- a/panda/src/text/CMakeLists.txt +++ b/panda/src/text/CMakeLists.txt @@ -34,6 +34,7 @@ set(P3TEXT_SOURCES composite_sources(p3text P3TEXT_SOURCES) add_library(p3text ${P3TEXT_HEADERS} ${P3TEXT_SOURCES}) +set_target_properties(p3text PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_TEXT) target_link_libraries(p3text p3parametrics) if(HAVE_FREETYPE) target_link_libraries(p3text p3pnmtext) diff --git a/panda/src/tform/CMakeLists.txt b/panda/src/tform/CMakeLists.txt index d45f162f0e..bb20b821ed 100644 --- a/panda/src/tform/CMakeLists.txt +++ b/panda/src/tform/CMakeLists.txt @@ -28,6 +28,7 @@ set(P3TFORM_SOURCES composite_sources(p3tform P3TFORM_SOURCES) add_library(p3tform ${P3TFORM_HEADERS} ${P3TFORM_SOURCES}) +set_target_properties(p3tform PROPERTIES DEFINE_SYMBOL BUILDING_PANDA_TFORM) target_link_libraries(p3tform p3device p3grutil) target_interrogate(p3tform ALL) diff --git a/panda/src/wgldisplay/CMakeLists.txt b/panda/src/wgldisplay/CMakeLists.txt index f6e83b06af..0370beadab 100644 --- a/panda/src/wgldisplay/CMakeLists.txt +++ b/panda/src/wgldisplay/CMakeLists.txt @@ -17,5 +17,6 @@ if(HAVE_WGL) composite_sources(p3wgldisplay P3WGLDISPLAY_SOURCES) add_library(p3wgldisplay ${P3WGLDISPLAY_HEADERS} ${P3WGLDISPLAY_SOURCES}) + set_target_properties(p3wgldisplay PROPERTIES DEFINE_SYMBOL BUILDING_PANDAGL) target_link_libraries(p3wgldisplay p3display p3putil p3windisplay p3glgsg) endif() diff --git a/panda/src/windisplay/CMakeLists.txt b/panda/src/windisplay/CMakeLists.txt index bd123d3ed7..92c5748301 100644 --- a/panda/src/windisplay/CMakeLists.txt +++ b/panda/src/windisplay/CMakeLists.txt @@ -12,6 +12,7 @@ if(WIN32) composite_sources(p3windisplay P3WINDISPLAY_SOURCES) add_library(p3windisplay ${P3WINDISPLAY_HEADERS} ${P3WINDISPLAY_SOURCES}) + set_target_properties(p3windisplay PROPERTIES DEFINE_SYMBOL BUILDING_PANDAWIN) target_link_libraries(p3windisplay p3display p3putil Imm32.lib) endif() diff --git a/panda/src/x11display/CMakeLists.txt b/panda/src/x11display/CMakeLists.txt index 8c66448497..3053e81677 100644 --- a/panda/src/x11display/CMakeLists.txt +++ b/panda/src/x11display/CMakeLists.txt @@ -10,6 +10,7 @@ if(HAVE_X11) composite_sources(p3x11display P3X11DISPLAY_SOURCES) add_library(p3x11display ${P3X11DISPLAY_HEADERS} ${P3X11DISPLAY_SOURCES}) + set_target_properties(p3x11display PROPERTIES DEFINE_SYMBOL BUILDING_PANDAX11) target_link_libraries(p3x11display p3display ${X11_LIBRARIES}) install(TARGETS p3x11display DESTINATION lib)