CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(accessibility-setting C) SET(HEADERS) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(EXEC_PREFIX "\${prefix}") SET(INCLUDEDIR "\${prefix}/include") SET(VERSION 1.0) SET(PACKAGE ${PROJECT_NAME}) SET(PKGNAME "org.tizen.${PACKAGE}") SET(PKGDIR "${TZ_SYS_RO_APP}/${PKGNAME}") SET(BINDIR "${PKGDIR}/bin") SET(RESDIR "${PKGDIR}/res") SET(EDJDIR "${RESDIR}/edje") SET(ICONDIR "${TZ_SYS_RO_ICONS}/default/small") SET(LOCALEDIR "${RESDIR}/locale") INCLUDE(FindPkgConfig) pkg_check_modules(pkgs REQUIRED capi-appfw-application appcore-efl elementary efl-extension dlog vconf ) FOREACH(flag ${pkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}") ENDFOREACH(flag) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -fPIE") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -Wall -fPIE") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -Wall -fPIE") SET(CMAKE_C_FLAGS_RELEASE "-O2 -Wall -fPIE") SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -fPIE") SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -g -fPIE") ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"") ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"") ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"") ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"") ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"") ADD_DEFINITIONS("-DTZ_SYS_RO_APP_D=\"${TZ_SYS_RO_APP}\"") SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed") SET(SRCS src/setting-accessibility.c src/setting-accessibility-menu.c src/setting-accessibility-vision.c ) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) SET(dependents "elementary efl-extension dlog vconf capi-appfw-application appcore-efl ") INCLUDE(FindPkgConfig) pkg_check_modules(pkgs REQUIRED ${dependents} ) FOREACH(flag ${pkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIE -Wl,-rpath,${LIBDIR}") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed") ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} "-pie") INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR}) ADD_CUSTOM_TARGET(${PROJECT_NAME}.edj COMMAND edje_cc ${CMAKE_SOURCE_DIR}/data/edc/${PROJECT_NAME}.edc ${PROJECT_NAME}.edj DEPENDS ${CMAKE_SOURCE_DIR}/data/edc/${PROJECT_NAME}.edc ) ADD_DEPENDENCIES(${PROJECT_NAME} ${PROJECT_NAME}.edj) INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.edj DESTINATION ${EDJDIR}) INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PKGNAME}.xml DESTINATION ${TZ_SYS_RO_PACKAGES}) # i18n ADD_SUBDIRECTORY(po)