summaryrefslogtreecommitdiff
path: root/automotive-dlt-config.cmake.in
diff options
context:
space:
mode:
authorMartin Willers <M.Willers@gmx.net>2021-05-10 03:02:08 +0200
committerGitHub <noreply@github.com>2021-05-10 10:02:08 +0900
commitb95044abb202838837b0566efc40ae26308a4bb4 (patch)
tree901351ddcf4f2b3f9fce5ad51166527d9c1cc56f /automotive-dlt-config.cmake.in
parente969bed805f7dba9d2fa35c56a7ace28efb67e4e (diff)
downloadDLT-daemon-b95044abb202838837b0566efc40ae26308a4bb4.tar.gz
Export cmake config file (#289)
Create and install proper CMake *-target.cmake and *-config.cmake files, for use by other CMake-using projects. It installs a file called automotive-dlt-targets.cmake into a common location for such files, namely <prefix>/lib/cmake/automotive-dlt/automotive-dlt-targets.cmake They can now call find_package(automotive-dlt) and obtain a target called Genivi::dlt that they can link against with target_link_libraries(), by which they automatically gain all necessary attributes, including libdlt's include directories. Signed-off-by: Martin Willers <M.Willers@gmx.net>
Diffstat (limited to 'automotive-dlt-config.cmake.in')
-rw-r--r--automotive-dlt-config.cmake.in32
1 files changed, 32 insertions, 0 deletions
diff --git a/automotive-dlt-config.cmake.in b/automotive-dlt-config.cmake.in
new file mode 100644
index 0000000..5013b54
--- /dev/null
+++ b/automotive-dlt-config.cmake.in
@@ -0,0 +1,32 @@
+#######
+# SPDX license identifier: MPL-2.0
+#
+# Copyright (C) 2021, Martin Willers <M.Willers@gmx.net>
+#
+# This file is part of GENIVI Project DLT - Diagnostic Log and Trace.
+#
+# This Source Code Form is subject to the terms of the
+# Mozilla Public License (MPL), v. 2.0.
+# If a copy of the MPL was not distributed with this file,
+# You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# For further information see http://www.genivi.org/.
+#######
+
+# Config file for the Genivi::dlt package.
+
+# This file exports the Genivi::dlt CMake target which should be passed to the
+# target_link_libraries command.
+#
+# In addition, the following variable is defined:
+# @PROJECT_NAME@_FOUND - TRUE if headers and library were found
+
+include(CMakeFindDependencyMacro)
+
+find_dependency(Threads)
+
+@PACKAGE_INIT@
+
+include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake")
+
+check_required_components(@PROJECT_NAME@)