Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 371941 | Differences between
and this patch

Collapse All | Expand All

(-)licq-1.5.1/cmake/Modules/FindCDK.cmake (+54 lines)
Line 0 Link Here
1
# Heavily inspired by the FindGpgme.cmake file in this same directory.
2
# Written August 2011 by Martin von Gagern for Licq on Gentoo Linux.
3
4
find_program(_CDKCONFIG_EXECUTABLE NAMES cdk5-config)
5
6
message(STATUS "Searching for Curses Development Kit (CDK)")
7
if(_CDKCONFIG_EXECUTABLE)
8
9
  message(STATUS " Found cdk5-config: ${_CDKCONFIG_EXECUTABLE}")
10
  exec_program(${_CDKCONFIG_EXECUTABLE} ARGS --version OUTPUT_VARIABLE CDK_VERSION)
11
  exec_program(${_CDKCONFIG_EXECUTABLE} ARGS --abi-version OUTPUT_VARIABLE CDK_ABIVERSION)
12
  message(STATUS " CDK version: ${CDK_VERSION}")
13
14
  exec_program(${_CDKCONFIG_EXECUTABLE} ARGS --cflags OUTPUT_VARIABLE CDK_CFLAGS)
15
  set(CDK_INCLUDE_DIR)
16
  string(REGEX REPLACE "[ \r\n]+" ";" _flags ${CDK_CFLAGS})
17
  foreach(_flag ${_flags})
18
    if( "${_flag}" MATCHES "^-I" )
19
      string(SUBSTRING "${_flag}" 2 -1 _dir)
20
      file(TO_CMAKE_PATH "${_dir}" _dir)
21
      set(CDK_INCLUDE_DIR ${CDK_INCLUDE_DIR} ${_dir})
22
    endif()
23
  endforeach()
24
25
  exec_program( ${_CDKCONFIG_EXECUTABLE} ARGS --libs OUTPUT_VARIABLE CDK_LIBS )
26
  set(CDK_LIBRARY)
27
  string(REGEX REPLACE "[ \r\n]+" ";" _flags ${CDK_LIBS})
28
  foreach(_flag ${_flags})
29
    if( "${_flag}" MATCHES "^-l" )
30
      string(SUBSTRING "${_flag}" 2 -1 _name)
31
      set(CDK_LIBRARY ${CDK_LIBRARY} ${_name})
32
    endif()
33
  endforeach()
34
35
else()
36
37
  message(STATUS " No cdk5-config found")
38
  find_path(CDK_INCLUDE_DIR cdk.h PATH_SUFFIXES cdk)
39
  if(CDK_INCLUDE_DIR)
40
    find_library(CDK_LIBRARY NAMES cdkw cdk)
41
  endif(CDK_INCLUDE_DIR)
42
43
endif()
44
45
if(CDK_LIBRARY)
46
  message(STATUS " CDK library: ${CDK_LIBRARY}")
47
  message(STATUS " CDK include directory: ${CDK_INCLUDE_DIR}")
48
else()
49
  if(CDK_FIND_REQUIRED)
50
    message(FATAL_ERROR "Did not find CDK")
51
  else()
52
    message(STATUS " Did not find CDK")
53
  endif()
54
endif()
(-)licq-1.5.1/plugins/console/CMakeLists.txt (-5 / +2 lines)
Lines 16-26 set(CURSES_NEED_NCURSES TRUE) Link Here
16
find_package(Curses REQUIRED)
16
find_package(Curses REQUIRED)
17
17
18
# CDK
18
# CDK
19
find_path(CDK_INCLUDE_DIR cdk.h PATH_SUFFIXES cdk)
19
set(CMAKE_MODULE_PATH ${Licq_CMAKE_DIR}/Modules)
20
if (CDK_INCLUDE_DIR)
20
find_package(CDK REQUIRED)
21
  find_library(CDK_LIBRARY cdk)
22
endif (CDK_INCLUDE_DIR)
23
24
if (NOT CDK_LIBRARY)
21
if (NOT CDK_LIBRARY)
25
  message(FATAL_ERROR "Could NOT find Curses Development Kit (CDK)")
22
  message(FATAL_ERROR "Could NOT find Curses Development Kit (CDK)")
26
endif (NOT CDK_LIBRARY)
23
endif (NOT CDK_LIBRARY)

Return to bug 371941