diff --git a/panda/CMakeLists.txt b/panda/CMakeLists.txt index 43ead6253f..dd8f545255 100644 --- a/panda/CMakeLists.txt +++ b/panda/CMakeLists.txt @@ -81,11 +81,17 @@ add_subdirectory(metalibs/pandaphysics) # Now add the Python modules: set(CORE_MODULE_COMPONENTS p3chan p3char p3collide p3cull p3device p3dgraph p3display p3downloader p3dxml - p3event p3express p3gobj p3grutil p3gsgbase p3linmath p3mathutil p3nativenet - p3net p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui p3pipeline + p3event p3express p3gobj p3grutil p3gsgbase p3linmath p3mathutil + p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui p3pipeline p3pnmimage p3pstatclient p3putil p3recorder p3text p3tform p3prc p3dtoolutil p3dtoolbase) +if(WANT_NATIVE_NET) + list(APPEND CORE_MODULE_COMPONENTS p3nativenet) + if(HAVE_NET) + list(APPEND CORE_MODULE_COMPONENTS p3net) + endif() +endif() if(HAVE_AUDIO) list(APPEND CORE_MODULE_COMPONENTS p3audio) endif() diff --git a/panda/metalibs/panda/CMakeLists.txt b/panda/metalibs/panda/CMakeLists.txt index 1a8d259b67..ee34835678 100644 --- a/panda/metalibs/panda/CMakeLists.txt +++ b/panda/metalibs/panda/CMakeLists.txt @@ -1,9 +1,15 @@ set(PANDA_LINK_TARGETS p3chan p3char p3collide p3cull p3device p3dgraph p3display p3dxml - p3event p3gobj p3grutil p3gsgbase p3linmath p3mathutil p3nativenet - p3net p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui p3pipeline + p3event p3gobj p3grutil p3gsgbase p3linmath p3mathutil + p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui p3pipeline p3pnmimage p3pnmimagetypes p3pstatclient p3putil p3recorder p3text p3tform) +if(WANT_NATIVE_NET) + list(APPEND PANDA_LINK_TARGETS p3nativenet) + if(HAVE_NET) + list(APPEND PANDA_LINK_TARGETS p3net) + endif() +endif() if(HAVE_AUDIO) list(APPEND PANDA_LINK_TARGETS p3audio) endif() diff --git a/panda/src/pstatclient/CMakeLists.txt b/panda/src/pstatclient/CMakeLists.txt index ac256ad870..83a9b7e968 100644 --- a/panda/src/pstatclient/CMakeLists.txt +++ b/panda/src/pstatclient/CMakeLists.txt @@ -23,7 +23,12 @@ set(P3PSTATCLIENT_SOURCES composite_sources(p3pstatclient P3PSTATCLIENT_SOURCES) add_component_library(p3pstatclient SYMBOL BUILDING_PANDA_PSTATCLIENT ${P3PSTATCLIENT_HEADERS} ${P3PSTATCLIENT_SOURCES}) -target_link_libraries(p3pstatclient p3net p3putil pandaexpress) +target_link_libraries(p3pstatclient p3putil pandaexpress) + +if(HAVE_NET AND WANT_NATIVE_NET) + target_link_libraries(p3pstatclient p3net) +endif() + target_interrogate(p3pstatclient ALL) if(NOT BUILD_METALIBS)