[kde-edu]: KDE/kdeedu/marble
Max Brazhnikov
makc at freebsd.org
Tue Jul 6 22:49:29 CEST 2010
SVN commit 1146867 by makc:
Rewrite Findlibgps.cmake without using PkgConfig.
Review request: http://reviewboard.kde.org/r/4498/#review6387
Approved by: Bastian Holst
CCMAIL: kde-edu at kde.org
M +14 -8 Findlibgps.cmake
M +3 -3 src/plugins/positionprovider/CMakeLists.txt
M +2 -2 src/plugins/positionprovider/gpsd/CMakeLists.txt
--- trunk/KDE/kdeedu/marble/Findlibgps.cmake #1146866:1146867
@@ -1,10 +1,16 @@
-# - Find Gpsd libs - gps daemon library
-#
-# This module finds if Gpsd is installed.
-#
-# Copyright (c) 2006, Andrew Manson, <g.real.ate at gmail.com>
-#
+# LIBGPS_FOUND - system has the LIBGPS library
+# LIBGPS_INCLUDE_DIR - the LIBGPS include directory
+# LIBGPS_LIBRARIES - The libraries needed to use LIBGPS
-include(FindPkgConfig)
+if(LIBGPS_INCLUDE_DIR AND LIBGPS_LIBRARIES)
+ set(LIBGPS_FOUND TRUE)
+else(LIBGPS_INCLUDE_DIR AND LIBGPS_LIBRARIES)
-pkg_check_modules(libgps libgps>=2.35)
+ 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)
--- trunk/KDE/kdeedu/marble/src/plugins/positionprovider/CMakeLists.txt #1146866:1146867
@@ -1,10 +1,10 @@
find_package(libgps)
-if(libgps_FOUND)
+if(LIBGPS_FOUND)
message( STATUS "Building with gpsd position provider")
add_subdirectory( gpsd )
-else(libgps_FOUND)
+else(LIBGPS_FOUND)
message( STATUS "Not building with gpsd position provider")
-endif(libgps_FOUND)
+endif(LIBGPS_FOUND)
find_package(liblocation)
if(liblocation_FOUND)
--- trunk/KDE/kdeedu/marble/src/plugins/positionprovider/gpsd/CMakeLists.txt #1146866:1146867
@@ -4,7 +4,7 @@
${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/positionprovider/gpsd
${CMAKE_BINARY_DIR}/src/plugins/positionprovider/gpsd
${QT_INCLUDE_DIR}
- ${libgps_INCLUDE_DIRS}
+ ${LIBGPS_INCLUDE_DIR}
)
include(${QT_USE_FILE})
@@ -15,6 +15,6 @@
GpsdThread.cpp
)
-set( GpsdPositionProviderPlugin_LIBS ${libgps_LIBRARIES} )
+set( GpsdPositionProviderPlugin_LIBS ${LIBGPS_LIBRARIES} )
marble_add_plugin( GpsdPositionProviderPlugin ${gpsd_SRCS} )
More information about the kde-edu
mailing list