Merge branch 2.4
This commit is contained in:
@@ -179,7 +179,7 @@ unset(__android_project_chain CACHE)
|
||||
#add_android_project(target_name ${path} NATIVE_DEPS opencv_core LIBRARY_DEPS ${OpenCV_BINARY_DIR} SDK_TARGET 11)
|
||||
macro(add_android_project target path)
|
||||
# parse arguments
|
||||
set(android_proj_arglist NATIVE_DEPS LIBRARY_DEPS SDK_TARGET IGNORE_JAVA)
|
||||
set(android_proj_arglist NATIVE_DEPS LIBRARY_DEPS SDK_TARGET IGNORE_JAVA IGNORE_MANIFEST)
|
||||
set(__varname "android_proj_")
|
||||
foreach(v ${android_proj_arglist})
|
||||
set(${__varname}${v} "")
|
||||
@@ -220,9 +220,13 @@ macro(add_android_project target path)
|
||||
# get project sources
|
||||
file(GLOB_RECURSE android_proj_files RELATIVE "${path}" "${path}/res/*" "${path}/src/*")
|
||||
|
||||
if(NOT android_proj_IGNORE_MANIFEST)
|
||||
list(APPEND android_proj_files ${ANDROID_MANIFEST_FILE})
|
||||
endif()
|
||||
|
||||
# copy sources out from the build tree
|
||||
set(android_proj_file_deps "")
|
||||
foreach(f ${android_proj_files} ${ANDROID_MANIFEST_FILE})
|
||||
foreach(f ${android_proj_files})
|
||||
add_custom_command(
|
||||
OUTPUT "${android_proj_bin_dir}/${f}"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${path}/${f}" "${android_proj_bin_dir}/${f}"
|
||||
@@ -324,6 +328,7 @@ macro(add_android_project target path)
|
||||
install(FILES "${OpenCV_BINARY_DIR}/bin/${target}.apk" DESTINATION "samples" COMPONENT main)
|
||||
get_filename_component(sample_dir "${path}" NAME)
|
||||
#java part
|
||||
list(REMOVE_ITEM android_proj_files ${ANDROID_MANIFEST_FILE})
|
||||
foreach(f ${android_proj_files} ${ANDROID_MANIFEST_FILE})
|
||||
get_filename_component(install_subdir "${f}" PATH)
|
||||
install(FILES "${android_proj_bin_dir}/${f}" DESTINATION "samples/${sample_dir}/${install_subdir}" COMPONENT main)
|
||||
|
@@ -3,8 +3,13 @@ if(${CMAKE_VERSION} VERSION_LESS "2.8.3")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (NOT MSVC AND NOT CMAKE_COMPILER_IS_GNUCXX OR MINGW)
|
||||
message(STATUS "CUDA compilation was disabled (due to unsuppoted host compiler).")
|
||||
if (WIN32 AND NOT MSVC)
|
||||
message(STATUS "CUDA compilation is disabled (due to only Visual Studio compiler suppoted on your platform).")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
message(STATUS "CUDA compilation is disabled (due to Clang unsuppoted on your platform).")
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
Reference in New Issue
Block a user