summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
blob: bfa8c05f6fbbd2cafc2f1548d9db1d62475e364a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(ug-attach-panel-document C)

SET(LIBDIR "${PREFIX1}/lib")

SET(VERSION 0.0.1)

SET(SRCS
	attach-panel-document.c
	doc-data.c
	doc-data-util.c
	doc-list.c
	doc-main-view.c
	doc-util.c
	doc-data-type.c
	doc-db-update.c
	doc-local-data.c
	doc-ui-util.c
)

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include/)

INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED
	elementary
	evas
	dlog
	glib-2.0
	capi-appfw-application
	capi-content-media-content
	ui-gadget-1
	efl-extension
	notification
	appsvc
	storage
	libtzplatform-config
)

FOREACH(flag ${pkgs_CFLAGS})
	SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
ENDFOREACH(flag)

SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} -fvisibility=hidden -Wall")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS}")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS}")

ADD_DEFINITIONS("-D_USE_DLOG_")
ADD_DEFINITIONS("-D_USE_SECURE_LOG_")
ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
ADD_DEFINITIONS("-DPACKAGE=\"${PROJECT_NAME}\"")
ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
ADD_DEFINITIONS("-DFEATURE_SIZE_CHECK")

#Set Library
ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION 0.0.1)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} "-ldl")

# install binary
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})