1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
17 SET(project_prefix "capi")
19 SET(maintainer "Sahil Bansal <sahil.bansal@samsung.com>")
20 SET(description "A Stream Recorder library in Tizen Native API")
22 SET(submodule "streamrecorder")
25 SET(dependents "dlog mm-streamrecorder capi-media-tool")
26 SET(pc_dependents "capi-base-common capi-media-tool")
28 SET(fw_name "${project_prefix}-${service}-${submodule}")
32 SET(CMAKE_INSTALL_PREFIX ${prefix})
33 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
36 INCLUDE_DIRECTORIES(${INC_DIR})
38 INCLUDE(FindPkgConfig)
39 pkg_check_modules(${fw_name} REQUIRED ${dependents})
40 FOREACH(flag ${${fw_name}_CFLAGS})
41 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
44 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")
45 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
47 IF("${ARCH}" STREQUAL "arm")
48 ADD_DEFINITIONS("-DTARGET")
49 ENDIF("${ARCH}" STREQUAL "arm")
51 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
52 ADD_DEFINITIONS("-DTIZEN_DEBUG")
54 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}")
56 aux_source_directory(src SOURCES)
57 ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
59 SET_TARGET_PROPERTIES(${fw_name}
66 TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS})
68 INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR})
70 DIRECTORY ${INC_DIR}/ DESTINATION include/${service}
72 PATTERN "*_private.h" EXCLUDE
73 PATTERN "${INC_DIR}/*.h"
76 SET(PC_NAME ${fw_name})
77 SET(PC_REQUIRED ${pc_dependents})
78 SET(PC_LDFLAGS -l${fw_name})
82 ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
85 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
87 ADD_SUBDIRECTORY(test)
91 ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution)
94 COMMENT "distribution clean"
97 -not -name config.cmake -and \(
101 -name cmake.depends -or
102 -name cmake.check_depends -or
103 -name CMakeCache.txt -or
104 -name cmake.check_cache -or
110 -name install_manifest.txt -or
113 | grep -v TC | xargs rm -rf