On 11.05.2011 07:26, Stephan Witt wrote:
Am 11.05.2011 um 00:02 schrieb Peter Kümmel:
On 10.05.2011 10:07, Kornel wrote:
Am Dienstag, 10. Mai 2011 schrieb Peter Kümmel:
...
Done.
Kornel
Good. Found a small issue when compiling with msvc.
Peter
I have a patch for enabling compiled lyx to run from anywhere without need
to have sysdir defined.
If everything fails (relative path, hardcoded, -sysdir etc)
it tries the (cmake-defined) source dir.
That way it works on system on which lyx was compiled.
Kornel
There is an already existing run-in-source detections which does not
work for builds with cmake, because
1. on linux in lib/ is no Makefile
2. build with msvc the lyx binary is in bin/Debug and not in bin/
3. maybe on Mac OSX is a third variant which could not be detected
The 3rd variant on Mac OSX is as follows:
* lyx binary is named LyX
* it resides in bin/Debug for debug configuration, but it's
- bin/Release/LyX for release configuration,
- bin/MinSizeRel/LyX for minumum sized release
- bin/RelWithDebInfo/LyX for release with debug info
OK, it's the same on Windows, we have to use "../../" which was only
used in the tex2lyx case, so the old detection logic does not work any more.
=======
Now you've made LYX_NLS active per default it doesn't build anymore
with this default. One has to passs -DLYX_EXTERNAL_LIBINTL=OFF too.
Does attached patch help?
Isn't it possible to detect the presence and/or usability of gettext
automatically? Here it cannot compile Message.o...
The error is the inability to include<libintl.h> because HAVE_GETTEXT
is defined.
Seems it is wrong to simply define HAVE_GETTEXT in case of LYX_NLS,
we have to test for it. The HAVE_GETTEXT define should be moved into
FindGettext.cmake.
The whole intls stuff needs some cleanup:
- Linux: building intl with HAVE_GETTEXT
- Apple: building intl with out HAVE_GETTEXT
- Windows: only linking intl of the downloaded dependencies (or should we also
try to compile it?)
Peter
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 38696)
+++ CMakeLists.txt (working copy)
@@ -336,6 +336,10 @@
add_subdirectory(po "${TOP_BINARY_DIR}/po")
endif()
+if(LYX_NLS AND APPLE)
+ set(LYX_EXTERNAL_LIBINTL 0)
+endif()
+
if(LYX_EXTERNAL_LIBINTL)
find_package(Libintl REQUIRED)
add_definitions(-DHAVE_GETTEXT) #TODO move to config.h