Hi, I just updated the CMake patch for supporting OS X bundles (some files were not included and the patch was conflicting with current repository). Could this be considered for inclusion since it allows building working LyX executables (or at least almost, there might be some differences with autotools still) for OS X?
the ticket: http://www.lyx.org/trac/ticket/8188 the patch: http://www.lyx.org/trac/attachment/ticket/8188/cmake-osx.patch Just some comments on the patch: - The executable name has to match the information in Info.plist (development/MacOSX/Info.plist.in and CMakeLists.txt). The autoconf config/lyxinclude.m4 file has been modified to make it work with autotools. - The process to build OS X bundle is to first add all the files to be included to the bundle when calling add_executable (src/CMakeLists.txt) and then by calling setting the source file property of each of these files (development/cmake/Install.cmake, l.14) so that the files are properly located into the bundle. This is also why Install.cmake has to be included two times in src/CMakeLists.txt (once to build the list of files, once to set the location of the list of files). - in CMakeLists.txt there is a line install(CODE "set(BU_CHMOD_BUNDLE_ITEMS 1)") What it does is to fix the owner permissions within the bundle - this is necessary because some libraries are copied within the bundle and might be owned by root - An empty qt.conf is included in the bundle so that QT does not try to link to other QT libraries (which will not be included in the bundle) - In development/cmake/Install.cmake, some OS X specific files (*.sdef, qt.conf, *.icns) have to be included in the bundle Benjamin On Sep 10, 2012, at 11:51 , Kornel Benko <kor...@lyx.org> wrote: > Am Montag, 10. September 2012 um 08:57:42, schrieb Benjamin Piwowarski > <benjamin.piwowar...@lip6.fr> > > Because it has to be included at a latter moment: see src/CMakeLists.txt > > line 109. This is > > because the OS X bundle is built differently than packages for other > > platforms. > > I see there only > add_executable(${lyx} ...) > > I see no connection to install commands. How will the needed data be > installed in a bundle? > But I confess, I don't know anything about OS X, wondering only. > > I see no problems for other platforms. > > > Benjamin > > > > On Sep 8, 2012, at 19:50 , Kornel Benko <kor...@lyx.org> wrote: > > > > > Am Samstag, 8. September 2012 um 19:13:39, schrieb Benjamin Piwowarski > > > <benjamin.piwowar...@lip6.fr> > > > > Hi, > > > > > > > > I would like to propose this patch to improve cmake-based building on > > > > OS X - it allows building a full OS X bundle. > > > > > > > > See bug #8188 > > > > http://www.lyx.org/trac/ticket/8188 > > > > > > > > and the patch cmake-osx.patch that does not break autotools > > > > http://www.lyx.org/trac/raw-attachment/ticket/8188/cmake-osx.patch > > > > > > > > It basically adds instructions in the cmake files to include all the > > > > linked libraries and resources necessary to start LyX. > > > > > > > > Benjamin Piwowarski > > > > > > It looks like it touches apple platforms only. > > > > > > What I do not understand is, why does apple bundle not need Install.cmake? > > > ... > > > IF (NOT (LYX_BUNDLE AND APPLE)) > > > include(../Install) > > > endif() > > > ... > > > > > > Kornel -- Benjamin Piwowarski LIP6/CNRS, University Pierre et Marie Curie (UPMC) case 169 – 4, Place de Jussieu – 75252 Paris cedex 05 – France benja...@bpiwowar.net http://www.bpiwowar.net/