Warning, /sdk/ktechlab/cmake/modules/FindGPSim.cmake is written in an unsupported language. File is not indexed.

0001 # CMake module to find GPSim
0002 #
0003 # It provides the following variables:
0004 #  GPSim_FOUND - system has the GPSim library
0005 #  GPSim_INCLUDE_DIRS - the include directories needed to use GPSim
0006 #  GPSim_LIBRARIES - the libraries needed to use GPSim
0007 
0008 # Copyright (c) 2017, Pino Toscano <pino@kde.org>
0009 #
0010 # Redistribution and use in source and binary forms, with or without
0011 # modification, are permitted provided that the following conditions
0012 # are met:
0013 #
0014 # 1. Redistributions of source code must retain the copyright
0015 #    notice, this list of conditions and the following disclaimer.
0016 # 2. Redistributions in binary form must reproduce the copyright
0017 #    notice, this list of conditions and the following disclaimer in the
0018 #    documentation and/or other materials provided with the distribution.
0019 # 3. The name of the author may not be used to endorse or promote products
0020 #    derived from this software without specific prior written permission.
0021 #
0022 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
0023 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
0024 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
0025 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
0026 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
0027 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
0028 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
0029 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0030 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
0031 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0032 
0033 
0034 # in cache already
0035 if (GPSim_INCLUDE_DIR AND GPSim_LIBRARY)
0036     set(GPSim_FIND_QUIETLY TRUE)
0037 endif ()
0038 
0039 find_package(GLIB)  # needed for using GPSim
0040 
0041 find_path(GPSim_INCLUDE_DIR
0042     NAMES gpsim/gpsim_interface.h
0043 )
0044 find_library(GPSim_LIBRARY NAMES gpsim)
0045 
0046 if (GPSim_INCLUDE_DIR AND GPSim_LIBRARY AND GLIB_FOUND)
0047     set(GPSim_INCLUDE_DIRS ${GPSim_INCLUDE_DIR} ${GLIB_INCLUDE_DIRS})
0048     set(GPSim_LIBRARIES ${GPSim_LIBRARY} ${GLIB_LIBRARIES})
0049 endif ()
0050 
0051 include(FindPackageHandleStandardArgs)
0052 find_package_handle_standard_args(GPSim
0053     FOUND_VAR GPSim_FOUND
0054     REQUIRED_VARS GPSim_LIBRARY GPSim_INCLUDE_DIR GLIB_LIBRARIES GLIB_INCLUDE_DIRS
0055 )
0056 
0057 mark_as_advanced(GPSim_INCLUDE_DIR GPSim_LIBRARY)