blob: b5a97d05ddf5d496e953b660a603be62b3673fdc (
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
cmake_minimum_required(VERSION 2.6)
project(wrt-plugins-tizen)
################################################################################
# Required platform modules
include(FindPkgConfig)
pkg_search_module(webkit2 REQUIRED ewebkit2)
pkg_search_module(dpl REQUIRED dpl-efl)
pkg_search_module(dpl-event REQUIRED dpl-event-efl)
pkg_search_module(wrt-plugins-types REQUIRED wrt-plugins-types)
pkg_search_module(wrt-deviceapis-commons REQUIRED wrt-plugins-commons)
pkg_search_module(wrt-deviceapis-commons-javascript REQUIRED wrt-plugins-commons-javascript)
include_directories(
${webkit2_INCLUDE_DIRS}
${dpl_INCLUDE_DIRS}
${wrt-plugins-types_INCLUDE_DIRS}
${wrt-deviceapis-commons_INCLUDE_DIRS}
${wrt-deviceapis-commons-javascript_INCLUDE_DIRS}
)
################################################################################
# Build options
#
# Logs
#
OPTION(DPL_LOG "DPL logs status" ON)
IF(DPL_LOG)
MESSAGE(STATUS "Logging enabled for DPL")
ADD_DEFINITIONS("-DDPL_LOGS_ENABLED")
ELSE(DPL_LOG)
MESSAGE(STATUS "Logging disabled for DPL")
ENDIF(DPL_LOG)
###############################################################################
# Set build type (Release by default)
IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
SET(CMAKE_BUILD_TYPE Release)
ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
##############################################################################
# Compiler flags
SET(CMAKE_C_FLAGS_PROFILING "-O0 -g -pg")
SET(CMAKE_CXX_FLAGS_PROFILING "-O0 -std=c++0x -g -pg")
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -std=c++0x -g")
SET(CMAKE_C_FLAGS_RELEASE "-O2 -g")
SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -std=c++0x -g")
####
ADD_DEFINITIONS("-DEXPORT_API=")
ADD_DEFINITIONS("-Wall")
#ADD_DEFINITIONS("-Werror")
#ADD_DEFINITIONS("-Wextra")
################################################################################
# Miscellaneous variables
set(CONFIG_FILE_NAME "config.cmake")
set(DIR_COMMONS ${CMAKE_SOURCE_DIR}/src/commons)
set(LIBS_COMMON
${dpl_LDFLAGS}
${dpl-event_LDFLAGS}
${webkit2_LDFLAGS}
${wrt-deviceapis-commons_LDFLAGS}
${wrt-deviceapis-commons-javascript_LDFLAGS}
)
################################################################################
# Target platform
if (NOT DEFINED PLATFORM)
set(PLATFORM "Tizen")
endif ()
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/src/platform
${CMAKE_CURRENT_SOURCE_DIR}/src/platform/${PLATFORM}
${CMAKE_CURRENT_SOURCE_DIR}/src/standards
)
################################################################################
# Schema of plugin's configuration file
set(COMMON_CONFIG_DTD ${CMAKE_CURRENT_SOURCE_DIR}/config.dtd)
set(COMMON_CONFIG_DTD_DST /usr/etc/tizen-apis)
INSTALL(FILES ${COMMON_CONFIG_DTD} DESTINATION ${COMMON_CONFIG_DTD_DST})
################################################################################
# Macros used for including plugins from AL.
function(add_subdir NAME)
message(STATUS "Building: ${CMAKE_CURRENT_SOURCE_DIR}/${NAME}")
add_subdirectory(${NAME})
endfunction()
################################################################################
# Subdirectories
add_subdirectory(src)
################################################################################
# Cache
set(PLATFORM "${PLATFORM}" CACHE STRING "Target platform" FORCE)
set(CMAKE_CONFIG_FILE_NAME "${CMAKE_CONFIG_FILE_NAME}" CACHE
STRING "CMake configuration file name." FORCE)
################################################################################
# Summary
message(STATUS "PLATFORM = ${PLATFORM}")
|