From 4803e6a493f9233567f6fe6923facafd0495e7d7 Mon Sep 17 00:00:00 2001 From: Peter Colberg Date: Tue, 29 Dec 2015 00:29:42 -0500 Subject: Add option WITH_GSM to use external gsm library This permits distributions to build against a packaged gsm library. --- cmake/FindGsm.cmake | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 cmake/FindGsm.cmake (limited to 'cmake') diff --git a/cmake/FindGsm.cmake b/cmake/FindGsm.cmake new file mode 100644 index 0000000..85f367b --- /dev/null +++ b/cmake/FindGsm.cmake @@ -0,0 +1,17 @@ +FIND_PATH(GSM_INCLUDE_DIR gsm/gsm.h) +FIND_LIBRARY(GSM_LIBRARY NAMES gsm) + +IF(GSM_INCLUDE_DIR AND GSM_LIBRARY) + SET(GSM_FOUND TRUE) +ENDIF(GSM_INCLUDE_DIR AND GSM_LIBRARY) + +IF(GSM_FOUND) + IF (NOT Gsm_FIND_QUIETLY) + MESSAGE(STATUS "Found gsm includes: ${GSM_INCLUDE_DIR}/gsm/config.h") + MESSAGE(STATUS "Found gsm library: ${GSM_LIBRARY}") + ENDIF (NOT Gsm_FIND_QUIETLY) +ELSE(GSM_FOUND) + IF (Gsm_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could NOT find gsm development files") + ENDIF (Gsm_FIND_REQUIRED) +ENDIF(GSM_FOUND) -- cgit v1.2.3