Backport of chanes made in trunk.

The main differecies to trunk is: Project name branchlyx.
        This is so, to be able to install trunk and branch (rpm or debian) package
        simultaneously. As they do not share the same directories it is
        now easy.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@28878 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Kornel Benko 2009-03-20 14:54:54 +00:00
parent 41de4ebc11
commit 63f86623cc
19 changed files with 681 additions and 116 deletions

View File

@ -1,7 +1,7 @@
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.
#
# Copyright (c) 2006, Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2006, Peter Kümmel, <syntheticpp@gmx.net>
#
cmake_minimum_required(VERSION 2.4)
@ -13,7 +13,8 @@ endif(COMMAND cmake_policy)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
project(lyx)
# Only to distinguish fron trunk, so we can install both simultaneously
project(branchlyx)
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/
# is checked
@ -23,28 +24,78 @@ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
# Supress regeneration
set(CMAKE_SUPPRESS_REGENERATION TRUE)
set(PACKAGE lyx)
set(PACKAGE_VERSION 1.6)
set(LYX_DATE "2008")
#TODO
set(VERSION_INFO "CMake Build")
set(LYX_DIR_VER "LYX_DIR_16x")
set(LYX_USERDIR_VER "LYX_USERDIR_16x")
set(PROGRAM_SUFFIX "")
set(LYX_ABS_INSTALLED_DATADIR "/usr/local/share/lyx${PACKAGE_VERSION}")
set(LYX_ABS_INSTALLED_LOCALEDIR "/usr/local/share/locale")
set(LYX_ABS_TOP_SRCDIR "${CMAKE_SOURCE_DIR}")
# Try to get some informations from configure.ac
include(LyXPaths) #called here to define the needed TOP_SRC_DIR-variable
file(STRINGS "${TOP_SRC_DIR}/configure.ac" _config_lines)
if(WIN32)
set(USE_WINDOWS_PACKAGING 1)
set(USE_WINDOWS_PACKAGING 1)
elseif(APPLE)
set(USE_MACOSX_PACKAGING 1)
set(USE_MACOSX_PACKAGING 1)
else()
set(USE_POSIX_PACKAGING 1)
set(USE_POSIX_PACKAGING 1)
endif()
macro(setstripped _varname _value)
string(STRIP ${_value} _v)
if(USE_POSIX_PACKAGING)
string(TOLOWER ${_v} ${_varname})
else()
set(${_varname} ${_v})
endif()
endmacro(setstripped)
foreach(_c_l ${_config_lines} )
if(_c_l MATCHES "^AC_INIT\\(\([^,]+\),\([^,]+\), *\\[\([^,]+\)\\] *,\(.*\)")
setstripped(PACKAGE_BASE ${CMAKE_MATCH_1})
setstripped(PACKAGE_VERSION ${CMAKE_MATCH_2})
setstripped(PACKAGE_BUGREPORT ${CMAKE_MATCH_3})
if(PACKAGE_VERSION MATCHES "^\([0-9]+\)\\.\([0-9]+\).*$")
set(LYX_MAJOR_VERSION ${CMAKE_MATCH_1})
set(LYX_MINOR_VERSION ${CMAKE_MATCH_2})
set(LYX_DIR_VER "LYX_DIR_${CMAKE_MATCH_1}${CMAKE_MATCH_2}x")
set(LYX_USERDIR_VER "LYX_USERDIR_${CMAKE_MATCH_1}${CMAKE_MATCH_2}x")
set(LYX_INSTALL_SUFFIX "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}")
endif()
endif()
if(_c_l MATCHES "^AC_SUBST\\( *LYX_DATE *, *\\[\\\"(.*)\\\"\\].*")
set(LYX_DATE "${CMAKE_MATCH_1}")
endif()
endforeach(_c_l)
if(UseVersionSuffix)
message(STATUS "-- Using versioned PACKAGE. Disable with -DUseVersionSuffix=0")
set(PACKAGE ${PACKAGE_BASE}${LYX_INSTALL_SUFFIX})
set(PROGRAM_SUFFIX "${LYX_INSTALL_SUFFIX}")
else()
message(STATUS "-- PACKAGE not versioned, to enable use -DUseVersionSuffix=1")
set(PACKAGE ${PACKAGE_BASE})
set(PROGRAM_SUFFIX "")
endif()
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
# see http://www.cmake.org/pipermail/cmake/2006-October/011559.html
if (UNIX)
# don't use the default "/usr/local"
# but respect the user-choice on the command-line
SET(CMAKE_INSTALL_PREFIX
"/usr/local/${project}${LYX_INSTALL_SUFFIX}" CACHE PATH "LyX install prefix" FORCE)
endif()
if(WIN32)
SET(CMAKE_INSTALL_PREFIX
${CMAKE_INSTALL_PREFIX}/${LYX_INSTALL_SUFFIX} CACHE PATH "LyX install prefix" FORCE)
endif()
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(LYX_ABS_INSTALLED_DATADIR "${CMAKE_INSTALL_PREFIX}")
set(LYX_LOCALEDIR "locale")
set(LYX_ABS_INSTALLED_LOCALEDIR "${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}")
set(LYX_ABS_TOP_SRCDIR "${TOP_SRC_DIR}")
if(NOT GROUP_CODE)
#set(GROUP_CODE "The Golden Code")
set(GROUP_CODE flat)
@ -54,7 +105,6 @@ endif()
set(LYX_CPP_FILES *.cpp)
set(LYX_HPP_FILES *.h)
include(LyXPaths)
include(LyXMacros)
include(ProjectSourceGroup)
@ -132,7 +182,7 @@ find_package(ZLIB REQUIRED)
if(all OR aspell)
set(aspell TRUE CACHE TYPE STRING)
find_package(ASPELL REQUIRED)
find_package(ASPELL REQUIRED)
else()
find_package(ASPELL)
endif()
@ -145,20 +195,20 @@ if(use_external_libintl)
add_definitions(-DHAVE_GETTEXT)
endif()
message("")
message(STATUS "")
if(nls OR all)
set(nls TRUE CACHE TYPE STRING)
add_definitions(-DENABLE_NLS=1)
message("----- Building with ENABLE_NLS")
message(STATUS "----- Building with ENABLE_NLS")
else()
message("----- No nls, to enable use -Dnls=1")
message(STATUS "----- No nls, to enable use -Dnls=1")
endif()
set(nls)
if(ASPELL_FOUND)
add_definitions(-DUSE_ASPELL=1)
message("----- Building with USE_ASPELL")
message(STATUS "----- Building with USE_ASPELL")
else()
message("----- No aspell, to get more information use -Daspell=1")
message(STATUS "----- No aspell, to get more information use -Daspell=1")
endif()
set(all)
@ -167,9 +217,9 @@ if(WIN32)
set(noconsole TRUE CACHE TYPE STRING)
set(WIN32_CONSOLE WIN32)
set(LYX_QTMAIN_LIBRARY ${QT_QTMAIN_LIBRARY})
message("----- Console disabled")
message(STATUS "----- Console disabled")
else()
message("----- Console enabled, disable it with -Dnoconsole=1")
message(STATUS "----- Console enabled, disable it with -Dnoconsole=1")
endif()
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DNOMINMAX)
@ -180,25 +230,26 @@ if(WIN32)
endif()
endif()
set(PROGRAM_SUFFIX "\"\"")
set(LYX_ABS_TOP_SRCDIR "${CMAKE_SOURCE_DIR}")
set(LYX_ABS_INSTALLED_DATADIR "/usr/local/share/lyx${PACKAGE_VERSION}")
set(LYX_ABS_INSTALLED_LOCALEDIR "/usr/local/share/locale")
message("")
message("----- PROGRAM_SUFFIX : ${PROGRAM_SUFFIX}")
message("----- LYX_ABS_TOP_SRCDIR : ${LYX_ABS_TOP_SRCDIR}")
message("----- LYX_ABS_INSTALLED_DATADIR : ${LYX_ABS_INSTALLED_DATADIR}")
message("----- LYX_ABS_INSTALLED_LOCALEDIR : ${LYX_ABS_INSTALLED_LOCALEDIR}")
message("")
message(STATUS "")
foreach(_v PACKAGE PACKAGE_VERSION
PROGRAM_SUFFIX LYX_DATE LYX_DIR_VER LYX_USERDIR_VER
LYX_ABS_TOP_SRCDIR
LYX_ABS_INSTALLED_DATADIR LYX_ABS_INSTALLED_LOCALEDIR LYX_INSTALL_SUFFIX)
if(NOT DEFINED ${_v})
message(FATAL_ERROR "${_v} not defined")
endif()
string(SUBSTRING "${_v} " 0 28 _v1)
message(STATUS "----- ${_v1}: ${${_v}}")
endforeach(_v)
message(STATUS "")
add_definitions(-DBOOST_USER_CONFIG="<config.h>")
if(MSVC AND NOT disable-pch AND NOT MERGE_FILES)
message("-----")
message("----- using precompiled headers, disable with -Ddisable-pch=1")
message("-----")
message(STATUS "-----")
message(STATUS "----- using precompiled headers, disable with -Ddisable-pch=1")
message(STATUS "-----")
configure_file(${CMAKE_SOURCE_DIR}/pcheaders.h
${CMAKE_BINARY_DIR}/pcheaders.h)
configure_file(${CMAKE_SOURCE_DIR}/config.cpp.cmake
@ -220,9 +271,9 @@ if(MSVC AND NOT disable-pch AND NOT MERGE_FILES)
"${CMAKE_CXX_FLAGS_MINSIZEREL} /DLYX_PCH_STL /DLYX_PCH_BOOST")
else()
if(MSVC)
message("-----")
message("----- precompiled headers disabled, enable with -Ddisable-pch=0")
message("-----")
message(STATUS "-----")
message(STATUS "----- precompiled headers disabled, enable with -Ddisable-pch=0")
message(STATUS "-----")
endif()
set(disable-pch TRUE CACHE TYPE STRING)
macro(lyx_add_msvc_pch)
@ -273,7 +324,7 @@ if(MSVC)
set(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} /Wp64 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
set(CMAKE_CXX_FLAGS_RELEASEs
set(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} /Wp64 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
set(CMAKE_CXX_FLAGS_MINSIZEREL
"${CMAKE_CXX_FLAGS_MINSIZEREL} /Wp64 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
@ -298,13 +349,20 @@ if(MSVC)
endif()
message("----- Warning level : ${CMAKE_CXX_WARNING_LEVEL} ${WARNING_LEVEL_MESSAGE}")
message("----- Warnings as errors : ${MSVC_W_ERROR}")
message("----- Warnings disabled : ${MSVC_W_DISABLE}")
message("")
message(STATUS "----- Warning level : ${CMAKE_CXX_WARNING_LEVEL} ${WARNING_LEVEL_MESSAGE}")
message(STATUS "----- Warnings as errors : ${MSVC_W_ERROR}")
message(STATUS "----- Warnings disabled : ${MSVC_W_DISABLE}")
message(STATUS "")
endif()
if(nls OR all)
find_package(LyXGettext REQUIRED)
include_directories(${TOP_SRC_DIR}/po)
add_subdirectory(po)
endif()
# compiler tests, config.h generation
if(MSVC AND NOT CONFIGURECHECKS)
configure_file(configCompiler.h.msvc ${CMAKE_BINARY_DIR}/configCompiler.h)
@ -318,14 +376,9 @@ configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
find_package(ICONV REQUIRED)
add_definitions(-DHAVE_ICONV=1)
#TODO: insource is not the best place
configure_file(${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx_version.py.in
${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx_version.py)
include_directories(
${CMAKE_BINARY_DIR}
${TOP_SRC_DIR}/src
include_directories(
${CMAKE_BINARY_DIR}
${TOP_SRC_DIR}/src
${TOP_SRC_DIR}/boost)
add_subdirectory(boost)
@ -334,5 +387,69 @@ if(NOT use_external_libintl)
endif()
add_subdirectory(src)
add_subdirectory(man)
add_subdirectory(doc)
add_subdirectory(lyx2lyx)
add_subdirectory(scripts)
include(../Install)
SET(CPACK_PACKAGE_VERSION_MAJOR "${LYX_MAJOR_VERSION}")
SET(CPACK_PACKAGE_VERSION_MINOR "${LYX_MINOR_VERSION}")
FILE(STRINGS "${TOP_SRC_DIR}/development/cmake/LyX_summary.txt" CPACK_PACKAGE_DESCRIPTION_SUMMARY)
#SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A WYSIWYM (What You See Is What You Mean) document processor")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${LYX_INSTALL_SUFFIX}")
#
# needed by rpm
SET(CPACK_SET_DESTDIR "ON")
FILE(READ "${TOP_SRC_DIR}/development/cmake/LyX_license.txt" CPACK_RPM_PACKAGE_LICENSE)
SET(CPACK_RPM_PACKAGE_GROUP "Applications/Publishing")
SET(CPACK_RPM_PACKAGE_VENDOR "The LyX team")
#
# the next ones are needed by deb
SET(CPACK_PACKAGE_CONTACT "${PACKAGE_BUGREPORT}")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${project}-${LYX_INSTALL_SUFFIX}")
#
# for the next ones, cmake insists on data with values in some file
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${TOP_SRC_DIR}/development/cmake/LyX_description.txt")
SET(CPACK_RESOURCE_FILE_LICENSE "${TOP_SRC_DIR}/development/cmake/LyX_license.txt")
# Find the revision number and use it as the release in rpm-package-build.
# This way we may omit the otherwise needed "--force" parameter when
# installing from that rpm package.
FIND_PROGRAM(_svnversion svnversion)
message(STATUS "svnversion = ${_svnversion}")
if(NOT ${_svnversion} MATCHES "-NOTFOUND")
EXECUTE_PROCESS(COMMAND ${_svnversion} WORKING_DIRECTORY "${TOP_SRC_DIR}" OUTPUT_VARIABLE CPACK_RPM_PACKAGE_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE)
# We use this value also to set the package-patch-value
if(CPACK_RPM_PACKAGE_RELEASE MATCHES "^\([0-9]+\)")
set(CPACK_PACKAGE_VERSION_PATCH ${CMAKE_MATCH_1})
endif()
endif()
# we do not have a readme or welcome data,
# so we do not provide infofiles for
# CPACK_RESOURCE_FILE_README and CPACK_RESOURCE_FILE_WELCOME
include(CPack)
#Now it is possible to create some packages
# cd <BuildDir>
# make package
#############################################################################################
# So, e.g. for variables
# CMAKE_PROJECT_NAME : lyx
# CPACK_PACKAGE_VERSION_MAJOR : 2
# CPACK_PACKAGE_VERSION_MINOR : 0
# CPACK_PACKAGE_VERSION_PATCH : 1
# CMAKE_SYSTEM_NAME : Linux
# CPACK_BINARY_DEB:BOOL : ON
#
# the package name builds as "lyx-2.0.1-Linux.deb"
#
############################## rpm ################################### deb ##################
# create # cpack -G RPM --config CPackConfig.cmake # cpack -G DEB --config CPackConfig.cmake
# creates =># lyx-2.0.1-Linux.rpm # lyx-2.0.1-Linux.deb
# list # rpm -qlp lyx-2.0.1-Linux.rpm # dpkg-deb -c lyx-2.0.1-Linux.deb
# install # rpm -U lyx-2.0.1-Linux.rpm # dpkg -i lyx-2.0.1-Linux.deb
#

View File

@ -46,6 +46,7 @@ check_include_files(argz.h HAVE_ARGZ_H)
check_function_exists(open HAVE_OPEN)
check_function_exists(chmod HAVE_CHMOD)
check_function_exists(close HAVE_CLOSE)
check_function_exists(dcgettext HAVE_DCGETTEXT)
check_function_exists(popen HAVE_POPEN)
check_function_exists(pclose HAVE_PCLOSE)
check_function_exists(_open HAVE__OPEN)
@ -53,6 +54,7 @@ check_function_exists(_close HAVE__CLOSE)
check_function_exists(_popen HAVE__POPEN)
check_function_exists(_pclose HAVE__PCLOSE)
check_function_exists(getpid HAVE_GETPID)
check_function_exists(gettext HAVE_GETTEXT)
check_function_exists(_getpid HAVE__GETPID)
check_function_exists(mkdir HAVE_MKDIR)
check_function_exists(_mkdir HAVE__MKDIR)

View File

@ -1,47 +1,80 @@
# TODO: set correct path
#set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
# TODO: set correct path in call to cmake
# e.g. cmake /usr/src/lyx/lyx-devel/development/cmake -DCMAKE_INSTALL_PREFIX=/usr/local/share/lyx2.0 -Dnls=1
message(STATUS "installing to ${CMAKE_INSTALL_PREFIX}, defined by CMAKE_INSTALL_PREFIX")
# the macro scans the directories "_parent_src_dir/_dir/_current_dir" for *._file_type files
# the macro scans the directories "_parent_src_dir/_dir/_current_dir" for *._file_type files
# and installs the files in CMAKE_INSTALL_PREFIX/_current_dir
# dir_item is on item of the remaining arguments
macro(lyx_install _parent_src_dir _dir _file_type)
foreach(_current_dir ${ARGN})
file(GLOB files_list ${_parent_src_dir}/${_dir}/${_current_dir}/*.${_file_type})
list(REMOVE_ITEM files_list "${_parent_src_dir}/${_dir}/${_current_dir}/.svn")
install(FILES ${files_list} DESTINATION ${_dir}/${_current_dir})
#message(STATUS "install ${_dir}/${_current_dir}: ${files_list} ")
#message(STATUS "install at ${CMAKE_INSTALL_PREFIX}/${_dir}/${_current_dir}")
endforeach(_current_dir)
macro(lyx_install _parent_src_dir _gl_dir _file_type)
#message("checking parents ${_parent_src_dir}")
file(GLOB _dirs RELATIVE "${_parent_src_dir}" ${_parent_src_dir}/${_gl_dir})
#cmake bug on Windows: if _gl_dir==. _dirs is empty but on linux _dirs==.
if(NOT _dirs)
set(_dirs .)
endif()
foreach(_dir ${_dirs})
foreach(_glob_dir ${ARGN})
file(GLOB _dir_list ${_parent_src_dir}/${_dir}/${_glob_dir})
if(NOT _dir_list)
if(_glob_dir STREQUAL ".")
set(_dir_list ${_parent_src_dir}/${_dir}/.)
endif()
endif()
#message(STATUS "${_dir}/${_glob_dir} -> ${_dir_list} ")
foreach(_current_dir ${_dir_list})
file(GLOB _item_list ${_current_dir}/${_file_type})
#cmake bug: globbing with * also returns directories on Windows
set(files_list ${_item_list})
foreach(_current_item ${_item_list})
if(IS_DIRECTORY ${_current_item})
#message(STATUS "removing ${_current_item}")
if(files_list)
list(REMOVE_ITEM files_list "${_current_item}")
endif()
endif()
endforeach(_current_item)
if(files_list)
list(REMOVE_ITEM files_list "${_current_dir}/.svn")
list(REMOVE_ITEM files_list "${_current_dir}/Makefile.in")
list(REMOVE_ITEM files_list "${_current_dir}/Makefile.am")
GET_FILENAME_COMPONENT(_base_dir ${_current_dir} NAME)
if(_glob_dir STREQUAL ".")
set(_base_dir .)
endif()
#message(STATUS "install ${_dir}/${_base_dir}: ${files_list} ")
#message(STATUS "install at ${CMAKE_INSTALL_PREFIX}/${_dir}/${_base_dir}")
install(FILES ${files_list} DESTINATION ${_dir}/${_base_dir})
endif()
endforeach(_current_dir)
endforeach(_glob_dir)
endforeach(_dir)
endmacro(lyx_install)
lyx_install(${TOP_SRC_DIR}/lib bind bind . de fi pt sv)
lyx_install(${TOP_SRC_DIR}/lib commands def .)
lyx_install(${TOP_SRC_DIR}/lib doc lyx . ca cs da de es eu fr gl he hu it ja nl nb pl pt ro ru sk sl sv uk)
lyx_install(${TOP_SRC_DIR}/lib doc * clipart)
lyx_install(${TOP_SRC_DIR}/lib doc/de * clipart)
lyx_install(${TOP_SRC_DIR}/lib doc/es * clipart)
lyx_install(${TOP_SRC_DIR}/lib doc/fr * clipart)
lyx_install(${TOP_SRC_DIR}/lib doc/it * clipart)
lyx_install(${TOP_SRC_DIR}/lib doc/ja * clipart)
lyx_install(${TOP_SRC_DIR}/lib doc/uk * clipart)
lyx_install(${TOP_SRC_DIR}/lib examples * . ca cs da de es eu fr gl he hu it ja nl nb pl pt ro ru sk sl sv uk)
# language-specific-directories (like ca, de, es ...) are now globbed as "[a-z][a-z]"
set(_all_languages "[a-z][a-z]")
lyx_install(${TOP_SRC_DIR}/lib bind *.bind . ${_all_languages})
lyx_install(${TOP_SRC_DIR}/lib commands *.def .)
# this is handled in doc/CMakeLists.txt
#lyx_install(${TOP_SRC_DIR}/lib doc *.lyx . ${_all_languages})
#lyx_install(${TOP_SRC_DIR}/lib doc *.txt . ${_all_languages})
lyx_install(${TOP_SRC_DIR}/lib doc * biblio clipart)
lyx_install(${TOP_SRC_DIR}/lib doc/${_all_languages} * clipart)
lyx_install(${TOP_SRC_DIR}/lib examples * . ${_all_languages})
lyx_install(${TOP_SRC_DIR}/lib fonts * .)
lyx_install(${TOP_SRC_DIR}/lib images * . math commands)
lyx_install(${TOP_SRC_DIR}/lib images * . math commands attic)
lyx_install(${TOP_SRC_DIR}/lib kbd * .)
lyx_install(${TOP_SRC_DIR}/lib layouts * .)
lyx_install(${TOP_SRC_DIR}/lib lyx2lyx * .)
lyx_install(${TOP_SRC_DIR}/lib scripts * .)
lyx_install(${TOP_SRC_DIR}/lib lyx2lyx *.py .)
lyx_install(${TOP_SRC_DIR}/lib scripts *.py .)
lyx_install(${TOP_SRC_DIR}/lib templates * .)
lyx_install(${TOP_SRC_DIR}/lib tex * .)
lyx_install(${TOP_SRC_DIR}/lib ui * .)
lyx_install(${TOP_SRC_DIR}/lib . * .)
# TODO also get dot-less filenames in lyx_install
foreach(_file unicodesymbols encodings languages lyx2lyx/lyx2lyx)
install(FILES ${TOP_SRC_DIR}/lib/${_file} DESTINATION .)
endforeach(_file)

View File

@ -0,0 +1,20 @@
LyX is a document processor that encourages an approach to writing
based on the structure of your documents, not their appearance. It
is released under a Free Software/Open Source license (GPL v.2).
LyX is for people that write and want their writing to look great,
right out of the box. No more endless tinkering with formatting
details, 'finger painting' font attributes or futzing around with
page boundaries. You just write. In the background, Prof. Knuth's
legendary TeX typesetting engine makes you look good.
On screen, LyX looks like any word processor; its printed output --
or richly cross-referenced PDF, just as readily produced -- looks
like nothing else. Gone are the days of industrially bland .docs,
all looking similarly not-quite-right, yet coming out unpredictably
different on different printer drivers. Gone are the crashes
'eating' your dissertation the evening before going to press.
LyX is stable and fully featured. It is a multi-platform, fully
internationalized application running natively on Unix/Linux, the
Macintosh and modern Windows platforms.

View File

@ -0,0 +1 @@
GPL

View File

@ -0,0 +1 @@
A WYSIWYM (What You See Is What You Mean) document processor

View File

@ -0,0 +1,44 @@
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.
#
# Copyright (c) 2009, Peter Kümmel, <syntheticpp@gmx.net>
# , Kornel Benko, <Kornel.Benko@berlin.de>
#
# _project has to be set before adding
# #include(../PyCompile)
project(${_project})
include(FindPythonInterp)
file(GLOB _py_files ${TOP_SRC_DIR}/lib/${_project}/*.py)
set(py_compile ${TOP_SRC_DIR}/config/py-compile)
set(_generated)
set(ENV{PYTHON} ${PYTHON_EXECUTABLE})
foreach(_orig_py ${_py_files})
get_filename_component(_base_we_py ${_orig_py} NAME_WE)
set(_compiled_py_ "${CMAKE_CURRENT_BINARY_DIR}/${_base_we_py}.pyc" "${CMAKE_CURRENT_BINARY_DIR}/${_base_we_py}.pyo")
set(_copied_py "${CMAKE_CURRENT_BINARY_DIR}/${_base_we_py}.py")
# we need that file really local first, due to the "py_compile"-script
# because the creation will be in the directory of .py-file
add_custom_command(
OUTPUT ${_copied_py}
PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "${_orig_py}" ${_copied_py}
DEPENDS ${_orig_py}
)
add_custom_command(
OUTPUT ${_compiled_py_}
PRE_BUILD
COMMAND ${py_compile} ${_copied_py}
DEPENDS ${_copied_py}
)
SET_SOURCE_FILES_PROPERTIES(${_copied_py} ${_created_py_} GENERATED)
install(FILES ${_compiled_py_} DESTINATION ${_project})
LIST(APPEND _generated ${_compiled_py_})
endforeach(_orig_py)
ADD_CUSTOM_TARGET(${_project} ALL DEPENDS ${_generated})

View File

@ -4,7 +4,7 @@
* Licence details can be found in the file COPYING.
*
* This is the compilation configuration file for LyX.
* It was generated by autoconfs configure.
* It was generated by cmake.
* You might want to change some of the defaults if something goes wrong
* during the compilation.
*/
@ -25,15 +25,16 @@
#cmakedefine PACKAGE "${PACKAGE}"
#cmakedefine PACKAGE_VERSION "${PACKAGE_VERSION}"
#cmakedefine PACKAGE_BUGREPORT "${PACKAGE_BUGREPORT}"
#cmakedefine LYX_DATE "${LYX_DATE}"
#cmakedefine VERSION_INFO "${VERSION_INFO}"
#cmakedefine LYX_DIR_VER "${LYX_DIR_VER}"
#cmakedefine LYX_USERDIR_VER "${LYX_USERDIR_VER}"
#cmakedefine PROGRAM_SUFFIX "${PPROGRAM_SUFFIX}"
#cmakedefine LYX_ABS_INSTALLED_DATADIR "${LYX_DIR}"
#cmakedefine LYX_ABS_INSTALLED_LOCALEDIR "${LOCALEDIR}"
#cmakedefine LYX_ABS_TOP_SRCDIR "${TOP_SRCDIR}"
#define PROGRAM_SUFFIX "${PROGRAM_SUFFIX}"
#define LYX_ABS_INSTALLED_DATADIR "${LYX_ABS_INSTALLED_DATADIR}"
#define LYX_ABS_INSTALLED_LOCALEDIR "${LYX_ABS_INSTALLED_LOCALEDIR}"
#define LYX_ABS_TOP_SRCDIR "${TOP_SRC_DIR}"
#cmakedefine USE_POSIX_PACKAGING 1
#cmakedefine USE_WINDOWS_PACKAGING 1

View File

@ -35,6 +35,7 @@
#cmakedefine HAVE_OPEN 1
#cmakedefine HAVE_CHMOD 1
#cmakedefine HAVE_CLOSE 1
#cmakedefine HAVE_DCGETTEXT 1
#cmakedefine HAVE_POPEN 1
#cmakedefine HAVE_PCLOSE 1
#cmakedefine HAVE__OPEN 1
@ -43,6 +44,7 @@
#cmakedefine HAVE__PCLOSE 1
#cmakedefine HAVE_GETPID 1
#cmakedefine HAVE__GETPID 1
#cmakedefine HAVE_GETTEXT 1
#cmakedefine HAVE_MKDIR 1
#cmakedefine HAVE__MKDIR 1
#cmakedefine HAVE_PUTENV 1
@ -96,13 +98,14 @@
# endif
#endif
#cmakedefine GETTEXT_FOUND 1
#cmakedefine HAVE_ALLOCA 1
#cmakedefine HAVE_SYMBOL_ALLOCA 1
#if defined(HAVE_SYMBOL_ALLOCA) && !defined(HAVE_ALLOCA)
#define HAVE_ALLOCA
#endif
#cmakedefine HAVE_ICONV_CONST 1
#ifdef HAVE_ICONV_CONST
#define ICONV_CONST const

View File

@ -0,0 +1,40 @@
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.
#
# Copyright (c) 2008, 2009 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008, 2009 Kornel Benko, <Kornel.Benko@berlin.de>
#
project(doc)
#TODO: replace perl script with python, see scons:
# http://www.lyx.org/trac/browser/lyx-devel/trunk/development/scons/scons_utils.py
SET(_docs)
file(GLOB_RECURSE _rel_lyx_docs RELATIVE "${TOP_SRC_DIR}/lib/doc" "${TOP_SRC_DIR}/lib/doc/*.lyx" "${TOP_SRC_DIR}/lib/doc/*.txt")
foreach(_rel_doc ${_rel_lyx_docs})
if ("${_rel_doc}" MATCHES "/" )
string(REGEX REPLACE "/[^/]*$" "" _rel_dir_part ${_rel_doc})
else("${_rel_doc}" MATCHES "/")
set(_rel_dir_part ".")
endif("${_rel_doc}" MATCHES "/")
set(_created_doc "${CMAKE_CURRENT_BINARY_DIR}/${_rel_doc}")
get_filename_component(_doc_dir ${_created_doc} PATH)
file(MAKE_DIRECTORY ${_doc_dir})
#message("found relative file " ${_rel_doc})
#message("input ${TOP_SRC_DIR}/lib/doc/${_rel_doc}")
#message("output ${_created_doc}")
#message("rel_dir_part ${_rel_dir_part}")
SET_SOURCE_FILES_PROPERTIES(${_created_doc} GENERATED)
add_custom_command(
OUTPUT "${_created_doc}"
COMMAND perl "${CMAKE_SOURCE_DIR}/doc/ReplaceValues.pl" "LYX_USERDIR_VER=${LYX_USERDIR_VER}" "LYX_DIR_VER=${LYX_DIR_VER}" "${TOP_SRC_DIR}/lib/doc/${_rel_doc}" > "${_created_doc}"
DEPENDS "${TOP_SRC_DIR}/lib/doc/${_rel_doc}"
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${_rel_doc}" DESTINATION "doc/${_rel_dir_part}")
LIST(APPEND _docs "${_created_doc}")
endforeach(_rel_doc)
ADD_CUSTOM_TARGET(doc ALL DEPENDS ${_docs})

View File

@ -0,0 +1,42 @@
#! /usr/bin/env perl
use strict;
# Syntax: ReplaceValues.pl [<var1>=<Subst1> [<var2>=<Subst> ...]] <Inputfile> [<Inputfile> ...]
# Parse Arguments for strings to substitute
my %Subst = ();
for my $arg (@ARGV) {
if ($arg =~ /^([^=]+)=(.*)$/) {
$Subst{$1} = $2;
}
else {
# $arg should be filename here
&SubstituteDataInFile($arg);
}
}
exit(0);
#################################################################
sub SubstituteDataInFile($)
{ my ($InFile) = @_;
open(FI, '<', $InFile) || die("Could not read \"$InFile\"");
while (my $l = <FI>) {
print &SubstituteDataInLine($l);
}
close(FI);
}
sub SubstituteDataInLine($)
{my ($line) = @_;
my $result = $line;
for my $k (keys %Subst) {
while ($result =~ s/\b$k\b/$Subst{$k}/) {
}
}
return($result);
}

View File

@ -0,0 +1,17 @@
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.
#
# Copyright (c) 2008, 2009 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008, 2009 Kornel Benko, <Kornel.Benko@berlin.de>
#
configure_file(${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx_version.py.in
${CMAKE_CURRENT_BINARY_DIR}/lyx2lyx_version.py)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lyx2lyx_version.py DESTINATION lyx2lyx)
if (UNIX)
set(_project "lyx2lyx")
include(../PyCompile)
endif()
install(PROGRAMS ${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx DESTINATION lyx2lyx)

View File

@ -0,0 +1,30 @@
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.
#
# Copyright (c) 2008, 2009 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008, 2009 Kornel Benko, <Kornel.Benko@berlin.de>
#
project(man)
SET(_manuals)
set(program_suffix ${PROGRAM_SUFFIX})
macro(add_manual _mansrc)
get_filename_component(_mandest ${_mansrc} NAME_WE)
SET(_created_manual "${CMAKE_CURRENT_BINARY_DIR}/${_mandest}${PROGRAM_SUFFIX}.1")
configure_file("${TOP_SRC_DIR}/${_mansrc}" ${_created_manual} @ONLY)
SET_SOURCE_FILES_PROPERTIES(${_created_manual} GENERATED)
LIST(APPEND _manuals ${_created_manual})
endmacro(add_manual)
set(real_pkgdatadir ${LYX_ABS_INSTALLED_DATADIR})
foreach(_mn lyx.1in src/client/lyxclient.man src/tex2lyx/tex2lyx.1)
add_manual(${_mn})
endforeach(_mn)
ADD_CUSTOM_TARGET(man ALL DEPENDS ${_manuals})
install(FILES ${_manuals} DESTINATION man/man1)
# ADD_MANUALS("lyx")

View File

@ -0,0 +1,73 @@
# - Slightly modified Find GNU gettext tools
# This module looks for the GNU gettext tools. This module defines the
# following values:
# GETTEXT_MSGMERGE_EXECUTABLE: the full path to the msgmerge tool.
# GETTEXT_MSGFMT_EXECUTABLE: the full path to the msgfmt tool.
# GETTEXT_FOUND: True if gettext has been found.
#
# Additionally it provides the following macros:
# GETTEXT_CREATE_TRANSLATIONS ( outputFile [ALL] file1 ... fileN )
# This will create a target "translations" which will convert the
# given input po files into the binary output mo file. If the
# ALL option is used, the translations will also be created when
# building the default target.
FIND_PROGRAM(GETTEXT_MSGMERGE_EXECUTABLE msgmerge)
FIND_PROGRAM(GETTEXT_MSGFMT_EXECUTABLE msgfmt)
MACRO(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFile)
SET(_gmoFiles)
# remove only the last extension e.g
# LyX2.0.pot ==> LyX2.0
# and not LyX2.0.pot ==> LyX2
# as it would be with NAME_WE
# GET_FILENAME_COMPONENT(_potBasename ${_potFile} NAME_WE)
GET_FILENAME_COMPONENT(_potname ${_potFile} NAME)
if (_potname MATCHES "^\(.+\)\\.[^\\.]+$")
set(_potBasename ${CMAKE_MATCH_1})
else()
set(_potBasename ${_potname})
endif()
GET_FILENAME_COMPONENT(_absPotFile ${_potFile} ABSOLUTE)
SET(_addToAll)
IF(${_firstPoFile} STREQUAL "ALL")
SET(_addToAll "ALL")
SET(_firstPoFile)
ENDIF(${_firstPoFile} STREQUAL "ALL")
FOREACH (_currentPoFile ${ARGN})
GET_FILENAME_COMPONENT(_absFile ${_currentPoFile} ABSOLUTE)
GET_FILENAME_COMPONENT(_abs_PATH ${_absFile} PATH)
GET_FILENAME_COMPONENT(_lang ${_absFile} NAME_WE)
SET(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo)
ADD_CUSTOM_COMMAND(
OUTPUT ${_gmoFile}
COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_absFile} ${_absPotFile}
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_absFile}
DEPENDS ${_absPotFile} ${_absFile}
)
INSTALL(FILES ${_gmoFile} DESTINATION ${LYX_LOCALEDIR}/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo)
SET(_gmoFiles ${_gmoFiles} ${_gmoFile})
ENDFOREACH (_currentPoFile )
ADD_CUSTOM_TARGET(translations ${_addToAll} DEPENDS ${_gmoFiles})
ENDMACRO(GETTEXT_CREATE_TRANSLATIONS )
IF (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )
SET(GETTEXT_FOUND TRUE)
ELSE (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )
SET(GETTEXT_FOUND FALSE)
IF (GetText_REQUIRED)
MESSAGE(FATAL_ERROR "GetText not found")
ENDIF (GetText_REQUIRED)
ENDIF (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )

View File

@ -34,7 +34,7 @@ else()
if(ZLIB_FIND_REQUIRED)
message(STATUS "Looked for Z libraries named ${POTENTIAL_Z_LIBS}.")
message(STATUS "Found no acceptable Z library. This is fatal.")
message(FATAL_ERROR "Could NOT find z library")
message(FATAL_ERROR "Could NOT find z library, set GNUWIN32_DIR to dir containing /include and /bin folders: -DGNUWIN32_DIR=...")
endif()
endif()

View File

@ -0,0 +1,87 @@
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.
#
# Copyright (c) 2008, 2009 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008, 2009 Kornel Benko, <Kornel.Benko@berlin.de>
#
project(po)
include_directories(${TOP_SRC_DIR}/po)
SET(_lyxname ${PACKAGE})
SET(_py_sources)
macro(add_gettext_python _par _dir)
file(GLOB _sources ${TOP_SRC_DIR}/${_dir}/${ARGN})
SET(_dst "${CMAKE_CURRENT_BINARY_DIR}/${_par}_l10n.pot")
ADD_CUSTOM_COMMAND(
OUTPUT "${_dst}"
PRE_BUILD
COMMAND python
ARGS "${TOP_SRC_DIR}/po/lyx_pot.py" -b "${TOP_SRC_DIR}" -o "${_dst}" -t ${_par} ${_sources}
DEPENDS ${_sources}
)
SET_SOURCE_FILES_PROPERTIES("${_dst}" GENERATED)
LIST(APPEND _py_sources "${_dst}")
endmacro(add_gettext_python)
SET_SOURCE_FILES_PROPERTIES("${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot" GENERATED)
SET_SOURCE_FILES_PROPERTIES("${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.fmt.pot" GENERATED)
SET_SOURCE_FILES_PROPERTIES("${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.pot" GENERATED)
add_gettext_python(encodings lib encodings)
add_gettext_python(external lib external_templates)
add_gettext_python(formats lib configure.py)
add_gettext_python(languages lib languages)
add_gettext_python(layouts lib/layouts *.layouts *.inc *.module)
add_gettext_python(qt4 src/frontends/qt4/ui *.ui)
add_gettext_python(ui lib/ui *.ui *.inc)
FIND_PROGRAM(GETTEXT_XGETTEXT_EXECUTABLE xgettext)
FIND_PROGRAM(GETTEXT_MSGUNIQ_EXECUTABLE msguniq)
# TODO:
# We need here perl, because I don't know how
# to write the alternative for "cat" in python
# e.g. perl -e "\"while(<>){print;}\""
# But maybe Jose knows?
ADD_CUSTOM_COMMAND(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot"
COMMAND perl
ARGS -e "\"while(<>){print;}\"" ${_py_sources} > "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot"
DEPENDS ${_py_sources}
)
ADD_CUSTOM_COMMAND(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.fmt.pot"
COMMAND ${GETTEXT_MSGUNIQ_EXECUTABLE}
ARGS -o "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.fmt.pot" "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot"
)
SET(_potfiles_dep)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/POTFILES.in "")
foreach(_dir src src/frontends/qt4 src/insets src/mathed src/support src/tex2lyx)
file(GLOB _tmp_potfiles RELATIVE ${TOP_SRC_DIR} ${TOP_SRC_DIR}/${_dir}/*.cpp)
foreach(_f ${_tmp_potfiles})
LIST(APPEND _potfiles_dep "${TOP_SRC_DIR}/${_f}")
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/POTFILES.in "${_f}\n")
endforeach(_f)
endforeach(_dir)
ADD_CUSTOM_COMMAND(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.pot"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.fmt.pot" "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.pot"
COMMAND ${GETTEXT_XGETTEXT_EXECUTABLE}
ARGS --default-domain=${_lyxname} --directory=${TOP_SRC_DIR} --add-comments=TRANSLATORS: --language=C++ --join-existing --keyword=_ --keyword=N_ --keyword=B_ --keyword=qt_ --files-from="${CMAKE_CURRENT_BINARY_DIR}/POTFILES.in" --copyright-holder='LyX Developers' --msgid-bugs-address=lyx-devel@lists.lyx.org -o "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.pot"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.fmt.pot" ${_potfiles_dep}
)
file(GLOB LYX_PO_FILES ${TOP_SRC_DIR}/po/*.po)
GETTEXT_CREATE_TRANSLATIONS(${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.pot ALL ${LYX_PO_FILES})
# ADD_POFILES("lyx")

View File

@ -0,0 +1,12 @@
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.
#
# Copyright (c) 2008, 2009 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008, 2009 Kornel Benko, <Kornel.Benko@berlin.de>
#
if (UNIX)
set(_project "scripts")
include(../PyCompile)
endif()

View File

@ -4,17 +4,20 @@
# Copyright (c) 2006, Peter Kümmel, <syntheticpp@gmx.net>
#
project(lyx)
set(_lyx ${PACKAGE_BASE}${PROGRAM_SUFFIX})
project(${_lyx})
include_directories(${TOP_SRC_DIR}/src)
add_subdirectory(frontends)
add_subdirectory(graphics)
add_subdirectory(insets)
add_subdirectory(mathed)
add_subdirectory(support)
add_subdirectory(tex2lyx)
add_subdirectory(frontends)
add_subdirectory(graphics)
add_subdirectory(insets)
add_subdirectory(mathed)
add_subdirectory(support)
add_subdirectory(tex2lyx)
if (UNIX)
add_subdirectory(client)
endif()
file(GLOB lyx_sources ${TOP_SRC_DIR}/src/${LYX_CPP_FILES})
file(GLOB lyx_headers ${TOP_SRC_DIR}/src/${LYX_HPP_FILES})
@ -25,8 +28,8 @@ list(REMOVE_ITEM lyx_sources
${TOP_SRC_DIR}/src/ISpell.cpp
${TOP_SRC_DIR}/src/Variables.cpp
${TOP_SRC_DIR}/src/Section.cpp)
if(ASPELL_FOUND)
if (ASPELL_FOUND)
include_directories(${ASPELL_INCLUDE_DIR})
set(lyx_sources ${lyx_sources} ${TOP_SRC_DIR}/src/ASpell.cpp)
endif()
@ -37,27 +40,27 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}
lyx_add_msvc_pch(lyx)
if(NOT MERGE_FILES)
if (NOT MERGE_FILES)
set(lyx_sources ${lyx_sources})
else()
lyx_const_touched_files(_allinone lyx_sources)
set(lyx_sources ${_allinone_files})
endif()
if(LYX_LEAK_DETECTION)
if (LYX_LEAK_DETECTION)
configure_file(${vld_path}/vld.ini ${CMAKE_CURRENT_BINARY_DIR}/vld.ini COPYONLY)
configure_file(${vld_path}/vld.ini ${CMAKE_CURRENT_BINARY_DIR}/memory_leak_report.txt COPYONLY)
set(vld_files ${CMAKE_CURRENT_BINARY_DIR}/vld.ini ${CMAKE_CURRENT_BINARY_DIR}/memory_leak_report.txt)
endif()
add_executable(lyx
add_executable(${_lyx}
${WIN32_CONSOLE}
${lyx_sources}
${lyx_sources}
${lyx_headers}
${vld_files}
)
)
target_link_libraries(lyx
target_link_libraries(${_lyx}
mathed
insets
frontends
@ -69,20 +72,20 @@ target_link_libraries(lyx
${QT_QTMAIN_LIBRARY}
${vld_dll})
if(ASPELL_FOUND)
target_link_libraries(lyx ${ASPELL_LIBRARY})
if (ASPELL_FOUND)
target_link_libraries(${_lyx} ${ASPELL_LIBRARY})
endif()
if(APPLE)
target_link_libraries(lyx "-bind_at_load" )
target_link_libraries(lyx "-framework Carbon" )
if (APPLE)
target_link_libraries(${_lyx} "-bind_at_load")
target_link_libraries(${_lyx} "-framework Carbon")
endif()
if(MINGW)
target_link_libraries(lyx ole32)
if (MINGW)
target_link_libraries(${_lyx} ole32)
endif()
project_source_group("${GROUP_CODE}" lyx_sources lyx_headers)
install(TARGETS lyx DESTINATION bin)
install(TARGETS ${_lyx} DESTINATION bin)

View File

@ -0,0 +1,39 @@
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.
#
# Copyright (c) 2008, 2009 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008, 2009 Kornel Benko, <Kornel.Benko@berlin.de>
#
set(_lyxclient lyxclient${PROGRAM_SUFFIX})
project(${_lyxclient})
file(GLOB _lyxclient_sources ${TOP_SRC_DIR}/src/client/*.cpp)
file(GLOB _lyxclient_headers ${TOP_SRC_DIR}/src/client/*.h)
list(REMOVE_ITEM _lyxclient_headers "${TOP_SRC_DIR}/src/client/pch.h")
include_directories(BEFORE "${TOP_SRC_DIR}/src/client"
"${TOP_SRC_DIR}/boost" ${ZLIB_INCLUDE_DIR})
add_executable(${_lyxclient} ${_lyxclient_sources} ${_lyxclient_headers})
target_link_libraries(${_lyxclient}
support
boost_regex
${LIBINTL_LIBRARIES}
${ICONV_LIBRARY}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
)
if (ASPELL_FOUND)
target_link_libraries(${_lyxclient} ${ASPELL_LIBRARY})
endif()
if (APPLE)
target_link_libraries(${_lyxclient} "-framework Carbon")
endif()
install(TARGETS ${_lyxclient} DESTINATION bin)