summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: c060b36cf49be10b039bc3c13c20bb4d861589fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
cmake_minimum_required(VERSION 2.6)
project(solve)
set(VMAJ 0)
set(VMIN 1)
set(VMIC 0)
set(PACKAGE_VERSION ${VMAJ}.${VMIN}.${VMIC})

set(PACKAGE ${CMAKE_PROJECT_NAME})
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

include_directories ("${PROJECT_BINARY_DIR}")

find_package(Eina REQUIRED)
find_package(Ecore REQUIRED)
find_package(Evas REQUIRED)
find_package(Elementary REQUIRED)

ADD_DEFINITIONS(-DPACKAGE_BIN_DIR="${CMAKE_INSTALL_PREFIX}/bin"
   -DPACKAGE_DATA_DIR="${CMAKE_INSTALL_PREFIX}/share/${CMAKE_PROJECT_NAME}"
   -DPACKAGE_LIB_DIR="${CMAKE_INSTALL_PREFIX}/lib")

set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/locale")

ADD_DEFINITIONS(
   -DLOCALE_DIR="${LOCALEDIR}"
   )

ADD_DEFINITIONS(-DHAVE_CONFIG_H)

configure_file (
   "${PROJECT_SOURCE_DIR}/cmakeconfig.h.in"
   "${PROJECT_BINARY_DIR}/config.h"
   )

add_subdirectory(src/bin)

# Make dist
set(CPACK_PACKAGE_VERSION_MAJOR ${VMAJ})
set(CPACK_PACKAGE_VERSION_MINOR ${VMIN})
set(CPACK_PACKAGE_VERSION_PATCH ${VMIC})
set(CPACK_SOURCE_GENERATOR "TGZ;TBZ2")
set(CPACK_SOURCE_PACKAGE_FILE_NAME
   "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_SOURCE_IGNORE_FILES
   "${CMAKE_BINARY_DIR};/.git/;.svn/;.swp$;~$;${CPACK_SOURCE_IGNORE_FILES}")
include(CPack)
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)

include(MakeDistcheck)
add_distcheck()