[Marble-commits] branches/KDE/4.5/kdeedu/marble
Max Brazhnikov
makc at freebsd.org
Sat Sep 4 22:40:21 CEST 2010
SVN commit 1171683 by makc:
merge r1146867:
Rewrite Findlibgps.cmake without using PkgConfig.
M +14 -8 Findlibgps.cmake
M +3 -3 src/plugins/positionprovider/CMakeLists.txt
M +2 -2 src/plugins/positionprovider/gpsd/CMakeLists.txt
--- branches/KDE/4.5/kdeedu/marble/Findlibgps.cmake #1171682:1171683
@@ -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)
--- branches/KDE/4.5/kdeedu/marble/src/plugins/positionprovider/CMakeLists.txt #1171682:1171683
@@ -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)
--- branches/KDE/4.5/kdeedu/marble/src/plugins/positionprovider/gpsd/CMakeLists.txt #1171682:1171683
@@ -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 Marble-commits
mailing list