1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
4 SET(project_prefix "capi")
6 SET(maintainer "Jeongmo Yang<jm80.yang@samsung.com>, Hyuntae Kim<ht1211.kim@samsung.com>, Seokhoon Lee<andy.shlee@samsung.com>, Taeyoung Chung <ty83.chung@samsung.com>, Sejong Park<sejong123.park@samsung.com, Haesu Gwon<haesu.gwon@samsung.com")
7 SET(description "A Camera library in Tizen Native API")
9 SET(submodule "camera")
12 IF(TIZEN_FEATURE_EVAS_RENDERER)
13 SET(dependents "glib-2.0 gio-2.0 libtbm dlog mm-common capi-base-common capi-media-tool ecore elementary mmsvc-camera tizen-extension-client mm-evas-renderer")
14 ELSE(TIZEN_FEATURE_EVAS_RENDERER)
15 SET(dependents "glib-2.0 gio-2.0 libtbm dlog mm-common capi-base-common capi-media-tool ecore elementary mmsvc-camera tizen-extension-client")
16 ENDIF(TIZEN_FEATURE_EVAS_RENDERER)
17 SET(pc_dependents "capi-base-common capi-media-tool libtbm evas ecore elementary")
18 SET(fw_name "${project_prefix}-${service}-${submodule}")
22 SET(CMAKE_INSTALL_PREFIX ${prefix})
23 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
26 INCLUDE_DIRECTORIES(${INC_DIR})
28 INCLUDE(FindPkgConfig)
29 pkg_check_modules(${fw_name} REQUIRED ${dependents})
30 FOREACH(flag ${${fw_name}_CFLAGS})
31 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
34 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Wextra -Wno-array-bounds -Wno-empty-body -Wno-ignored-qualifiers -Wno-unused-parameter -Wshadow -Wwrite-strings -Wswitch-default -Wno-unused-but-set-parameter -Wno-unused-but-set-variable")
35 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
37 IF("${ARCH}" STREQUAL "arm")
38 ADD_DEFINITIONS("-DTARGET")
39 ENDIF("${ARCH}" STREQUAL "arm")
41 IF(TIZEN_FEATURE_EVAS_RENDERER)
42 ADD_DEFINITIONS("-DTIZEN_FEATURE_EVAS_RENDERER")
43 ENDIF(TIZEN_FEATURE_EVAS_RENDERER)
45 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
46 ADD_DEFINITIONS("-DTIZEN_DEBUG")
48 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}")
50 aux_source_directory(src SOURCES)
51 ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
53 SET_TARGET_PROPERTIES(${fw_name}
60 TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS})
62 INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR})
64 DIRECTORY ${INC_DIR}/ DESTINATION include/${service}
66 PATTERN "*_private.h" EXCLUDE
67 PATTERN "${INC_DIR}/*.h"
70 SET(PC_NAME ${fw_name})
71 SET(PC_REQUIRED ${pc_dependents})
72 SET(PC_LDFLAGS -l${fw_name})
76 ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
79 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
81 ADD_SUBDIRECTORY(test)
85 ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution)
88 COMMENT "distribution clean"
91 -not -name config.cmake -and \(
95 -name cmake.depends -or
96 -name cmake.check_depends -or
97 -name CMakeCache.txt -or
98 -name cmake.check_cache -or
104 -name install_manifest.txt -or
107 | grep -v TC | xargs rm -rf