commit 4b052dec771af65808815eace8ec1f0cd90ed6b5
Author: Kornel Benko <[email protected]>
Date: Mon Apr 13 13:39:33 2020 +0200
Amend ef42541d26: Missed to commit these
---
3rdparty/dtl/CMakeLists.txt | 5 ++++-
src/LyX.cpp | 19 +++++++++++++++++++
2 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/3rdparty/dtl/CMakeLists.txt b/3rdparty/dtl/CMakeLists.txt
index 8b49bf4..3b31972 100644
--- a/3rdparty/dtl/CMakeLists.txt
+++ b/3rdparty/dtl/CMakeLists.txt
@@ -32,5 +32,8 @@ foreach(_t ${targets})
add_man(${_t}.man)
endforeach()
-install(TARGETS ${targets} DESTINATION ${LYX_UTILITIES_INSTALL_PATH})
+# Install dtl tools in this directory to omit possible packaging conflicts
+# if installing multiple lyx versions, each with own dtl executables
+get_data_destination(dest_data)
+install(TARGETS ${targets} DESTINATION
"${CMAKE_INSTALL_PREFIX}/${dest_data}/extratools")
install(FILES ${_manuals} DESTINATION ${LYX_MAN_DIR}/man1)
diff --git a/src/LyX.cpp b/src/LyX.cpp
index 20c5e83..d800d19 100644
--- a/src/LyX.cpp
+++ b/src/LyX.cpp
@@ -909,6 +909,25 @@ bool LyX::init()
if (package().build_support().empty())
prependEnvPath("PATH", package().binary_dir().absFileName());
#endif
+ {
+ // Add the directory containing the dt2dv and dv2dt executables
to the path
+ FileName dtldir;
+ if (!package().build_support().empty()) {
+ // dtl executables should be in the same dir ar tex2lyx
+ dtldir = package().binary_dir();
+ }
+ else {
+ dtldir =
FileName(addName(package().system_support().absFileName(), "extratools"));
+ }
+#if defined(_WIN32)
+ string dtlexe = "dt2dv.exe";
+#else
+ string dtlexe = "dt2dv";
+#endif
+ FileName const dt2dv = FileName(addName(dtldir.absFileName(),
dtlexe));
+ if (dt2dv.exists())
+ prependEnvPath("PATH", dtldir.absFileName());
+ }
if (!lyxrc.path_prefix.empty())
prependEnvPath("PATH",
replaceEnvironmentPath(lyxrc.path_prefix));
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs