CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(privacy-setting C) INCLUDE(FindPkgConfig) STRING(REGEX MATCH "([^.]*)" SO_VERSION "${VERSION}") # Set compiler flags SET(CMAKE_C_FLAGS_RELEASE "-O2 -Wall") SET(CMAKE_C_FLAGS_DEBUG "-O0 -Wall -g -ggdb") SET(CMAKE_C_FLAGS_CCOV "-O2 -Wall --coverage") ADD_DEFINITIONS("-Werror") # Make all warnings into errors. ADD_DEFINITIONS("-Wall") # Generate all warnings ADD_DEFINITIONS("-Wextra") # Generate even more extra warnings ADD_DEFINITIONS("-Wno-unused-parameter") # Ignore unused parameter ADD_DEFINITIONS("-Wno-unused-function") ADD_DEFINITIONS("-Wno-unused-variable") # Set linker flags SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed") SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie") SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(BINDIR "${PREFIX}/bin") SET(PREFIX_POPUP ${CMAKE_POPUP_INSTALL_PREFIX}) SET(POPUP_BINDIR "${PREFIX_POPUP}/bin") SET(LIBDIR "${PREFIX}/lib") SET(RESDIR "${PREFIX}/res") SET(POPUP_RESDIR "${PREFIX_POPUP}/res") SET(LOCALEDIR "${RESDIR}/locale") SET(POPUP_LOCALEDIR "${POPUP_RESDIR}/locale") ADD_DEFINITIONS("-D_TZ_SYS_RO_APP=\"${TZ_SYS_RO_APP}\"") IF (CMAKE_BUILD_TYPE MATCHES "DEBUG") ADD_DEFINITIONS("-DTIZEN_DEBUG_ENABLE") ADD_DEFINITIONS("-DBUILD_TYPE_DEBUG") ADD_DEFINITIONS("-DDPL_LOGS_ENABLED") ENDIF (CMAKE_BUILD_TYPE MATCHES "DEBUG") ADD_DEFINITIONS("-DPACKAGE=\"${PROJECT_NAME}\"") ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"") ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"") ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"") ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"") SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) #ADD_DEFINITIONS("-DUG_WAYLAND") ADD_SUBDIRECTORY(ui) ADD_SUBDIRECTORY(ui-popup) ADD_SUBDIRECTORY(po) INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/icon DESTINATION DESTINATION ${TZ_SYS_RO_APP}/org.tizen.privacy-setting/res FILES_MATCHING PATTERN "*.png") INSTALL(FILES ${CMAKE_SOURCE_DIR}/packaging/org.tizen.privacy-setting.xml DESTINATION ${TZ_SYS_RO_PACKAGES}/) INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/button DESTINATION DESTINATION ${TZ_SYS_RO_APP}/org.tizen.privacy-setting-popup/res FILES_MATCHING PATTERN "*.png") INSTALL(FILES ${CMAKE_SOURCE_DIR}/packaging/org.tizen.privacy-setting-popup.xml DESTINATION ${TZ_SYS_RO_PACKAGES}/)