summaryrefslogtreecommitdiff
path: root/common/CMakeLists.txt
blob: fca8475f23f9de4f07b5454b0fac5ef67d9f71c1 (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
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
)

INCLUDE_DIRECTORIES(
	${CMAKE_CURRENT_SOURCE_DIR}
	${CMAKE_CURRENT_SOURCE_DIR}/include
)

INCLUDE(FindPkgConfig)
pkg_check_modules(commonpkgs REQUIRED
	elementary
	evas
	ui-gadget
	dlog
)

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

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -Wall")
SET(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} ${commonpkgs_LDFLAGS} -lm )

INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib)