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
979721c9
Commit
979721c9
authored
Apr 06, 2015
by
Maksim Shabunin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix generating of android.mk
parent
ac22c524
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
49 deletions
+39
-49
OpenCVGenAndroidMK.cmake
cmake/OpenCVGenAndroidMK.cmake
+7
-24
OpenCVUtils.cmake
cmake/OpenCVUtils.cmake
+32
-25
No files found.
cmake/OpenCVGenAndroidMK.cmake
View file @
979721c9
...
...
@@ -43,34 +43,17 @@ if(ANDROID)
endforeach
()
# build the list of opencv libs and dependencies for all modules
set
(
OPENCV_MODULES_CONFIGMAKE
""
)
set
(
OPENCV_EXTRA_COMPONENTS_CONFIGMAKE
""
)
set
(
OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE
""
)
foreach
(
m
${
OPENCV_MODULES_PUBLIC
}
)
list
(
INSERT OPENCV_MODULES_CONFIGMAKE 0
${${
m
}
_MODULE_DEPS_
${
ocv_optkind
}}
${
m
}
)
if
(
${
m
}
_EXTRA_DEPS_
${
ocv_optkind
}
)
list
(
INSERT OPENCV_EXTRA_COMPONENTS_CONFIGMAKE 0
${${
m
}
_EXTRA_DEPS_
${
ocv_optkind
}}
)
endif
()
endforeach
()
ocv_get_all_libs
(
OPENCV_MODULES_CONFIGMAKE OPENCV_EXTRA_COMPONENTS_CONFIGMAKE OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE
)
# split 3rdparty libs and modules
foreach
(
mod
${
OPENCV_MODULES_CONFIGMAKE
}
)
if
(
NOT mod MATCHES
"^opencv_.+$"
)
list
(
INSERT OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE 0
${
mod
}
)
endif
()
endforeach
()
if
(
OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE
)
list
(
REMOVE_ITEM OPENCV_MODULES_CONFIGMAKE
${
OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE
}
)
endif
()
# list -> string
string
(
REPLACE
";"
" "
OPENCV_MODULES_CONFIGMAKE
"
${
OPENCV_MODULES_CONFIGMAKE
}
"
)
string
(
REPLACE
";"
" "
OPENCV_EXTRA_COMPONENTS_CONFIGMAKE
"
${
OPENCV_EXTRA_COMPONENTS_CONFIGMAKE
}
"
)
string
(
REPLACE
";"
" "
OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE
"
${
OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE
}
"
)
# convert CMake lists to makefile literals
foreach
(
lst OPENCV_MODULES_CONFIGMAKE OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE OPENCV_EXTRA_COMPONENTS_CONFIGMAKE
)
ocv_list_unique
(
${
lst
}
)
ocv_list_reverse
(
${
lst
}
)
string
(
REPLACE
";"
" "
${
lst
}
"
${${
lst
}}
"
)
endforeach
()
# replace 'opencv_<module>' -> '<module>''
string
(
REPLACE
"opencv_"
""
OPENCV_MODULES_CONFIGMAKE
"
${
OPENCV_MODULES_CONFIGMAKE
}
"
)
# prepare 3rd-party component list without TBB for armeabi and mips platforms. TBB is useless there.
set
(
OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE_NO_TBB
${
OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE
}
)
foreach
(
mod
${
OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE_NO_TBB
}
)
...
...
cmake/OpenCVUtils.cmake
View file @
979721c9
...
...
@@ -415,31 +415,6 @@ function(status text)
endfunction
()
# splits cmake libraries list of format "general;item1;debug;item2;release;item3" to two lists
macro
(
ocv_split_libs_list lst lstdbg lstopt
)
set
(
${
lstdbg
}
""
)
set
(
${
lstopt
}
""
)
set
(
perv_keyword
""
)
foreach
(
word
${${
lst
}}
)
if
(
word STREQUAL
"debug"
OR word STREQUAL
"optimized"
)
set
(
perv_keyword
${
word
}
)
elseif
(
word STREQUAL
"general"
)
set
(
perv_keyword
""
)
elseif
(
perv_keyword STREQUAL
"debug"
)
list
(
APPEND
${
lstdbg
}
"
${
word
}
"
)
set
(
perv_keyword
""
)
elseif
(
perv_keyword STREQUAL
"optimized"
)
list
(
APPEND
${
lstopt
}
"
${
word
}
"
)
set
(
perv_keyword
""
)
else
()
list
(
APPEND
${
lstdbg
}
"
${
word
}
"
)
list
(
APPEND
${
lstopt
}
"
${
word
}
"
)
set
(
perv_keyword
""
)
endif
()
endforeach
()
endmacro
()
# remove all matching elements from the list
macro
(
ocv_list_filterout lst regex
)
foreach
(
item
${${
lst
}}
)
...
...
@@ -810,3 +785,35 @@ function(ocv_add_library target)
_ocv_append_target_includes
(
${
target
}
)
endfunction
()
# build the list of opencv libs and dependencies for all modules
# _modules - variable to hold list of all modules
# _extra - variable to hold list of extra dependencies
# _3rdparty - variable to hold list of prebuilt 3rdparty libraries
macro
(
ocv_get_all_libs _modules _extra _3rdparty
)
set
(
${
_modules
}
""
)
set
(
${
_extra
}
""
)
set
(
${
_3rdparty
}
""
)
foreach
(
m
${
OPENCV_MODULES_PUBLIC
}
)
get_target_property
(
deps
${
m
}
INTERFACE_LINK_LIBRARIES
)
list
(
INSERT
${
_modules
}
0
${
deps
}
${
m
}
)
foreach
(
dep
${
deps
}
${
OPENCV_LINKER_LIBS
}
)
if
(
TARGET
${
dep
}
)
list
(
INSERT
${
_3rdparty
}
0
${
dep
}
)
else
()
list
(
INSERT
${
_extra
}
0
${
dep
}
)
endif
()
endforeach
()
endforeach
()
# split 3rdparty libs and modules
ocv_list_filterout
(
${
_3rdparty
}
"^opencv_.+$"
)
ocv_list_filterout
(
${
_extra
}
"^opencv_.+$"
)
list
(
REMOVE_ITEM
${
_modules
}
${${
_3rdparty
}}
${${
_extra
}}
)
# convert CMake lists to makefile literals
foreach
(
lst
${
_modules
}
${
_3rdparty
}
${
_extra
}
)
ocv_list_unique
(
${
lst
}
)
ocv_list_reverse
(
${
lst
}
)
endforeach
()
endmacro
()
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