cmake: import LibGPS module from kde-workspace

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2015-11-16 12:03:14 +02:00
parent 91ee52c839
commit 83fc0ed955
2 changed files with 17 additions and 0 deletions

View file

@ -72,6 +72,7 @@ set(cmakeFiles
FindLibArt.cmake
FindLibAttica.cmake
FindLibGcrypt.cmake
FindLibGPS.cmake
FindLibintl.cmake
FindLibKasten.cmake
FindLibKonq.cmake

View file

@ -0,0 +1,16 @@
# LIBGPS_FOUND - system has the LIBGPS library
# LIBGPS_INCLUDE_DIR - the LIBGPS include directory
# LIBGPS_LIBRARIES - The libraries needed to use LIBGPS
if(LIBGPS_INCLUDE_DIR AND LIBGPS_LIBRARIES)
set(LIBGPS_FOUND TRUE)
else(LIBGPS_INCLUDE_DIR AND LIBGPS_LIBRARIES)
find_path(LIBGPS_INCLUDE_DIR NAMES gps.h)
find_library(LIBGPS_LIBRARIES NAMES gps)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(libgps DEFAULT_MSG LIBGPS_INCLUDE_DIR LIBGPS_LIBRARIES)
mark_as_advanced(LIBGPS_INCLUDE_DIR LIBGPS_LIBRARIES)
endif(LIBGPS_INCLUDE_DIR AND LIBGPS_LIBRARIES)