|
|
@@ -12,8 +12,29 @@ else()
|
|
|
set(libtype STATIC)
|
|
|
endif()
|
|
|
|
|
|
-if(HAVE_PYTHON)
|
|
|
- add_library(interrogatedb ${libtype} pydtool.cxx)
|
|
|
+if(HAVE_PYTHON AND INTERROGATE_PYTHON_INTERFACE)
|
|
|
+ set(INTERROGATEDB_IGATE
|
|
|
+ ../../src/interrogatedb/interrogate_interface.h
|
|
|
+ ../../src/interrogatedb/interrogate_request.h
|
|
|
+ )
|
|
|
+
|
|
|
+ add_custom_command(
|
|
|
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/interrogatedb_module.cxx"
|
|
|
+ COMMAND interrogate
|
|
|
+ -D EXPCL_INTERROGATEDB=
|
|
|
+ -nodb -python -promiscuous
|
|
|
+ -module panda3d.interrogatedb
|
|
|
+ -library interrogatedb
|
|
|
+ -string -true-names -do-module
|
|
|
+ -srcdir "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
|
+ -oc "${CMAKE_CURRENT_BINARY_DIR}/interrogatedb_module.cxx"
|
|
|
+ ${INTERROGATEDB_IGATE}
|
|
|
+ DEPENDS interrogate ${INTERROGATEDB_IGATE}
|
|
|
+ COMMENT "Interrogating interrogatedb"
|
|
|
+ )
|
|
|
+
|
|
|
+ add_library(interrogatedb ${libtype}
|
|
|
+ "${CMAKE_CURRENT_BINARY_DIR}/interrogatedb_module.cxx")
|
|
|
target_use_packages(interrogatedb PYTHON)
|
|
|
target_link_libraries(interrogatedb p3dtoolconfig)
|
|
|
|