]> git.lyx.org Git - features.git/blob - development/cmake/src/tex2lyx/CMakeLists.txt
cmake: more option cleanup, use LYX_OPTION macro for consistent messages and variable...
[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, 2008, 2009 Peter Kümmel, <syntheticpp@gmx.net>
5 # Copyright (c)       2008, 2009 Kornel Benko, <Kornel.Benko@berlin.de>
6 #
7
8 set(_tex2lyx tex2lyx${PROGRAM_SUFFIX})
9 project(${_tex2lyx})
10
11 # There is no header file lengthcommon.h
12 set(LINKED_sources ${TOP_SRC_DIR}/src/lengthcommon.cpp)
13 set(LINKED_headers)
14
15 foreach(_src insets/InsetLayout Color Counters
16     Encoding FloatList Floating
17     Layout LayoutModuleList Lexer ModuleList TextClass
18     FontInfo Spacing)
19   list(APPEND LINKED_sources ${TOP_SRC_DIR}/src/${_src}.cpp)
20   list(APPEND LINKED_headers ${TOP_SRC_DIR}/src/${_src}.h)
21 endforeach(_src)
22
23 file(GLOB tex2lyx_sources ${TOP_SRC_DIR}/src/tex2lyx/${LYX_CPP_FILES})
24
25 file(GLOB tex2lyx_headers ${TOP_SRC_DIR}/src/tex2lyx/${LYX_HPP_FILES})
26
27 include_directories(BEFORE ${TOP_SRC_DIR}/src/tex2lyx
28   ${TOP_SRC_DIR}/src/support/minizip ${ZLIB_INCLUDE_DIR})
29
30 add_definitions(-DTEX2LYX)
31
32 if(NOT LYX_MERGE_FILES)
33         add_executable(${_tex2lyx} ${tex2lyx_sources} ${LINKED_sources}
34                 ${tex2lyx_headers} ${LINKED_headers})
35 else()
36         lyx_const_touched_files(_allinone  tex2lyx_sources)
37         lyx_const_touched_files(_allinone_linked  LINKED_sources)
38         add_executable(${_tex2lyx} ${_allinone_files} ${_allinone_linked_files})
39 endif()
40
41 target_link_libraries(${_tex2lyx}
42         support
43         ${Lyx_Boost_Libraries}
44         ${QT_QTCORE_LIBRARY}
45         ${LIBINTL_LIBRARIES}
46         ${ICONV_LIBRARY})
47
48 if(WIN32)
49         target_link_libraries(${_tex2lyx} shlwapi ole32 psapi)
50 endif()
51
52 if(APPLE)
53         target_link_libraries(${_tex2lyx} "-framework Carbon")
54 endif()
55
56 project_source_group("${GROUP_CODE}" tex2lyx_sources tex2lyx_headers)
57
58 install(TARGETS ${_tex2lyx} DESTINATION bin)
59