]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/CMakeLists.txt
Rename eolString() to eol() and pass a MathTeXStream parameter
[lyx.git] / src / tex2lyx / CMakeLists.txt
1 # This file is part of LyX, the document processor.
2 # Licence details can be found in the file COPYING.
3 #
4 # Copyright (c) 2006-2011 Peter Kümmel, <syntheticpp@gmx.net>
5 # Copyright (c) 2008-2011 Kornel Benko, <Kornel.Benko@berlin.de>
6 #
7
8 project(${_tex2lyx})
9
10 set(LINKED_sources)
11 set(LINKED_headers)
12
13 foreach(_src graphics/GraphicsParams insets/ExternalTemplate
14         insets/ExternalTransforms insets/InsetLayout Author CiteEnginesList Color Counters
15         Encoding FloatList Floating FontInfo LaTeXPackages Layout
16         LayoutFile LayoutModuleList Lexer ModuleList TextClass
17         Spacing version)
18         list(APPEND LINKED_sources ${TOP_SRC_DIR}/src/${_src}.cpp)
19         list(APPEND LINKED_headers ${TOP_SRC_DIR}/src/${_src}.h)
20 endforeach(_src)
21
22 file(GLOB tex2lyx_sources ${TOP_SRC_DIR}/src/tex2lyx/${LYX_CPP_FILES})
23
24 file(GLOB tex2lyx_headers ${TOP_SRC_DIR}/src/tex2lyx/${LYX_HPP_FILES})
25
26 include_directories((BEFORE
27         ${TOP_SRC_DIR}/src/tex2lyx)
28         ${ZLIB_INCLUDE_DIR})
29
30 if(WIN32 AND NOT MINGW)
31         set(FILE_RC ${TOP_SRC_DIR}/src/lyxwinres.rc)
32         message(STATUS "Using icon defined in resource file: ${FILE_RC}")
33 endif()
34
35 if(NOT LYX_MERGE_FILES)
36         add_executable(${_tex2lyx} ${tex2lyx_sources} ${LINKED_sources} ${tex2lyx_headers} ${LINKED_headers}    ${FILE_RC})
37 else()
38         lyx_const_touched_files(_allinone  tex2lyx_sources)
39         lyx_const_touched_files(_allinone_linked  LINKED_sources)
40         add_executable(${_tex2lyx} ${_allinone_files} ${_allinone_linked_files} ${FILE_RC})
41 endif()
42 set_target_properties(${_tex2lyx} PROPERTIES
43         FOLDER "applications/TeX2LyX"
44   QT_NO_UNICODE_DEFINES TRUE
45         INTERPROCEDURAL_OPTIMIZATION ${LYX_IPO_SUPPORTED})
46
47 target_link_libraries(${_tex2lyx}
48         support
49         ${Lyx_Boost_Libraries}
50         ${QT_QTCORE_LIBRARY}
51         ${QT_QTGUI_LIBRARY}
52         ${ICONV_LIBRARY})
53
54 qt_use_modules(${_tex2lyx} ${QtCore5CompatModule})
55 lyx_target_link_libraries(${_tex2lyx} Magic)
56
57 add_dependencies(${_tex2lyx} lyx_version)
58
59 if(WIN32)
60         target_link_libraries(${_tex2lyx} shlwapi ole32 psapi)
61 endif()
62
63 if(CYGWIN)
64         target_link_libraries(${_tex2lyx} shlwapi ole32)
65 endif()
66
67 if(APPLE)
68         target_link_libraries(${_tex2lyx} "-framework AppKit")
69 endif()
70
71
72 project_source_group("${GROUP_CODE}" tex2lyx_sources tex2lyx_headers)
73
74 add_subdirectory(test)
75
76 install(TARGETS ${_tex2lyx} DESTINATION ${LYX_UTILITIES_INSTALL_PATH})
77