Work around a CMake file(TO_NATIVE_PATH) oddity with CPack

This commit is contained in:
Bill Somerville 2021-05-05 17:04:02 +01:00
parent 9322b1a8c7
commit fe8a2a31af
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F
1 changed files with 7 additions and 3 deletions

View File

@ -52,9 +52,13 @@ target_include_directories (map65 PRIVATE ${CMAKE_SOURCE_DIR})
target_link_libraries (map65 wsjt_qt 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\")"
CODE "get_filename_component (_path \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/wsjtx_dir.txt\" REALPATH)
if (WIN32)
set (_separator \"\\\\\")
else ()
set (_separator \"/\")
endif ()
file (WRITE \"\${_path}\" \".\${_separator}\\n\")"
)
install (