]> git.lyx.org Git - features.git/blob - development/cmake/src/tex2lyx/CMakeLists.txt
fix cmake build for tex2lyx
[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_sources
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(LINKED_headers
21         ${TOP_SRC_DIR}/src/Layout.h
22         ${TOP_SRC_DIR}/src/TextClass.h
23 )
24
25 set(tex2lyx_sources
26         ${TOP_SRC_DIR}/src/tex2lyx/boost.cpp
27         ${TOP_SRC_DIR}/src/tex2lyx/Context.cpp
28         ${TOP_SRC_DIR}/src/tex2lyx/Font.cpp
29         ${TOP_SRC_DIR}/src/tex2lyx/gettext.cpp
30         ${TOP_SRC_DIR}/src/tex2lyx/lengthcommon.cpp
31         ${TOP_SRC_DIR}/src/tex2lyx/Parser.cpp
32         ${TOP_SRC_DIR}/src/tex2lyx/tex2lyx.cpp
33         ${TOP_SRC_DIR}/src/tex2lyx/preamble.cpp
34         ${TOP_SRC_DIR}/src/tex2lyx/math.cpp
35         ${TOP_SRC_DIR}/src/tex2lyx/table.cpp
36         ${TOP_SRC_DIR}/src/tex2lyx/text.cpp
37 )
38
39 set(tex2lyx_headers
40         ${TOP_SRC_DIR}/src/tex2lyx/Spacing.h
41         ${TOP_SRC_DIR}/src/tex2lyx/Context.h
42         ${TOP_SRC_DIR}/src/tex2lyx/Font.h
43         ${TOP_SRC_DIR}/src/tex2lyx/Parser.h
44         ${TOP_SRC_DIR}/src/tex2lyx/tex2lyx.h
45 )
46
47 include_directories(BEFORE ${TOP_SRC_DIR}/src/tex2lyx ${TOP_SRC_DIR}/src/support/minizip ${ZLIB_INCLUDE_DIR})
48
49 add_definitions(-DTEX2LYX)
50
51 if(NOT MERGE_FILES)
52         add_executable(tex2lyx ${tex2lyx_sources} ${LINKED_sources} ${tex2lyx_headers} ${LINKED_headers})
53 else(NOT MERGE_FILES)
54         lyx_const_touched_files(_allinone  tex2lyx_sources)
55         lyx_const_touched_files(_allinone_linked  LINKED_sources)
56         add_executable(tex2lyx  ${_allinone_files} ${_allinone_linked_files})
57 endif(NOT MERGE_FILES)
58
59
60 target_link_libraries(tex2lyx  
61         support
62         boost_iostreams
63         boost_filesystem
64         boost_regex
65         ${QT_QTCORE_LIBRARY} 
66         intl
67         )
68         
69 if(WIN32)
70         target_link_libraries(tex2lyx shlwapi)
71 endif(WIN32)
72
73 if(APPLE)
74         target_link_libraries(tex2lyx "-framework Carbon")
75 endif(APPLE)
76
77 project_source_group("${GROUP_CODE}" tex2lyx_sources tex2lyx_headers)
78