Skip to content

Commit

Permalink
Fix build order for csharp examples/bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
jrtcppv committed Jul 30, 2018
1 parent a17b91e commit 1b82e95
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion examples/deploy/csharp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
enable_language(CSharp)
include(CSharpUtilities)
file(GLOB SWIG_SRC "${PROJECT_BINARY_DIR}/deploy/bindings/*.cs")
set(SWIG_SRC
${PROJECT_BINARY_DIR}/deploy/bindings/VideoWriter.cs
${PROJECT_BINARY_DIR}/deploy/bindings/VideoReader.cs
Expand All @@ -13,7 +14,6 @@ set(SWIG_SRC
${PROJECT_BINARY_DIR}/deploy/bindings/VectorDouble.cs
${PROJECT_BINARY_DIR}/deploy/bindings/SWIGTYPE_p_void.cs
${PROJECT_BINARY_DIR}/deploy/bindings/SWIGTYPE_p_unsigned_char.cs
${PROJECT_BINARY_DIR}/deploy/bindings/SWIGTYPE_p_std__vectorT_float_t.cs
${PROJECT_BINARY_DIR}/deploy/bindings/RulerMaskFinder.cs
${PROJECT_BINARY_DIR}/deploy/bindings/Rect.cs
${PROJECT_BINARY_DIR}/deploy/bindings/PairIntInt.cs
Expand All @@ -25,23 +25,31 @@ set(SWIG_SRC
${PROJECT_BINARY_DIR}/deploy/bindings/Color.cs
${PROJECT_BINARY_DIR}/deploy/bindings/Codec.cs
${PROJECT_BINARY_DIR}/deploy/bindings/Classifier.cs)
add_custom_target(swig_source_gen
COMMAND ""
DEPENDS openem_cs
BYPRODUCTS ${SWIG_SRC})
csharp_set_windows_forms_properties(
find_ruler.cs
detect.cs)

add_executable(find_ruler_cs find_ruler.cs ${SWIG_SRC})
add_dependencies(find_ruler_cs openem_cs)
set_property(TARGET find_ruler_cs PROPERTY VS_DOTNET_REFERENCES "System")
install(TARGETS find_ruler_cs DESTINATION examples/deploy/csharp)

add_executable(detect_cs detect.cs ${SWIG_SRC})
add_dependencies(detect_cs openem_cs)
set_property(TARGET detect_cs PROPERTY VS_DOTNET_REFERENCES "System")
install(TARGETS detect_cs DESTINATION examples/deploy/csharp)

add_executable(classify_cs classify.cs ${SWIG_SRC})
add_dependencies(classify_cs openem_cs)
set_property(TARGET classify_cs PROPERTY VS_DOTNET_REFERENCES "System")
install(TARGETS classify_cs DESTINATION examples/deploy/csharp)

add_executable(video_cs video.cs ${SWIG_SRC})
add_dependencies(video_cs openem_cs)
set_property(TARGET video_cs PROPERTY VS_DOTNET_REFERENCES "System")
install(TARGETS video_cs DESTINATION examples/deploy/csharp)

0 comments on commit 1b82e95

Please sign in to comment.