summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2015-06-14 15:10:36 +0300
committerDaniel Zaoui <daniel.zaoui@samsung.com>2015-06-14 15:18:47 +0300
commite5674365c576fff68167aeb69204bb99732c150b (patch)
treecb15f24d8b102cf9cc1408caf56d30d89a5fa740
parentb57a0dc7eceab32ef4da17f3c230138f20d52f86 (diff)
Clean cmake files
-rw-r--r--CMakeLists.txt65
-rw-r--r--cmake/Modules/EFLCheck.cmake12
-rw-r--r--cmake/Modules/FindCGraph.cmake41
-rw-r--r--cmake/Modules/FindCheck.cmake32
-rw-r--r--cmake/Modules/FindGvc.cmake41
-rw-r--r--cmake_uninstall.cmake.in21
-rw-r--r--src/bin/CMakeLists.txt22
7 files changed, 3 insertions, 231 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a37e9a..4428c20 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,71 +1,6 @@
1cmake_minimum_required(VERSION 2.8.1) 1cmake_minimum_required(VERSION 2.8.1)
2 2
3set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
4
5project(EOINFO)
6string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
7
8# define var EGUI_IS_RELEASE to activate install scripts
9if (NOT CMAKE_BUILD_TYPE)
10 set(CMAKE_BUILD_TYPE Release)
11endif(NOT CMAKE_BUILD_TYPE)
12
13string(TOLOWER ${CMAKE_BUILD_TYPE} EOINFO_BUILD_TYPE)
14#string(COMPARE EQUAL ${EOINFO_BUILD_TYPE} release EOINFO_IS_RELEASE)
15
16set(EOINFO_COMMON_DEFINITIONS -DEFL_EO_API_SUPPORT -DEFL_BETA_API_SUPPORT)
17add_definitions(${EOINFO_COMMON_DEFINITIONS})
18
19find_package(Eina REQUIRED) 3find_package(Eina REQUIRED)
20find_package(Eo REQUIRED)
21find_package(Eolian REQUIRED) 4find_package(Eolian REQUIRED)
22find_package(Ecore REQUIRED)
23find_package(Efreet REQUIRED)
24include(EFLCheck)
25
26#######################################
27## Some of following libraries are included into libc on different distributions.
28## So try to locate them.
29## If library not found, supposing that it is included somethere.
30#######################################
31#finding dl library
32find_library(DL dl)
33if(${DL} STREQUAL DL-NOTFOUND)
34 set(DL_LIBRARY "")
35else()
36 set(DL_LIBRARY ${DL})
37endif()
38mark_as_advanced(DL_LIBRARY)
39
40#finding m library
41find_library(M m)
42if(${M} STREQUAL M-NOTFOUND)
43 set(M_LIBRARY "")
44else()
45 set(M_LIBRARY ${M})
46endif()
47mark_as_advanced(M_LIBRARY)
48
49#finding rt library
50find_library(RT rt)
51if(${RT} STREQUAL RT-NOTFOUND)
52 set(RT_LIBRARY "")
53else()
54 set(RT_LIBRARY ${RT})
55endif()
56mark_as_advanced(RT_LIBRARY)
57######################################
58
59# uninstall target
60configure_file(
61 "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
62 "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
63 IMMEDIATE @ONLY)
64
65add_custom_target(uninstall
66 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
67 5
68#add_subdirectory(src/lib)
69add_subdirectory(src/bin) 6add_subdirectory(src/bin)
70#add_subdirectory(src/tests)
71#add_subdirectory(data/config)
diff --git a/cmake/Modules/EFLCheck.cmake b/cmake/Modules/EFLCheck.cmake
deleted file mode 100644
index f729325..0000000
--- a/cmake/Modules/EFLCheck.cmake
+++ /dev/null
@@ -1,12 +0,0 @@
1include(CTest)
2ENABLE_TESTING()
3add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure)
4
5find_package(Check)
6set (CHECK_ENABLED ${CHECK_FOUND})
7
8set(EFL_COVERAGE false CACHE BOOL "Whether coverage support should be built.'")
9if (EFL_COVERAGE)
10 include(EFLlcov REQUIRED)
11 ENABLE_COVERAGE()
12endif (EFL_COVERAGE)
diff --git a/cmake/Modules/FindCGraph.cmake b/cmake/Modules/FindCGraph.cmake
deleted file mode 100644
index 200efe1..0000000
--- a/cmake/Modules/FindCGraph.cmake
+++ /dev/null
@@ -1,41 +0,0 @@
1# - Try to find GraphViz
2# Once done this will define
3# CGRAPH_FOUND - System has GraphViz
4# CGRAPH_INCLUDE_DIRS - The GraphViz include directories
5# CGRAPH_LIBRARIES - The libraries needed to use GraphViz
6# CGRAPH_LDFLAGS_OTHER - Other LDFLAGS needed te use GraphViz
7# CGRAPH_DEFINITIONS - Compiler switches required for using GraphViz
8
9find_package(PkgConfig)
10if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER "2.8.1")
11 # "QUIET" was introduced in 2.8.2
12 set(_QUIET QUIET)
13endif ()
14pkg_check_modules(PC_LIBCGRAPH ${_QUIET} libcgraph)
15
16set (CGRAPH_MIN_VERSION "2.35.0.0")
17if ("${PC_LIBCGRAPH_VERSION}" VERSION_LESS ${CGRAPH_MIN_VERSION})
18 MESSAGE(STATUS "libcgraph version required: ${CGRAPH_MIN_VERSION}. Current version: ${PC_LIBCGRAPH_VERSION}.")
19else()
20 SET(LIBCGRAPH_REQUIRED_VERSION 1)
21endif()
22
23if (LIBCGRAPH_REQUIRED_VERSION)
24 find_path(CGRAPH_INCLUDE_DIR cgraph.h
25 HINTS ${PC_LIBCGRAPH_INCLUDEDIR} ${PC_LIBCCGRAPH_INCLUDE_DIRS}
26 PATH_SUFFIXES cgraph )
27
28 find_library(CGRAPH_LIBRARY NAMES cgraph libcgraph
29 HINTS ${PC_LIBCGRAPH_LIBDIR} ${PC_LIBCGRAPH_LIBRARY_DIRS} )
30
31 set(CGRAPH_INCLUDE_DIRS ${CGRAPH_INCLUDE_DIR})
32 set(CGRAPH_LIBRARIES ${CGRAPH_LIBRARY} )
33
34 #include(FindPackageHandleStandardArgs)
35 # handle the QUIETLY and REQUIRED arguments and set EINA_FOUND to TRUE
36 # if all listed variables are TRUE
37 find_package_handle_standard_args(cgraph DEFAULT_MSG
38 CGRAPH_LIBRARY)
39endif (LIBCGRAPH_REQUIRED_VERSION)
40
41mark_as_advanced(CGRAPH_INCLUDE_DIR CGRAPH_LIBRARY)
diff --git a/cmake/Modules/FindCheck.cmake b/cmake/Modules/FindCheck.cmake
deleted file mode 100644
index 13ed8e9..0000000
--- a/cmake/Modules/FindCheck.cmake
+++ /dev/null
@@ -1,32 +0,0 @@
1# - Try to find check
2# Once done this will define
3# CHECK_FOUND - System has check
4# CHECK_INCLUDE_DIRS - The check include directories
5# CHECK_LIBRARIES - The libraries needed to use check
6# CHECK_DEFINITIONS - Compiler switches required for using check
7
8find_package(PkgConfig)
9if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER "2.8.1")
10 # "QUIET" was introduced in 2.8.2
11 set(_QUIET QUIET)
12endif ()
13pkg_check_modules(PC_LIBCHECK ${_QUIET} check)
14set(CHECK_DEFINITIONS ${PC_LIBCHECK_CFLAGS_OTHER})
15
16find_path(CHECK_INCLUDE_DIR check.h
17 HINTS ${PC_LIBCHECK_INCLUDEDIR} ${PC_LIBCHECK_INCLUDE_DIRS}
18 PATH_SUFFIXES check )
19
20find_library(CHECK_LIBRARY NAMES check
21 HINTS ${PC_LIBCHECK_LIBDIR} ${PC_LIBCHECK_LIBRARY_DIRS} )
22
23set(CHECK_LIBRARIES ${CHECK_LIBRARY} )
24set(CHECK_INCLUDE_DIRS ${CHECK_INCLUDE_DIR} )
25
26include(FindPackageHandleStandardArgs)
27# handle the QUIETLY and REQUIRED arguments and set CHECK_FOUND to TRUE
28# if all listed variables are TRUE
29find_package_handle_standard_args(check DEFAULT_MSG
30 CHECK_LIBRARY CHECK_INCLUDE_DIR)
31
32mark_as_advanced(CHECK_INCLUDE_DIR CHECK_LIBRARY )
diff --git a/cmake/Modules/FindGvc.cmake b/cmake/Modules/FindGvc.cmake
deleted file mode 100644
index 5bcb911..0000000
--- a/cmake/Modules/FindGvc.cmake
+++ /dev/null
@@ -1,41 +0,0 @@
1# - Try to find GraphViz
2# Once done this will define
3# GVC_FOUND - System has GraphViz
4# GVC_INCLUDE_DIRS - The GraphViz include directories
5# GVC_LIBRARIES - The libraries needed to use GraphViz
6# GVC_LDFLAGS_OTHER - Other LDFLAGS needed te use GraphViz
7# GVC_DEFINITIONS - Compiler switches required for using GraphViz
8
9find_package(PkgConfig)
10if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER "2.8.1")
11 # "QUIET" was introduced in 2.8.2
12 set(_QUIET QUIET)
13endif ()
14
15pkg_check_modules(PC_LIBGVC ${_QUIET} libgvc)
16set (LIBGVC_MIN_VERSION "2.35.0.0")
17if ("${PC_LIBGVC_VERSION}" VERSION_LESS ${LIBGVC_MIN_VERSION})
18 MESSAGE(STATUS "libgvc version required: ${LIBGVC_MIN_VERSION}. Current version: ${PC_LIBGVC_VERSION}.")
19else()
20 SET(LIBGVC_REQUIRED_VERSION 1)
21endif()
22
23if (LIBGVC_REQUIRED_VERSION)
24 find_path(GVC_INCLUDE_DIR gvc.h
25 HINTS ${PC_LIBGVC_INCLUDEDIR} ${PC_LIBCGVC_INCLUDE_DIRS}
26 PATH_SUFFIXES gvc )
27
28 find_library(GVC_LIBRARY NAMES gvc libgvc
29 HINTS ${PC_LIBGVC_LIBDIR} ${PC_LIBGVC_LIBRARY_DIRS} )
30
31 set(GVC_INCLUDE_DIRS ${GVC_INCLUDE_DIR})
32 set(GVC_LIBRARIES ${GVC_LIBRARY} )
33
34 #include(FindPackageHandleStandardArgs)
35 # handle the QUIETLY and REQUIRED arguments and set EINA_FOUND to TRUE
36 # if all listed variables are TRUE
37 find_package_handle_standard_args(gvc DEFAULT_MSG
38 GVC_LIBRARY)
39endif (LIBGVC_REQUIRED_VERSION)
40
41mark_as_advanced(GVC_INCLUDE_DIR GVC_LIBRARY)
diff --git a/cmake_uninstall.cmake.in b/cmake_uninstall.cmake.in
deleted file mode 100644
index 2037e36..0000000
--- a/cmake_uninstall.cmake.in
+++ /dev/null
@@ -1,21 +0,0 @@
1if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
2 message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
3endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
4
5file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
6string(REGEX REPLACE "\n" ";" files "${files}")
7foreach(file ${files})
8 message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
9 if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
10 exec_program(
11 "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
12 OUTPUT_VARIABLE rm_out
13 RETURN_VALUE rm_retval
14 )
15 if(NOT "${rm_retval}" STREQUAL 0)
16 message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
17 endif(NOT "${rm_retval}" STREQUAL 0)
18 else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
19 message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
20 endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
21endforeach(file)
diff --git a/src/bin/CMakeLists.txt b/src/bin/CMakeLists.txt
index 201f72d..2f8c4c9 100644
--- a/src/bin/CMakeLists.txt
+++ b/src/bin/CMakeLists.txt
@@ -1,32 +1,16 @@
1#include_directories (${CMAKE_SOURCE_DIR}/src/lib)
2#include_directories (${CMAKE_SOURCE_DIR}/src/bin/eo_info)
3
4#link_directories (${CMAKE_SOURCE_DIR}/src/lib)
5#link_directories (${PC_LIBELEMENTARY_LIBRARY_DIRS})
6
7set(TARGET eo_info_cmd) 1set(TARGET eo_info_cmd)
8 2
9set(EOLIAN_INCLUDE_FLAG -I \"${EOLIAN_EO_DIR}/eo-1\" -I${CMAKE_CURRENT_SOURCE_DIR}) 3set(COMMON_DEFINITIONS -DEFL_BETA_API_SUPPORT)
4add_definitions(${COMMON_DEFINITIONS})
10 5
11add_executable(${TARGET} main.c) 6add_executable(${TARGET} main.c)
12 7
13# this puts "/build_dir/data/config" path to erigo_cmd
14set_property(TARGET ${TARGET}
15 PROPERTY COMPILE_DEFINITIONS PACKAGE_DATA_DIR="${CMAKE_BINARY_DIR}/data")
16include_directories( 8include_directories(
17 ${EINA_INCLUDE_DIRS} 9 ${EINA_INCLUDE_DIRS}
18 ${EOLIAN_INCLUDE_DIRS} 10 ${EOLIAN_INCLUDE_DIRS}
19 ${ECORE_INCLUDE_DIRS}
20 ) 11 )
12
21target_link_libraries (${TARGET} 13target_link_libraries (${TARGET}
22 ${EINA_LIBRARIES} 14 ${EINA_LIBRARIES}
23 ${EOLIAN_LIBRARIES} 15 ${EOLIAN_LIBRARIES}
24 ${ECORE_LIBRARIES}
25 ) 16 )
26
27# Save current dir because we want to know path to soutce file to build erigo
28SET(EOINFO_BINARY_SRC ${CMAKE_CURRENT_LIST_DIR})
29# Save build path of erigo_cmd, because we want to copy egui to the same folder
30SET(EOINFO_BINARY_BLD ${CMAKE_CURRENT_BINARY_DIR})
31
32#add_subdirectory(gui)