1 cmake_minimum_required(VERSION 2.6)
6 set(PACKAGE_VERSION ${VMAJ}.${VMIN}.${VMIC})
8 set(PACKAGE ${CMAKE_PROJECT_NAME})
9 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
11 include_directories ("${PROJECT_BINARY_DIR}")
13 find_package(Eina REQUIRED)
14 find_package(Evas REQUIRED)
15 find_package(Elementary REQUIRED)
17 # likely put this into an FindCompilerAttribute.cmake:
18 INCLUDE(CheckCSourceCompiles)
19 SET(HAVE___ATTRIBUTE__)
20 CHECK_C_SOURCE_COMPILES(
21 "void foo (int bar __attribute__((unused)) ) { }
22 static void baz (void) __attribute__((unused));
23 static void baz (void) { }
28 ADD_DEFINITIONS(-DPACKAGE_BIN_DIR="${CMAKE_INSTALL_PREFIX}/bin"
29 -DPACKAGE_DATA_DIR="${CMAKE_INSTALL_PREFIX}/share/${CMAKE_PROJECT_NAME}"
30 -DPACKAGE_LIB_DIR="${CMAKE_INSTALL_PREFIX}/lib")
32 ADD_DEFINITIONS(-DHAVE_CONFIG_H)
35 "${PROJECT_SOURCE_DIR}/cmakeconfig.h.in"
36 "${PROJECT_BINARY_DIR}/config.h"
41 add_subdirectory(src/lib)
43 add_subdirectory(src/tests EXCLUDE_FROM_ALL)
44 add_subdirectory(src/benchmarks EXCLUDE_FROM_ALL)
45 add_subdirectory(src/examples)
51 "${PROJECT_SOURCE_DIR}/eo.pc.in"
52 "${PROJECT_BINARY_DIR}/eo.pc"
56 INSTALL(FILES "${PROJECT_BINARY_DIR}/eo.pc"
57 DESTINATION "lib/pkgconfig")