]> git.lyx.org Git - features.git/blob - development/cmake/src/tex2lyx/CMakeLists.txt
cmake build system:
[features.git] / development / cmake / 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, Peter Kümmel, <syntheticpp@gmx.net>
5 #
6
7 project(tex2lyx)
8
9
10
11 set(LINKED_FILES
12         ${TOP_SRC_DIR}/src/FloatList.C
13         ${TOP_SRC_DIR}/src/Floating.C
14         ${TOP_SRC_DIR}/src/counters.C
15         ${TOP_SRC_DIR}/src/lyxlayout.C
16         ${TOP_SRC_DIR}/src/lyxtextclass.C
17         ${TOP_SRC_DIR}/src/lyxlex.C
18         ${TOP_SRC_DIR}/src/lyxlex_pimpl.C
19 )
20
21 set(tex2lyx_sources
22         ${TOP_SRC_DIR}/src/tex2lyx/boost.C
23         ${TOP_SRC_DIR}/src/tex2lyx/context.C
24         ${TOP_SRC_DIR}/src/tex2lyx/gettext.C
25         ${TOP_SRC_DIR}/src/tex2lyx/lengthcommon.C
26         ${TOP_SRC_DIR}/src/tex2lyx/lyxfont.C
27         ${TOP_SRC_DIR}/src/tex2lyx/texparser.C
28         ${TOP_SRC_DIR}/src/tex2lyx/tex2lyx.C
29         ${TOP_SRC_DIR}/src/tex2lyx/preamble.C
30         ${TOP_SRC_DIR}/src/tex2lyx/math.C
31         ${TOP_SRC_DIR}/src/tex2lyx/table.C
32         ${TOP_SRC_DIR}/src/tex2lyx/text.C
33 )
34
35 set(tex2lyx_headers
36         ${TOP_SRC_DIR}/src/lyxlayout.h
37         ${TOP_SRC_DIR}/src/lyxtextclass.h
38         ${TOP_SRC_DIR}/src/tex2lyx/Spacing.h
39         ${TOP_SRC_DIR}/src/tex2lyx/context.h
40         ${TOP_SRC_DIR}/src/tex2lyx/lyxfont.h
41         ${TOP_SRC_DIR}/src/tex2lyx/texparser.h
42         ${TOP_SRC_DIR}/src/tex2lyx/tex2lyx.h
43 )
44
45 include_directories(BEFORE ${TOP_SRC_DIR}/src/tex2lyx)
46
47 if(MSVC)
48         SET_SOURCE_FILES_PROPERTIES(${TOP_SRC_DIR}/src/lyxlayout.C ${TOP_SRC_DIR}/src/lyxtextclass.C
49                 PROPERTIES COMPILE_FLAGS 
50                 "/FI${TOP_SRC_DIR}/src/tex2lyx/lyxfont.h /FI${TOP_SRC_DIR}/src/tex2lyx/Spacing.h")
51 else(MSVC)
52         SET_SOURCE_FILES_PROPERTIES(${TOP_SRC_DIR}/src/lyxlayout.C ${TOP_SRC_DIR}/src/lyxtextclass.C
53                 PROPERTIES COMPILE_FLAGS 
54                 "-include ${TOP_SRC_DIR}/src/tex2lyx/lyxfont.h -include ${TOP_SRC_DIR}/src/tex2lyx/Spacing.h")
55 endif(MSVC)
56
57
58 if(NOT MERGE_FILES)
59         add_executable(tex2lyx ${tex2lyx_sources} ${LINKED_FILES} ${tex2lyx_headers})
60 else(NOT MERGE_FILES)
61         set(tex2lyx_sources_all ${tex2lyx_sources} ${LINKED_FILES})
62         lyx_merge_files(${CMAKE_CURRENT_BINARY_DIR}/tex2lyx_allinone.C tex2lyx_sources_all)
63         add_executable(tex2lyx ${CMAKE_CURRENT_BINARY_DIR}/tex2lyx_allinone.C)
64 endif(NOT MERGE_FILES)
65
66
67 target_link_libraries(tex2lyx  
68         support
69         boost_iostreams
70         boost_filesystem
71         boost_regex
72         ${QT_QTCORE_LIBRARY} 
73         intl
74         )
75         
76 if(WIN32)
77         target_link_libraries(tex2lyx shlwapi)
78 endif(WIN32)
79
80 if(APPLE)
81         target_link_libraries(tex2lyx "-framework Carbon")
82 endif(APPLE)
83
84 project_source_group("${GROUP_CODE}" tex2lyx_sources tex2lyx_headers)
85