mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
Fixed output paths for Android build
This commit is contained in:
parent
9600ebadf2
commit
725d771570
@ -96,5 +96,5 @@ SET( ENABLE_SSE42 OFF CACHE INTERNAL "" FORCE )
|
||||
#Enable SSSE3 instructions
|
||||
SET( ENABLE_SSSE3 OFF CACHE INTERNAL "" FORCE )
|
||||
|
||||
#Set output folder to "libs/armeabi-v7a" instead of "lib" for compatibility with java projects
|
||||
SET( LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/libs/${ARMEABI_NDK_NAME} CACHE PATH "path for android libs" )
|
||||
#Set output folder to ${CMAKE_BINARY_DIR}
|
||||
set( LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_BINARY_DIR} CACHE PATH "root for library output, set this to change where android libs are installed to" )
|
@ -231,7 +231,7 @@ endif()
|
||||
#set these flags for client use
|
||||
if( ARM_TARGET STREQUAL "armeabi" )
|
||||
set( ARMEABI true )
|
||||
set( ARMEABI_NDK_NAME "armeabi" )
|
||||
set( ARMEABI_NDK_NAME "armeabi" CACHE STRING "NDK eabi name" FORCE)
|
||||
set( NEON false )
|
||||
set( CMAKE_SYSTEM_PROCESSOR "armv5te" )
|
||||
else()
|
||||
@ -246,7 +246,7 @@ Supported values are: \"armeabi\", \"armeabi-v7a\", \"armeabi-v7a with NEON\", \
|
||||
" )
|
||||
endif()
|
||||
set( ARMEABI_V7A true )
|
||||
set( ARMEABI_NDK_NAME "armeabi-v7a" )
|
||||
set( ARMEABI_NDK_NAME "armeabi-v7a" CACHE STRING "NDK eabi name" FORCE)
|
||||
set( CMAKE_SYSTEM_PROCESSOR "armv7-a" )
|
||||
endif()
|
||||
|
||||
@ -255,13 +255,12 @@ set( LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_SOURCE_DIR} CACHE PATH "root for library o
|
||||
|
||||
SET( DO_NOT_CHANGE_OUTPUT_PATHS_ON_FIRST_PASS OFF CACHE BOOL "")
|
||||
if( DO_NOT_CHANGE_OUTPUT_PATHS_ON_FIRST_PASS )
|
||||
#some cmake standard modules work incorrectly if output paths are changed
|
||||
if( EXISTS ${CMAKE_SOURCE_DIR}/jni/CMakeLists.txt )
|
||||
# these paths are required for jni part of Android projects
|
||||
# but they may conflict with traditional unix makefile's folder structure
|
||||
set( EXECUTABLE_OUTPUT_PATH ${LIBRARY_OUTPUT_PATH_ROOT}/bin/${ARMEABI_NDK_NAME} CACHE PATH "Output directory for applications" FORCE)
|
||||
set( LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ARMEABI_NDK_NAME} CACHE PATH "path for android libs" FORCE )
|
||||
else()
|
||||
set( EXECUTABLE_OUTPUT_PATH ${LIBRARY_OUTPUT_PATH_ROOT}/bin CACHE PATH "Output directory for applications" FORCE)
|
||||
endif()
|
||||
set( LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ARMEABI_NDK_NAME} CACHE PATH "path for android libs" FORCE )
|
||||
set( CMAKE_INSTALL_PREFIX ${ANDROID_NDK_TOOLCHAIN_ROOT}/user/${ARMEABI_NDK_NAME} CACHE STRING "path for installing" FORCE )
|
||||
endif()
|
||||
SET( DO_NOT_CHANGE_OUTPUT_PATHS_ON_FIRST_PASS ON CACHE INTERNAL "" FORCE)
|
||||
|
Loading…
Reference in New Issue
Block a user