FindElementaryUtils.cmake 1.58 KB
Newer Older
Nabil Chouika's avatar
refs#16  
Nabil Chouika committed
1
2
3
4
# - Try to find ElementaryUtils (both in system folders if it was installed, and in the current workspace)
#
# Once done this will define
#
5
6
7
#  ElementaryUtils_FOUND - system has Elementary_Utils lib
#  ElementaryUtils_LIBRARIES - the path of the library
#  ElementaryUtils_INCLUDE_DIR - the include directory
Nabil Chouika's avatar
refs#16  
Nabil Chouika committed
8

9
if (ElementaryUtils_INCLUDE_DIR AND ElementaryUtils_LIBRARIES)
Nabil Chouika's avatar
refs#16  
Nabil Chouika committed
10
11

  # in cache already
12
  set(ElementaryUtils_FOUND TRUE)
Nabil Chouika's avatar
refs#16  
Nabil Chouika committed
13

14
else (ElementaryUtils_INCLUDE_DIR AND ElementaryUtils_LIBRARIES)
Nabil Chouika's avatar
refs#16  
Nabil Chouika committed
15

16
  find_path(ElementaryUtils_INCLUDE_DIR ElementaryUtils/PropertiesManager.h
Nabil Chouika's avatar
refs#16  
Nabil Chouika committed
17
      PATHS
Nabil Chouika's avatar
refs#16    
Nabil Chouika committed
18
19
20
      ${CMAKE_INSTALL_PREFIX}
      ${CMAKE_SOURCE_DIR}/../ElementaryUtils
      ${CMAKE_SOURCE_DIR}/ElementaryUtils
Nabil Chouika's avatar
Nabil Chouika committed
21
22
      ${CMAKE_SOURCE_DIR}/../elementary-utils
      ${CMAKE_SOURCE_DIR}/elementary-utils
Nabil Chouika's avatar
refs#16    
Nabil Chouika committed
23
24
      ${CMAKE_SOURCE_DIR}
      PATH_SUFFIXES include/PARTONS include
Nabil Chouika's avatar
refs#16  
Nabil Chouika committed
25
26
    )
    
27
  find_library(ElementaryUtils_LIBRARIES
Nabil Chouika's avatar
refs#16  
Nabil Chouika committed
28
29
                     NAMES ElementaryUtils
                     PATHS
Nabil Chouika's avatar
refs#16    
Nabil Chouika committed
30
31
32
                     ${CMAKE_INSTALL_PREFIX}
                     ${CMAKE_SOURCE_DIR}/../ElementaryUtils
                     ${CMAKE_SOURCE_DIR}/ElementaryUtils
Nabil Chouika's avatar
Nabil Chouika committed
33
34
                     ${CMAKE_SOURCE_DIR}/../elementary-utils
                     ${CMAKE_SOURCE_DIR}/elementary-utils
Nabil Chouika's avatar
refs#16    
Nabil Chouika committed
35
36
                     ${CMAKE_SOURCE_DIR}
                     PATH_SUFFIXES lib/PARTONS lib64/PARTONS bin/PARTONS lib lib64 bin)
Nabil Chouika's avatar
refs#16  
Nabil Chouika committed
37
38

  include(FindPackageHandleStandardArgs)
39
  find_package_handle_standard_args(ElementaryUtils DEFAULT_MSG ElementaryUtils_INCLUDE_DIR ElementaryUtils_LIBRARIES)
Nabil Chouika's avatar
refs#16  
Nabil Chouika committed
40

41
endif(ElementaryUtils_INCLUDE_DIR AND ElementaryUtils_LIBRARIES)
Nabil Chouika's avatar
refs#16  
Nabil Chouika committed
42