diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake index fb4332ddf..baecc520e 100644 --- a/Modules/CMakeGenericSystem.cmake +++ b/Modules/CMakeGenericSystem.cmake @@ -6,6 +6,7 @@ SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty SET(CMAKE_INCLUDE_FLAG_C "-I") # -I SET(CMAKE_INCLUDE_FLAG_C_SEP "") # , or empty SET(CMAKE_LIBRARY_PATH_FLAG "-L") +SET(CMAKE_LIBRARY_PATH_TERMINATOR "") # for the Digital Mars D compiler the link paths have to be terminated with a "/" SET(CMAKE_LINK_LIBRARY_FLAG "-l") SET(CMAKE_LINK_LIBRARY_SUFFIX "") diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 87b34a121..78570721c 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1531,6 +1531,8 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout, } std::string libPathFlag = this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG"); + std::string libPathTerminator = + this->Makefile->GetSafeDefinition("CMAKE_LIBRARY_PATH_TERMINATOR"); std::string libLinkFlag = this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FLAG"); // collect all the flags needed for linking libraries @@ -1599,6 +1601,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout, { linkLibs += libPathFlag; linkLibs += fullLibPath; + linkLibs += libPathTerminator; linkLibs += " "; // Put this directory in the rpath if using build-tree rpath