Browse Source

CMake: Get egg to interrogate.

Sam Edwards 12 years ago
parent
commit
2872c14c8f
2 changed files with 10 additions and 6 deletions
  1. 3 2
      panda/CMakeLists.txt
  2. 7 4
      panda/src/egg/CMakeLists.txt

+ 3 - 2
panda/CMakeLists.txt

@@ -27,8 +27,6 @@ add_subdirectory(src/putil)
 add_subdirectory(src/pstatclient)
 add_subdirectory(src/linmath)
 add_subdirectory(src/event)
-add_subdirectory(src/egg)
-add_subdirectory(src/egg2pg)
 add_subdirectory(src/mathutil)
 add_subdirectory(src/gsgbase)
 add_subdirectory(src/glstuff)
@@ -54,6 +52,8 @@ add_subdirectory(src/tform)
 add_subdirectory(src/pgui)
 add_subdirectory(src/recorder)
 add_subdirectory(src/collide)
+add_subdirectory(src/egg)
+add_subdirectory(src/egg2pg)
 add_subdirectory(src/framework)
 add_subdirectory(src/testbed)
 
@@ -66,3 +66,4 @@ add_python_module(core p3chan p3char p3collide p3cull p3device p3dgraph
   p3display p3downloader p3event p3express p3gobj p3grutil p3gsgbase p3linmath
   p3mathutil p3parametrics p3pgraph p3pgraphnodes p3pgui p3pipeline p3pnmimage
   p3pnmtext p3pstatclient p3putil p3recorder p3text p3tform)
+add_python_module(egg p3egg p3egg2pg)

+ 7 - 4
panda/src/egg/CMakeLists.txt

@@ -86,12 +86,15 @@ if(HAVE_EGG)
     vector_PT_EggMaterial.cxx pt_EggTexture.cxx
     vector_PT_EggTexture.cxx pt_EggVertex.cxx
     vector_PT_EggVertex.cxx
-    lexer.cxx
-    parser.cxx
   )
 
+  # These cannot be interrogated, and are excluded from the composites.
+  set(P3EGG_PARSER_SOURCES
+    parser.cxx
+    lexer.cxx)
+
   composite_sources(p3egg P3EGG_SOURCES)
-  add_library(p3egg ${P3EGG_HEADERS} ${P3EGG_SOURCES})
+  add_library(p3egg ${P3EGG_HEADERS} ${P3EGG_SOURCES} ${P3EGG_PARSER_SOURCES})
   target_link_libraries(p3egg p3prc p3pandabase p3express p3linmath p3mathutil)
-  target_interrogate(p3egg ALL)
+  target_interrogate(p3egg ${P3EGG_HEADERS} ${P3EGG_SOURCES})
 endif()