cmake: install on Windows, sync with trunk, should be uncritical

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@34573 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2010-06-01 12:24:21 +00:00
parent fd5f7a7174
commit 1729663bc7
19 changed files with 603 additions and 96 deletions

View File

@ -1,8 +1,10 @@
# 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-2010 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008-2010 Kornel Benko, <Kornel.Benko@berlin.de>
cmake_minimum_required(VERSION 2.4)
@ -11,15 +13,21 @@ if(COMMAND cmake_policy)
cmake_policy(SET CMP0005 OLD)
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)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/
# is checked
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
option(lyxinstall "Build install projects/rules" ON)
# Supress regeneration
set(CMAKE_SUPPRESS_REGENERATION TRUE)
@ -90,6 +98,12 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
endif()
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
if (WIN32)
set(DATA_SUBDIR "Resources/" CACHE STRING "Subdirectory for all lyx-system-data" FORCE)
else()
set(DATA_SUBDIR "" CACHE STRING "Subdirectory for all lyx-system-data" FORCE)
endif()
set(LYX_ABS_INSTALLED_DATADIR "${CMAKE_INSTALL_PREFIX}")
set(LYX_LOCALEDIR "locale")
set(LYX_ABS_INSTALLED_LOCALEDIR "${LYX_ABS_INSTALLED_DATADIR}/${LYX_LOCALEDIR}")
@ -105,6 +119,7 @@ endif()
set(LYX_CPP_FILES *.cpp)
set(LYX_HPP_FILES *.h)
include(LyXMacros)
include(ProjectSourceGroup)
@ -114,6 +129,7 @@ if(merge OR merge_rebuild)
message(STATUS "")
message(STATUS "All *.cpp files of a project are merged into two files, disable with -Dmerge=0")
message(STATUS "")
add_definitions(-DLYX_MERGED_BUILD)
else()
set(merge 0 CACHE TYPE STRING FORCE)
set(MERGE_FILES 0 CACHE TYPE STRING FORCE)
@ -164,8 +180,8 @@ if(NOT MSVC)
if(concept-checks)
set(LYX_CXX_FLAGS "${LYX_CXX_FLAGS} -D_GLIBCPP_CONCEPT_CHECKS")
endif()
set(CMAKE_CXX_FLAGS "${LYX_CXX_FLAGS}" CACHE TYPE STRING FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "${LYX_CXX_FLAGS} -O -g -D_DEBUG" CACHE TYPE STRING FORCE)
set(CMAKE_CXX_FLAGS "${LYX_CXX_FLAGS} -fno-strict-aliasing " CACHE TYPE STRING FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "${LYX_CXX_FLAGS} -fno-strict-aliasing -O -g -D_DEBUG" CACHE TYPE STRING FORCE)
if(MINGW)
set(CMAKE_CXX_FLAGS_RELEASE "${LYX_CXX_FLAGS} -O2 -DNDEBUG" CACHE TYPE STRING FORCE)
else()
@ -188,12 +204,20 @@ else()
endif()
set(aspell)
set(use_external_libintl TRUE)
if(use_external_libintl)
find_package(Libintl REQUIRED)
add_definitions(-DHAVE_GETTEXT)
endif()
if(WIN32)
find_library(ENCHANT_LIBRARY "libenchant")
find_path(ENCHANT_INCLUDE_DIR "enchant++.h")
else()
find_library(ENCHANT_LIBRARY "enchant" "/usr/local/lib" "/usr/lib")
find_path(ENCHANT_INCLUDE_DIR "enchant++.h" PATHS /usr/local/include /usr/local/include/enchant /usr/include /usr/include/enchant)
find_library(ENCHANT_LIBRARY "enchant" "/usr/local/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib")
find_path(ENCHANT_INCLUDE_DIR "enchant++.h" PATHS /usr/local/include /usr/local/include/enchant /usr/include /usr/include/enchant /opt/local/include/enchant)
endif()
if (ENCHANT_LIBRARY AND ENCHANT_INCLUDE_DIR)
set(ENCHANT_FOUND TRUE)
@ -203,14 +227,6 @@ else()
message(STATUS "----- Enchant not found, building without enchant support")
endif()
set(use_external_libintl TRUE)
if(use_external_libintl)
find_package(Libintl REQUIRED)
add_definitions(-DHAVE_GETTEXT)
endif()
message(STATUS "")
if(nls OR all)
set(nls TRUE CACHE TYPE STRING)
@ -260,31 +276,46 @@ endforeach(_v)
message(STATUS "")
add_definitions(-DBOOST_USER_CONFIG="<config.h>")
# PCHs not supported by cmake: http://www.cmake.org/Bug/view.php?id=1260
# Not sure if it works for all non-msvc compilers
include(PCHSupport_26)
if (MSVC)
option(disable-pch "Disable precompiled headers" ON)
else()
option(disable-pch "Disable precompiled headers" ON)
endif()
if(NOT disable-pch)
if(MSVC AND NOT disable-pch AND NOT MERGE_FILES)
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
${CMAKE_BINARY_DIR}/config_pch.cpp)
macro(lyx_add_msvc_pch name_)
set_source_files_properties(${${name_}_sources} PROPERTIES
COMPILE_FLAGS "/Yuconfig.h /Fp\$(IntDir)/config.pch")
set_source_files_properties(${CMAKE_BINARY_DIR}/config_pch.cpp PROPERTIES
COMPILE_FLAGS "/Ycconfig.h /Fp\$(IntDir)/config.pch")
set(${name_}_sources ${${name_}_sources} ${CMAKE_BINARY_DIR}/config_pch.cpp
${CMAKE_BINARY_DIR}/pcheaders.h)
add_definitions(/DLYX_ENABLE_PCH)
endmacro(lyx_add_msvc_pch)
set(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} /DLYX_PCH_STL /DLYX_PCH_BOOST /DLYX_PCH_QT4")
set(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} /DLYX_PCH_STL /DLYX_PCH_BOOST /DLYX_PCH_QT4")
set(CMAKE_CXX_FLAGS_MINSIZEREL
"${CMAKE_CXX_FLAGS_MINSIZEREL} /DLYX_PCH_STL /DLYX_PCH_BOOST")
configure_file(${CMAKE_SOURCE_DIR}/pcheaders.h ${CMAKE_BINARY_DIR}/pcheaders.h)
configure_file(${CMAKE_SOURCE_DIR}/config.cpp.cmake ${CMAKE_BINARY_DIR}/config_pch.cpp)
add_definitions(-DLYX_ENABLE_PCH)
if(MSVC AND NOT MERGE_FILES)
macro(lyx_add_msvc_pch name_)
set_source_files_properties(${${name_}_sources} PROPERTIES
COMPILE_FLAGS "/Yuconfig.h /Fp\$(IntDir)/config.pch")
set_source_files_properties(${CMAKE_BINARY_DIR}/config_pch.cpp PROPERTIES
COMPILE_FLAGS "/Ycconfig.h /Fp\$(IntDir)/config.pch")
set(${name_}_sources ${${name_}_sources} ${CMAKE_BINARY_DIR}/config_pch.cpp
${CMAKE_BINARY_DIR}/pcheaders.h)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /DLYX_PCH_STL /DLYX_PCH_BOOST /DLYX_PCH_QT4")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /DLYX_PCH_STL /DLYX_PCH_BOOST /DLYX_PCH_QT4")
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /DLYX_PCH_STL /DLYX_PCH_BOOST")
endmacro(lyx_add_msvc_pch)
macro(lyx_add_gcc_pch name_)
endmacro()
else()
macro(lyx_add_msvc_pch name_)
endmacro()
macro(lyx_add_gcc_pch name_)
add_definitions(-DLYX_PCH_STL -DLYX_PCH_BOOST -DLYX_PCH_QT4)
ADD_PRECOMPILED_HEADER(${name_} ${CMAKE_BINARY_DIR}/config_pch.cpp ${CMAKE_BINARY_DIR}/config.h.gch)
endmacro()
endif()
else()
if(MSVC)
message(STATUS "-----")
@ -294,6 +325,8 @@ else()
set(disable-pch TRUE CACHE TYPE STRING)
macro(lyx_add_msvc_pch)
endmacro(lyx_add_msvc_pch)
macro(lyx_add_gcc_pch name_)
endmacro()
endif()
if(MSVC)
@ -336,7 +369,7 @@ if(MSVC)
# add here warnings which should produce an error /weXXXX
set(MSVC_W_ERROR "/we4101 /we4189")
# add here warnings which should be disabled /wdXXXX
set(MSVC_W_DISABLE "/wd4288 /wd4355 /wd4800 /wd4996 /wd4311 /wd4312 /wd4505 /wd4267 /wd4512 /wd4245 /wd4127 /wd4180")
set(MSVC_W_DISABLE "/wd4288 /wd4355 /wd4800 /wd4996 /wd4311 /wd4312 /wd4505 /wd4267 /wd4512 /wd4245 /wd4127 /wd4180 /wd4231")
set(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} /Wp64 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
@ -354,7 +387,7 @@ if(MSVC)
# add here warnings which should produce an error /weXXXX
set(MSVC_W_ERROR "/we4101 /we4189")
# add here warnings which should be disabled /wdXXXX
set(MSVC_W_DISABLE "/wd4288 /wd4355 /wd4800 /wd4996 /wd4267 /wd4180")
set(MSVC_W_DISABLE "/wd4288 /wd4355 /wd4800 /wd4996 /wd4267 /wd4180 /wd4231")
set(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
@ -388,6 +421,17 @@ if(NOT ${_PERL_EXECUTABLE} MATCHES "-NOTFOUND")
endif()
endif()
option(debug_glibc "Enable libstdc++ debug mode" OFF)
option(debug_glibc_pedantic "Enable libstdc++pedantic debug mode" OFF)
if(debug_glibc)
set(_GLIBCXX_DEBUG 1)
endif()
if(debug_glibc_pedantic)
set(_GLIBCXX_DEBUG_PEDANTIC 1)
endif()
# compiler tests, config.h generation
if(MSVC AND NOT CONFIGURECHECKS)
configure_file(configCompiler.h.msvc ${CMAKE_BINARY_DIR}/configCompiler.h)
@ -395,36 +439,61 @@ else()
include(ConfigureChecks.cmake)
configure_file(configCompiler.h.cmake ${CMAKE_BINARY_DIR}/configCompiler.h)
endif()
find_package(AiksaurusLIB)
if(AIKSAURUSLIB_FOUND)
# Variables in config.h will be set correctly with configure_file()
set(HAVE_LIBAIKSAURUS 1)
set(AIKSAURUS_H_LOCATION 1)
endif()
configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
find_package(ICONV REQUIRED)
add_definitions(-DHAVE_ICONV=1)
include_directories(
${CMAKE_BINARY_DIR}
${TOP_SRC_DIR}/src
${TOP_SRC_DIR}/boost)
add_subdirectory(boost)
include_directories(
${CMAKE_BINARY_DIR}
${TOP_SRC_DIR}/src)
option(UseExternalBoost "Use external boost" OFF)
if(UseExternalBoost)
message(STATUS "Searching for boost")
find_package(Boost COMPONENTS signals regex)
if(Boost_FOUND)
message(STATUS "Boost found")
message(STATUS "Boost-libs = ${Boost_LIBRARIES}")
set(Lyx_Boost_Libraries ${Boost_LIBRARIES})
else()
message(FATAL_ERROR "Boost not found" ${Boost_ERROR_REASON})
endif()
else()
message(STATUS "----- Using internal boost. To build with installed version use -DUseExternalBoost:BOOL=ON")
set(Lyx_Boost_Libraries boost_signals boost_regex)
add_definitions(-DBOOST_USER_CONFIG="<config.h>")
include_directories(${TOP_SRC_DIR}/boost)
add_subdirectory(boost)
endif()
if(NOT use_external_libintl)
add_subdirectory(intl)
add_subdirectory(intl)
endif()
add_subdirectory(src)
add_subdirectory(man)
if(NOT ${_PERL_EXECUTABLE} MATCHES "-NOTFOUND")
add_subdirectory(doc)
if(lyxinstall)
add_subdirectory(man)
if(NOT ${_PERL_EXECUTABLE} MATCHES "-NOTFOUND")
add_subdirectory(doc)
endif()
endif()
add_subdirectory(lyx2lyx)
add_subdirectory(scripts)
include(../Install)
if(lyxinstall)
include(../Install)
endif()
SET(CPACK_PACKAGE_VERSION_MAJOR "${LYX_MAJOR_VERSION}")
SET(CPACK_PACKAGE_VERSION_MINOR "${LYX_MINOR_VERSION}")
@ -441,6 +510,12 @@ 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}")
# This is experimental, valid on _my_ system (Kornel)
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libqtgui4 (>= 4.4.3-0)")
IF(ASPELL_FOUND)
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libaspell15 (>= 0.60.6-1),${CPACK_DEBIAN_PACKAGE_DEPENDS}")
ENDIF()
#
# for the next ones, cpack insists on data with values in some file
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${TOP_SRC_DIR}/development/cmake/LyX_description.txt")
@ -463,7 +538,10 @@ endif()
# so we do not provide infofiles for
# CPACK_RESOURCE_FILE_README and CPACK_RESOURCE_FILE_WELCOME
include(CPack)
if(lyxinstall)
include(CPack)
endif()
#Now it is possible to create some packages
# cd <BuildDir>
# make package

View File

@ -43,9 +43,9 @@ macro(lyx_install _parent_src_dir _gl_dir _file_type)
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})
#message(STATUS "install ${DATA_SUBDIR}${_dir}/${_base_dir}: ${files_list} ")
#message(STATUS "install at ${CMAKE_INSTALL_PREFIX}/${DATA_SUBDIR}${_dir}/${_base_dir}")
install(FILES ${files_list} DESTINATION ${DATA_SUBDIR}${_dir}/${_base_dir})
endif()
endforeach(_current_dir)
endforeach(_glob_dir)

View File

@ -1,12 +1,22 @@
:: be sure there is a solution
cmake ..\trunk\development\cmake -Dmerge=1
:: set here the path to Qt's bin folder and to the LyX-MSVC depend bin folder
:: (these are example paths)
PATH=D:\Qt\bin;D:\LyXSVN\lyx-devel\lyx-windows-deps-msvc2008\bin;%PATH%
:: change directory to the folder where the compile result should be stored
:: (this is an example path)
cd D:\LyXSVN\lyx-devel\compile-result
cmake ..\development\cmake -G"Visual Studio 9 2008" -Dnls=1 -DGNUWIN32_DIR=D:\LyXSVN\lyx-devel\lyx-windows-deps-msvc2008 -Dmerge=0
:: clean
devenv lyx.sln /clean Release
start lyx.sln :: /clean Release
:: rebuild all generated files
cmake ..\trunk\development\cmake -Dmerge_rebuild=1
::cmake ..\cmake -Dmerge_rebuild=1
:: build release version
devenv lyx.sln /build Release
::start lyx.sln /build Release
:: return to the cmake folder where this script was started from
:: (this is an example path)
cd D:\LyXSVN\lyx-devel\development\cmake

View File

@ -25,6 +25,7 @@
#cmakedefine PACKAGE "${PACKAGE}"
#cmakedefine PACKAGE_VERSION "${PACKAGE_VERSION}"
#define PACKAGE_STRING "LyX ${PACKAGE_VERSION}"
#cmakedefine PACKAGE_BUGREPORT "${PACKAGE_BUGREPORT}"
#cmakedefine LYX_DATE "${LYX_DATE}"
#cmakedefine VERSION_INFO "${VERSION_INFO}"
@ -41,7 +42,44 @@
#cmakedefine USE_MACOSX_PACKAGING 1
#cmakedefine PATH_MAX ${PATH_MAX}
#cmakedefine HAVE_LIBAIKSAURUS 1
#cmakedefine AIKSAURUS_H_LOCATION <${AIKSAURUS_H}>
#endif
// cleanup global namespace
#ifdef ColorMode
#undef ColorMode
#endif
#ifdef FocusOut
#undef FocusOut
#endif
#ifdef FocusIn
#undef FocusIn
#endif
#ifdef KeyRelease
#undef KeyRelease
#endif
#ifdef CursorShape
#undef CursorShape
#endif
#ifdef IGNORE
#undef IGNORE
#endif
#ifdef GrayScale
#undef GrayScale
#endif
#ifdef Status
#undef Status
#endif
#ifdef IN
#undef IN
#endif

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-2010 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008-2010 Kornel Benko, <Kornel.Benko@berlin.de>
#
project(doc)
@ -32,7 +32,7 @@ foreach(_rel_doc ${_rel_lyx_docs})
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}")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${_rel_doc}" DESTINATION "${DATA_SUBDIR}doc/${_rel_dir_part}")
LIST(APPEND _docs "${_created_doc}")
endforeach(_rel_doc)

View File

@ -1,17 +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>
# Copyright (c) 2008-2010 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008-2010 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)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lyx2lyx_version.py DESTINATION ${DATA_SUBDIR}lyx2lyx)
if (UNIX)
set(_project "lyx2lyx")
include(../PyCompile)
endif()
install(PROGRAMS ${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx DESTINATION lyx2lyx)
install(PROGRAMS ${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx DESTINATION ${DATA_SUBDIR}lyx2lyx)

View File

@ -1,14 +1,16 @@
# 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-2010 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008-2010 Kornel Benko, <Kornel.Benko@berlin.de>
#
project(man)
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")
@ -24,7 +26,7 @@ endforeach(_mn)
ADD_CUSTOM_TARGET(man ALL DEPENDS ${_manuals})
install(FILES ${_manuals} DESTINATION man/man1)
install(FILES ${_manuals} DESTINATION ${DATA_SUBDIR}man/man1)
# ADD_MANUALS("lyx")

View File

@ -2,8 +2,6 @@
# from kdelibs
#
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
if(WIN32)
# check if GNUWIN32_DIR is already set
@ -14,15 +12,12 @@ if(WIN32)
if(NOT GNUWIN32_DIR)
# search in the default program install folder
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _progFiles)
find_file(GNUWIN32_DIR_tmp gnuwin32 win32libs
find_file(GNUWIN32_DIR gnuwin32 win32libs
PATHS
"${_progFiles}"
"C:/" "D:/" "E:/" "F:/" "G:/"
)
set(GNUWIN32_DIR ${GNUWIN32_DIR_tmp})
endif()
else()
set(GNUWIN32_DIR ${GNUWIN32_DIR} CACHE TYPE STRING)
endif()
if(GNUWIN32_DIR)
@ -42,7 +37,8 @@ if(WIN32)
endif()
else()
if (GNUWIN32_FIND_REQUIRED)
message(SEND_ERROR "Could NOT find GNUWIN32, please set GNUWIN32_DIR")
set(GNUWIN32_DIR CACHE PATH FORCE)
message(FATAL_ERROR "Could NOT find GNUWIN32, please set GNUWIN32_DIR")
endif()
endif()

View File

@ -0,0 +1,29 @@
#
# based on FindZLIB.cmake
# created 2009, Kornel Benko, <kornel.benko@berlin.de>
#
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
if (MYTHESLIB_INCLUDE_DIR)
# Already in cache, be silent
set(MYTHESLIB_FIND_QUIETLY TRUE)
endif()
set(MYTHES_H mythes.hxx)
find_path(MYTHESLIB_INCLUDE_DIR ${MYTHES_H}
/usr/include
/usr/local/include)
set(POTENTIAL_MYTHES_LIBS mythes)
find_library(MYTHESLIB_LIBRARY NAMES ${POTENTIAL_MYTHES_LIBS}
PATHS
/usr/lib /usr/local/lib)
# handle the QUIETLY and REQUIRED arguments and set MYTHESLIB_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MYTHESLIB DEFAULT_MSG MYTHESLIB_LIBRARY MYTHESLIB_INCLUDE_DIR)
mark_as_advanced(MYTHESLIB_LIBRARY MYTHESLIB_INCLUDE_DIR)

View File

@ -0,0 +1,319 @@
# - Try to find precompiled headers support for GCC 3.4 and 4.x
# Once done this will define:
#
# Variable:
# PCHSupport_FOUND
#
# Macro:
# ADD_PRECOMPILED_HEADER _targetName _input _dowarn
# ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use _dowarn
# ADD_NATIVE_PRECOMPILED_HEADER _targetName _input _dowarn
# GET_NATIVE_PRECOMPILED_HEADER _targetName _input
IF(CMAKE_COMPILER_IS_GNUCXX)
EXEC_PROGRAM(
${CMAKE_CXX_COMPILER}
ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
OUTPUT_VARIABLE gcc_compiler_version)
#MESSAGE("GCC Version: ${gcc_compiler_version}")
IF(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
SET(PCHSupport_FOUND TRUE)
ELSE(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
IF(gcc_compiler_version MATCHES "3\\.4\\.[0-9]")
SET(PCHSupport_FOUND TRUE)
ENDIF(gcc_compiler_version MATCHES "3\\.4\\.[0-9]")
ENDIF(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
SET(_PCH_include_prefix "-I")
ELSE(CMAKE_COMPILER_IS_GNUCXX)
IF(WIN32)
SET(PCHSupport_FOUND TRUE) # for experimental msvc support
SET(_PCH_include_prefix "/I")
ELSE(WIN32)
SET(PCHSupport_FOUND FALSE)
ENDIF(WIN32)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name)
SET(${_out_compile_flags} ${${_flags_var_name}} )
IF(CMAKE_COMPILER_IS_GNUCXX)
GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
IF(${_targetType} STREQUAL SHARED_LIBRARY)
LIST(APPEND ${_out_compile_flags} "${${_out_compile_flags}} -fPIC")
ENDIF(${_targetType} STREQUAL SHARED_LIBRARY)
ELSE(CMAKE_COMPILER_IS_GNUCXX)
## TODO ... ? or does it work out of the box
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES )
FOREACH(item ${DIRINC})
LIST(APPEND ${_out_compile_flags} "${_PCH_include_prefix}${item}")
ENDFOREACH(item)
GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
#MESSAGE("_directory_flags ${_directory_flags}" )
LIST(APPEND ${_out_compile_flags} ${_directory_flags})
LIST(APPEND ${_out_compile_flags} ${CMAKE_CXX_FLAGS} )
SEPARATE_ARGUMENTS(${_out_compile_flags})
ENDMACRO(_PCH_GET_COMPILE_FLAGS)
MACRO(_PCH_WRITE_PCHDEP_CXX _targetName _include_file _dephelp)
SET(${_dephelp} ${CMAKE_CURRENT_BINARY_DIR}/${_targetName}_pch_dephelp.cxx)
FILE(WRITE ${${_dephelp}}
"#include \"${_include_file}\"
int testfunction()
{
return 0;
}
"
)
ENDMACRO(_PCH_WRITE_PCHDEP_CXX )
MACRO(_PCH_GET_COMPILE_COMMAND out_command _input _output)
FILE(TO_NATIVE_PATH ${_input} _native_input)
FILE(TO_NATIVE_PATH ${_output} _native_output)
IF(CMAKE_COMPILER_IS_GNUCXX)
IF(CMAKE_CXX_COMPILER_ARG1)
# remove leading space in compiler argument
STRING(REGEX REPLACE "^ +" "" pchsupport_compiler_cxx_arg1 ${CMAKE_CXX_COMPILER_ARG1})
SET(${out_command}
${CMAKE_CXX_COMPILER} ${pchsupport_compiler_cxx_arg1} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input}
)
ELSE(CMAKE_CXX_COMPILER_ARG1)
SET(${out_command}
${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input}
)
ENDIF(CMAKE_CXX_COMPILER_ARG1)
ELSE(CMAKE_COMPILER_IS_GNUCXX)
SET(_dummy_str "#include <${_input}>")
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/pch_dummy.cpp ${_dummy_str})
SET(${out_command}
${CMAKE_CXX_COMPILER} ${_compile_FLAGS} /c /Fp${_native_output} /Yc${_native_input} pch_dummy.cpp
)
#/out:${_output}
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
ENDMACRO(_PCH_GET_COMPILE_COMMAND )
MACRO(_PCH_GET_TARGET_COMPILE_FLAGS _cflags _header_name _pch_path _dowarn )
FILE(TO_NATIVE_PATH ${_pch_path} _native_pch_path)
IF(CMAKE_COMPILER_IS_GNUCXX)
# for use with distcc and gcc >4.0.1 if preprocessed files are accessible
# on all remote machines set
# PCH_ADDITIONAL_COMPILER_FLAGS to -fpch-preprocess
# if you want warnings for invalid header files (which is very inconvenient
# if you have different versions of the headers for different build types
# you may set _pch_dowarn
IF (_dowarn)
SET(${_cflags} "${PCH_ADDITIONAL_COMPILER_FLAGS} -include ${CMAKE_CURRENT_BINARY_DIR}/${_header_name} -Winvalid-pch " )
ELSE (_dowarn)
SET(${_cflags} "${PCH_ADDITIONAL_COMPILER_FLAGS} -include ${CMAKE_CURRENT_BINARY_DIR}/${_header_name} " )
ENDIF (_dowarn)
ELSE(CMAKE_COMPILER_IS_GNUCXX)
set(${_cflags} "/Fp${_native_pch_path} /Yu${_header_name}" )
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
ENDMACRO(_PCH_GET_TARGET_COMPILE_FLAGS )
MACRO(GET_PRECOMPILED_HEADER_OUTPUT _targetName _input _output)
GET_FILENAME_COMPONENT(_name ${_input} NAME)
GET_FILENAME_COMPONENT(_path ${_input} PATH)
SET(_output "${CMAKE_CURRENT_BINARY_DIR}/${_name}.gch/${_targetName}_${CMAKE_BUILD_TYPE}.h++")
ENDMACRO(GET_PRECOMPILED_HEADER_OUTPUT _targetName _input)
MACRO(ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use )
# to do: test whether compiler flags match between target _targetName
# and _pch_output_to_use
GET_FILENAME_COMPONENT(_name ${_input} NAME)
IF( "${ARGN}" STREQUAL "0")
SET(_dowarn 0)
ELSE( "${ARGN}" STREQUAL "0")
SET(_dowarn 1)
ENDIF("${ARGN}" STREQUAL "0")
_PCH_GET_TARGET_COMPILE_FLAGS(_target_cflags ${_name} ${_pch_output_to_use} ${_dowarn})
# MESSAGE("Add flags ${_target_cflags} to ${_targetName} " )
SET_TARGET_PROPERTIES(${_targetName}
PROPERTIES
COMPILE_FLAGS ${_target_cflags}
)
ADD_CUSTOM_TARGET(pch_Generate_${_targetName}
DEPENDS ${_pch_output_to_use}
)
ADD_DEPENDENCIES(${_targetName} pch_Generate_${_targetName} )
ENDMACRO(ADD_PRECOMPILED_HEADER_TO_TARGET)
MACRO(ADD_PRECOMPILED_HEADER _targetName _input _gch)
SET(_PCH_current_target ${_targetName})
IF(NOT CMAKE_BUILD_TYPE)
MESSAGE(FATAL_ERROR
"This is the ADD_PRECOMPILED_HEADER macro. "
"You must set CMAKE_BUILD_TYPE!"
)
ENDIF(NOT CMAKE_BUILD_TYPE)
IF( "${ARGN}" STREQUAL "0")
SET(_dowarn 0)
ELSE( "${ARGN}" STREQUAL "0")
SET(_dowarn 1)
ENDIF("${ARGN}" STREQUAL "0")
GET_FILENAME_COMPONENT(_name ${_input} NAME)
GET_FILENAME_COMPONENT(_path ${_input} PATH)
GET_PRECOMPILED_HEADER_OUTPUT( ${_targetName} ${_input} _output)
GET_FILENAME_COMPONENT(_outdir ${_output} PATH )
GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
_PCH_WRITE_PCHDEP_CXX(${_targetName} ${_input} _pch_dephelp_cxx)
IF(${_targetType} STREQUAL SHARED_LIBRARY)
ADD_LIBRARY(${_targetName}_pch_dephelp SHARED ${_pch_dephelp_cxx} )
ELSE(${_targetType} STREQUAL SHARED_LIBRARY)
ADD_LIBRARY(${_targetName}_pch_dephelp STATIC ${_pch_dephelp_cxx})
ENDIF(${_targetType} STREQUAL SHARED_LIBRARY)
FILE(MAKE_DIRECTORY ${_outdir})
_PCH_GET_COMPILE_FLAGS(_compile_FLAGS)
#MESSAGE("_compile_FLAGS: ${_compile_FLAGS}")
#message("COMMAND ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input}")
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/${_name} PROPERTIES GENERATED 1)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_name}
COMMAND ${CMAKE_COMMAND} -E copy ${_input} ${CMAKE_CURRENT_BINARY_DIR}/${_name} # ensure same directory! Required by gcc
DEPENDS ${_input}
)
#message("_command ${_input} ${_output}")
_PCH_GET_COMPILE_COMMAND(_command ${CMAKE_CURRENT_BINARY_DIR}/${_name} ${_gch} )
#message(${_input} )
#message("_output ${_output}")
ADD_CUSTOM_COMMAND(
OUTPUT ${_output}
COMMAND ${_command}
DEPENDS ${_input} ${CMAKE_CURRENT_BINARY_DIR}/${_name} ${_targetName}_pch_dephelp
)
ADD_PRECOMPILED_HEADER_TO_TARGET(${_targetName} ${_input} ${_output} ${_dowarn})
ENDMACRO(ADD_PRECOMPILED_HEADER)
# Generates the use of precompiled in a target,
# without using depency targets (2 extra for each target)
# Using Visual, must also add ${_targetName}_pch to sources
# Not needed by Xcode
MACRO(GET_NATIVE_PRECOMPILED_HEADER _targetName _input)
if(CMAKE_GENERATOR MATCHES Visual*)
SET(_dummy_str "#include \"${_input}\"\n"
"// This is required to suppress LNK4221. Very annoying.\n"
"void *g_${_targetName}Dummy = 0\;\n")
# Use of cxx extension for generated files (as Qt does)
SET(${_targetName}_pch ${CMAKE_CURRENT_BINARY_DIR}/${_targetName}_pch.cxx)
if(EXISTS ${${_targetName}_pch})
# Check if contents is the same, if not rewrite
# todo
else(EXISTS ${${_targetName}_pch})
FILE(WRITE ${${_targetName}_pch} ${_dummy_str})
endif(EXISTS ${${_targetName}_pch})
endif(CMAKE_GENERATOR MATCHES Visual*)
ENDMACRO(GET_NATIVE_PRECOMPILED_HEADER)
MACRO(ADD_NATIVE_PRECOMPILED_HEADER _targetName _input)
IF( "${ARGN}" STREQUAL "0")
SET(_dowarn 0)
ELSE( "${ARGN}" STREQUAL "0")
SET(_dowarn 1)
ENDIF("${ARGN}" STREQUAL "0")
if(CMAKE_GENERATOR MATCHES Visual*)
# Auto include the precompile (useful for moc processing, since the use of
# precompiled is specified at the target level
# and I don't want to specifiy /F- for each moc/res/ui generated files (using Qt)
GET_TARGET_PROPERTY(oldProps ${_targetName} COMPILE_FLAGS)
if (${oldProps} MATCHES NOTFOUND)
SET(oldProps "")
endif(${oldProps} MATCHES NOTFOUND)
SET(newProperties "${oldProps} /Yu\"${_input}\" /FI\"${_input}\"")
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES COMPILE_FLAGS "${newProperties}")
#also inlude ${oldProps} to have the same compile options
SET_SOURCE_FILES_PROPERTIES(${${_targetName}_pch} PROPERTIES COMPILE_FLAGS "${oldProps} /Yc\"${_input}\"")
else(CMAKE_GENERATOR MATCHES Visual*)
if (CMAKE_GENERATOR MATCHES Xcode)
# For Xcode, cmake needs my patch to process
# GCC_PREFIX_HEADER and GCC_PRECOMPILE_PREFIX_HEADER as target properties
GET_TARGET_PROPERTY(oldProps ${_targetName} COMPILE_FLAGS)
if (${oldProps} MATCHES NOTFOUND)
SET(oldProps "")
endif(${oldProps} MATCHES NOTFOUND)
# When buiding out of the tree, precompiled may not be located
# Use full path instead.
GET_FILENAME_COMPONENT(fullPath ${_input} ABSOLUTE)
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${fullPath}")
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES")
else (CMAKE_GENERATOR MATCHES Xcode)
#Fallback to the "old" precompiled suppport
#ADD_PRECOMPILED_HEADER(${_targetName} ${_input} ${_dowarn})
endif(CMAKE_GENERATOR MATCHES Xcode)
endif(CMAKE_GENERATOR MATCHES Visual*)
ENDMACRO(ADD_NATIVE_PRECOMPILED_HEADER)

View File

@ -76,5 +76,5 @@
#if defined(LYX_PCH_QT4) && defined(LYX_BUILD_QT4_FRONTEND)
#include <QtCore>
#include <QtGUI>
#include <QtGui>
#endif

View File

@ -18,14 +18,31 @@ macro(add_gettext_python _par _dir)
list(APPEND _sources ${_s1})
endforeach(_arg)
SET(_dst "${CMAKE_CURRENT_BINARY_DIR}/${_par}_l10n.pot")
SET(_tmp_src_files "${CMAKE_CURRENT_BINARY_DIR}/${_par}_tmp_files")
SET(_src_files "${CMAKE_CURRENT_BINARY_DIR}/${_par}_files")
file(WRITE ${_tmp_src_files} "")
foreach(_s ${_sources})
FILE(APPEND ${_tmp_src_files} "${_s}\n")
endforeach()
if(${_par} MATCHES "^\(.*\)_[0-9]+$")
set(_par1 ${CMAKE_MATCH_1})
else()
set(_par1 ${_par})
endif()
ADD_CUSTOM_COMMAND(
OUTPUT ${_src_files}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${_tmp_src_files} ${_src_files}
DEPENDS ${_tmp_src_files}
)
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}
ARGS "${TOP_SRC_DIR}/po/lyx_pot.py" -b "${TOP_SRC_DIR}" -o "${_dst}" -t ${_par1} ${_sources}
DEPENDS ${_sources} ${_src_files}
)
SET_SOURCE_FILES_PROPERTIES("${_dst}" GENERATED)
SET_SOURCE_FILES_PROPERTIES("${_src_files}" GENERATED)
LIST(APPEND _py_sources "${_dst}")
endmacro(add_gettext_python)

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>
#
set(_lyx ${PACKAGE_BASE}${PROGRAM_SUFFIX})
@ -70,6 +70,8 @@ add_executable(${_lyx}
${vld_files}
)
lyx_add_gcc_pch(${_lyx})
target_link_libraries(${_lyx}
mathed
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) 2008, 2009 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008, 2009 Peter Kümmel, <syntheticpp@gmx.net>
# Copyright (c) 2008, 2009 Kornel Benko, <Kornel.Benko@berlin.de>
#

View File

@ -8,6 +8,10 @@ project(frontend_qt4)
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)
file(GLOB frontends_qt4_headers
${TOP_SRC_DIR}/src/frontends/qt4/${LYX_HPP_FILES})
file(GLOB frontend_qt4_UI
@ -23,12 +27,12 @@ file(GLOB_RECURSE frontend_qt4_images ${TOP_SRC_DIR}/lib/images/*.png)
set(resource_name ${CMAKE_CURRENT_BINARY_DIR}/Resources.qrc)
lyx_qt_resources_file(${resource_name} "${TOP_SRC_DIR}/lib/" frontend_qt4_images)
qt4_add_resources(resource_files ${resource_name})
add_definitions(-DQT_GENUINE_STR -DLYX_BUILD_QT4_FRONTEND)
include_directories(
${TOP_SRC_DIR}/src/frontends/qt4
include_directories(
${TOP_SRC_DIR}/src/frontends/qt4
${QT_INCLUDES}
${CMAKE_CURRENT_BINARY_DIR})
@ -39,7 +43,7 @@ if(MERGE_FILES)
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}
add_library(frontend_qt4 ${library_type}
${_allinone_files} ${frontends_qt4_headers} ${ui_files} ${resource_files})
else()
add_library(frontend_qt4 ${library_type}
@ -47,11 +51,13 @@ else()
endif()
target_link_libraries(frontend_qt4
target_link_libraries(frontend_qt4
frontends
${QT_QTCORE_LIBRARY}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY})
lyx_add_gcc_pch(frontend_qt4)
if(WIN32)
target_link_libraries(frontend_qt4 Gdi32)
endif()

View File

@ -21,5 +21,7 @@ else()
add_library(graphics ${library_type} ${_allinone_files})
endif()
lyx_add_gcc_pch(graphics)
project_source_group("${GROUP_CODE}" graphics_sources graphics_headers)

View File

@ -13,7 +13,7 @@ list(REMOVE_ITEM insets_sources ${TOP_SRC_DIR}/src/insets/InsetTheorem.cpp)
lyx_add_msvc_pch(insets)
include_directories(${TOP_SRC_DIR}/src/insets)
include_directories(${TOP_SRC_DIR}/src/insets ${QT_INCLUDES})
if(NOT MERGE_FILES)
@ -23,6 +23,7 @@ else()
add_library(insets ${library_type} ${_allinone_files})
endif()
lyx_add_gcc_pch(insets)
project_source_group("${GROUP_CODE}" insets_sources insets_headers)

View File

@ -24,5 +24,7 @@ else()
add_library(mathed ${library_type} ${_allinone_files})
endif()
lyx_add_gcc_pch(mathed)
project_source_group("${GROUP_CODE}" mathed_sources mathed_headers)

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>
#
project(support)
@ -54,18 +54,23 @@ if(NOT MERGE_FILES)
set(support_headers ${support_headers} ${support_minizip_headers} ${support_linkback_headers})
add_library(support ${library_type} ${support_sources} ${support_headers} ${dont_merge})
else()
# GCC bug: gcc resolves ::bind as boost::bind
set(support_separate ${TOP_SRC_DIR}/src/support/socktools.cpp ${TOP_SRC_DIR}/src/support/Messages.cpp)
list(REMOVE_ITEM support_sources ${support_separate})
lyx_const_touched_files(_allinone support_sources)
set(depends_moc ${support_headers})
set(depends_moc ${support_headers})
set_source_files_properties(_allinone_const.C
PROPERTIES OBJECT_DEPENDS "${depends_moc}")
set_source_files_properties(_allinone_touched.C
PROPERTIES OBJECT_DEPENDS "${depends_moc}")
add_library(support ${library_type} ${_allinone_files}
${support_minizip_sources} ${support_minizip_cpp_sources} ${support_linkback_sources} ${support_headers} ${dont_merge})
PROPERTIES OBJECT_DEPENDS "${depends_moc}")
add_library(support ${library_type} ${_allinone_files} ${support_separate}
${support_mythes_sources} ${support_linkback_sources} ${support_headers} ${dont_merge})
endif()
target_link_libraries(support boost_signals ${QT_QTCORE_LIBRARY} ${ZLIB_LIBRARY})
lyx_add_gcc_pch(support)
if(APPLE)
target_link_libraries(support "objc" "-framework Appkit" "-framework CoreFoundation")
elseif(WIN32)