msgpack/msgpack-config.cmake.in
Stefan Herbrechtsmeier 3d82c2d651 Add cmake package config support
Add support for CMake find_package command to msgpack. The package
exports the two targets msgpackc-static and msgpackc if shared is
enabled. The CMake find_package command works after installation
of msgpack and during build of another project which adds msgpack
as sub project via add_subdirectory command.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
2017-04-04 08:33:18 +02:00

24 lines
385 B
CMake

#.rst:
# msgpack
# -------
#
# The following import targets are created
#
# ::
#
# msgpackc-static
# msgpackc
#
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
if(NOT TARGET msgpackc AND NOT TARGET msgpackc-static)
include("${CMAKE_CURRENT_LIST_DIR}/msgpack-targets.cmake")
if(NOT @MSGPACK_ENABLE_SHARED@)
add_library(msgpackc ALIAS msgpackc-static)
endif()
endif()