Browse Source

CMake: p3distort is NOT a component; it's its own pandafx library

Sam Edwards 6 years ago
parent
commit
b9e50da3ce
3 changed files with 13 additions and 14 deletions
  1. 2 1
      panda/CMakeLists.txt
  2. 1 1
      panda/metalibs/panda/CMakeLists.txt
  3. 10 12
      panda/src/distort/CMakeLists.txt

+ 2 - 1
panda/CMakeLists.txt

@@ -81,7 +81,7 @@ add_subdirectory(metalibs/pandaphysics)
 
 
 # Now add the Python modules:
 # Now add the Python modules:
 set(CORE_MODULE_COMPONENTS
 set(CORE_MODULE_COMPONENTS
-  p3chan p3char p3collide p3cull p3device p3dgraph p3display p3distort
+  p3chan p3char p3collide p3cull p3device p3dgraph p3display
   p3downloader p3dxml p3event p3express p3gobj p3grutil p3gsgbase p3linmath
   p3downloader p3dxml p3event p3express p3gobj p3grutil p3gsgbase p3linmath
   p3mathutil p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui
   p3mathutil p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui
   p3pipeline p3pnmimage p3pstatclient p3putil p3recorder p3text p3tform
   p3pipeline p3pnmimage p3pstatclient p3putil p3recorder p3text p3tform
@@ -122,6 +122,7 @@ if(INTERROGATE_PYTHON_INTERFACE)
     export_targets(EggPython NAMESPACE "Panda3D::Python::" COMPONENT EggDevel)
     export_targets(EggPython NAMESPACE "Panda3D::Python::" COMPONENT EggDevel)
   endif()
   endif()
 
 
+  add_python_module(panda3d.fx pandafx IMPORT panda3d.core)
   add_python_module(panda3d.physics p3physics p3particlesystem LINK pandaphysics IMPORT panda3d.core)
   add_python_module(panda3d.physics p3physics p3particlesystem LINK pandaphysics IMPORT panda3d.core)
 
 
   if(HAVE_ODE)
   if(HAVE_ODE)

+ 1 - 1
panda/metalibs/panda/CMakeLists.txt

@@ -1,5 +1,5 @@
 set(PANDA_LINK_TARGETS
 set(PANDA_LINK_TARGETS
-  p3chan p3char p3collide p3cull p3device p3dgraph p3display p3distort p3dxml
+  p3chan p3char p3collide p3cull p3device p3dgraph p3display p3dxml
   p3event p3gobj p3grutil p3gsgbase p3linmath p3mathutil
   p3event p3gobj p3grutil p3gsgbase p3linmath p3mathutil
   p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui p3pipeline
   p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui p3pipeline
   p3pnmimage p3pnmimagetypes p3pstatclient p3putil p3recorder p3text p3tform
   p3pnmimage p3pnmimagetypes p3pstatclient p3putil p3recorder p3text p3tform

+ 10 - 12
panda/src/distort/CMakeLists.txt

@@ -18,17 +18,15 @@ set(P3DISTORT_SOURCES
   pSphereLens.cxx
   pSphereLens.cxx
 )
 )
 
 
-composite_sources(p3distort P3DISTORT_SOURCES)
-add_component_library(p3distort SYMBOL BUILDING_PANDAFX
-  ${P3DISTORT_HEADERS} ${P3DISTORT_SOURCES})
-target_link_libraries(p3distort p3pgraphnodes p3display)
-target_interrogate(p3distort ALL)
+composite_sources(pandafx P3DISTORT_SOURCES)
+add_library(pandafx ${P3DISTORT_HEADERS} ${P3DISTORT_SOURCES})
+set_target_properties(pandafx PROPERTIES DEFINE_SYMBOL BUILDING_PANDAFX)
+target_link_libraries(pandafx panda)
+target_interrogate(pandafx ALL)
 
 
-if(NOT BUILD_METALIBS)
-  install(TARGETS p3distort
-    EXPORT Core COMPONENT Core
-    DESTINATION lib
-    RUNTIME DESTINATION bin
-    ARCHIVE COMPONENT CoreDevel)
-endif()
+install(TARGETS pandafx
+  EXPORT Core COMPONENT Core
+  DESTINATION lib
+  RUNTIME DESTINATION bin
+  ARCHIVE COMPONENT CoreDevel)
 install(FILES ${P3DISTORT_HEADERS} COMPONENT CoreDevel DESTINATION include/panda3d)
 install(FILES ${P3DISTORT_HEADERS} COMPONENT CoreDevel DESTINATION include/panda3d)