aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/mcap/unofficial-mcapConfig.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/mcap/unofficial-mcapConfig.cmake.in')
-rw-r--r--vcpkg/ports/mcap/unofficial-mcapConfig.cmake.in24
1 files changed, 24 insertions, 0 deletions
diff --git a/vcpkg/ports/mcap/unofficial-mcapConfig.cmake.in b/vcpkg/ports/mcap/unofficial-mcapConfig.cmake.in
new file mode 100644
index 0000000..e441dee
--- /dev/null
+++ b/vcpkg/ports/mcap/unofficial-mcapConfig.cmake.in
@@ -0,0 +1,24 @@
+# Template for unofficial-mcapConfig.cmake
+
+include(CMakeFindDependencyMacro)
+foreach(_DEPENDENCY IN ITEMS @MCAP_FIND_DEPENDENCIES@)
+ find_dependency(${_DEPENDENCY})
+endforeach()
+
+# Protect against multiple inclusion
+if (TARGET @_LIB_TARGET@)
+ return ()
+endif ()
+
+# Compute the installation prefix relative to this file, which is located in ${_IMPORT_PREFIX}/share/@_LIB_NAME@
+get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE)
+
+# Create imported mcap target
+add_library(@_LIB_TARGET@ INTERFACE IMPORTED)
+target_include_directories(@_LIB_TARGET@ INTERFACE "${_IMPORT_PREFIX}/include")
+if (NOT "@MCAP_LINK_LIBRARIES@" STREQUAL "")
+ target_link_libraries(@_LIB_TARGET@ INTERFACE @MCAP_LINK_LIBRARIES@)
+endif ()
+if (NOT "@MCAP_COMPILE_DEFINITIONS@" STREQUAL "")
+ target_compile_definitions(@_LIB_TARGET@ INTERFACE @MCAP_COMPILE_DEFINITIONS@)
+endif ()