INCLUDE(FindPkgConfig)
-# Options
-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)
-
STRING(REGEX MATCH "([^.]*)" PROJECT_API_VERSION "${PROJECT_VERSION}")
ADD_DEFINITIONS("-DPROJECT_API_VERSION=\"$(PROJECT_API_VERSION)\"")
MESSAGE(STATUS "Version from changelog: ${PROJECT_VERSION}")
SET(CMAKE_BUILD_TYPE "Release")
ENDIF(NOT CMAKE_BUILD_TYPE)
+OPTION(DPL_LOG "DPL logs status" ON)
+OPTION(WITH_TESTS "Build tests" OFF)
+#enable csp policy support
+OPTION(CSP_SUPPORT "Support for csp policy" ON)
+IF(CSP_SUPPORT)
+ ADD_DEFINITIONS("-DCSP_ENABLED")
+ENDIF(CSP_SUPPORT)
+# logs can be only enabled in debug mode
+IF(CMAKE_BUILD_TYPE MATCHES "Profiling" AND DPL_LOG)
+ MESSAGE(STATUS "Logging disabled for DPL")
+ELSE(CMAKE_BUILD_TYPE MATCHES "Profiling" AND DPL_LOG)
+ ADD_DEFINITIONS("-DDPL_LOGS_ENABLED")
+ MESSAGE(STATUS "Logging enabled for DPL")
+ENDIF(CMAKE_BUILD_TYPE MATCHES "Profiling" AND DPL_LOG)
+
+MESSAGE(STATUS "WITH_TESTS: " ${WITH_TESTS})
+MESSAGE(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+OPTION(PROFILING "Profiling status" OFF)
+IF(CMAKE_BUILD_TYPE MATCHES "Profiling")
+ MESSAGE(STATUS "PROFILING: ENABLED")
+ ADD_DEFINITIONS("-DPROFILING_ENABLED")
+ SET(PROFILING ON)
+ELSE(CMAKE_BUILD_TYPE MATCHES "Profiling")
+ MESSAGE(STATUS "PROFILING: DISABLED")
+ENDIF(CMAKE_BUILD_TYPE MATCHES "Profiling")
+
# 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_PROFILING "-O2")
+SET(CMAKE_CXX_FLAGS_PROFILING "-O2 -std=c++0x")
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(TARGET_CORE_MODULE_LIB "wrt-core-module")
SET(TARGET_BUNDLES_LIB "wrt-wk2-bundle")
-# PROFILING
-# need to check build with OFF
-OPTION(PROFILING "Profiling enabled" ON)
+SET(PROF_LIB "")
IF(PROFILING)
- MESSAGE(STATUS "PROFILING: ENABLED")
- ADD_DEFINITIONS("-DPROFILING_ENABLED")
SET(PROF_LIB ${TARGET_PROFILING_LIB})
-ELSE(PROFILING)
- MESSAGE(STATUS "PROFILING: DISABLED")
- SET(PROF_LIB "")
ENDIF(PROFILING)
INSTALL(FILES
DESTINATION /usr/etc/wrt/
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE
)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/roaming_error.msg
- DESTINATION /usr/etc/wrt/
- PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE
- )
INSTALL(FILES ${CMAKE_SOURCE_DIR}/parental.png
DESTINATION /usr/etc/wrt/
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE
)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/wrt_widget_default_icon.png
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/default_icon_tizen.png
+ DESTINATION share/wrt-engine/
+ )
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/default_icon_wac.png
DESTINATION share/wrt-engine/
)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/userAgentProfile.xml
DESTINATION share/wrt-engine/
)
ADD_CUSTOM_COMMAND(
- OUTPUT ${PROJECT_SOURCE_DIR}/data/communicationBox.edj
- COMMAND edje_cc
- ARGS ${PROJECT_SOURCE_DIR}/data/communicationBox.edc
- ${PROJECT_SOURCE_DIR}/data/communicationBox.edj
- DEPENDS ${PROJECT_SOURCE_DIR}/data/communicationBox.edc
- )
-ADD_CUSTOM_COMMAND(
OUTPUT ${PROJECT_SOURCE_DIR}/data/wrt_theme.edj
COMMAND edje_cc -id ${PROJECT_SOURCE_DIR}/data/images
ARGS ${PROJECT_SOURCE_DIR}/data/wrt_theme.edc
${PROJECT_SOURCE_DIR}/data/Daemon.edj
DEPENDS ${PROJECT_SOURCE_DIR}/data/Daemon.edc
)
-ADD_CUSTOM_TARGET( ACE_EDJES ALL DEPENDS
- ${PROJECT_SOURCE_DIR}/data/communicationBox.edj
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${PROJECT_SOURCE_DIR}/data/Platform.edj
+ COMMAND edje_cc
+ ARGS ${PROJECT_SOURCE_DIR}/data/Platform.edc
+ ${PROJECT_SOURCE_DIR}/data/Platform.edj
+ DEPENDS ${PROJECT_SOURCE_DIR}/data/Platform.edc
)
ADD_CUSTOM_TARGET( WRT_THEME_EDJES ALL DEPENDS
${PROJECT_SOURCE_DIR}/data/wrt_theme.edj
ADD_CUSTOM_TARGET( WRT_EDJES ALL DEPENDS
${PROJECT_SOURCE_DIR}/data/Daemon.edj
)
+ADD_CUSTOM_TARGET( WRT_PLATFORM_LAYOUT_EDJES ALL DEPENDS
+ ${PROJECT_SOURCE_DIR}/data/Platform.edj
+ )
ADD_CUSTOM_COMMAND(
OUTPUT ${PROJECT_SOURCE_DIR}/data/generic_popup.edj
COMMAND edje_cc
INSTALL(FILES ${PROJECT_SOURCE_DIR}/data/generic_popup.edj
DESTINATION share/edje/ace/
)
-INSTALL(FILES ${PROJECT_SOURCE_DIR}/data/communicationBox.edj
- DESTINATION share/edje/ace/
- )
INSTALL(FILES ${PROJECT_SOURCE_DIR}/data/wrt_theme.edj
DESTINATION share/edje/wrt/
)
INSTALL(FILES ${PROJECT_SOURCE_DIR}/data/Daemon.edj
DESTINATION share/edje/wrt/
)
+INSTALL(FILES ${PROJECT_SOURCE_DIR}/data/Platform.edj
+ DESTINATION share/edje/wrt/
+ )
ADD_CUSTOM_COMMAND(
OUTPUT ${PROJECT_SOURCE_DIR}/data/generic_popup_horizontal.edj
COMMAND edje_cc
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(po)
-set(PKGCONFIG_DIR ${PROJECT_SOURCE_DIR}/pkgconfig)
+SET(WRT_API_NEW_INCLUDES
+ "${PROJECT_SOURCE_DIR}/src/api_new/"
+ "${PROJECT_SOURCE_DIR}/src/domain/"
+ "${PROJECT_SOURCE_DIR}/src/view/")
+
+SET(PKGCONFIG_DIR ${PROJECT_SOURCE_DIR}/pkgconfig)
CONFIGURE_FILE(${PKGCONFIG_DIR}/wrt-core.pc.in
${PKGCONFIG_DIR}/wrt-core.pc @ONLY)
INSTALL(FILES ${PKGCONFIG_DIR}/wrt-core.pc DESTINATION lib/pkgconfig)
+IF(WITH_TESTS)
+ add_subdirectory(tests)
+ENDIF(WITH_TESTS)
+