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