Skip to content

Commit

Permalink
CMake: p3distort is NOT a component; it's its own pandafx library
Browse files Browse the repository at this point in the history
  • Loading branch information
CFSworks committed Aug 20, 2019
1 parent 31c9a88 commit b9e50da
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
3 changes: 2 additions & 1 deletion panda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ add_subdirectory(metalibs/pandaphysics)

# Now add the Python modules:
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
p3mathutil p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui
p3pipeline p3pnmimage p3pstatclient p3putil p3recorder p3text p3tform
Expand Down Expand Up @@ -122,6 +122,7 @@ if(INTERROGATE_PYTHON_INTERFACE)
export_targets(EggPython NAMESPACE "Panda3D::Python::" COMPONENT EggDevel)
endif()

add_python_module(panda3d.fx pandafx IMPORT panda3d.core)
add_python_module(panda3d.physics p3physics p3particlesystem LINK pandaphysics IMPORT panda3d.core)

if(HAVE_ODE)
Expand Down
2 changes: 1 addition & 1 deletion panda/metalibs/panda/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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
p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui p3pipeline
p3pnmimage p3pnmimagetypes p3pstatclient p3putil p3recorder p3text p3tform
Expand Down
22 changes: 10 additions & 12 deletions panda/src/distort/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@ set(P3DISTORT_SOURCES
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)

0 comments on commit b9e50da

Please sign in to comment.