Fix compilation problems with XCode 7.1.1 and cmake 3.3.2

This commit is contained in:
Maksim Shabunin
2015-11-16 18:07:24 +03:00
parent 01b5971c94
commit eebd4cad66
16 changed files with 82 additions and 63 deletions

View File

@@ -247,7 +247,7 @@ if(ANDROID)
# build the library project
# normally we should do this after a native part, but for a library project we can build the java part first
add_custom_command(OUTPUT "${JAR_FILE}" "${JAR_FILE}.dephelper"
COMMAND ${ANT_EXECUTABLE} -q -noinput -k debug
COMMAND ${ANT_EXECUTABLE} -q -noinput -k debug -Djava.target=1.6 -Djava.source=1.6
COMMAND ${CMAKE_COMMAND} -E touch "${JAR_FILE}.dephelper" # can not rely on classes.jar because different versions of SDK update timestamp at different times
WORKING_DIRECTORY "${OpenCV_BINARY_DIR}"
DEPENDS ${step3_depends}

View File

@@ -43,7 +43,7 @@ list(APPEND opencv_test_java_file_deps ${android_proj_target_files})
add_custom_command(
OUTPUT "${opencv_test_java_bin_dir}/bin/OpenCVTest-debug.apk"
COMMAND ${CMAKE_COMMAND} -E copy "${OpenCV_BINARY_DIR}/lib/${ANDROID_NDK_ABI_NAME}/libopencv_java.so" "${opencv_test_java_bin_dir}/libs/${ANDROID_NDK_ABI_NAME}/libopencv_java.so"
COMMAND ${ANT_EXECUTABLE} -q -noinput -k debug
COMMAND ${ANT_EXECUTABLE} -q -noinput -k debug -Djava.target=1.6 -Djava.source=1.6
COMMAND ${CMAKE_COMMAND} -E touch "${opencv_test_java_bin_dir}/bin/OpenCVTest-debug.apk" # needed because ant does not update the timestamp of updated apk
WORKING_DIRECTORY "${opencv_test_java_bin_dir}"
MAIN_DEPENDENCY "${opencv_test_java_bin_dir}/${ANDROID_MANIFEST_FILE}"