File: FindMsgpack.cmake

package info (click to toggle)
autobahn-cpp 17.5.1%2Bgit7cc5d37-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 792 kB
  • sloc: cpp: 2,133; makefile: 3
file content (24 lines) | stat: -rw-r--r-- 790 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# - Try to find msgpack
# Once done this will define
#  Msgpack_FOUND - System has msgpack
#  Msgpack_INCLUDE_DIRS - The msgpack include directories

find_package(PkgConfig QUIET)

if (PKG_CONFIG_FOUND)
    pkg_check_modules(PC_MSGPACK QUIET msgpack)
endif (PKG_CONFIG_FOUND)

find_path(Msgpack_INCLUDE_DIR msgpack.hpp
          HINTS ${PC_MSGPACK_INCLUDEDIR} ${PC_MSGPACK_INCLUDE_DIRS})

set(Msgpack_INCLUDE_DIRS ${Msgpack_INCLUDE_DIR})

include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set Msgpack_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(Msgpack DEFAULT_MSG
                                  Msgpack_INCLUDE_DIR
                                  Msgpack_INCLUDE_DIRS)

mark_as_advanced(Msgpack_INCLUDE_DIR)