summaryrefslogtreecommitdiffstats
path: root/cmake/install-script.cmake
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:01:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:01:36 +0000
commit62e4c68907d8d33709c2c1f92a161dff00b3d5f2 (patch)
treeadbbaf3acf88ea08f6eeec4b75ee98ad3b07fbdc /cmake/install-script.cmake
parentInitial commit. (diff)
downloadlnav-62e4c68907d8d33709c2c1f92a161dff00b3d5f2.tar.xz
lnav-62e4c68907d8d33709c2c1f92a161dff00b3d5f2.zip
Adding upstream version 0.11.2.upstream/0.11.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--cmake/install-script.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/install-script.cmake b/cmake/install-script.cmake
new file mode 100644
index 0000000..6bd0c6e
--- /dev/null
+++ b/cmake/install-script.cmake
@@ -0,0 +1,18 @@
+file(
+ RELATIVE_PATH relative_path
+ "/${lnav_INSTALL_CMAKEDIR}"
+ "/${CMAKE_INSTALL_BINDIR}/${lnav_NAME}"
+)
+
+get_filename_component(prefix "${CMAKE_INSTALL_PREFIX}" ABSOLUTE)
+set(config_dir "${prefix}/${lnav_INSTALL_CMAKEDIR}")
+set(config_file "${config_dir}/lnavConfig.cmake")
+
+message(STATUS "Installing: ${config_file}")
+file(WRITE "${config_file}" "\
+set(
+ LNAV_EXECUTABLE
+ \"\${CMAKE_CURRENT_LIST_DIR}/${relative_path}\"
+ CACHE FILEPATH \"Path to the lnav executable\"
+)
+")