summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 0a42d0c3fc19b5a766a682ae36d586e2feb64632 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
cmake_minimum_required(VERSION 2.8.1)

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

project(ERIGO)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)

# define var EGUI_IS_RELEASE to activate install scripts
set(CMAKE_BUILD_TYPE Debug)
if (NOT CMAKE_BUILD_TYPE)
   set(CMAKE_BUILD_TYPE Release)
endif(NOT CMAKE_BUILD_TYPE)

string(TOLOWER ${CMAKE_BUILD_TYPE} EGUI_BUILD_TYPE)
string(COMPARE EQUAL ${EGUI_BUILD_TYPE} release EGUI_IS_RELEASE)

set(EGUI_COMMON_DEFINITIONS -DELM_INTERNAL_API_ARGESFSDFEFC -DEFL_EO_API_SUPPORT -DEFL_BETA_API_SUPPORT)
add_definitions(${EGUI_COMMON_DEFINITIONS})

find_package(Eina REQUIRED)
find_package(Eo REQUIRED)
find_package(Eolian REQUIRED)
find_package(Ecore REQUIRED)
find_package(Evas REQUIRED)
find_package(Efl REQUIRED)
find_package(Efreet REQUIRED)
find_package(Edje REQUIRED)
find_package(Elementary 1.14.0 REQUIRED)
find_package(Ffi REQUIRED)
find_package(Threads)
include(EFLCheck)

#######################################
## Some of following libraries are included into libc on different distributions.
## So try to locate them. 
## If library not found, supposing that it is included somethere.
#######################################
#finding dl library
find_library(DL dl)
if(${DL} STREQUAL DL-NOTFOUND)
   set(DL_LIBRARY "")
else()
   set(DL_LIBRARY ${DL})
endif()
mark_as_advanced(DL_LIBRARY)

#finding m library
find_library(M m)
if(${M} STREQUAL M-NOTFOUND)
   set(M_LIBRARY "")
else()
   set(M_LIBRARY ${M})
endif()
mark_as_advanced(M_LIBRARY)

#finding rt library
find_library(RT rt)
if(${RT} STREQUAL RT-NOTFOUND)
   set(RT_LIBRARY "")
else()
   set(RT_LIBRARY ${RT})
endif()
mark_as_advanced(RT_LIBRARY)
######################################

# uninstall target
configure_file(
    "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
    "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
    IMMEDIATE @ONLY)

add_custom_target(uninstall
    COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)

add_subdirectory(src/lib)
add_subdirectory(src/bin)
add_subdirectory(src/tests)
add_subdirectory(data/config)
add_subdirectory(data/layouts)
add_dependencies(erigo dummy_edj panes_layout_edj)