File: FindWcecompat.cmake

package info (click to toggle)
libical3 3.0.20-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,068 kB
  • sloc: ansic: 37,740; xml: 6,726; cpp: 6,414; python: 2,551; perl: 1,613; java: 1,415; yacc: 1,136; sh: 520; lex: 133; makefile: 46; php: 10
file content (33 lines) | stat: -rw-r--r-- 1,081 bytes parent folder | download | duplicates (6)
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
# Try to find Wcecompat functionality
# Once done this will define
#
#  WCECOMPAT_FOUND - system has Wcecompat
#  WCECOMPAT_INCLUDE_DIR - Wcecompat include directory
#  WCECOMPAT_LIBRARIES - Libraries needed to use Wcecompat
#
# Copyright (c) 2010, Andreas Holzammer, <andy@kdab.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.

if(WCECOMPAT_INCLUDE_DIR AND WCECOMPAT_LIB_FOUND)
  set(Wcecompat_FIND_QUIETLY TRUE)
endif()

find_path(WCECOMPAT_INCLUDE_DIR errno.h PATH_SUFFIXES wcecompat)

set(WCECOMPAT_LIB_FOUND FALSE)

if(WCECOMPAT_INCLUDE_DIR)
  find_library(WCECOMPAT_LIBRARIES NAMES wcecompat wcecompatex)
  if(WCECOMPAT_LIBRARIES)
    set(WCECOMPAT_LIB_FOUND TRUE)
  endif()
endif()

# I have no idea what this is about, but it seems to be used quite often, so I add this here
set(WCECOMPAT_CONST const)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Wcecompat DEFAULT_MSG WCECOMPAT_LIBRARIES WCECOMPAT_LIB_FOUND)

mark_as_advanced(WCECOMPAT_INCLUDE_DIR WCECOMPAT_LIBRARIES WCECOMPAT_CONST WCECOMPAT_LIB_FOUND)