CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(ug-setting-theme-efl C) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(EXEC_PREFIX "\${prefix}") SET(LIBDIR "\${prefix}/lib") SET(INCLUDEDIR "\${prefix}/include") SET(VERSION 0.1.0) SET(SRCS setting-theme-efl.c) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) INCLUDE(FindPkgConfig) pkg_check_modules(pkgs REQUIRED elementary ui-gadget x11 vconf aul efreet-mime eina) FOREACH(flag ${pkgs_CFLAGS}) SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}") ENDFOREACH(flag) SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} -fvisibility=hidden -Wall") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS}") SET(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS}) ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS}) SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION 0.1.0) TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS}) ADD_CUSTOM_TARGET(setting-theme-efl.edj COMMAND edje_cc ${CMAKE_SOURCE_DIR}/setting-theme-efl.edc ${CMAKE_BINARY_DIR}/setting-theme-efl.edj DEPENDS ${CMAKE_SOURCE_DIR}/setting-theme-efl.edc ) ADD_DEPENDENCIES(${PROJECT_NAME} setting-theme-efl.edj) INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib) INSTALL(FILES ${CMAKE_BINARY_DIR}/setting-theme-efl.edj DESTINATION /opt/ug/res/edje/ug-setting-theme-efl) INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/images/ DESTINATION /opt/ug/res/images/ug-setting-theme-efl FILES_MATCHING PATTERN "*.png") ADD_SUBDIRECTORY(po)