X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=CMakeLists.txt;h=8217e6737422ca11cb7bcd2ef97e563cafb4526a;hb=da854ef348cf918993a95adeeffa616db2dca6f7;hp=ffa4731254796d9f8e9f358bbcdc9dcfce4ba99d;hpb=9c61c076f198660f9d9683fc1f091cbc95b3286b;p=profile%2Fivi%2Fwrt-plugins-common.git diff --git a/CMakeLists.txt b/CMakeLists.txt index ffa4731..8217e67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,49 +14,25 @@ # cmake_minimum_required(VERSION 2.6) -IF("${CMAKE_PROJECT_NAME}" STREQUAL "") - SET(CMAKE_PROJECT_NAME wrt-plugins-common) -ENDIF("${CMAKE_PROJECT_NAME}" STREQUAL "") - +SET(CMAKE_PROJECT_NAME wrt-plugins-common) set(PACKAGE_NAME ${CMAKE_PROJECT_NAME}) - project(${CMAKE_PROJECT_NAME}) +STRING(REGEX MATCH "([^.]*)" CMAKE_PROJECT_API_VERSION "${CMAKE_PROJECT_VERSION}") ################################################################################ # Required platform modules include(FindPkgConfig) -pkg_search_module(dpl REQUIRED dpl-efl>=1.0.0) +pkg_search_module(dpl REQUIRED dpl-efl>=0.2.21) include_directories( ${dpl_INCLUDE_DIRS} ) - -# -# 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_BUILD_TYPE Release) 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") @@ -65,15 +41,33 @@ SET(CMAKE_C_FLAGS_RELEASE "-O2 -g") SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -std=c++0x -g") #### +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) + ADD_DEFINITIONS("-fvisibility=default") # mark all exported symbols as visible +ADD_DEFINITIONS("-fPIC") # If supported for the target machine, emit position-independent code, suitable for dynamic linking and avoiding ADD_DEFINITIONS("-DEXPORT_API=") ADD_DEFINITIONS("-Wall") -ADD_DEFINITIONS("-Werror") +#ADD_DEFINITIONS("-Werror") ADD_DEFINITIONS("-Wextra") ADD_DEFINITIONS("-Wno-deprecated") - -#disable default singleton implementation ADD_DEFINITIONS("-DSEPARATED_SINGLETON_IMPLEMENTATION") +#ADD_DEFINITIONS("-DW3C_TEST") +#ADD_DEFINITIONS("-DDEVPKG") + +############################################################################## +# CMake flags +IF (W3C_TEST) + SET(W3C_TEST "ON") +ENDIF(W3C_TEST) +IF (DEVPKG) + SET(DEVPKG "ON") +ENDIF(DEVPKG) ################################################################################ # Miscellaneous variables @@ -95,6 +89,13 @@ if (NOT DEFINED PLATFORM) endif () ################################################################################ +# Schema of plugin's configuration file + +set(COMMON_CONFIG_DTD ${CMAKE_CURRENT_SOURCE_DIR}/config.dtd) +set(COMMON_CONFIG_DTD_DST /usr/etc/wrt-plugins) +INSTALL(FILES ${COMMON_CONFIG_DTD} DESTINATION ${COMMON_CONFIG_DTD_DST}) + +################################################################################ # Macros used for including plugins from AL. @@ -107,7 +108,6 @@ endfunction() # Subdirectories add_subdirectory(src) -add_subdirectory(tests) ################################################################################ # PKGCONFIG @@ -123,24 +123,9 @@ endmacro(configure_and_install_pkg) configure_and_install_pkg(wrt-plugins-commons-javascript.pc) configure_and_install_pkg(wrt-plugins-commons.pc) configure_and_install_pkg(wrt-plugins-filesystem.pc) -configure_and_install_pkg(wrt-plugins-camera.pc) -configure_and_install_pkg(wrt-plugins-messaging.pc) -configure_and_install_pkg(wrt-plugins-calendar.pc) -configure_and_install_pkg(wrt-plugins-haptics.pc) -configure_and_install_pkg(wrt-plugins-contact.pc) configure_and_install_pkg(wrt-plugins-mmplayer.pc) -configure_and_install_pkg(wrt-plugins-widget.pc) configure_and_install_pkg(wrt-plugins-cpu.pc) -configure_and_install_pkg(wrt-plugins-accelerometer.pc) -configure_and_install_pkg(wrt-plugins-task.pc) -configure_and_install_pkg(wrt-plugins-orientation.pc) -configure_and_install_pkg(wrt-plugins-radio.pc) -configure_and_install_pkg(wrt-plugins-power.pc) -configure_and_install_pkg(wrt-plugins-profile.pc) -configure_and_install_pkg(wrt-plugins-localstorage.pc) -configure_and_install_pkg(wrt-plugins-systeminfo.pc) -configure_and_install_pkg(wrt-plugins-widget_interface_dao.pc) -configure_and_install_pkg(wrt-plugins-storageevent.pc) +configure_and_install_pkg(wrt-plugins-widget-interface-dao.pc) configure_and_install_pkg(wrt-plugins-widgetdb.pc) configure_and_install_pkg(wrt-plugins-plugin-manager.pc) @@ -156,3 +141,4 @@ set(CMAKE_CONFIG_FILE_NAME "${CMAKE_CONFIG_FILE_NAME}" CACHE # Summary message(STATUS "PLATFORM = ${PLATFORM}") +message(STATUS "W3C_TEST = ${W3C_TEST}")