From f4e18125b4c0e507f4174edd656fb364df674631 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Mon, 29 May 2017 13:54:36 +0300 Subject: [PATCH] Do not clean src and gen directories when java is disabled --- modules/java/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/java/CMakeLists.txt b/modules/java/CMakeLists.txt index 7994332930..16acd6b3b9 100644 --- a/modules/java/CMakeLists.txt +++ b/modules/java/CMakeLists.txt @@ -8,6 +8,9 @@ if(APPLE_FRAMEWORK OR WINRT OR NOT PYTHON_DEFAULT_AVAILABLE OR NOT ANT_EXECUTABL ocv_module_disable(java) endif() +set(the_description "The java bindings") +ocv_add_module(java BINDINGS opencv_core opencv_imgproc) + if(EXISTS ${CMAKE_BINARY_DIR}/src) execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_BINARY_DIR}/src") endif() @@ -15,8 +18,6 @@ if(EXISTS ${CMAKE_BINARY_DIR}/gen) execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_BINARY_DIR}/gen") endif() -set(the_description "The java bindings") -ocv_add_module(java BINDINGS opencv_core opencv_imgproc) ocv_module_include_directories("${CMAKE_CURRENT_SOURCE_DIR}/generator/src/cpp") ocv_module_include_directories("${OpenCV_SOURCE_DIR}/include")