summaryrefslogtreecommitdiff
path: root/common/CMakeLists.txt
blob: f51ffea0faf111990b1eb7aa2b6941e7da1cd53e (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
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(ivug_common C CXX)

SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(VERSION 0.1.0)

SET(SRCS
	src/ivug-mouse-event.c
	src/debug.c
	src/statistics.c
	src/ivug-uuid.c
	src/ivug-util.c
	src/ivug-drm.c
	src/ivug-file-info.c
	src/ivug-callback.c
	src/ivug-config.c
	src/ivug-message.c
	src/ivug-exif.c
	src/ivug-db.c
)

INCLUDE_DIRECTORIES(
	${CMAKE_SOURCE_DIR}/include
	include
	src
)

MESSAGE("Checking " ${PROJECT_NAME}
)

INCLUDE(FindPkgConfig)
pkg_check_modules(${PROJECT_NAME}_pkgs REQUIRED
	elementary
	evas
	ecore-evas
	ecore-file
	efreet-mime
	dlog
	drm-client
	libexif
	vconf
	capi-system-power
	capi-media-metadata-extractor
	capi-content-mime-type
	capi-content-media-content
)

FOREACH(flag ${${PROJECT_NAME}_pkgs_CFLAGS})
	SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
ENDFOREACH(flag)

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

ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")

ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION} )

TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${${PROJECT_NAME}_pkgs_LDFLAGS})

INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib)