]> git.lyx.org Git - lyx.git/blobdiff - src/support/Package.cpp
Unbreak citing from bibliography environment
[lyx.git] / src / support / Package.cpp
index 75d6e1a2f87978818d97c34309d8c36642e4465a..8b6fa0b03ae8becd97c3bc5c7b6caaa3245ecca7 100644 (file)
@@ -55,7 +55,7 @@ namespace {
 Package package_;
 bool initialised_ = false;
 
-} // namespace anon
+} // namespace
 
 
 void init_package(string const & command_line_arg0,
@@ -101,7 +101,7 @@ string const & with_version_suffix();
 
 string const fix_dir_name(string const & name);
 
-} // namespace anon
+} // namespace
 
 
 Package::Package(string const & command_line_arg0,
@@ -193,7 +193,9 @@ void Package::set_temp_dir(FileName const & temp_dir) const
 FileName Package::messages_file(string const & c) const
 {
        if (in_build_dir_) {
-               FileName res = FileName(lyx_dir().absFileName() + "/../po/" + c + ".gmo");
+               FileName res = FileName(lyx_dir().absFileName() + "/po/" + c + ".gmo");
+               if (!res.isReadableFile())
+                       res = FileName(lyx_dir().absFileName() + "../po/" + c + ".gmo");
                if (!res.isReadableFile())
                        res = FileName(top_srcdir().absFileName() + "/po/" + c + ".gmo");
                return res;
@@ -247,7 +249,7 @@ string const & with_version_suffix()
        return program_suffix.empty() ? program_suffix : with_version_suffix;
 }
 
-} // namespace anon
+} // namespace
 
 
 FileName const & Package::top_srcdir()
@@ -302,8 +304,8 @@ bool isBuildDir(FileName const & abs_binary, string const & dir_location,
         return true;
     }
     //  cmake file, no Makefile in lib
-    FileName build_boost_dir = FileName(addPath(search_dir + "/3rdparty", "boost"));
-    if (!fileSearch(build_boost_dir.absFileName(), "cmake_install.cmake").empty()) {
+    FileName build_src_dir = FileName(addPath(search_dir, "src"));
+    if (!fileSearch(build_src_dir.absFileName(), "cmake_install.cmake").empty()) {
         return true;
     }
 
@@ -799,7 +801,7 @@ string const relative_system_support_dir()
        return result;
 }
 
-} // namespace anon
+} // namespace
 
 } // namespace support
 } // namespace lyx