adding Android-specific linking flags

This commit is contained in:
Andrey Pavlenko 2011-11-30 13:58:42 +00:00
parent 2d815c80a5
commit f24e16f54d

View File

@ -94,7 +94,12 @@ SET(OpenCV_LIB_COMPONENTS opencv_contrib opencv_legacy opencv_stitching opencv_g
# remove modules unavailable on current platform:
if(ANDROID)
LIST(REMOVE_ITEM OpenCV_LIB_COMPONENTS opencv_gpu)
SET(OpenCV_LIB_COMPONENTS ${OpenCV_LIB_COMPONENTS} @OpenCV_LIB_ANDROID@)
SET(OpenCV_LIB_ANDROID @OpenCV_LIB_ANDROID@)
IF(OpenCV_LIB_ANDROID)
SET(OpenCV_LIB_COMPONENTS ${OpenCV_LIB_COMPONENTS} ${OpenCV_LIB_ANDROID})
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--allow-shlib-undefined")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-shlib-undefined")
ENDIF()
endif()
if(NOT ANDROID OR OpenCV_SHARED OR NOT OpenCV_HAVE_ANDROID_CAMERA)
LIST(REMOVE_ITEM OpenCV_LIB_COMPONENTS opencv_androidcamera)