2 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
3 SET(fw_name "capi-media-player")
7 SET(CMAKE_INSTALL_PREFIX /usr)
8 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
11 SET(INC_DIR include/wearable)
13 SET(INC_DIR include/common)
14 ENDIF (TIZEN_WEARABLE)
16 SET(INC_COM_DIR include)
18 INCLUDE_DIRECTORIES(${INC_DIR}, ${INC_COM_DIR})
19 IF (TIZEN_FEATURE_EVAS_RENDERER)
20 SET(dependents "dlog glib-2.0 libtbm capi-media-tool capi-media-sound-manager capi-base-common mused mm-common tizen-extension-client evas ecore elementary mm-evas-renderer storage capi-system-info")
21 ELSE (TIZEN_FEATURE_EVAS_RENDERER)
22 SET(dependents "dlog glib-2.0 libtbm capi-media-tool capi-media-sound-manager capi-base-common mused mm-common tizen-extension-client evas ecore elementary storage capi-system-info")
23 ENDIF (TIZEN_FEATURE_EVAS_RENDERER)
24 SET(pc_dependents "libtbm capi-media-tool capi-base-common capi-media-sound-manager ecore-wayland")
26 INCLUDE(FindPkgConfig)
27 pkg_check_modules(${fw_name} REQUIRED ${dependents})
28 FOREACH(flag ${${fw_name}_CFLAGS})
29 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
32 pkg_check_modules(MMSVC_PLAYER mmsvc-player)
33 FOREACH(mmsvcflag ${MMSVC_PLAYER_CFLAGS})
34 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${mmsvcflag}")
37 SET(CMAKE_C_FLAGS "-I./${INC_DIR} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror -Wno-deprecated -Wno-deprecated-declarations")
38 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
40 IF("${ARCH}" STREQUAL "arm")
41 ADD_DEFINITIONS("-DTARGET")
42 ENDIF("${ARCH}" STREQUAL "arm")
44 IF (TIZEN_FEATURE_EVAS_RENDERER)
45 ADD_DEFINITIONS("-DTIZEN_FEATURE_EVAS_RENDERER")
46 ENDIF(TIZEN_FEATURE_EVAS_RENDERER)
48 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
49 ADD_DEFINITIONS("-DTIZEN_DEBUG")
52 ADD_DEFINITIONS("-DTIZEN_TV")
55 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}")
57 aux_source_directory(src SOURCES)
58 ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
60 TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS})
62 SET_TARGET_PROPERTIES(${fw_name}
69 INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR})
71 DIRECTORY ${INC_DIR}/ DESTINATION include/media
73 PATTERN "*_private.h" EXCLUDE
74 PATTERN "${INC_DIR}/*.h"
77 SET(PC_NAME ${fw_name})
78 SET(PC_REQUIRED ${pc_dependents})
79 SET(PC_LDFLAGS -l${fw_name})
80 SET(PC_CFLAGS -I\${includedir}/media)
84 ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
87 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
89 ADD_SUBDIRECTORY(test)
93 ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution)
96 COMMENT "distribution clean"
99 -not -name config.cmake -and \(
103 -name cmake.depends -or
104 -name cmake.check_depends -or
105 -name CMakeCache.txt -or
106 -name cmake.check_cache -or
112 -name install_manifest.txt -or
115 | grep -v TC | xargs rm -rf