summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 88d5a2e0e981233afa794e619503d6dbdb8390e6 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

PROJECT(sticker-panel C)

SET(VERSION 0.1.0)

SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(INCLUDEDIR "${PREFIX}/include/${PROJECT_NAME}")

SET(LIBDIR "${LIB_INSTALL_DIR}")

SET(ICONDIR "${SHAREDIR}/icons")
SET(PANELDIR "${SHAREDIR}/${PROJECT_NAME}")

SET(EDJEDIR "${PANELDIR}/edje")
SET(IMAGEDIR "${PANELDIR}/images")
SET(LOCALEDIR "${PANELDIR}/locale")
SET(SAMPLEDIR "${PANELDIR}/sample")

SET(INSTALL_HEADERS_DEVEL
	sticker_panel.h
)

SET(SRCS
	src/sticker_panel.c
	src/grid.c
	src/page.c
	src/scroller.c
	src/toolbar.c
	src/ui_manager.c
	src/naviframe.c
	src/icon_info.c
	src/db.c
	src/gesture.c
	src/group_icon_info.c
	src/setting.c
)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED
	capi-appfw-application
	capi-base-common
	appcore-efl
	dlog
	elementary
	evas
	feedback
	isf
	efl-extension
	sqlite3
	bundle
)

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

SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -g -Wall -O2")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")

ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
ADD_DEFINITIONS("-DEDJEDIR=\"${EDJEDIR}\"")
ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
ADD_DEFINITIONS("-DPANELDIR=\"${PANELDIR}\"")

ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION 0.1.0)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})

INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/A01-1_icon_Menu.png DESTINATION ${ICONDIR})

CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROJECT_NAME}.pc")
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIBDIR}/pkgconfig)

FOREACH(hfile ${INSTALL_HEADERS_DEVEL})
	INSTALL(FILES ${CMAKE_SOURCE_DIR}/include/${hfile} DESTINATION include/${PROJECT_NAME})
ENDFOREACH(hfile)

# subdir
ADD_SUBDIRECTORY(res)
ADD_SUBDIRECTORY(sample)