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 (EVAS_RENDERER_SUPPORT)
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")
21 ELSE (EVAS_RENDERER_SUPPORT)
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")
23 ENDIF (EVAS_RENDERER_SUPPORT)
24 SET(pc_dependents "libtbm capi-media-tool capi-base-common capi-media-sound-manager")
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")
45 ADD_DEFINITIONS("-DHAVE_WAYLAND")
46 ENDIF(WAYLAND_SUPPORT)
48 ADD_DEFINITIONS("-DHAVE_X11")
50 IF (EVAS_RENDERER_SUPPORT)
51 ADD_DEFINITIONS("-DEVAS_RENDERER_SUPPORT")
52 ENDIF(EVAS_RENDERER_SUPPORT)
54 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
55 ADD_DEFINITIONS("-DTIZEN_DEBUG")
58 ADD_DEFINITIONS("-DTIZEN_TV")
61 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}")
63 aux_source_directory(src SOURCES)
64 ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
66 TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS})
68 SET_TARGET_PROPERTIES(${fw_name}
75 INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR})
77 DIRECTORY ${INC_DIR}/ DESTINATION include/media
79 PATTERN "*_private.h" EXCLUDE
80 PATTERN "${INC_DIR}/*.h"
83 SET(PC_NAME ${fw_name})
84 SET(PC_REQUIRED ${pc_dependents})
85 SET(PC_LDFLAGS -l${fw_name})
86 SET(PC_CFLAGS -I\${includedir}/media)
90 ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
93 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
95 ADD_SUBDIRECTORY(test)
99 ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution)
102 COMMENT "distribution clean"
105 -not -name config.cmake -and \(
109 -name cmake.depends -or
110 -name cmake.check_depends -or
111 -name CMakeCache.txt -or
112 -name cmake.check_cache -or
118 -name install_manifest.txt -or
121 | grep -v TC | xargs rm -rf