add support of precompiled headers for msvc, enable with -Dpch=1, disable headers by defining LYX_DONT_PRECOMPILE_* macros in config.C.cmake

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15505 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2006-10-23 13:32:46 +00:00
parent 5c4c5d9b05
commit 2ceb5e2769
12 changed files with 507 additions and 12 deletions

View File

@ -88,14 +88,35 @@ if(MSVC)
SET(CMAKE_EXE_LINKER_FLAGS /MANIFEST) SET(CMAKE_EXE_LINKER_FLAGS /MANIFEST)
endif(MSVC_IDE) endif(MSVC_IDE)
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Zi -wd4996 -wd4800" CACHE STRING "runtime-library flags" FORCE) ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -wd4996 -wd4800" CACHE STRING "runtime-library flags" FORCE)
SET(CMAKE_C_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
SET(CMAKE_C_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
else(MSVC) else(MSVC)
add_definitions(-DBOOST_USER_CONFIG="<config.h>") add_definitions(-DBOOST_USER_CONFIG="<config.h>")
endif(MSVC) endif(MSVC)
if(pch AND MSVC)
set(pch TRUE CACHE TYPE STRING)
macro(lyx_add_msvc_pch _sources)
SET_SOURCE_FILES_PROPERTIES(${${_sources}} PROPERTIES COMPILE_FLAGS
"/Yuconfig.h /Fp${CMAKE_BINARY_DIR}/config.pch /Fd${CMAKE_BINARY_DIR}/pchlib.pdb")
endmacro(lyx_add_msvc_pch)
configure_file(config.C.cmake ${CMAKE_BINARY_DIR}/config.C)
SET_SOURCE_FILES_PROPERTIES(${CMAKE_BINARY_DIR}/config.C PROPERTIES COMPILE_FLAGS
"/Ycconfig.h /Fp${CMAKE_BINARY_DIR}/config.pch /Fd${CMAKE_BINARY_DIR}/pchlib.pdb")
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${TOP_SRC_DIR}/src/support ${ICONV_INCLUDE_DIR})
add_library(pchlib STATIC ${CMAKE_BINARY_DIR}/config.C)
set(pchlibname pchlib )
set(PRECOMPILED_HEADERS TRUE)
else(pch AND MSVC)
macro(lyx_add_msvc_pch)
endmacro(lyx_add_msvc_pch)
set(pchlibname boost_signals) # dummy
endif(pch AND MSVC)
#TODO: insource is not the best place #TODO: insource is not the best place
configure_file(${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx_version.py.in configure_file(${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx_version.py.in

444
development/cmake/config.C.cmake Executable file
View File

@ -0,0 +1,444 @@
/*
* \file config.C
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* This is the compilation configuration file for LyX.
* It was generated by autoconfs configure.
* You might want to change some of the defaults if something goes wrong
* during the compilation.
*/
#include <config.h>
//#define LYX_DONT_PRECOMPILE_SRC
//#define LYX_DONT_PRECOMPILE_SUPPORT
//#define LYX_DONT_PRECOMPILE_INSETS
//#define LYX_DONT_PRECOMPILE_MATHED
//#define LYX_DONT_PRECOMPILE_FRONTENDS
//#define LYX_DONT_PRECOMPILE_CONTROLLERS
#include <boost/any.hpp>
#include <boost/array.hpp>
#include <boost/assert.hpp>
#include <boost/crc.hpp>
#include <boost/cregex.hpp>
#include <boost/current_function.hpp>
#include <boost/function.hpp>
#include <boost/iterator/indirect_iterator.hpp>
#include <boost/optional.hpp>
#include <boost/regex.hpp>
#include <boost/scoped_array.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/signals/connection.hpp>
#include <boost/signal.hpp>
#include <boost/signals/trackable.hpp>
#include <boost/version.hpp>
#if BOOST_VERSION < 103300
# include <boost/test/detail/nullstream.hpp>
#else
# include <boost/test/utils/nullstream.hpp>
#endif
#include <boost/tokenizer.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/utility.hpp>
#include <algorithm>
#include <cerrno>
#include <clocale>
#include <csignal>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#ifndef LYX_DONT_PRECOMPILE_SRC
#include <vspace.h>
#include <version.h>
#include <vc-backend.h>
#include <undo.h>
#include <trans_mgr.h>
#include <trans_decl.h>
#include <trans.h>
#include <toc.h>
#include <texrow.h>
#include <tex-strings.h>
#include <tex-accent.h>
#include <tabular.h>
#include <sgml.h>
#include <session.h>
#include <rowpainter.h>
#include <pspell.h>
#include <pariterator.h>
#include <paragraph_pimpl.h>
#include <paragraph_funcs.h>
#include <paragraph.h>
#include <paper.h>
#include <outputparams.h>
#include <output_plaintext.h>
#include <output_latex.h>
#include <output_docbook.h>
#include <output.h>
#include <mover.h>
#include <metricsinfo.h>
#include <messages.h>
#include <lyxvc.h>
#include <lyxtextclasslist.h>
#include <lyxtextclass.h>
#include <lyxtext.h>
#include <lyxsocket.h>
#include <lyxserver.h>
#include <lyxrow.h>
#include <lyxrc.h>
#include <lyxlex_pimpl.h>
#include <lyxlex.h>
#include <lyxlength.h>
#include <lyxlayout_ptr_fwd.h>
#include <lyxlayout.h>
#include <lyxgluelength.h>
#include <lyxfunc.h>
#include <lyxfont.h>
#include <lyxfind.h>
#include <lyx_sty.h>
#include <lyx_main.h>
#include <lyx_cb.h>
#include <lfuns.h>
#include <lengthcommon.h>
#include <layout.h>
#include <language.h>
#include <kbsequence.h>
#include <kbmap.h>
#include <ispell.h>
#include <intl.h>
#include <insetiterator.h>
#include <importer.h>
#include <graph.h>
#include <gettext.h>
#include <funcrequest.h>
#include <format.h>
#include <factory.h>
#include <exporter.h>
#include <errorlist.h>
#include <encoding.h>
#include <dociterator.h>
#include <dispatchresult.h>
#include <dimension.h>
#include <debug.h>
#include <cursor_slice.h>
#include <cursor.h>
#include <counters.h>
#include <coordcache.h>
#include <converter.h>
#include <chset.h>
#include <changes.h>
#include <bufferview_funcs.h>
#include <bufferparams.h>
#include <bufferlist.h>
#include <buffer_funcs.h>
#include <buffer.h>
#include <box.h>
#include <author.h>
#include <aspell_local.h>
#include <WordLangTuple.h>
#include <Variables.h>
#include <ToolbarBackend.h>
#include <TocBackend.h>
#include <Thesaurus.h>
#include <SpellBase.h>
#include <Spacing.h>
#include <Sectioning.h>
#include <RowList_fwd.h>
#include <PrinterParams.h>
#include <ParagraphParameters.h>
#include <ParagraphList_fwd.h>
#include <ParagraphList.h>
#include <MenuBackend.h>
#include <LyXAction.h>
#include <LaTeXFeatures.h>
#include <LaTeX.h>
#include <LColor.h>
#include <InsetList.h>
#include <FuncStatus.h>
#include <FontIterator.h>
#include <Floating.h>
#include <FloatList.h>
#include <DepTable.h>
#include <CutAndPaste.h>
#include <Color.h>
#include <Chktex.h>
#include <Bullet.h>
#include <BufferView.h>
#include <BranchList.h>
#include <Bidi.h>
#endif
#ifndef LYX_DONT_PRECOMPILE_SUPPORT
#include <support/FileMonitor.h>
#include <support/RandomAccessList.h>
#include <support/convert.h>
#include <support/copied_ptr.h>
#include <support/cow_ptr.h>
#include <support/debugstream.h>
#include <support/docstream.h>
#include <support/docstring.h>
#include <support/environment.h>
#include <support/filefilterlist.h>
#include <support/filename.h>
#include <support/filetools.h>
#include <support/fontutils.h>
#include <support/forkedcall.h>
#include <support/forkedcallqueue.h>
#include <support/forkedcontr.h>
#include <support/fs_extras.h>
#include <support/limited_stack.h>
#include <support/lstrings.h>
#include <support/lyxalgo.h>
#include <support/lyxlib.h>
#include <support/lyxmanip.h>
#include <support/lyxtime.h>
#include <support/os.h>
#include <support/os_win32.h>
#include <support/package.h>
#include <support/path.h>
#include <support/socktools.h>
#include <support/std_istream.h>
#include <support/std_ostream.h>
#include <support/systemcall.h>
#include <support/textutils.h>
#include <support/translator.h>
#include <support/types.h>
#include <support/unicode.h>
#include <support/userinfo.h>
#endif
#ifndef LYX_DONT_PRECOMPILE_INSETS
#include <insets/ExternalSupport.h>
#include <insets/ExternalTemplate.h>
#include <insets/ExternalTransforms.h>
#include <insets/inset.h>
#include <insets/insetbase.h>
#include <insets/insetbibitem.h>
#include <insets/insetbibtex.h>
#include <insets/insetbox.h>
#include <insets/insetbranch.h>
#include <insets/insetcaption.h>
#include <insets/insetcharstyle.h>
#include <insets/insetcite.h>
#include <insets/insetcollapsable.h>
#include <insets/insetcommand.h>
#include <insets/insetcommandparams.h>
#include <insets/insetenv.h>
#include <insets/insetert.h>
#include <insets/insetexternal.h>
#include <insets/insetfloat.h>
#include <insets/insetfloatlist.h>
#include <insets/insetfoot.h>
#include <insets/insetfootlike.h>
#include <insets/insetgraphics.h>
#include <insets/insetgraphicsParams.h>
#include <insets/insethfill.h>
#include <insets/insetinclude.h>
#include <insets/insetindex.h>
#include <insets/insetlabel.h>
#include <insets/insetlatexaccent.h>
#include <insets/insetline.h>
#include <insets/insetmarginal.h>
#include <insets/insetnewline.h>
#include <insets/insetnote.h>
#include <insets/insetoptarg.h>
#include <insets/insetpagebreak.h>
#include <insets/insetquotes.h>
#include <insets/insetref.h>
#include <insets/insetspace.h>
#include <insets/insetspecialchar.h>
#include <insets/insettabular.h>
#include <insets/insettext.h>
#include <insets/insettoc.h>
#include <insets/inseturl.h>
#include <insets/insetvspace.h>
#include <insets/insetwrap.h>
#include <insets/mailinset.h>
#include <insets/render_base.h>
#include <insets/render_button.h>
#include <insets/render_graphic.h>
#include <insets/render_preview.h>
#endif
#ifndef LYX_DONT_PRECOMPILE_MATHED
#include <mathed/InsetFormulaMacro.h>
#include <mathed/InsetMath.h>
#include <mathed/InsetMathAMSArray.h>
#include <mathed/InsetMathArray.h>
#include <mathed/InsetMathBig.h>
#include <mathed/InsetMathBinom.h>
#include <mathed/InsetMathBoldSymbol.h>
#include <mathed/InsetMathBox.h>
#include <mathed/InsetMathBoxed.h>
#include <mathed/InsetMathBrace.h>
#include <mathed/InsetMathCases.h>
#include <mathed/InsetMathChar.h>
#include <mathed/InsetMathColor.h>
#include <mathed/InsetMathCommand.h>
#include <mathed/InsetMathComment.h>
#include <mathed/InsetMathDFrac.h>
#include <mathed/InsetMathDecoration.h>
#include <mathed/InsetMathDelim.h>
#include <mathed/InsetMathDiff.h>
#include <mathed/InsetMathDim.h>
#include <mathed/InsetMathDots.h>
#include <mathed/InsetMathEnv.h>
#include <mathed/InsetMathExFunc.h>
#include <mathed/InsetMathExInt.h>
#include <mathed/InsetMathFBox.h>
#include <mathed/InsetMathFont.h>
#include <mathed/InsetMathFontOld.h>
#include <mathed/InsetMathFrac.h>
#include <mathed/InsetMathFracBase.h>
#include <mathed/InsetMathFrameBox.h>
#include <mathed/InsetMathGrid.h>
#include <mathed/InsetMathHull.h>
#include <mathed/InsetMathKern.h>
#include <mathed/InsetMathLefteqn.h>
#include <mathed/InsetMathLim.h>
#include <mathed/InsetMathMBox.h>
#include <mathed/InsetMathMacro.h>
#include <mathed/InsetMathMakebox.h>
#include <mathed/InsetMathMatrix.h>
#include <mathed/InsetMathNest.h>
#include <mathed/InsetMathNumber.h>
#include <mathed/InsetMathOverset.h>
#include <mathed/InsetMathPar.h>
#include <mathed/InsetMathPhantom.h>
#include <mathed/InsetMathRef.h>
#include <mathed/InsetMathRoot.h>
#include <mathed/InsetMathScript.h>
#include <mathed/InsetMathSize.h>
#include <mathed/InsetMathSpace.h>
#include <mathed/InsetMathSplit.h>
#include <mathed/InsetMathSqrt.h>
#include <mathed/InsetMathStackrel.h>
#include <mathed/InsetMathString.h>
#include <mathed/InsetMathSubstack.h>
#include <mathed/InsetMathSymbol.h>
#include <mathed/InsetMathTFrac.h>
#include <mathed/InsetMathTabular.h>
#include <mathed/InsetMathUnderset.h>
#include <mathed/InsetMathUnknown.h>
#include <mathed/InsetMathXArrow.h>
#include <mathed/InsetMathXYArrow.h>
#include <mathed/InsetMathXYMatrix.h>
#include <mathed/MathAtom.h>
#include <mathed/MathAutoCorrect.h>
#include <mathed/MathData.h>
#include <mathed/MathExtern.h>
#include <mathed/MathFactory.h>
#include <mathed/MathGridInfo.h>
#include <mathed/MathMLStream.h>
#include <mathed/MathMacroArgument.h>
#include <mathed/MathMacroTable.h>
#include <mathed/MathMacroTemplate.h>
#include <mathed/MathParser.h>
#include <mathed/MathReplace.h>
#include <mathed/MathStream.h>
#include <mathed/MathSupport.h>
#include <mathed/TextPainter.h>
#endif
#ifndef LYX_DONT_PRECOMPILE_FRONTENDS
#include <frontends/Alert.h>
#include <frontends/Alert_pimpl.h>
#include <frontends/Application.h>
#include <frontends/Clipboard.h>
#include <frontends/Dialogs.h>
#include <frontends/FileDialog.h>
#include <frontends/FontLoader.h>
#include <frontends/FontMetrics.h>
#include <frontends/Gui.h>
#include <frontends/LyXKeySym.h>
#include <frontends/LyXKeySymFactory.h>
#include <frontends/LyXView.h>
#include <frontends/Menubar.h>
#include <frontends/NoGuiFontLoader.h>
#include <frontends/NoGuiFontMetrics.h>
#include <frontends/Painter.h>
#include <frontends/Selection.h>
#include <frontends/Timeout.h>
#include <frontends/Toolbars.h>
#include <frontends/WorkArea.h>
#include <frontends/guiapi.h>
#include <frontends/key_state.h>
#include <frontends/mouse_state.h>
#include <frontends/nullpainter.h>
#endif
#ifndef LYX_DONT_PRECOMPILE_CONTROLLERS
#include <frontends/controllers/BCView.h>
#include <frontends/controllers/ButtonController.h>
#include <frontends/controllers/ButtonPolicies.h>
#include <frontends/controllers/ControlAboutlyx.h>
#include <frontends/controllers/ControlBibtex.h>
#include <frontends/controllers/ControlBox.h>
#include <frontends/controllers/ControlBranch.h>
#include <frontends/controllers/ControlChanges.h>
//#include <frontends/controllers/ControlCharacter.h>
#include <frontends/controllers/ControlCitation.h>
#include <frontends/controllers/ControlCommand.h>
#include <frontends/controllers/ControlCommandBuffer.h>
#include <frontends/controllers/ControlDocument.h>
#include <frontends/controllers/ControlERT.h>
#include <frontends/controllers/ControlErrorList.h>
#include <frontends/controllers/ControlExternal.h>
#include <frontends/controllers/ControlFloat.h>
#include <frontends/controllers/ControlGraphics.h>
#include <frontends/controllers/ControlInclude.h>
#include <frontends/controllers/ControlLog.h>
#include <frontends/controllers/ControlMath.h>
#include <frontends/controllers/ControlNote.h>
#include <frontends/controllers/ControlParagraph.h>
#include <frontends/controllers/ControlPrefs.h>
#include <frontends/controllers/ControlPrint.h>
#include <frontends/controllers/ControlRef.h>
#include <frontends/controllers/ControlSearch.h>
#include <frontends/controllers/ControlSendto.h>
#include <frontends/controllers/ControlShowFile.h>
#include <frontends/controllers/ControlSpellchecker.h>
#include <frontends/controllers/ControlTabular.h>
#include <frontends/controllers/ControlTabularCreate.h>
#include <frontends/controllers/ControlTexinfo.h>
#include <frontends/controllers/ControlThesaurus.h>
#include <frontends/controllers/ControlToc.h>
#include <frontends/controllers/ControlVSpace.h>
#include <frontends/controllers/ControlViewSource.h>
#include <frontends/controllers/ControlWrap.h>
#include <frontends/controllers/Dialog.h>
#include <frontends/controllers/Kernel.h>
#include <frontends/controllers/biblio.h>
//#include <frontends/controllers/character.h>
#include <frontends/controllers/frnt_lang.h>
#include <frontends/controllers/helper_funcs.h>
#include <frontends/controllers/pch.h>
#include <frontends/controllers/tex_helpers.h>
#endif

View File

@ -163,4 +163,9 @@
#define uintmax_t UINT_MAX #define uintmax_t UINT_MAX
#endif #endif
#ifdef _MSC_VER
#pragma warning( disable : 4800 ) //: forcing value to bool 'true' or 'false' (performance warning)
#endif
#endif #endif

View File

@ -124,4 +124,3 @@ MACRO (LYX_AUTOMOC)
endif (EXISTS ${_abs_FILE} AND NOT _skip) endif (EXISTS ${_abs_FILE} AND NOT _skip)
endforeach (_current_FILE) endforeach (_current_FILE)
endmacro (LYX_AUTOMOC) endmacro (LYX_AUTOMOC)

View File

@ -28,20 +28,20 @@ list(REMOVE_ITEM lyx_sources
${TOP_SRC_DIR}/src/Variables.C ${TOP_SRC_DIR}/src/Variables.C
${TOP_SRC_DIR}/src/Sectioning.C) ${TOP_SRC_DIR}/src/Sectioning.C)
set( lyx_sources ${lyx_sources} ${CMAKE_CURRENT_BINARY_DIR}/version.C )
if(ASPELL_FOUND) if(ASPELL_FOUND)
include_directories(${ASPELL_INCLUDE_DIR}) include_directories(${ASPELL_INCLUDE_DIR})
set(lyx_sources ${lyx_sources} ${TOP_SRC_DIR}/src/aspell.C) set(lyx_sources ${lyx_sources} ${TOP_SRC_DIR}/src/aspell.C)
endif(ASPELL_FOUND) endif(ASPELL_FOUND)
include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR})
lyx_add_msvc_pch(lyx_sources)
set(lyx_sources ${lyx_sources} ${CMAKE_CURRENT_BINARY_DIR}/version.C)
add_executable(lyx-${qt_postfix} add_executable(lyx-${qt_postfix}
${lyx_sources} ${lyx_sources}
${lyx_headers} ${lyx_headers}
${CMAKE_CURRENT_BINARY_DIR}/version.C
) )
target_link_libraries(lyx-${qt_postfix} target_link_libraries(lyx-${qt_postfix}
@ -54,9 +54,9 @@ target_link_libraries(lyx-${qt_postfix}
intl intl
${QT_QTMAIN_LIBRARY} ${QT_QTMAIN_LIBRARY}
boost_iostreams boost_iostreams
${pchlibname}
) )
if(ASPELL_FOUND) if(ASPELL_FOUND)
target_link_libraries(lyx-${qt_postfix} ${ASPELL_LIBRARY}) target_link_libraries(lyx-${qt_postfix} ${ASPELL_LIBRARY})
endif(ASPELL_FOUND) endif(ASPELL_FOUND)

View File

@ -16,7 +16,11 @@ add_subdirectory(${qt_postfix})
file(GLOB frontends_sources ${TOP_SRC_DIR}/src/frontends/*.C) file(GLOB frontends_sources ${TOP_SRC_DIR}/src/frontends/*.C)
file(GLOB frontends_headers ${TOP_SRC_DIR}/src/frontends/*.h) file(GLOB frontends_headers ${TOP_SRC_DIR}/src/frontends/*.h)
lyx_add_msvc_pch(frontends_sources)
add_library(frontends STATIC ${frontends_sources} ${frontends_headers}) add_library(frontends STATIC ${frontends_sources} ${frontends_headers})
add_dependencies(frontends ${pchlibname})
project_source_group("${GROUP_CODE}" frontends_sources frontends_headers) project_source_group("${GROUP_CODE}" frontends_sources frontends_headers)

View File

@ -9,11 +9,15 @@ project(controllers)
file(GLOB controllers_sources ${TOP_SRC_DIR}/src/frontends/controllers/*.C) file(GLOB controllers_sources ${TOP_SRC_DIR}/src/frontends/controllers/*.C)
file(GLOB controllers_headers ${TOP_SRC_DIR}/src/frontends/controllers/*.h) file(GLOB controllers_headers ${TOP_SRC_DIR}/src/frontends/controllers/*.h)
lyx_add_msvc_pch(controllers_sources)
include_directories(${TOP_SRC_DIR}/src/frontends/controllers) include_directories(${TOP_SRC_DIR}/src/frontends/controllers)
add_library(controllers STATIC ${controllers_sources} ${controllers_headers}) add_library(controllers STATIC ${controllers_sources} ${controllers_headers})
target_link_libraries(controllers boost_regex boost_filesystem) target_link_libraries(controllers boost_regex boost_filesystem)
add_dependencies(controllers ${pchlibname})
project_source_group("${GROUP_CODE}" controllers_sources controllers_headers) project_source_group("${GROUP_CODE}" controllers_sources controllers_headers)

View File

@ -11,6 +11,7 @@ file(GLOB frontends_qt4_sources ${TOP_SRC_DIR}/src/frontends/qt4/*.C)
file(GLOB frontends_qt4_headers ${TOP_SRC_DIR}/src/frontends/qt4/*.h) file(GLOB frontends_qt4_headers ${TOP_SRC_DIR}/src/frontends/qt4/*.h)
file(GLOB frontend_qt4_UI ${TOP_SRC_DIR}/src/frontends/qt4/ui/*.ui) file(GLOB frontend_qt4_UI ${TOP_SRC_DIR}/src/frontends/qt4/ui/*.ui)
lyx_add_msvc_pch(frontends_qt4_sources)
lyx_automoc(${frontends_qt4_sources}) lyx_automoc(${frontends_qt4_sources})
@ -23,6 +24,7 @@ add_definitions(
-DQT_NO_KEYWORDS -DQT_NO_KEYWORDS
) )
include_directories( ${TOP_SRC_DIR}/src/frontends/qt4 include_directories( ${TOP_SRC_DIR}/src/frontends/qt4
${TOP_SRC_DIR}/src/frontends/controllers ${TOP_SRC_DIR}/src/frontends/controllers
${CMAKE_CURRENT_BINARY_DIR}) ${CMAKE_CURRENT_BINARY_DIR})
@ -31,6 +33,8 @@ add_library(frontend_qt4 STATIC ${frontends_qt4_sources} ${frontends_qt4_headers
target_link_libraries(frontend_qt4 ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} controllers) target_link_libraries(frontend_qt4 ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} controllers)
add_dependencies(frontend_qt4 ${pchlibname})
if(WIN32) if(WIN32)
target_link_libraries(frontend_qt4 Gdi32) target_link_libraries(frontend_qt4 Gdi32)
endif(WIN32) endif(WIN32)

View File

@ -9,9 +9,13 @@ project(graphics)
file(GLOB graphics_sources ${TOP_SRC_DIR}/src/graphics/*.C) file(GLOB graphics_sources ${TOP_SRC_DIR}/src/graphics/*.C)
file(GLOB graphics_headers ${TOP_SRC_DIR}/src/graphics/*.h) file(GLOB graphics_headers ${TOP_SRC_DIR}/src/graphics/*.h)
lyx_add_msvc_pch(graphics_sources)
include_directories(${TOP_SRC_DIR}/src/graphics) include_directories(${TOP_SRC_DIR}/src/graphics)
add_library(graphics STATIC ${graphics_sources} ${graphics_headers}) add_library(graphics STATIC ${graphics_sources} ${graphics_headers})
add_dependencies(graphics ${pchlibname})
project_source_group("${GROUP_CODE}" graphics_sources graphics_headers) project_source_group("${GROUP_CODE}" graphics_sources graphics_headers)

View File

@ -11,9 +11,13 @@ file(GLOB insets_headers ${TOP_SRC_DIR}/src/insets/*.h)
list(REMOVE_ITEM insets_sources ${TOP_SRC_DIR}/src/insets/insettheorem.C) list(REMOVE_ITEM insets_sources ${TOP_SRC_DIR}/src/insets/insettheorem.C)
lyx_add_msvc_pch(insets_sources)
include_directories(${TOP_SRC_DIR}/src/insets) include_directories(${TOP_SRC_DIR}/src/insets)
add_library(insets STATIC ${insets_sources} ${insets_headers}) add_library(insets STATIC ${insets_sources} ${insets_headers})
add_dependencies(insets ${pchlibname})
project_source_group("${GROUP_CODE}" insets_sources insets_headers) project_source_group("${GROUP_CODE}" insets_sources insets_headers)

View File

@ -14,9 +14,13 @@ list(REMOVE_ITEM mathed_sources
${TOP_SRC_DIR}/src/mathed/InsetMathMBox.C ${TOP_SRC_DIR}/src/mathed/InsetMathMBox.C
${TOP_SRC_DIR}/src/mathed/InsetFormulaMacro.C) ${TOP_SRC_DIR}/src/mathed/InsetFormulaMacro.C)
lyx_add_msvc_pch(mathed_sources)
include_directories(${TOP_SRC_DIR}/src/mathed) include_directories(${TOP_SRC_DIR}/src/mathed)
add_library(mathed STATIC ${mathed_sources} ${mathed_headers}) add_library(mathed STATIC ${mathed_sources} ${mathed_headers})
add_dependencies(mathed ${pchlibname})
project_source_group("${GROUP_CODE}" mathed_sources mathed_headers) project_source_group("${GROUP_CODE}" mathed_sources mathed_headers)

View File

@ -20,16 +20,18 @@ list(REMOVE_ITEM support_sources
${TOP_SRC_DIR}/src/support/atexit.c ${TOP_SRC_DIR}/src/support/atexit.c
${TOP_SRC_DIR}/src/support/strerror.c) ${TOP_SRC_DIR}/src/support/strerror.c)
lyx_add_msvc_pch(support_sources)
set(support_sources ${support_sources} ${CMAKE_CURRENT_BINARY_DIR}/package.C) set(support_sources ${support_sources} ${CMAKE_CURRENT_BINARY_DIR}/package.C)
include_directories(${TOP_SRC_DIR}/src/support ${ICONV_INCLUDE_DIR}) include_directories(${TOP_SRC_DIR}/src/support ${ICONV_INCLUDE_DIR})
add_library(support STATIC ${support_sources} ${support_headers}) add_library(support STATIC ${support_sources} ${support_headers})
target_link_libraries(support boost_signals) target_link_libraries(support boost_signals)
add_dependencies(support ${pchlibname})
if(WIN32) if(WIN32)
target_link_libraries(support shlwapi) target_link_libraries(support shlwapi)
endif(WIN32) endif(WIN32)