2 # Once done this will define
4 # GSM_FOUND - system has GSM
5 # GSM_INCLUDE_DIRS - the GSM include directory
6 # GSM_LIBRARIES - Link these to use GSM
7 # GSM_DEFINITIONS - Compiler switches required for using GSM
9 # Copyright (c) 2006 Andreas Schneider <mail@cynapses.org>
10 # Edited by Saikrishna Arcot <saiarcot895@gmail.com> to find the GSM library
12 # Redistribution and use is allowed according to the terms of the New
14 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
18 if (GSM_LIBRARIES AND GSM_INCLUDE_DIRS)
21 else (GSM_LIBRARIES AND GSM_INCLUDE_DIRS)
22 # use pkg-config to get the directories and then use these values
23 # in the FIND_PATH() and FIND_LIBRARY() calls
24 #include(UsePkgConfig)
26 #FIXME pkgconfig does not work: return a carriage return that makes compilation failed
27 #pkgconfig(speex _GsmIncDir _GsmLinkDir _GsmLinkFlags _GsmCflags)
29 #set(GSM_DEFINITIONS ${_GsmCflags})
30 set(GSM_DEFINITIONS "")
32 find_path(GSM_INCLUDE_DIR
44 find_library(GSM_LIBRARY
71 if (GSM_INCLUDE_DIRS AND GSM_LIBRARIES)
73 endif (GSM_INCLUDE_DIRS AND GSM_LIBRARIES)
76 if (NOT Gsm_FIND_QUIETLY)
77 message(STATUS "Found GSM: ${GSM_LIBRARIES}")
78 endif (NOT Gsm_FIND_QUIETLY)
80 if (Gsm_FIND_REQUIRED)
81 message(FATAL_ERROR "Could not find GSM")
82 endif (Gsm_FIND_REQUIRED)
85 # show the GSM_INCLUDE_DIRS and GSM_LIBRARIES variables only in the advanced view
86 mark_as_advanced(GSM_INCLUDE_DIRS GSM_LIBRARIES)
88 endif (GSM_LIBRARIES AND GSM_INCLUDE_DIRS)