Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
d96f5337
Commit
d96f5337
authored
Jul 04, 2011
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Instroduced separate option for Android examples - BUILD_ANDROID_EXAMPLES
parent
65cb53aa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
8 deletions
+25
-8
CMakeLists.txt
CMakeLists.txt
+13
-5
CMakeLists.txt
modules/java/CMakeLists.txt
+9
-0
CMakeLists.txt
samples/CMakeLists.txt
+1
-1
CMakeLists.txt
samples/android/CMakeLists.txt
+2
-2
No files found.
CMakeLists.txt
View file @
d96f5337
...
...
@@ -668,7 +668,7 @@ if (PYTHON_EXECUTABLE AND ANDROID)
option
(
BUILD_JAVA_SUPPORT
"Build with Java support"
TRUE
)
endif
()
if
(
BUILD_JAVA_SUPPORT
AND
(
BUILD_EXAMPLES OR BUILD_TESTS
)
)
if
(
BUILD_JAVA_SUPPORT
)
file
(
TO_CMAKE_PATH
"$ENV{ANT_DIR}"
ANT_DIR_ENV_PATH
)
file
(
TO_CMAKE_PATH
"$ENV{ProgramFiles}"
ProgramFiles_ENV_PATH
)
...
...
@@ -713,6 +713,10 @@ if (BUILD_JAVA_SUPPORT AND (BUILD_EXAMPLES OR BUILD_TESTS))
endif
()
endif
()
if
(
CAN_BUILD_ANDROID_PROJECTS
)
option
(
BUILD_ANDROID_EXAMPLES
"Build examples for Android platform"
TRUE
)
endif
()
#YV
############################### QT ################################
...
...
@@ -1441,7 +1445,7 @@ add_subdirectory(doc)
add_subdirectory
(
data
)
add_subdirectory
(
3rdparty
)
if
(
BUILD_EXAMPLES OR INSTALL_PYTHON_EXAMPLES
)
if
(
BUILD_EXAMPLES OR
BUILD_ANDROID_EXAMPLES OR
INSTALL_PYTHON_EXAMPLES
)
add_subdirectory
(
samples
)
endif
()
...
...
@@ -1509,6 +1513,11 @@ else()
status
(
" Linker flags (Debug):"
${
CMAKE_SHARED_LINKER_FLAGS
}
${
CMAKE_SHARED_LINKER_FLAGS_DEBUG
}
)
endif
()
if
(
ANDROID
)
status
(
" Floating point type:"
${
ARM_TARGET
}
)
status
(
" Native API level:"
android-
${
ANDROID_API_LEVEL
}
)
endif
()
#YV
status
(
""
)
status
(
" GUI: "
)
...
...
@@ -1626,7 +1635,7 @@ status(" Examples:" BUILD_EXAMPLES THEN YES ELSE NO)
if
(
ANDROID
)
status
(
" Android tests:"
BUILD_TESTS AND CAN_BUILD_ANDROID_PROJECTS THEN YES ELSE NO
)
status
(
" Android examples:"
BUILD_
EXAMPLES AND CAN_BUILD_ANDROID_PROJECT
S THEN YES ELSE NO
)
status
(
" Android examples:"
BUILD_
ANDROID_EXAMPLE
S THEN YES ELSE NO
)
endif
()
# auxiliary
...
...
@@ -1640,4 +1649,4 @@ status("")
# warn in the case of in-source build
if
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
STREQUAL
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
message
(
WARNING
"The source directory is the same as binary directory.
\"
make clean
\"
may damage the source tree"
)
endif
()
\ No newline at end of file
endif
()
modules/java/CMakeLists.txt
View file @
d96f5337
...
...
@@ -64,8 +64,17 @@ FILE(GLOB handwrittren_cpp_sources "${CMAKE_CURRENT_SOURCE_DIR}/src/cpp/*.cpp")
add_library
(
${
target
}
SHARED
${
handwrittren_cpp_sources
}
${
generated_cpp_sources
}
)
target_link_libraries
(
${
target
}
${
dependent_libs
}
${
dependent_extra_libs
}
${
OPENCV_LINKER_LIBS
}
)
if
(
ANDROID
)
target_link_libraries
(
${
target
}
jnigraphics
)
# force strip library before install/strip command
# because samples and tests will make a copy of library before install
ADD_CUSTOM_COMMAND
(
TARGET
${
target
}
POST_BUILD
COMMAND
${
CMAKE_STRIP
}
"
${
LIBRARY_OUTPUT_PATH
}
/lib
${
target
}
.so"
)
endif
()
#add_dependencies(${the_target} ${dependent_extra_libs} ${dependent_libs})
...
...
samples/CMakeLists.txt
View file @
d96f5337
...
...
@@ -10,7 +10,7 @@ if(NOT ANDROID)
add_subdirectory
(
gpu
)
endif
()
if
(
ANDROID AND CAN_BUILD_ANDROID_PROJECT
S
)
if
(
BUILD_ANDROID_EXAMPLE
S
)
add_subdirectory
(
android
)
endif
()
...
...
samples/android/CMakeLists.txt
View file @
d96f5337
...
...
@@ -3,7 +3,7 @@
#
# ----------------------------------------------------------------------------
if
(
BUILD_EXAMPLES
)
if
(
BUILD_
ANDROID_
EXAMPLES
)
project
(
android_samples
)
include_directories
(
...
...
@@ -98,7 +98,7 @@ if (BUILD_EXAMPLES)
endforeach()
#hello-android sample
ADD_EXECUTABLE(
hello-android hello-android/main.cpp
)
ADD_EXECUTABLE(
hello-android hello-android/main.cpp
)
ADD_DEPENDENCIES(hello-android
${
sample_dependencies
}
)
TARGET_LINK_LIBRARIES(hello-android
${
OPENCV_LINKER_LIBS
}
${
sample_dependencies
}
)
set_target_properties(hello-android PROPERTIES OUTPUT_NAME hello-android RUNTIME_OUTPUT_DIRECTORY "
${
EXECUTABLE_OUTPUT_PATH
}
")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment