File: FindIrcclient.cmake

package info (click to toggle)
megaglest 3.13.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 12,844 kB
  • ctags: 18,191
  • sloc: cpp: 144,280; ansic: 11,861; sh: 3,233; perl: 1,904; python: 1,751; objc: 142; asm: 42; makefile: 24
file content (82 lines) | stat: -rw-r--r-- 2,406 bytes parent folder | download | duplicates (5)
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
81
82
# Locate ircclient library
# This module defines
#  IRCCLIENT_FOUND, if false, do not try to link to IRCCLIENT
#  IRCCLIENT_LIBRARY, the libircclient variant
#  IRCCLIENT_INCLUDE_DIR, where to find libircclient.h and family)
#
# Note that the expected include convention is
#  #include "libircclient.h"
# and not
#  #include <libircclient/libircclient.h>
# This is because, the ircclient location is not standardized and may exist
# in locations other than libircclient/

#=============================================================================
# Copyright 2011 Mark Vejvoda
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
#  License text for the above reference.)

FIND_PATH(IRCCLIENT_INCLUDE_DIR libircclient.h
  HINTS
  $ENV{IRCCLIENTDIR}
  PATH_SUFFIXES include/libircclient include
  PATHS
  ~/Library/Frameworks
  /Library/Frameworks
  /usr/local
  /usr
  /sw # Fink
  /opt/local # DarwinPorts
  /opt/csw # Blastwave
  /opt
)

SET(IRCCLIENT_FIND_LIBRARIES ircclient)

IF(STATIC_Ircclient)
	SET(IRCCLIENT_FIND_LIBRARIES libircclient.a ircclient.a libircclient ircclient)
ELSE()
	SET(IRCCLIENT_FIND_LIBRARIES libircclient ircclient)
ENDIF()

FIND_LIBRARY(IRCCLIENT_LIBRARY 
  NAMES ${IRCCLIENT_FIND_LIBRARIES}
  HINTS
  $ENV{IRCCLIENTDIR}
  PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
  PATHS
  ~/Library/Frameworks
  /Library/Frameworks
  /usr/local
  /usr
  /sw
  /opt/local
  /opt/csw
  /opt
)


# handle the QUIETLY and REQUIRED arguments and set IRCCLIENT_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(IRCCLIENT DEFAULT_MSG IRCCLIENT_LIBRARY IRCCLIENT_INCLUDE_DIR)

IF(IRCCLIENT_FOUND)

        MESSAGE(STATUS "Found IRCClient include path: ${IRCCLIENT_INCLUDE_DIR} libs: ${IRCCLIENT_LIBRARY}")

ELSE()

        MESSAGE(STATUS "**** WARNING: IRCClient NOT FOUND include path: ${IRCCLIENT_INCLUDE_DIR} libs: ${IRCCLIENT_LIBRARY}")

ENDIF()

MARK_AS_ADVANCED(IRCCLIENT_LIBRARY IRCCLIENT_INCLUDE_DIR)