Don't depend swig targets on renderdoc target, just interface headers

* This avoids rebuilding swig every time if some internal cpp in the
  renderdoc target changes, but will still rebuild it if the interface
  headers change.
This commit is contained in:
baldurk
2017-05-02 18:50:30 +01:00
parent 78ea82315c
commit e4a5b80bdd
+8 -1
View File
@@ -168,6 +168,12 @@ set(swig_interfaces
set(swig_output)
file(GLOB RDOC_REPLAY_FILES ${CMAKE_SOURCE_DIR}/renderdoc/api/replay/*.h)
file(GLOB QRD_INTERFACE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/Code/Interface/*.h)
list(SORT RDOC_REPLAY_FILES)
list(SORT QRD_INTERFACE_FILES)
foreach(in ${swig_interfaces})
get_filename_component(swig_file ${in} NAME_WE)
@@ -175,7 +181,8 @@ foreach(in ${swig_interfaces})
COMMAND ${CMAKE_BINARY_DIR}/bin/swig -v -Wextra -Werror -O -c++ -python -modern -modernargs -enumclass -fastunpack -py3 -builtin -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_SOURCE_DIR}/renderdoc/api/replay -outdir ${CMAKE_CURRENT_BINARY_DIR} -o ${CMAKE_CURRENT_BINARY_DIR}/${swig_file}_python.cxx ${CMAKE_CURRENT_SOURCE_DIR}/${in}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${in}
DEPENDS custom_swig
DEPENDS renderdoc)
DEPENDS ${RDOC_REPLAY_FILES}
DEPENDS ${QRD_INTERFACE_FILES})
add_custom_command(OUTPUT ${swig_file}.py.c
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}