blob: 64adece100c62d343486ba744e4487f311770be9 (
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
85
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(this_target "message-port")
SET(CMAKE_INSTALL_PREFIX /usr)
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
## OUTPUT PATHS
SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output)
INCLUDE_DIRECTORIES (
/usr/include
/usr/include/appfw
/usr/include/dlog
/usr/include/glib-2.0
/usr/lib/glib-2.0/include
/usr/include/chromium
include
)
SET (${this_target}_SOURCE_FILES
src/IpcClient.cpp
src/message-port.cpp
src/message-port-messages.cpp
src/MessagePortProxy.cpp
)
SET(requires "dlog bundle glib-2.0 chromium")
INCLUDE(FindPkgConfig)
pkg_check_modules(${this_target} REQUIRED ${requires})
FOREACH(flag ${${this_target}_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wall" )
## SET C COMPILER FLAGS
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror")
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
## SET CPP COMPILER FLAGS
SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
IF("${ARCH}" STREQUAL "arm")
ADD_DEFINITIONS("-DTARGET")
ENDIF("${ARCH}" STREQUAL "arm")
ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
ADD_DEFINITIONS("-DSLP_DEBUG")
## Create Library
ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES})
## SET LINKER FLAGS
SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib")
TARGET_LINK_LIBRARIES(${this_target} "-ldlog" )
TARGET_LINK_LIBRARIES(${this_target} "-lbundle" )
TARGET_LINK_LIBRARIES(${this_target} "-lglib-2.0" )
TARGET_LINK_LIBRARIES(${this_target} "-lchromium" )
TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-app-manager" )
TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-package-manager" )
SET_TARGET_PROPERTIES(${this_target}
PROPERTIES
VERSION ${FULLVER}
SOVERSION ${MAJORVER}
CLEAN_DIRECT_OUTPUT 1
)
# pkgconfig file
CONFIGURE_FILE(${this_target}.pc.in ${CMAKE_SOURCE_DIR}/${this_target}.pc @ONLY)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/${this_target}.pc DESTINATION lib/pkgconfig)
INSTALL(TARGETS ${this_target} DESTINATION lib)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION include/appfw FILES_MATCHING PATTERN "*.h")
INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/ DESTINATION lib
FILES_MATCHING PATTERN "*.so*"
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
WORLD_EXECUTE WORLD_READ)
|