From 4a7d5b8602ffbc4037021d7efd751327f4439233 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Sat, 24 Apr 2021 01:03:13 +0100 Subject: [PATCH] Write a file Fortran code can use to prefix $cwd file paths --- map65/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/map65/CMakeLists.txt b/map65/CMakeLists.txt index 67a1831cd..8ee96ab08 100644 --- a/map65/CMakeLists.txt +++ b/map65/CMakeLists.txt @@ -50,6 +50,12 @@ qt5_wrap_ui (map65_GENUISRCS ${map65_UISRCS}) add_executable (map65 ${map65_CXXSRCS} ${map65_CSRCS} ${map65_GENUISRCS} map65.rc) target_link_libraries (map65 m65impl ${FFTW3_LIBRARIES} Qt5::Widgets Qt5::Network Portaudio::Portaudio Usb::Usb) +install ( + CODE "file (TO_NATIVE_PATH \"/\" _separator) +get_filename_component (_path \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/wsjtx_dir.txt\" REALPATH) +file (WRITE \"\${_path}\" \".\${_separator}\\n\")" + ) + install ( TARGETS map65 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime