diff --git a/OpenCVPCHSupport.cmake b/OpenCVPCHSupport.cmake index 476f7b7a8..dae36d1e6 100644 --- a/OpenCVPCHSupport.cmake +++ b/OpenCVPCHSupport.cmake @@ -129,9 +129,9 @@ MACRO(_PCH_GET_TARGET_COMPILE_FLAGS _cflags _header_name _pch_path _dowarn ) # if you have different versions of the headers for different build types # you may set _pch_dowarn IF (_dowarn) - SET(${_cflags} "${PCH_ADDITIONAL_COMPILER_FLAGS} -include ${CMAKE_CURRENT_BINARY_DIR}/${_header_name} -Winvalid-pch " ) + SET(${_cflags} "${PCH_ADDITIONAL_COMPILER_FLAGS} -include \"${CMAKE_CURRENT_BINARY_DIR}/${_header_name}\" -Winvalid-pch " ) ELSE (_dowarn) - SET(${_cflags} "${PCH_ADDITIONAL_COMPILER_FLAGS} -include ${CMAKE_CURRENT_BINARY_DIR}/${_header_name} " ) + SET(${_cflags} "${PCH_ADDITIONAL_COMPILER_FLAGS} -include \"${CMAKE_CURRENT_BINARY_DIR}/${_header_name}\" " ) ENDIF (_dowarn) ELSE(CMAKE_COMPILER_IS_GNUCXX) diff --git a/modules/java/CMakeLists.txt b/modules/java/CMakeLists.txt index 69ba16472..e6e1b590f 100644 --- a/modules/java/CMakeLists.txt +++ b/modules/java/CMakeLists.txt @@ -171,7 +171,11 @@ endforeach() #android test project if(ANDROID AND BUILD_TESTS AND CAN_BUILD_ANDROID_PROJECTS) - file(COPY android_test DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" PATTERN ".svn" EXCLUDE) + file(COPY android_test DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" + PATTERN ".svn" EXCLUDE + PATTERN "gen" EXCLUDE + PATTERN "bin" EXCLUDE + ) SET(test_dir "${CMAKE_CURRENT_BINARY_DIR}/android_test") SET(test_name opencv_test_java) diff --git a/samples/android/CMakeLists.txt b/samples/android/CMakeLists.txt index 22acbbe9f..699c5446b 100644 --- a/samples/android/CMakeLists.txt +++ b/samples/android/CMakeLists.txt @@ -93,7 +93,11 @@ if (BUILD_ANDROID_EXAMPLES) list(REMOVE_ITEM android_samples hello-android) list(SORT android_samples) - file(COPY ${android_samples} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" PATTERN ".svn" EXCLUDE) + file(COPY ${android_samples} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" + PATTERN ".svn" EXCLUDE + PATTERN "gen" EXCLUDE + PATTERN "bin" EXCLUDE + ) foreach(sample ${android_samples}) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${sample}/AndroidManifest.xml)