1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
4 SET(project_prefix "capi")
6 SET(maintainer "Jeongmo Yang<jm80.yang>, Hyuntae Kim<ht1211.kim@samsung.com>, Seokhoon Lee<andy.shlee@samsung.com>, Taeyoung Chung <ty83.chung@samsung.com>, Sejong Park<sejong123.park@samsung.com")
7 SET(description "A Camera library in Tizen Native API")
9 SET(submodule "camera")
12 SET(dependents "libtbm dlog mm-common capi-base-common capi-media-tool ecore elementary mmsvc-camera tizen-extension-client")
13 SET(pc_dependents "capi-base-common capi-media-tool libtbm evas ecore elementary")
14 SET(fw_name "${project_prefix}-${service}-${submodule}")
18 SET(CMAKE_INSTALL_PREFIX ${prefix})
19 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
22 INCLUDE_DIRECTORIES(${INC_DIR})
24 INCLUDE(FindPkgConfig)
25 pkg_check_modules(${fw_name} REQUIRED ${dependents})
26 FOREACH(flag ${${fw_name}_CFLAGS})
27 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
30 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")
31 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
33 IF("${ARCH}" STREQUAL "arm")
34 ADD_DEFINITIONS("-DTARGET")
35 ENDIF("${ARCH}" STREQUAL "arm")
38 ADD_DEFINITIONS("-DHAVE_WAYLAND")
39 ENDIF(WAYLAND_SUPPORT)
41 ADD_DEFINITIONS("-DHAVE_X11")
44 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
45 ADD_DEFINITIONS("-DTIZEN_DEBUG")
47 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}")
49 aux_source_directory(src SOURCES)
50 ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
52 SET_TARGET_PROPERTIES(${fw_name}
59 TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS})
61 INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR})
63 DIRECTORY ${INC_DIR}/ DESTINATION include/${service}
65 PATTERN "*_private.h" EXCLUDE
66 PATTERN "${INC_DIR}/*.h"
69 SET(PC_NAME ${fw_name})
70 SET(PC_REQUIRED ${pc_dependents})
71 SET(PC_LDFLAGS -l${fw_name})
75 ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
78 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
80 ADD_SUBDIRECTORY(test)
84 ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution)
87 COMMENT "distribution clean"
90 -not -name config.cmake -and \(
94 -name cmake.depends -or
95 -name cmake.check_depends -or
96 -name CMakeCache.txt -or
97 -name cmake.check_cache -or
103 -name install_manifest.txt -or
106 | grep -v TC | xargs rm -rf