INCLUDE(FindPkgConfig)
+############################# build type ######################################
+
+IF(NOT CMAKE_BUILD_TYPE)
+ SET(CMAKE_BUILD_TYPE "Release")
+ENDIF(NOT CMAKE_BUILD_TYPE)
+
############################# compilation defines #############################
-# EMPTY
+
+#csp from .xml parsing enabled
+OPTION(CSP_SUPPORT "Support for csp policy" ON)
+
+IF(CSP_SUPPORT)
+ ADD_DEFINITIONS("-DCSP_ENABLED")
+ENDIF(CSP_SUPPORT)
############################# 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(CMAKE_CXX_FLAGS_RELEASE "-O2 -std=c++0x -g")
+SET(CMAKE_CXX_FLAGS_CCOV "-O0 -std=c++0x -g --coverage")
OPTION(DPL_LOG "DPL logs status" ON)
-IF(DPL_LOG)
+OPTION(WITH_TESTS "Build tests" OFF)
+IF(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling")
MESSAGE(STATUS "Logging enabled for DPL")
ADD_DEFINITIONS("-DDPL_LOGS_ENABLED")
-ELSE(DPL_LOG)
+ELSE(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling")
MESSAGE(STATUS "Logging disabled for DPL")
-ENDIF(DPL_LOG)
+ENDIF(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling")
+MESSAGE(STATUS "WITH_TESTS: " ${WITH_TESTS})
# If supported for the target machine, emit position-independent code,suitable
# for dynamic linking and avoiding any limit on the size of the global offset
# table. This option makes a difference on the m68k, PowerPC and SPARC.
# (BJ: our ARM too?)
ADD_DEFINITIONS("-fPIC")
-ADD_DEFINITIONS("-DSEPARATED_SINGLETON_IMPLEMENTATION")
# Set the default ELF image symbol visibility to hidden - all symbols will be
# marked with this unless overridden within the code.
ADD_DEFINITIONS("-Wextra") # Generate even more extra warnings
ADD_DEFINITIONS("-Wno-variadic-macros") # Inhibit variadic macros warnings (needed for ORM)
ADD_DEFINITIONS("-Wno-deprecated") # No warnings about deprecated features
-ADD_DEFINITIONS("-std=c++0x") # No warnings about deprecated features
+ADD_DEFINITIONS("-std=c++0x") # accept C++11x standard
#ADD_DEFINITIONS("-DWRT_SMACK_ENABLED")
############################# Targets names ###################################
SET(TARGET_INSTALLER_STATIC "wrt-installer_static")
SET(TARGET_INSTALLER "wrt-installer")
SET(TARGET_BACKEND_LIB "wgt")
-SET(TARGET_CONFIG_GEN_LIB "wrt-config-generator")
-############################# subdirectories ##################################
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${PROJECT_SOURCE_DIR}/data/widget_install_popup.edj
+ COMMAND edje_cc
+ ARGS ${PROJECT_SOURCE_DIR}/data/widget_install_popup.edc
+ ${PROJECT_SOURCE_DIR}/data/widget_install_popup.edj
+ DEPENDS ${PROJECT_SOURCE_DIR}/data/widget_install_popup.edc
+ )
+ADD_CUSTOM_TARGET(widget_install_popup ALL DEPENDS
+ ${PROJECT_SOURCE_DIR}/data/widget_install_popup.edj
+ )
+INSTALL(FILES ${PROJECT_SOURCE_DIR}/data/widget_install_popup.edj
+ DESTINATION share/edje/wrt
+ )
+############################# subdirectories ##################################
ADD_SUBDIRECTORY(src)
-ADD_SUBDIRECTORY(tests)
+ADD_SUBDIRECTORY(etc)
+
+IF(WITH_TESTS)
+ ADD_SUBDIRECTORY(tests)
+ENDIF(WITH_TESTS)