Skip to content

Commit bb3a416

Browse files
Ryuhei MoriRyuhei Mori
authored andcommitted
Fix cpu features detection on android
1 parent 913a2db commit bb3a416

File tree

7 files changed

+589
-83
lines changed

7 files changed

+589
-83
lines changed

3rdparty/cpufeatures/CMakeLists.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
ocv_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
3+
file(GLOB cpuf_s *.c)
4+
file(GLOB cpuf_h *.h)
5+
6+
set(lib_srcs ${cpuf_s})
7+
set(lib_hdrs ${cpuf_h})
8+
9+
set(CPUFEATURES_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
10+
set(CPUFEATURES_LIBRARIES cpufeatures CACHE INTERNAL "")
11+
12+
add_library(cpufeatures STATIC ${lib_srcs} ${lib_hdrs})
13+
14+
set_target_properties(cpufeatures
15+
PROPERTIES OUTPUT_NAME cpufeatures
16+
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
17+
COMPILE_PDB_NAME cpufeatures
18+
COMPILE_PDB_NAME_DEBUG "cpufeatures${OPENCV_DEBUG_POSTFIX}"
19+
ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH}
20+
)
21+
22+
if(ENABLE_SOLUTION_FOLDERS)
23+
set_target_properties(cpufeatures PROPERTIES FOLDER "3rdparty")
24+
endif()
25+
26+
if(NOT BUILD_SHARED_LIBS)
27+
ocv_install_target(cpufeatures EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
28+
endif()
29+

0 commit comments

Comments
 (0)