]> git.lyx.org Git - features.git/blob - development/cmake/src/tex2lyx/CMakeLists.txt
Fix cmake after r28575. Patch from Kornel.
[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 set(_tex2lyx tex2lyx${PROGRAM_SUFFIX})
8 project(${_tex2lyx})
9
10 set(LINKED_sources
11         ${TOP_SRC_DIR}/src/insets/InsetLayout.cpp
12         ${TOP_SRC_DIR}/src/Encoding.cpp
13         ${TOP_SRC_DIR}/src/FloatList.cpp
14         ${TOP_SRC_DIR}/src/Floating.cpp
15         ${TOP_SRC_DIR}/src/Counters.cpp
16         ${TOP_SRC_DIR}/src/Layout.cpp
17         ${TOP_SRC_DIR}/src/LayoutModuleList.cpp
18         ${TOP_SRC_DIR}/src/TextClass.cpp
19         ${TOP_SRC_DIR}/src/Lexer.cpp
20         ${TOP_SRC_DIR}/src/lengthcommon.cpp
21         ${TOP_SRC_DIR}/src/Color.cpp
22         ${TOP_SRC_DIR}/src/ModuleList.cpp)
23
24 set(LINKED_headers
25         ${TOP_SRC_DIR}/src/Layout.h
26         ${TOP_SRC_DIR}/src/LayoutModuleList.h
27         ${TOP_SRC_DIR}/src/TextClass.h)
28
29 set(tex2lyx_sources
30         ${TOP_SRC_DIR}/src/tex2lyx/boost.cpp
31         ${TOP_SRC_DIR}/src/tex2lyx/Context.cpp
32         ${TOP_SRC_DIR}/src/tex2lyx/Font.cpp
33         ${TOP_SRC_DIR}/src/tex2lyx/gettext.cpp
34         ${TOP_SRC_DIR}/src/tex2lyx/Parser.cpp
35         ${TOP_SRC_DIR}/src/tex2lyx/tex2lyx.cpp
36         ${TOP_SRC_DIR}/src/tex2lyx/preamble.cpp
37         ${TOP_SRC_DIR}/src/tex2lyx/math.cpp
38         ${TOP_SRC_DIR}/src/tex2lyx/table.cpp
39         ${TOP_SRC_DIR}/src/tex2lyx/text.cpp)
40
41 set(tex2lyx_headers
42         ${TOP_SRC_DIR}/src/tex2lyx/Spacing.h
43         ${TOP_SRC_DIR}/src/tex2lyx/Context.h
44         ${TOP_SRC_DIR}/src/tex2lyx/Font.h
45         ${TOP_SRC_DIR}/src/tex2lyx/Parser.h
46         ${TOP_SRC_DIR}/src/tex2lyx/tex2lyx.h)
47
48 include_directories(BEFORE ${TOP_SRC_DIR}/src/tex2lyx
49         ${TOP_SRC_DIR}/src/support/minizip ${ZLIB_INCLUDE_DIR})
50
51 add_definitions(-DTEX2LYX)
52
53 if(NOT MERGE_FILES)
54         add_executable(${_tex2lyx} ${tex2lyx_sources} ${LINKED_sources}
55                 ${tex2lyx_headers} ${LINKED_headers})
56 else()
57         lyx_const_touched_files(_allinone  tex2lyx_sources)
58         lyx_const_touched_files(_allinone_linked  LINKED_sources)
59         add_executable(${_tex2lyx}  ${_allinone_files} ${_allinone_linked_files})
60 endif()
61
62
63 target_link_libraries(${_tex2lyx}  
64         support
65         boost_regex
66         ${QT_QTCORE_LIBRARY} 
67         ${LIBINTL_LIBRARIES}
68         ${ICONV_LIBRARY})
69         
70 if(WIN32)
71         target_link_libraries(${_tex2lyx} shlwapi ole32)
72 endif()
73
74 if(APPLE)
75         target_link_libraries(${_tex2lyx} "-framework Carbon")
76 endif()
77
78 project_source_group("${GROUP_CODE}" tex2lyx_sources tex2lyx_headers)
79
80 install(TARGETS ${_tex2lyx} DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
81