CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(settings-tv-ref) IF (with_wayland) ADD_DEFINITIONS("-DWAYLAND") ENDIF (with_wayland) INCLUDE(FindPkgConfig) pkg_check_modules(HOMEPANEL_PKGS REQUIRED application-common capi-appfw-application dlog edje elementary evas glib-2.0 eina aul ui-gadget-1 json-glib-1.0 vconf capi-network-wifi capi-network-connection capi-system-info capi-media-sound-manager ) #capi-system-tvtimer #tv-service #tv-player-core SET(PREFIX ${CMAKE_INSTALL_PREFIX}) IF(NOT DEFINED PACKAGE_NAME) SET(PACKAGE_NAME "org.tizen.${PROJECT_NAME}") ENDIF(NOT DEFINED PACKAGE_NAME) IF(NOT DEFINED BINDIR) SET(BINDIR "${PREFIX}/bin") ENDIF(NOT DEFINED BINDIR) IF(NOT DEFINED RESDIR) SET(RESDIR "${PREFIX}/res") ENDIF(NOT DEFINED RESDIR) IF(NOT DEFINED IMAGEDIR) SET(IMAGEDIR "${PREFIX}/res/images") ENDIF(NOT DEFINED IMAGEDIR) IF(NOT DEFINED EDJEDIR) SET(EDJEDIR "${PREFIX}/res/edje") ENDIF(NOT DEFINED EDJEDIR) IF(NOT DEFINED LOCALEDIR) SET(LOCALEDIR "${PREFIX}/res/locale") ENDIF(NOT DEFINED LOCALEDIR) IF(NOT DEFINED MANIFESTDIR) SET(MANIFESTDIR "${PREFIX}/share/packages") ENDIF(NOT DEFINED MANIFESTDIR) IF(NOT DEFINED DESKTOP_ICONDIR) SET(DESKTOP_ICONDIR "/usr/share/icons/default/small") ENDIF(NOT DEFINED DESKTOP_ICONDIR) IF(NOT DEFINED DESKTOP_ICON) SET(DESKTOP_ICON ${PACKAGE_NAME}.png) ENDIF(NOT DEFINED DESKTOP_ICON) IF(NOT DEFINED JSONDIR) SET(JSONDIR "${PREFIX}/res/json") ENDIF(NOT DEFINED JSONDIR) IF(NOT DEFINED UGLIBDIR) SET(UGLIBDIR "/usr/ug/lib") ENDIF(NOT DEFINED UGLIBDIR) SET(EDJ_FILE "org.tizen.settings-tv-ref.edj") SET(EDJ_THEME "org.tizen.settings-tv-ref-theme.edj") ADD_DEFINITIONS("-DPROJECTNAME=\"${PROJECT_NAME}\"") ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE_NAME}\"") ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"") ADD_DEFINITIONS("-DEDJEDIR=\"${EDJEDIR}\"") ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"") ADD_DEFINITIONS("-DEDJ_FILE=\"${EDJEDIR}/${EDJ_FILE}\"") ADD_DEFINITIONS("-DEDJ_THEME=\"${EDJEDIR}/${EDJ_THEME}\"") ADD_DEFINITIONS("-DJSON_OUTPUT_DIR=\"${JSONOUTPUTDIR}\"") ADD_DEFINITIONS("-DJSON_HELPER_FILE=\"${JSONHELPERFILE}\"") INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) ADD_EXECUTABLE(${PROJECT_NAME} src/main.c src/parser.c src/data_wrapper.c src/utils.c src/viewmgr.c src/view_maincatalog.c src/view_uigadget.c src/view_sublist.c src/view_bottomsublist.c src/view_bottomslider.c src/settings_provider.c src/view_pwd_popup.c src/view_device_manager.c src/view_resetpopup.c src/view_upgrade_popup.c src/view_system_clock.c src/view_need_pwd.c src/timeout_handler.c ) FOREACH (flag ${HOMEPANEL_PKGS_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") FOREACH (flag ${HOMEPANEL_PKGS_CFLAGS}) SET(EXTRA_CXXFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS}") TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${HOMEPANEL_PKGS_LDFLAGS}) CONFIGURE_FILE(${PACKAGE_NAME}.xml.in ${PACKAGE_NAME}.xml) # Install INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR}) INSTALL(FILES ${PACKAGE_NAME}.xml DESTINATION ${MANIFESTDIR}) INSTALL(FILES ${CMAKE_SOURCE_DIR}/${DESKTOP_ICON} DESTINATION ${DESKTOP_ICONDIR}) INSTALL(FILES ${CMAKE_SOURCE_DIR}/${DESKTOP_ICON_4X2} DESTINATION ${DESKTOP_ICONDIR}) #INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/data/images/ DESTINATION ${IMAGEDIR}) INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/json DESTINATION ${RESDIR}) ADD_SUBDIRECTORY(data) #ADD_SUBDIRECTORY(po) ADD_SUBDIRECTORY(ug/channel) ADD_SUBDIRECTORY(ug/network) ADD_SUBDIRECTORY(ug/proxy) ADD_SUBDIRECTORY(ug/wifi-direct) ADD_SUBDIRECTORY(ug/system/clock) #ADD_SUBDIRECTORY(ug/system/wakeup_timer)