Commit f0d37902 authored by Ben Boeckel's avatar Ben Boeckel

wrapping: depend on the target for non-Ninja generators

parent 9ab48b3b
......@@ -76,6 +76,15 @@ $<$<BOOL:$<TARGET_PROPERTY:${TARGET},INCLUDE_DIRECTORIES>>:
SET(VTK_JAVA_DEPENDENCIES)
SET(VTK_JAVA_DEPENDENCIES_FILE)
if (CMAKE_GENERATOR MATCHES "Ninja")
set(hierarchy_depend ${KIT_HIERARCHY_FILE})
else ()
string(LENGTH "${TARGET}" target_length)
math(EXPR target_length "${target_length} - 4")
string(SUBSTRING "${TARGET}" 0 "${target_length}" target_basename)
set(hierarchy_depend "${target_basename}Hierarchy")
endif ()
# For each class
FOREACH(FILE ${SOURCES})
# some wrapped files need to be compiled as objective C++
......@@ -117,7 +126,7 @@ $<$<BOOL:$<TARGET_PROPERTY:${TARGET},INCLUDE_DIRECTORIES>>:
${VTK_WRAP_HINTS}
${TMP_INPUT}
${_args_file}
${KIT_HIERARCHY_FILE}
${hierarchy_depend}
COMMAND ${VTK_PARSE_JAVA_EXE}
@${_args_file}
-o ${VTK_JAVA_HOME}/${TMP_FILENAME}.java
......
......@@ -54,6 +54,15 @@ $<$<BOOL:$<TARGET_PROPERTY:${TARGET},INCLUDE_DIRECTORIES>>:
-I\">\">
")
if (CMAKE_GENERATOR MATCHES "Ninja")
set(hierarchy_depend ${KIT_HIERARCHY_FILE})
else ()
string(LENGTH "${TARGET}" target_length)
math(EXPR target_length "${target_length} - 6")
string(SUBSTRING "${TARGET}" 0 "${target_length}" target_basename)
set(hierarchy_depend "${target_basename}Hierarchy")
endif ()
# for each class
foreach(FILE ${SOURCES})
# what is the filename without the extension
......@@ -83,7 +92,7 @@ $<$<BOOL:$<TARGET_PROPERTY:${TARGET},INCLUDE_DIRECTORIES>>:
${VTK_WRAP_HINTS}
${TMP_INPUT}
${_args_file}
${KIT_HIERARCHY_FILE}
${hierarchy_depend}
IMPLICIT_DEPENDS CXX ${TMP_INPUT}
COMMAND ${VTK_WRAP_PYTHON_EXE}
@${_args_file}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment