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")
- add_definitions(-DLYX_PRECOMPILED_HEADERS)
+ configure_file(${CMAKE_SOURCE_DIR}/pcheaders.h ${CMAKE_BINARY_DIR}/pcheaders.h)
+ macro(lyx_add_msvc_pch name_)
+ configure_file(${CMAKE_SOURCE_DIR}/config.C.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.C)
+ SET_SOURCE_FILES_PROPERTIES(${${name_}_sources} PROPERTIES COMPILE_FLAGS /Yuconfig.h)
+ SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/config.C PROPERTIES COMPILE_FLAGS /Ycconfig.h)
+ add_definitions(/DLYX_PRECOMPILED_HEADERS)
+ set(${name_}_sources ${${name_}_sources} ${CMAKE_CURRENT_BINARY_DIR}/config.C ${CMAKE_BINARY_DIR}/pcheaders.h)
endmacro(lyx_add_msvc_pch)
-
- configure_file(config.C.cmake ${CMAKE_BINARY_DIR}/config.C)
- configure_file(pcheaders.h ${CMAKE_BINARY_DIR}/pcheaders.h)
- 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 -DLYX_PRECOMPILED_HEADERS")
-
- include_directories(${CMAKE_CURRENT_BINARY_DIR} ${TOP_SRC_DIR}/src/support ${ICONV_INCLUDE_DIR})
- add_library(pchlib STATIC ${CMAKE_BINARY_DIR}/config.C ${CMAKE_BINARY_DIR}/pcheaders.h)
-
- 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)
#endif
#ifdef LYX_PRECOMPILED_HEADERS
-#include "pcheaders.h"
+# include "pcheaders.h"
+# ifdef LYX_BUILD_QT4_FRONTEND
+# include <QtCore>
+# include <QtGUI>
+# endif
#endif
#endif
*/
-//#define LYX_DONT_PRECOMPILE_SRC
-
#include <boost/any.hpp>
#include <boost/array.hpp>
#include <boost/assert.hpp>
+#include <boost/bind.hpp>
#include <boost/crc.hpp>
#include <boost/cregex.hpp>
#include <boost/current_function.hpp>
+#include <boost/filesystem/operations.hpp>
#include <boost/function.hpp>
+#include <boost/iostreams/device/file.hpp>
+#include <boost/iostreams/filter/gzip.hpp>
+#include <boost/iostreams/filtering_streambuf.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/connection.hpp>
#include <boost/signals/trackable.hpp>
+#include <boost/tokenizer.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/utility.hpp>
#include <boost/version.hpp>
#if BOOST_VERSION < 103300
# 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 <cassert>
#include <clocale>
#include <csignal>
#include <cstddef>
#include <queue>
#include <set>
#include <sstream>
+#include <string>
#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
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-lyx_add_msvc_pch(lyx_sources)
+lyx_add_msvc_pch(lyx)
set(lyx_sources ${lyx_sources} ${CMAKE_CURRENT_BINARY_DIR}/version.C)
intl
${QT_QTMAIN_LIBRARY}
boost_iostreams
- ${pchlibname}
)
if(ASPELL_FOUND)
add_subdirectory(${qt_postfix})
-
file(GLOB frontends_sources ${TOP_SRC_DIR}/src/frontends/*.C)
file(GLOB frontends_headers ${TOP_SRC_DIR}/src/frontends/*.h)
-lyx_add_msvc_pch(frontends_sources)
+lyx_add_msvc_pch(frontends)
add_library(frontends STATIC ${frontends_sources} ${frontends_headers})
-add_dependencies(frontends ${pchlibname})
-
project_source_group("${GROUP_CODE}" frontends_sources frontends_headers)
file(GLOB controllers_sources ${TOP_SRC_DIR}/src/frontends/controllers/*.C)
file(GLOB controllers_headers ${TOP_SRC_DIR}/src/frontends/controllers/*.h)
-lyx_add_msvc_pch(controllers_sources)
+lyx_add_msvc_pch(controllers)
include_directories(${TOP_SRC_DIR}/src/frontends/controllers)
target_link_libraries(controllers boost_regex boost_filesystem)
-add_dependencies(controllers ${pchlibname})
-
project_source_group("${GROUP_CODE}" controllers_sources controllers_headers)
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)
-lyx_add_msvc_pch(frontends_qt4_sources)
+lyx_add_msvc_pch(frontends_qt4)
lyx_automoc(${frontends_qt4_sources})
-DQT_GENUINE_STR
-DQT_NO_STL
-DQT_NO_KEYWORDS
+ -DLYX_BUILD_QT4_FRONTEND
)
target_link_libraries(frontend_qt4 ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} controllers)
-add_dependencies(frontend_qt4 ${pchlibname})
-
if(WIN32)
target_link_libraries(frontend_qt4 Gdi32)
endif(WIN32)
file(GLOB graphics_sources ${TOP_SRC_DIR}/src/graphics/*.C)
file(GLOB graphics_headers ${TOP_SRC_DIR}/src/graphics/*.h)
-lyx_add_msvc_pch(graphics_sources)
+lyx_add_msvc_pch(graphics)
include_directories(${TOP_SRC_DIR}/src/graphics)
add_library(graphics STATIC ${graphics_sources} ${graphics_headers})
-add_dependencies(graphics ${pchlibname})
-
project_source_group("${GROUP_CODE}" graphics_sources graphics_headers)
list(REMOVE_ITEM insets_sources ${TOP_SRC_DIR}/src/insets/insettheorem.C)
-lyx_add_msvc_pch(insets_sources)
+lyx_add_msvc_pch(insets)
include_directories(${TOP_SRC_DIR}/src/insets)
add_library(insets STATIC ${insets_sources} ${insets_headers})
-add_dependencies(insets ${pchlibname})
-
project_source_group("${GROUP_CODE}" insets_sources insets_headers)
${TOP_SRC_DIR}/src/mathed/InsetMathMBox.C
${TOP_SRC_DIR}/src/mathed/InsetFormulaMacro.C)
-lyx_add_msvc_pch(mathed_sources)
+lyx_add_msvc_pch(mathed)
include_directories(${TOP_SRC_DIR}/src/mathed)
add_library(mathed STATIC ${mathed_sources} ${mathed_headers})
-add_dependencies(mathed ${pchlibname})
-
project_source_group("${GROUP_CODE}" mathed_sources mathed_headers)
${TOP_SRC_DIR}/src/support/atexit.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)
+
+lyx_add_msvc_pch(support)
include_directories(${TOP_SRC_DIR}/src/support ${ICONV_INCLUDE_DIR})
target_link_libraries(support boost_signals)
-add_dependencies(support ${pchlibname})
-
if(WIN32)
target_link_libraries(support shlwapi)
endif(WIN32)