From d61ecb8a8f281e8b1e808330036c4eb32c4ac0c5 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sat, 16 Mar 2019 17:26:44 -0600 Subject: [PATCH] CMake: Build p3distort --- panda/CMakeLists.txt | 9 ++++---- panda/metalibs/panda/CMakeLists.txt | 2 +- panda/src/distort/CMakeLists.txt | 34 +++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 panda/src/distort/CMakeLists.txt diff --git a/panda/CMakeLists.txt b/panda/CMakeLists.txt index dd8f545255..962101b8e2 100644 --- a/panda/CMakeLists.txt +++ b/panda/CMakeLists.txt @@ -14,6 +14,7 @@ add_subdirectory(src/cull) add_subdirectory(src/device) add_subdirectory(src/dgraph) add_subdirectory(src/display) +add_subdirectory(src/distort) add_subdirectory(src/downloader) add_subdirectory(src/downloadertools) add_subdirectory(src/dxgsg9) @@ -80,10 +81,10 @@ 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 - p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui p3pipeline - p3pnmimage p3pstatclient p3putil p3recorder p3text p3tform + p3chan p3char p3collide p3cull p3device p3dgraph p3display p3distort + p3downloader p3dxml 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) diff --git a/panda/metalibs/panda/CMakeLists.txt b/panda/metalibs/panda/CMakeLists.txt index ee34835678..bb1e96d374 100644 --- a/panda/metalibs/panda/CMakeLists.txt +++ b/panda/metalibs/panda/CMakeLists.txt @@ -1,5 +1,5 @@ set(PANDA_LINK_TARGETS - p3chan p3char p3collide p3cull p3device p3dgraph p3display p3dxml + p3chan p3char p3collide p3cull p3device p3dgraph p3display p3distort p3dxml p3event p3gobj p3grutil p3gsgbase p3linmath p3mathutil p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui p3pipeline p3pnmimage p3pnmimagetypes p3pstatclient p3putil p3recorder p3text p3tform) diff --git a/panda/src/distort/CMakeLists.txt b/panda/src/distort/CMakeLists.txt new file mode 100644 index 0000000000..9711656648 --- /dev/null +++ b/panda/src/distort/CMakeLists.txt @@ -0,0 +1,34 @@ +set(P3DISTORT_HEADERS + config_distort.h + cylindricalLens.h cylindricalLens.I + fisheyeLens.h fisheyeLens.I + nonlinearImager.h nonlinearImager.I + oSphereLens.h oSphereLens.I + projectionScreen.h projectionScreen.I + pSphereLens.h pSphereLens.I +) + +set(P3DISTORT_SOURCES + config_distort.cxx + cylindricalLens.cxx + fisheyeLens.cxx + nonlinearImager.cxx + oSphereLens.cxx + projectionScreen.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) + +if(NOT BUILD_METALIBS) + install(TARGETS p3distort + EXPORT Core COMPONENT Core + DESTINATION lib + RUNTIME DESTINATION bin + ARCHIVE COMPONENT CoreDevel) +endif() +install(FILES ${P3DISTORT_HEADERS} COMPONENT CoreDevel DESTINATION include/panda3d)