]> git.lyx.org Git - features.git/blob - development/cmake/src/tex2lyx/CMakeLists.txt
cmake: tex2lyx fix, don't include regular font.h code -> define the include guard...
[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.cpp
13         ${TOP_SRC_DIR}/src/Floating.cpp
14         ${TOP_SRC_DIR}/src/Counters.cpp
15         ${TOP_SRC_DIR}/src/Layout.cpp
16         ${TOP_SRC_DIR}/src/TextClass.cpp
17         ${TOP_SRC_DIR}/src/Lexer.cpp
18 )
19
20 set(tex2lyx_sources
21         ${TOP_SRC_DIR}/src/tex2lyx/boost.cpp
22         ${TOP_SRC_DIR}/src/tex2lyx/Context.cpp
23         ${TOP_SRC_DIR}/src/tex2lyx/gettext.cpp
24         ${TOP_SRC_DIR}/src/tex2lyx/lengthcommon.cpp
25         ${TOP_SRC_DIR}/src/tex2lyx/Font.cpp
26         ${TOP_SRC_DIR}/src/tex2lyx/Parser.cpp
27         ${TOP_SRC_DIR}/src/tex2lyx/tex2lyx.cpp
28         ${TOP_SRC_DIR}/src/tex2lyx/preamble.cpp
29         ${TOP_SRC_DIR}/src/tex2lyx/math.cpp
30         ${TOP_SRC_DIR}/src/tex2lyx/table.cpp
31         ${TOP_SRC_DIR}/src/tex2lyx/text.cpp
32 )
33
34 set(tex2lyx_headers
35         ${TOP_SRC_DIR}/src/Layout.h
36         ${TOP_SRC_DIR}/src/TextClass.h
37         ${TOP_SRC_DIR}/src/tex2lyx/Spacing.h
38         ${TOP_SRC_DIR}/src/tex2lyx/Context.h
39         ${TOP_SRC_DIR}/src/tex2lyx/Font.h
40         ${TOP_SRC_DIR}/src/tex2lyx/Parser.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/Layout.cpp ${TOP_SRC_DIR}/src/TextClass.cpp
48                 PROPERTIES COMPILE_FLAGS 
49                 "/DFONT_H /FI${TOP_SRC_DIR}/src/tex2lyx/Font.h /FI${TOP_SRC_DIR}/src/tex2lyx/Spacing.h")
50 else(MSVC)
51         SET_SOURCE_FILES_PROPERTIES(${TOP_SRC_DIR}/src/Layout.cpp ${TOP_SRC_DIR}/src/TextClass.cpp
52                 PROPERTIES COMPILE_FLAGS 
53                 "-include ${TOP_SRC_DIR}/src/tex2lyx/Font.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