tomlplusplus/cmake/tomlplusplus.cmake.in
Andrea Pappacoda 4bd9bda09f
build(meson): install CMake Config files to datadir (#141)
* build(meson): install CMake Config files to datadir

Since Meson doesn't yet support CMake's ARCH_INDEPENDENT option, a
pre-generated Package Version file is installed instead of generating it
at configure time.

I've also cleaned up a bit the nearby lines of code.

Fixes #140

* build(meson): don't hardcode include in CMake Config
2022-02-02 16:01:52 +02:00

15 lines
473 B
CMake

@PACKAGE_INIT@
# If tomlplusplus::tomlplusplus target is not defined it will be included
if(NOT TARGET tomlplusplus::tomlplusplus)
# Import tomlplusplus interface library
add_library(tomlplusplus::tomlplusplus INTERFACE IMPORTED)
set_target_properties(tomlplusplus::tomlplusplus PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${PACKAGE_PREFIX_DIR}/@includedir@")
# Require C++17
target_compile_features(tomlplusplus::tomlplusplus INTERFACE cxx_std_17)
endif()