CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(image-viewer C) SET(PKG_NAME org.tizen.image-viewer) SET(SRCS src/image-viewer.c ) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include/ ) INCLUDE(FindPkgConfig) pkg_check_modules(pkgs REQUIRED utilX elementary ui-gadget-1 evas ecore-x ecore ecore-input vconf capi-appfw-application dlog ) FOREACH(flag ${pkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") ADD_DEFINITIONS("-DSLP_DEBUG") #SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed") # install desktop file & icon SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(BINDIR "${PREFIX}/bin") SET(RESDIR "${PREFIX}/res") SET(DATADIR "${PREFIX}/data") SET(LOCALEDIR "${RESDIR}/locale") SET(ICONDIR "/opt/share/icons/default/small") SET(EDJDIR "${RESDIR}/edje") INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/manifest/${PKG_NAME}.xml DESTINATION /opt/share/packages) INSTALL(DIRECTORY DESTINATION ${DATADIR}) INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/manifest/${PKG_NAME}.png DESTINATION ${ICONDIR}) ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS}) INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)