1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
18 SET(project_prefix "capi")
21 SET(maintainer "Seungbae Shin <seungbae.shin@samsung.com>, Sangchul Lee <sc11.lee@samsung.com>, Jeongho Mok <jho.mok@samsung.com>")
22 SET(description "A wav player library in Tizen Native API")
24 SET(submodule "wav-player")
27 SET(dependents "mm-sound dlog capi-base-common capi-media-sound-manager")
28 SET(pc_dependents "capi-base-common capi-media-sound-manager")
30 SET(fw_name "${project_prefix}-${service}-${submodule}")
34 SET(CMAKE_INSTALL_PREFIX ${prefix})
35 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
36 SET(VERSION ${version})
39 INCLUDE_DIRECTORIES(${INC_DIR})
41 INCLUDE(FindPkgConfig)
42 pkg_check_modules(${fw_name} REQUIRED ${dependents})
43 FOREACH(flag ${${fw_name}_CFLAGS})
44 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
47 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall")
48 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
50 IF("${ARCH}" MATCHES "^arm.*")
51 ADD_DEFINITIONS("-DTARGET")
52 ENDIF("${ARCH}" MATCHES "^arm.*")
54 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
55 ADD_DEFINITIONS("-DTIZEN_DEBUG")
57 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}")
59 aux_source_directory(src SOURCES)
60 ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
62 TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS})
64 SET_TARGET_PROPERTIES(${fw_name}
71 INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR})
73 DIRECTORY ${INC_DIR}/ DESTINATION include/${service}
75 PATTERN "*_private.h" EXCLUDE
76 PATTERN "${INC_DIR}/*.h"
79 SET(PC_NAME ${fw_name})
80 SET(PC_REQUIRED ${pc_dependents})
81 SET(PC_LDFLAGS -l${fw_name})
85 ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
88 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
90 IF(TIZEN_FEATURE_TESTSUITE)
91 ADD_SUBDIRECTORY(test)
92 ENDIF(TIZEN_FEATURE_TESTSUITE)
96 ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution)
99 COMMENT "distribution clean"
102 -not -name config.cmake -and \(
106 -name cmake.depends -or
107 -name cmake.check_depends -or
108 -name CMakeCache.txt -or
109 -name cmake.check_cache -or
115 -name install_manifest.txt -or
118 | grep -v TC | xargs rm -rf