1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

changing package layout after 'make install' for Android build

This commit is contained in:
Marina Kolpakova
2012-06-28 17:23:50 +00:00
parent 2dcb091d94
commit b28b2428f6
31 changed files with 146 additions and 122 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
# ----------------------------------------------------------------------------
# CMake file for samples. See root CMakeLists.txt
# CMake file for samples. See root CMakeLists.txt
#
# ----------------------------------------------------------------------------
@@ -2,15 +2,10 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
OPENCV_CAMERA_MODULES:=off
include ../includeOpenCV.mk
ifeq ("$(wildcard $(OPENCV_MK_PATH))","")
#try to load OpenCV.mk from default install location
include $(TOOLCHAIN_PREBUILT_ROOT)/user/share/OpenCV/OpenCV.mk
else
include $(OPENCV_MK_PATH)
endif
#OPENCV_CAMERA_MODULES:=off
#OPENCV_INSTALL_MODULES:=off
#OPENCV_LIB_TYPE:=SHARED
include ../../sdk/native/jni/OpenCV.mk
LOCAL_SRC_FILES := DetectionBasedTracker_jni.cpp
LOCAL_C_INCLUDES += $(LOCAL_PATH)
@@ -2,16 +2,7 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
OPENCV_LIB_TYPE:=STATIC
OPENCV_INSTALL_MODULES:=on
include ../includeOpenCV.mk
ifeq ("$(wildcard $(OPENCV_MK_PATH))","")
#try to load OpenCV.mk from default install location
include $(TOOLCHAIN_PREBUILT_ROOT)/user/share/OpenCV/OpenCV.mk
else
include $(OPENCV_MK_PATH)
endif
include ../../sdk/native/jni/OpenCV.mk
LOCAL_MODULE := native_sample
LOCAL_SRC_FILES := jni_part.cpp
@@ -2,17 +2,7 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
OPENCV_CAMERA_MODULES:=off
OPENCV_INSTALL_MODULES:=on
#OPENCV_LIB_TYPE:=SHARED <- this is default
include ../includeOpenCV.mk
ifeq ("$(wildcard $(OPENCV_MK_PATH))","")
#try to load OpenCV.mk from default install location
include $(TOOLCHAIN_PREBUILT_ROOT)/user/share/OpenCV/OpenCV.mk
else
include $(OPENCV_MK_PATH)
endif
include ../../sdk/native/jni/OpenCV.mk
LOCAL_MODULE := mixed_sample
LOCAL_SRC_FILES := jni_part.cpp
+4 -4
View File
@@ -15,7 +15,7 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
if(CMAKE_COMPILER_IS_GNUCXX AND NOT ENABLE_NOISY_WARNINGS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function")
endif()
ocv_include_modules(${OPENCV_C_SAMPLES_REQUIRED_DEPS})
# ---------------------------------------------
@@ -42,9 +42,9 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
RUNTIME DESTINATION "samples/c" COMPONENT main)
endif()
ENDMACRO()
file(GLOB cpp_samples RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.c)
foreach(sample_filename ${cpp_samples})
get_filename_component(sample ${sample_filename} NAME_WE)
OPENCV_DEFINE_C_EXAMPLE(${sample} ${sample_filename})
@@ -54,7 +54,7 @@ endif()
if (INSTALL_C_EXAMPLES AND NOT WIN32)
file(GLOB C_SAMPLES *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd )
install(FILES ${C_SAMPLES}
DESTINATION share/opencv/samples/c
DESTINATION share/OpenCV/samples/c
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
endif ()
+5 -5
View File
@@ -23,7 +23,7 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
if(CMAKE_COMPILER_IS_GNUCXX AND NOT ENABLE_NOISY_WARNINGS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function")
endif()
# ---------------------------------------------
# Define executable targets
# ---------------------------------------------
@@ -39,7 +39,7 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
set_target_properties(${the_target} PROPERTIES
OUTPUT_NAME "${name}"
PROJECT_LABEL "(EXAMPLE) ${name}")
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${the_target} PROPERTIES FOLDER "samples//cpp")
endif()
@@ -52,9 +52,9 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
RUNTIME DESTINATION "samples/cpp" COMPONENT main)
endif()
ENDMACRO()
file(GLOB cpp_samples RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
foreach(sample_filename ${cpp_samples})
get_filename_component(sample ${sample_filename} NAME_WE)
OPENCV_DEFINE_CPP_EXAMPLE(${sample} ${sample_filename})
@@ -64,7 +64,7 @@ endif()
if (INSTALL_C_EXAMPLES AND NOT WIN32)
file(GLOB C_SAMPLES *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd )
install(FILES ${C_SAMPLES}
DESTINATION share/opencv/samples/cpp
DESTINATION share/OpenCV/samples/cpp
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
endif()
+5 -5
View File
@@ -8,7 +8,7 @@ ocv_check_dependencies(${OPENCV_GPU_SAMPLES_REQUIRED_DEPS})
if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
set(project "gpu")
string(TOUPPER "${project}" project_upper)
project("${project}_samples")
ocv_include_modules(${OPENCV_GPU_SAMPLES_REQUIRED_DEPS})
@@ -35,9 +35,9 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${OPENCV_GPU_SAMPLES_REQUIRED_DEPS})
set_target_properties(${the_target} PROPERTIES
OUTPUT_NAME "${name}_${project}"
OUTPUT_NAME "${name}_${project}"
PROJECT_LABEL "(EXAMPLE_${project_upper}) ${name}")
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${the_target} PROPERTIES FOLDER "samples//${project}")
endif()
@@ -61,10 +61,10 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
include("performance/CMakeLists.txt")
endif()
if (NOT WIN32)
if (INSTALL_C_EXAMPLES AND NOT WIN32)
file(GLOB install_list *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd )
install(FILES ${install_list}
DESTINATION share/opencv/samples/${project}
DESTINATION share/OpenCV/samples/${project}
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
endif()
+4 -4
View File
@@ -9,18 +9,18 @@ target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${OPENCV_GPU_SAMPLES_R
set_target_properties(${the_target} PROPERTIES
OUTPUT_NAME "performance_gpu"
PROJECT_LABEL "(EXAMPLE_GPU) performance")
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${the_target} PROPERTIES FOLDER "samples//gpu")
endif()
endif()
if(WIN32)
install(TARGETS ${the_target} RUNTIME DESTINATION "samples/gpu" COMPONENT main)
endif()
if(NOT WIN32)
if(INSTALL_C_EXAMPLES AND NOT WIN32)
file(GLOB GPU_FILES performance/*.cpp performance/*.h)
install(FILES ${GPU_FILES}
DESTINATION share/opencv/samples/gpu/performance
DESTINATION share/OpenCV/samples/gpu/performance
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
endif()