2 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
3 SET(fw_name "capi-web-url-download")
7 SET(CMAKE_INSTALL_PREFIX /usr)
8 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
11 INCLUDE_DIRECTORIES(${INC_DIR})
13 SET(requires "dlog capi-base-common bundle capi-appfw-app-manager capi-appfw-application download-provider")
14 MESSAGE(STATUS "PACKAGES : ${requires}")
15 SET(pc_requires "capi-base-common capi-appfw-application")
17 INCLUDE(FindPkgConfig)
18 pkg_check_modules(${fw_name} REQUIRED ${requires})
19 FOREACH(flag ${${fw_name}_CFLAGS})
20 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
23 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror")
24 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
26 IF("${ARCH}" STREQUAL "arm")
27 ADD_DEFINITIONS("-DTARGET")
28 ENDIF("${ARCH}" STREQUAL "arm")
30 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
31 ADD_DEFINITIONS("-DSLP_DEBUG")
33 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib")
35 SET(SOURCES src/url_download_provider.c)
36 MESSAGE(STATUS "SOURCES : ${SOURCES}")
37 ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
39 TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS})
41 INSTALL(TARGETS ${fw_name} DESTINATION lib)
43 DIRECTORY ${INC_DIR}/ DESTINATION include/web
45 PATTERN "*_private.h" EXCLUDE
46 PATTERN "${INC_DIR}/*.h"
49 SET(PC_NAME ${fw_name})
50 SET(PC_REQUIRED ${pc_requires})
51 SET(PC_LDFLAGS -l${fw_name})
52 SET(PC_CFLAGS -I\${includedir}/system)
55 capi-web-url-download.pc.in
56 ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
59 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION lib/pkgconfig)
63 ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution)
66 COMMENT "distribution clean"
69 -not -name config.cmake -and \(
73 -name cmake.depends -or
74 -name cmake.check_depends -or
75 -name CMakeCache.txt -or
76 -name cmake.check_cache -or
82 -name install_manifest.txt -or
85 | grep -v TC | xargs rm -rf