Browse Source

CMake: Build p3distort

Sam Edwards 6 years ago
parent
commit
d61ecb8a8f
3 changed files with 40 additions and 5 deletions
  1. 5 4
      panda/CMakeLists.txt
  2. 1 1
      panda/metalibs/panda/CMakeLists.txt
  3. 34 0
      panda/src/distort/CMakeLists.txt

+ 5 - 4
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)

+ 1 - 1
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)

+ 34 - 0
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)