summaryrefslogtreecommitdiff
path: root/tomlplusplus/cmake/tomlplusplusConfig.cmake.meson.in
diff options
context:
space:
mode:
Diffstat (limited to 'tomlplusplus/cmake/tomlplusplusConfig.cmake.meson.in')
-rw-r--r--tomlplusplus/cmake/tomlplusplusConfig.cmake.meson.in29
1 files changed, 29 insertions, 0 deletions
diff --git a/tomlplusplus/cmake/tomlplusplusConfig.cmake.meson.in b/tomlplusplus/cmake/tomlplusplusConfig.cmake.meson.in
new file mode 100644
index 0000000000..b007b6850c
--- /dev/null
+++ b/tomlplusplus/cmake/tomlplusplusConfig.cmake.meson.in
@@ -0,0 +1,29 @@
+@PACKAGE_INIT@
+
+# If tomlplusplus::tomlplusplus target is not defined it will be included
+if(NOT TARGET tomlplusplus::tomlplusplus)
+
+ if (@compile_library@)
+ set(imported_type UNKNOWN)
+ else()
+ set(imported_type INTERFACE)
+ endif()
+
+ # Import tomlplusplus interface library
+ add_library(tomlplusplus::tomlplusplus ${imported_type} 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)
+
+ # Set the path to the installed library so that users can link to it
+ if (@compile_library@)
+ set_target_properties(tomlplusplus::tomlplusplus PROPERTIES
+ IMPORTED_LOCATION "${PACKAGE_PREFIX_DIR}/@libdir@/@lib_name@"
+ )
+ # compile_options not quoted on purpose
+ target_compile_options(tomlplusplus::tomlplusplus INTERFACE @compile_options@)
+ endif()
+
+endif()