File: CMakeLists.txt

package info (click to toggle)
opencv 2.3.1-11%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 82,284 kB
  • sloc: xml: 493,314; cpp: 334,117; ansic: 108,641; java: 15,407; python: 14,061; sh: 107; makefile: 61
file content (36 lines) | stat: -rw-r--r-- 1,482 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
SET (the_target native_camera_r${ANDROID_VERSION})

project(${the_target})

link_directories("${ANDROID_SOURCE_TREE}/out/target/product/generic/system/lib")

INCLUDE_DIRECTORIES(
	${ANDROID_SOURCE_TREE}
	${ANDROID_SOURCE_TREE}/frameworks/base/include/ui
	${ANDROID_SOURCE_TREE}/frameworks/base/include/surfaceflinger
	${ANDROID_SOURCE_TREE}/frameworks/base/include/camera
	${ANDROID_SOURCE_TREE}/frameworks/base/include/media
	${ANDROID_SOURCE_TREE}/frameworks/base/include/camera
	${ANDROID_SOURCE_TREE}/frameworks/base/include
	${ANDROID_SOURCE_TREE}/system/core/include
	${ANDROID_SOURCE_TREE}/hardware/libhardware/include
	${ANDROID_SOURCE_TREE}/frameworks/base/native/include
	)

SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-rtti -fno-exceptions" )
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -fno-exceptions")

ADD_LIBRARY(${the_target} MODULE camera_wrapper.h camera_wrapper.cpp)

string(REGEX REPLACE "[.]" "_" LIBRARY_DEF ${ANDROID_VERSION})
add_definitions(-DANDROID_r${LIBRARY_DEF})

target_link_libraries(${the_target} dl m stdc++ utils camera_client ui media binder cutils surfaceflinger_client supc++ log )

SET_TARGET_PROPERTIES(${the_target} PROPERTIES
                      OUTPUT_NAME "${the_target}"
                      ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
                      RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
                      )

install(TARGETS ${the_target} LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main)