cmake: we have 2011 and more white space changes, won't call "use tabs" ;)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37174 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2011-01-10 23:24:00 +00:00
parent cdb3b00033
commit 707eeb22fb
21 changed files with 276 additions and 282 deletions

View File

@ -2,8 +2,8 @@
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.
#
# Copyright (c) 2006-2010 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008-2010 Kornel Benko, <Kornel.Benko@berlin.de>
# Copyright (c) 2006-2011 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008-2011 Kornel Benko, <Kornel.Benko@berlin.de>
cmake_minimum_required(VERSION 2.6.4)

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-2011 Peter Kümmel, <syntheticpp@gmx.net>
#
add_subdirectory(libs)

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) 2010, Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2010-2011 Peter Kümmel, <syntheticpp@gmx.net>
#
project(boost)

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-2011 Peter Kümmel, <syntheticpp@gmx.net>
#
project(boost_regex)

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-2011 Peter Kümmel, <syntheticpp@gmx.net>
#
project(boost_signals)

View File

@ -1,8 +1,8 @@
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.
#
# Copyright (c) 2008-2010 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008-2010 Kornel Benko, <Kornel.Benko@berlin.de>
# Copyright (c) 2008-2011 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008-2011 Kornel Benko, <Kornel.Benko@berlin.de>
#
project(doc)

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,2011 Peter Kümmel, <syntheticpp@gmx.net>
#
project(intl)
@ -12,57 +12,57 @@ configure_file(libgnuintl.h ${CMAKE_CURRENT_BINARY_DIR}/libintl.h COPYONLY)
add_definitions(
-DHAVE_CONFIG_H=1
-DMAKE_INTL_LIB
-DIN_LIBINTL
-DENABLE_RELOCATABLE=1
-DIN_LIBRARY
-DNO_XMALLOC
-Dset_relocation_prefix=libintl_set_relocation_prefix
-Drelocate=libintl_relocate
-DDEPENDS_ON_LIBICONV=1)
-DHAVE_CONFIG_H=1
-DMAKE_INTL_LIB
-DIN_LIBINTL
-DENABLE_RELOCATABLE=1
-DIN_LIBRARY
-DNO_XMALLOC
-Dset_relocation_prefix=libintl_set_relocation_prefix
-Drelocate=libintl_relocate
-DDEPENDS_ON_LIBICONV=1)
if(NOT APPLE)
add_definitions(
-DLOCALEDIR=\\"${LOACLE_DIR}\\"
-DLOCALE_ALIAS_PATH=\\"${LOACLE_DIR}\\"
-DLIBDIR=\\"${TOP_SRC_DIR}\\"
-DINSTALLDIR=\\"${PREFIX}\\" )
-DLOCALEDIR=\\"${LOACLE_DIR}\\"
-DLOCALE_ALIAS_PATH=\\"${LOACLE_DIR}\\"
-DLIBDIR=\\"${TOP_SRC_DIR}\\"
-DINSTALLDIR=\\"${PREFIX}\\" )
else()
add_definitions(
-DLOCALEDIR='\"${LOCALE_DIR}\"'
-DLOCALE_ALIAS_PATH='\"${LOCALE_DIR}\"'
-DLIBDIR='\"${TOP_SRC_DIR}\"'
-DINSTALLDIR='\"${PREFIX}\"' )
-DLOCALEDIR='\"${LOCALE_DIR}\"'
-DLOCALE_ALIAS_PATH='\"${LOCALE_DIR}\"'
-DLIBDIR='\"${TOP_SRC_DIR}\"'
-DINSTALLDIR='\"${PREFIX}\"' )
endif()
file(GLOB intl_headers ${TOP_SRC_DIR}/intl/*.h)
set(intl_sources
bindtextdom.c
dcgettext.c
dgettext.c
gettext.c
finddomain.c
loadmsgcat.c
localealias.c
textdomain.c
l10nflist.c
explodename.c
dcigettext.c
dcngettext.c
dngettext.c
ngettext.c
plural.c
plural-exp.c
localcharset.c
relocatable.c
localename.c
log.c
printf.c
osdep.c
intl-compat.c
langprefs.c
bindtextdom.c
dcgettext.c
dgettext.c
gettext.c
finddomain.c
loadmsgcat.c
localealias.c
textdomain.c
l10nflist.c
explodename.c
dcigettext.c
dcngettext.c
dngettext.c
ngettext.c
plural.c
plural-exp.c
localcharset.c
relocatable.c
localename.c
log.c
printf.c
osdep.c
intl-compat.c
langprefs.c
)
lyx_add_path(intl_sources ${TOP_SRC_DIR}/intl)

View File

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

View File

@ -1,8 +1,8 @@
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.
#
# Copyright (c) 2008-2010 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008-2010 Kornel Benko, <Kornel.Benko@berlin.de>
# Copyright (c) 2008-2011 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008-2011 Kornel Benko, <Kornel.Benko@berlin.de>
#
project(man)
@ -11,17 +11,18 @@ SET(_manuals)
set(program_suffix ${PROGRAM_SUFFIX})
set(version_suffix ${PROGRAM_SUFFIX})
set(VERSION "${LYX_MAJOR_VERSION}.${LYX_MINOR_VERSION}")
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})
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.1in src/tex2lyx/tex2lyx.1in)
add_manual(${_mn})
add_manual(${_mn})
endforeach(_mn)
ADD_CUSTOM_TARGET(man ALL DEPENDS ${_manuals})

View File

@ -6,12 +6,12 @@
# are met:
#
# 1. Redistributions of source code must retain the copyright
# notice, this list of conditions and the following disclaimer.
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@ -28,210 +28,207 @@
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
macro(lyx_add_path _list _prefix)
set(_tmp)
foreach(_current ${${_list}})
set(_tmp ${_tmp} ${_prefix}/${_current})
#message(${_prefix}/${_current})
endforeach(_current)
set(${_list} ${_tmp})
set(_tmp)
foreach(_current ${${_list}})
set(_tmp ${_tmp} ${_prefix}/${_current})
endforeach(_current)
set(${_list} ${_tmp})
endmacro(lyx_add_path _out _prefix)
#create the implementation files from the ui files and add them
# to the list of sources
#to the list of sources
#usage: LYX_ADD_QT4_UI_FILES(foo_SRCS ${ui_files})
macro(LYX_ADD_UI_FILES _sources _ui)
foreach (_current_FILE ${ARGN})
foreach (_current_FILE ${ARGN})
get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE)
get_filename_component(_basename ${_tmp_FILE} NAME_WE)
set(_header ${CMAKE_CURRENT_BINARY_DIR}/ui_${_basename}.h)
get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE)
get_filename_component(_basename ${_tmp_FILE} NAME_WE)
set(_header ${CMAKE_CURRENT_BINARY_DIR}/ui_${_basename}.h)
# we need to run uic and replace some things in the generated file
# this is done by executing the cmake script LyXuic.cmake
# ######
# Latest test showed on linux and windows show no bad consequeces,
# so we removed the call to LyXuic.cmake
add_custom_command(OUTPUT ${_header}
# we need to run uic and replace some things in the generated file
# this is done by executing the cmake script LyXuic.cmake
# ######
# Latest test showed on linux and windows show no bad consequeces,
# so we removed the call to LyXuic.cmake
add_custom_command(OUTPUT ${_header}
COMMAND ${QT_UIC_EXECUTABLE} -tr lyx::qt_ ${_tmp_FILE} -o ${_header}
MAIN_DEPENDENCY ${_tmp_FILE}
)
set(${_ui} ${${_ui}} ${_header})
endforeach (_current_FILE)
MAIN_DEPENDENCY ${_tmp_FILE})
set(${_ui} ${${_ui}} ${_header})
endforeach (_current_FILE)
endmacro(LYX_ADD_UI_FILES)
macro(LYX_AUTOMOC)
if (QT4_GET_MOC_INC_DIRS)
QT4_GET_MOC_INC_DIRS(_moc_INCS)
endif()
if (QT4_GET_MOC_INC_DIRS)
QT4_GET_MOC_INC_DIRS(_moc_INCS)
endif()
set(_matching_FILES)
foreach (_current_FILE ${ARGN})
set(_matching_FILES)
foreach (_current_FILE ${ARGN})
get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
# if "SKIP_AUTOMOC" is set to true, we will not handle this file here.
# here. this is required to make bouic work correctly:
# we need to add generated .cpp files to the sources (to compile them),
# but we cannot let automoc handle them, as the .cpp files don't exist yet when
# cmake is run for the very first time on them -> however the .cpp files might
# exist at a later run. at that time we need to skip them, so that we don't add two
# different rules for the same moc file
get_source_file_property(_skip ${_abs_FILE} SKIP_AUTOMOC)
get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
# if "SKIP_AUTOMOC" is set to true, we will not handle this file here.
# here. this is required to make bouic work correctly:
# we need to add generated .cpp files to the sources (to compile them),
# but we cannot let automoc handle them, as the .cpp files don't exist yet when
# cmake is run for the very first time on them -> however the .cpp files might
# exist at a later run. at that time we need to skip them, so that we don't add two
# different rules for the same moc file
get_source_file_property(_skip ${_abs_FILE} SKIP_AUTOMOC)
if (EXISTS ${_abs_FILE} AND NOT _skip)
if (EXISTS ${_abs_FILE} AND NOT _skip)
file(READ ${_abs_FILE} _contents)
file(READ ${_abs_FILE} _contents)
get_filename_component(_abs_PATH ${_abs_FILE} PATH)
get_filename_component(_abs_PATH ${_abs_FILE} PATH)
string(REGEX MATCHALL "#include +[\"<]moc_[^ ]+\\.cpp[\">]" _match "${_contents}")
if (_match)
foreach (_current_MOC_INC ${_match})
string(REGEX MATCH "moc_[^ <\"]+\\.cpp" _current_MOC "${_current_MOC_INC}")
string(REGEX MATCHALL "#include +[\"<]moc_[^ ]+\\.cpp[\">]" _match "${_contents}")
if (_match)
foreach (_current_MOC_INC ${_match})
string(REGEX MATCH "moc_[^ <\"]+\\.cpp" _current_MOC "${_current_MOC_INC}")
get_filename_component(_basename ${_current_MOC} NAME_WE)
get_filename_component(_basename ${_current_MOC} NAME_WE)
string(LENGTH ${_basename} _length)
MATH(EXPR _mocless_length ${_length}-4)
STRING(SUBSTRING ${_basename} 4 ${_mocless_length} _mocless_name )
string(LENGTH ${_basename} _length)
MATH(EXPR _mocless_length ${_length}-4)
STRING(SUBSTRING ${_basename} 4 ${_mocless_length} _mocless_name )
set(_header ${_abs_PATH}/${_mocless_name}.h)
set(_header ${_abs_PATH}/${_mocless_name}.h)
#message(STATUS "moc : ${_header}")
#set(_header ${CMAKE_CURRENT_SOURCE_DIR}/${_basename}.h)
#set(_header ${_abs_PATH}/${_basename}.h)
#message(STATUS "moc : ${_header}")
#set(_header ${CMAKE_CURRENT_SOURCE_DIR}/${_basename}.h)
#set(_header ${_abs_PATH}/${_basename}.h)
set(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
if (WIN32)
set(_def -D_WIN32)
endif()
#set(_moc ${_abs_PATH}/${_current_MOC})
add_custom_command(OUTPUT ${_moc}
COMMAND ${QT_MOC_EXECUTABLE}
ARGS ${_def} ${_moc_INCS} ${_header} -o ${_moc}
MAIN_DEPENDENCY ${_header})
macro_add_file_dependencies(${_abs_FILE} ${_moc})
SET_SOURCE_FILES_PROPERTIES(${_moc} GENERATED)
endforeach (_current_MOC_INC)
else()
#message(STATUS "moc not found : ${_abs_FILE} ")
endif()
endif()
endforeach (_current_FILE)
set(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
if (WIN32)
set(_def -D_WIN32)
endif()
#set(_moc ${_abs_PATH}/${_current_MOC})
add_custom_command(OUTPUT ${_moc}
COMMAND ${QT_MOC_EXECUTABLE}
ARGS ${_def} ${_moc_INCS} ${_header} -o ${_moc}
MAIN_DEPENDENCY ${_header})
macro_add_file_dependencies(${_abs_FILE} ${_moc})
SET_SOURCE_FILES_PROPERTIES(${_moc} GENERATED)
endforeach (_current_MOC_INC)
else()
#message(STATUS "moc not found : ${_abs_FILE} ")
endif()
endif()
endforeach (_current_FILE)
endmacro (LYX_AUTOMOC)
macro(lyx_const_touched_files _allinone_name _list)
set(_file_list ${_allinone_name}_files)
set(_file_const ${CMAKE_CURRENT_BINARY_DIR}/${_allinone_name}_const.C)
set(_file_touched ${CMAKE_CURRENT_BINARY_DIR}/${_allinone_name}_touched.C)
set(_file_list ${_allinone_name}_files)
set(_file_const ${CMAKE_CURRENT_BINARY_DIR}/${_allinone_name}_const.C)
set(_file_touched ${CMAKE_CURRENT_BINARY_DIR}/${_allinone_name}_touched.C)
# don't touch exisiting or non-empty file,
# so a cmake re-run doesn't touch all created files
set(_rebuild_file_const 0)
if (NOT EXISTS ${_file_const})
set(_rebuild_file_const 1)
else()
FILE(READ ${_file_const} _file_content)
if (NOT _file_content)
set(_rebuild_file_const 1)
endif()
endif()
# don't touch exisiting or non-empty file,
# so a cmake re-run doesn't touch all created files
set(_rebuild_file_const 0)
if (NOT EXISTS ${_file_const})
set(_rebuild_file_const 1)
else()
FILE(READ ${_file_const} _file_content)
if (NOT _file_content)
set(_rebuild_file_const 1)
endif()
endif()
set(_rebuild_file_touched 0)
if (NOT EXISTS ${_file_touched})
set(_rebuild_file_touched 1)
else()
FILE(READ ${_file_touched} _file_content)
if (NOT _file_content)
set(_rebuild_file_touched 1)
endif()
endif()
set(_rebuild_file_touched 0)
if (NOT EXISTS ${_file_touched})
set(_rebuild_file_touched 1)
else()
FILE(READ ${_file_touched} _file_content)
if (NOT _file_content)
set(_rebuild_file_touched 1)
endif()
endif()
if (LYX_MERGE_REBUILD)
#message(STATUS "Merge files build: rebuilding generated files")
set(_rebuild_file_const 1)
set(_rebuild_file_touched 1)
endif()
if (LYX_MERGE_REBUILD)
#message(STATUS "Merge files build: rebuilding generated files")
set(_rebuild_file_const 1)
set(_rebuild_file_touched 1)
endif()
if (_rebuild_file_const)
file(WRITE ${_file_const} "// autogenerated file \n//\n")
file(APPEND ${_file_const} "// * clear or delete this file to build it again by cmake \n//\n\n")
endif()
if (_rebuild_file_const)
file(WRITE ${_file_const} "// autogenerated file \n//\n")
file(APPEND ${_file_const} "// * clear or delete this file to build it again by cmake \n//\n\n")
endif()
if (_rebuild_file_touched)
file(WRITE ${_file_touched} "// autogenerated file \n//\n")
file(APPEND ${_file_touched} "// * clear or delete this file to build it again by cmake \n//\n")
file(APPEND ${_file_touched} "// * don't touch this file \n//\n\n")
file(APPEND ${_file_touched} "#define DONT_INCLUDE_CONST_FILES\n")
file(APPEND ${_file_touched} "#include \"${_file_const}\"\n\n\n")
endif()
if (_rebuild_file_touched)
file(WRITE ${_file_touched} "// autogenerated file \n//\n")
file(APPEND ${_file_touched} "// * clear or delete this file to build it again by cmake \n//\n")
file(APPEND ${_file_touched} "// * don't touch this file \n//\n\n")
file(APPEND ${_file_touched} "#define DONT_INCLUDE_CONST_FILES\n")
file(APPEND ${_file_touched} "#include \"${_file_const}\"\n\n\n")
endif()
#add merged files also to the project so they become editable
if(${GROUP_CODE} MATCHES "flat")
#add merged files also to the project so they become editable
if(${GROUP_CODE} MATCHES "flat")
lyx_add_info_files_no_group(${${_list}})
else()
lyx_add_info_files(MergedFiles ${${_list}})
endif()
set(${_file_list} ${_file_const} ${_file_touched} ${lyx_${groupname}_info_files})
set(${_file_list} ${_file_const} ${_file_touched} ${lyx_${groupname}_info_files})
foreach (_current_FILE ${${_list}})
get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
# don't include any generated files in the final-file
# because then cmake will not know the dependencies
get_source_file_property(_isGenerated ${_abs_FILE} GENERATED)
if (_isGenerated)
list(APPEND ${_file_list} ${_abs_FILE})
else()
GET_FILENAME_COMPONENT(_file_name ${_abs_FILE} NAME_WE)
STRING(REGEX REPLACE "-" "_" _file_name "${_file_name}")
set(__macro_name ${_file_name}___ASSUME_CONST)
foreach (_current_FILE ${${_list}})
get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
# don't include any generated files in the final-file
# because then cmake will not know the dependencies
get_source_file_property(_isGenerated ${_abs_FILE} GENERATED)
if (_isGenerated)
list(APPEND ${_file_list} ${_abs_FILE})
else()
GET_FILENAME_COMPONENT(_file_name ${_abs_FILE} NAME_WE)
STRING(REGEX REPLACE "-" "_" _file_name "${_file_name}")
set(__macro_name ${_file_name}___ASSUME_CONST)
if (_rebuild_file_const)
file(APPEND ${_file_const} "#define ${__macro_name}\n")
file(APPEND ${_file_const} "#if defined(${__macro_name}) && !defined(DONT_INCLUDE_CONST_FILES)\n")
file(APPEND ${_file_const} "#include \"${_abs_FILE}\"\n")
file(APPEND ${_file_const} "#endif\n\n")
endif()
if (_rebuild_file_const)
file(APPEND ${_file_const} "#define ${__macro_name}\n")
file(APPEND ${_file_const} "#if defined(${__macro_name}) && !defined(DONT_INCLUDE_CONST_FILES)\n")
file(APPEND ${_file_const} "#include \"${_abs_FILE}\"\n")
file(APPEND ${_file_const} "#endif\n\n")
endif()
if (_rebuild_file_touched)
file(APPEND ${_file_touched} "#ifndef ${__macro_name}\n")
file(APPEND ${_file_touched} "#include \"${_abs_FILE}\"\n")
file(APPEND ${_file_touched} "#endif\n\n")
endif()
endif()
endforeach (_current_FILE)
if (_rebuild_file_touched)
file(APPEND ${_file_touched} "#ifndef ${__macro_name}\n")
file(APPEND ${_file_touched} "#include \"${_abs_FILE}\"\n")
file(APPEND ${_file_touched} "#endif\n\n")
endif()
endif()
endforeach (_current_FILE)
endmacro(lyx_const_touched_files)
macro(lyx_qt_resources_file _qrc_name _to_dir _list)
if (NOT EXISTS ${_qrc_name})
set(_rebuild_file 1)
else()
FILE(READ ${_qrc_name} _file_content)
if (NOT _file_content)
set(_rebuild_file 1)
endif()
endif()
if (NOT EXISTS ${_qrc_name})
set(_rebuild_file 1)
else()
FILE(READ ${_qrc_name} _file_content)
if (NOT _file_content)
set(_rebuild_file 1)
endif()
endif()
if (_rebuild_file)
message(STATUS "Generating ${_qrc_name}")
file(WRITE ${_qrc_name} "<!DOCTYPE RCC><RCC version=\"1.0\">\n")
file(APPEND ${_qrc_name} "<qresource>\n")
if (_rebuild_file)
message(STATUS "Generating ${_qrc_name}")
file(WRITE ${_qrc_name} "<!DOCTYPE RCC><RCC version=\"1.0\">\n")
file(APPEND ${_qrc_name} "<qresource>\n")
foreach (_current_FILE ${${_list}})
get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
string(REGEX REPLACE "${_to_dir}" "" _file_name ${_abs_FILE})
file(APPEND ${_qrc_name} " <file alias=\"${_file_name}\">${_abs_FILE}</file>\n")
endforeach (_current_FILE)
foreach (_current_FILE ${${_list}})
get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
string(REGEX REPLACE "${_to_dir}" "" _file_name ${_abs_FILE})
file(APPEND ${_qrc_name} " <file alias=\"${_file_name}\">${_abs_FILE}</file>\n")
endforeach (_current_FILE)
file(APPEND ${_qrc_name} "</qresource>\n")
file(APPEND ${_qrc_name} "</RCC>\n")
endif()
file(APPEND ${_qrc_name} "</qresource>\n")
file(APPEND ${_qrc_name} "</RCC>\n")
endif()
endmacro(lyx_qt_resources_file)
@ -252,9 +249,9 @@ macro(LYX_OPTION _name _description _default _sys)
endif()
endif()
if(_msg)
string(SUBSTRING "LYX_${_name} " 0 25 _var)
string(SUBSTRING "${LYX_${_name}} " 0 4 _val)
message(STATUS "${_var}: ${_val} (${_description})")
string(SUBSTRING "LYX_${_name} " 0 25 _var)
string(SUBSTRING "${LYX_${_name}} " 0 4 _val)
message(STATUS "${_var}: ${_val} (${_description})")
endif()
endmacro()

View File

@ -1,8 +1,8 @@
# 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>
# Copyright (c) 2008-2011 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008-2011 Kornel Benko, <Kornel.Benko@berlin.de>
#
project(po)

View File

@ -1,12 +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>
# Copyright (c) 2008-2011 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008-2011 Kornel Benko, <Kornel.Benko@berlin.de>
#
if (UNIX)
set(_project "scripts")
include(../PyCompile)
set(_project "scripts")
include(../PyCompile)
endif()

View File

@ -16,7 +16,7 @@ add_subdirectory(mathed)
add_subdirectory(support)
add_subdirectory(tex2lyx)
if (UNIX)
add_subdirectory(client)
add_subdirectory(client)
endif()
file(GLOB lyx_sources ${TOP_SRC_DIR}/src/${LYX_CPP_FILES})
@ -63,8 +63,8 @@ endif()
lyx_automoc(${TOP_SRC_DIR}/src/Compare.cpp)
if (WIN32)
lyx_automoc(${TOP_SRC_DIR}/src/Server.cpp)
if(WIN32)
lyx_automoc(${TOP_SRC_DIR}/src/Server.cpp)
endif()
include_directories(${CMAKE_CURRENT_BINARY_DIR}
@ -123,23 +123,23 @@ target_link_libraries(${_lyx}
${QT_QTMAIN_LIBRARY}
${vld_dll})
if (HUNSPELL_FOUND)
target_link_libraries(${_lyx} ${HUNSPELL_LIBRARY})
if(HUNSPELL_FOUND)
target_link_libraries(${_lyx} ${HUNSPELL_LIBRARY})
endif()
if (ASPELL_FOUND)
if(ASPELL_FOUND)
target_link_libraries(${_lyx} ${ASPELL_LIBRARY})
endif()
if (ENCHANT_FOUND)
target_link_libraries(${_lyx} ${ENCHANT_LIBRARY})
if(ENCHANT_FOUND)
target_link_libraries(${_lyx} ${ENCHANT_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)

View File

@ -1,8 +1,8 @@
# 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>
# Copyright (c) 2008-2011 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008-2011 Kornel Benko, <Kornel.Benko@berlin.de>
#
set(_lyxclient lyxclient${PROGRAM_SUFFIX})
@ -14,8 +14,10 @@ file(GLOB _lyxclient_headers ${TOP_SRC_DIR}/src/client/*.h)
list(REMOVE_ITEM _lyxclient_headers "${TOP_SRC_DIR}/src/client/pch.h")
list(REMOVE_ITEM _lyxclient_sources "${TOP_SRC_DIR}/src/client/lyxclient.cpp")
include_directories(BEFORE "${TOP_SRC_DIR}/src/client"
"${TOP_SRC_DIR}/boost" ${ZLIB_INCLUDE_DIR})
include_directories(BEFORE
"${TOP_SRC_DIR}/src/client"
"${TOP_SRC_DIR}/boost"
${ZLIB_INCLUDE_DIR})
add_executable(${_lyxclient} ${_lyxclient_sources} ${_lyxclient_headers})
@ -28,12 +30,12 @@ target_link_libraries(${_lyxclient}
${QT_QTGUI_LIBRARY}
)
if (ASPELL_FOUND)
target_link_libraries(${_lyxclient} ${ASPELL_LIBRARY})
if(ASPELL_FOUND)
target_link_libraries(${_lyxclient} ${ASPELL_LIBRARY})
endif()
if (APPLE)
target_link_libraries(${_lyxclient} "-framework Carbon")
if(APPLE)
target_link_libraries(${_lyxclient} "-framework Carbon")
endif()
install(TARGETS ${_lyxclient} DESTINATION bin)

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-2011 Peter Kümmel, <syntheticpp@gmx.net>
#
project(frontends)

View File

@ -1,23 +1,20 @@
# 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-2011 Peter Kümmel, <syntheticpp@gmx.net>
#
project(frontend_qt4)
file(GLOB frontends_qt4_sources
${TOP_SRC_DIR}/src/frontends/qt4/${LYX_CPP_FILES})
file(GLOB frontends_qt4_sources ${TOP_SRC_DIR}/src/frontends/qt4/${LYX_CPP_FILES})
file(GLOB moc_files ${TOP_SRC_DIR}/src/frontends/qt4/${LYX_MOC_FILES})
list(REMOVE_ITEM frontends_qt4_sources ${moc_files} .)
list(REMOVE_ITEM frontends_qt4_sources ${TOP_SRC_DIR}/src/frontends/qt4/liblyxqt4.cpp)
list(REMOVE_ITEM frontends_qt4_sources ${TOP_SRC_DIR}/src/frontends/qt4/Resources.cpp)
file(GLOB frontends_qt4_headers
${TOP_SRC_DIR}/src/frontends/qt4/${LYX_HPP_FILES})
file(GLOB frontend_qt4_UI
${TOP_SRC_DIR}/src/frontends/qt4/ui/*.ui)
file(GLOB frontends_qt4_headers ${TOP_SRC_DIR}/src/frontends/qt4/${LYX_HPP_FILES})
file(GLOB frontend_qt4_UI ${TOP_SRC_DIR}/src/frontends/qt4/ui/*.ui)
lyx_add_msvc_pch(frontends_qt4)
@ -45,15 +42,12 @@ endif()
if(LYX_MERGE_FILES)
lyx_const_touched_files(_allinone frontends_qt4_sources)
set(depends_moc_uic ${frontends_qt4_headers} ${ui_files})
set_source_files_properties(_allinone_const.C
PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}")
set_source_files_properties(_allinone_touched.C
PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}")
set_source_files_properties(_allinone_const.C PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}")
set_source_files_properties(_allinone_touched.C PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}")
add_library(frontend_qt4 ${library_type}
${_allinone_files} ${frontends_qt4_headers} ${ui_files} ${resource_files})
else()
add_library(frontend_qt4 ${library_type}
${frontends_qt4_sources} ${frontends_qt4_headers} ${ui_files} ${resource_files})
add_library(frontend_qt4 ${library_type} ${frontends_qt4_sources} ${frontends_qt4_headers} ${ui_files} ${resource_files})
endif()
@ -68,8 +62,7 @@ if(WIN32)
target_link_libraries(frontend_qt4 Gdi32)
endif()
project_source_group("${GROUP_CODE}"
frontends_qt4_sources frontends_qt4_headers)
project_source_group("${GROUP_CODE}" frontends_qt4_sources frontends_qt4_headers)
source_group("Uic files" FILES ${frontend_qt4_UI})

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-2011 Peter Kümmel, <syntheticpp@gmx.net>
#
project(graphics)

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-2011 Peter Kümmel, <syntheticpp@gmx.net>
#
project(insets)

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-2011, Peter Kümmel, <syntheticpp@gmx.net>
#
project(mathed)

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<EFBFBD>mmel, <syntheticpp@gmx.net>
# Copyright (c) 2006-2011 Peter Kümmel, <syntheticpp@gmx.net>
#
project(support)

View File

@ -1,8 +1,8 @@
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.
#
# Copyright (c) 2006, 2008, 2009 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008, 2009 Kornel Benko, <Kornel.Benko@berlin.de>
# Copyright (c) 2006-2011 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008-2011 Kornel Benko, <Kornel.Benko@berlin.de>
#
set(_tex2lyx tex2lyx${PROGRAM_SUFFIX})
@ -13,25 +13,26 @@ set(LINKED_sources ${TOP_SRC_DIR}/src/lengthcommon.cpp)
set(LINKED_headers)
foreach(_src insets/InsetLayout Color Counters
Encoding FloatList Floating
Layout LayoutModuleList Lexer ModuleList TextClass
FontInfo Spacing)
list(APPEND LINKED_sources ${TOP_SRC_DIR}/src/${_src}.cpp)
list(APPEND LINKED_headers ${TOP_SRC_DIR}/src/${_src}.h)
Encoding FloatList Floating
Layout LayoutModuleList Lexer ModuleList TextClass
FontInfo Spacing)
list(APPEND LINKED_sources ${TOP_SRC_DIR}/src/${_src}.cpp)
list(APPEND LINKED_headers ${TOP_SRC_DIR}/src/${_src}.h)
endforeach(_src)
file(GLOB tex2lyx_sources ${TOP_SRC_DIR}/src/tex2lyx/${LYX_CPP_FILES})
file(GLOB tex2lyx_headers ${TOP_SRC_DIR}/src/tex2lyx/${LYX_HPP_FILES})
include_directories(BEFORE ${TOP_SRC_DIR}/src/tex2lyx
${TOP_SRC_DIR}/src/support/minizip ${ZLIB_INCLUDE_DIR})
include_directories(BEFORE
${TOP_SRC_DIR}/src/tex2lyx
${TOP_SRC_DIR}/src/support/minizip
${ZLIB_INCLUDE_DIR})
add_definitions(-DTEX2LYX)
if(NOT LYX_MERGE_FILES)
add_executable(${_tex2lyx} ${tex2lyx_sources} ${LINKED_sources}
${tex2lyx_headers} ${LINKED_headers})
add_executable(${_tex2lyx} ${tex2lyx_sources} ${LINKED_sources} ${tex2lyx_headers} ${LINKED_headers})
else()
lyx_const_touched_files(_allinone tex2lyx_sources)
lyx_const_touched_files(_allinone_linked LINKED_sources)