]> git.lyx.org Git - features.git/blob - development/cmake/src/CMakeLists.txt
4a3c671c86eab0c66aced379b4662e2cb606d9d8
[features.git] / development / cmake / src / 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(lyx-${qt_postfix})
8
9 include_directories(${TOP_SRC_DIR}/src)
10
11 add_subdirectory(frontends) 
12 add_subdirectory(graphics) 
13 add_subdirectory(insets) 
14 add_subdirectory(mathed) 
15 add_subdirectory(support) 
16 if(NOT MERGE_FILES)
17         add_subdirectory(tex2lyx) 
18 endif(NOT MERGE_FILES)
19
20
21 file(GLOB lyx_sources ${TOP_SRC_DIR}/src/${LYX_CPP_FILES})
22 file(GLOB lyx_headers ${TOP_SRC_DIR}/src/${LYX_HPP_FILES})
23
24 list(REMOVE_ITEM lyx_sources
25         ${TOP_SRC_DIR}/src/ASpell.cpp
26         ${TOP_SRC_DIR}/src/PSpell.cpp
27         ${TOP_SRC_DIR}/src/ISpell.cpp
28         ${TOP_SRC_DIR}/src/Variables.cpp
29         ${TOP_SRC_DIR}/src/Section.cpp)
30         
31 if(ASPELL_FOUND)
32         include_directories(${ASPELL_INCLUDE_DIR})
33         set(lyx_sources ${lyx_sources} ${TOP_SRC_DIR}/src/ASpell.cpp)
34 endif(ASPELL_FOUND)
35
36 include_directories(${CMAKE_CURRENT_BINARY_DIR})
37
38 lyx_add_msvc_pch(lyx)
39
40
41 if(NOT MERGE_FILES)
42         set(lyx_sources ${lyx_sources})
43 else(NOT MERGE_FILES)
44         lyx_const_touched_files(_allinone  lyx_sources)
45         set(lyx_sources ${_allinone_files})
46 endif(NOT MERGE_FILES)
47
48 add_executable(lyx-${qt_postfix}
49         ${WIN32_CONSOLE}
50         ${lyx_sources} 
51         ${lyx_headers}
52         )
53
54 target_link_libraries(lyx-${qt_postfix}
55         mathed
56         insets
57         frontends
58         frontend_${qt_postfix}
59         graphics
60         support
61         intl
62         ${QT_QTMAIN_LIBRARY}
63         boost_iostreams
64 )
65
66 if(ASPELL_FOUND)
67         target_link_libraries(lyx-${qt_postfix} ${ASPELL_LIBRARY})
68 endif(ASPELL_FOUND)
69
70 if(APPLE)
71   target_link_libraries(lyx-${qt_postfix} "-bind_at_load" ) 
72   target_link_libraries(lyx-${qt_postfix} "-framework Carbon" ) 
73 endif(APPLE)
74
75 project_source_group("${GROUP_CODE}" lyx_sources lyx_headers)
76
77 install(TARGETS lyx-${qt_postfix} DESTINATION bin)
78