1 # This file is part of LyX, the document processor.
2 # Licence details can be found in the file COPYING.
4 # Copyright (c) 2006, Peter Kümmel, <syntheticpp@gmx.net>
7 set(_lyx ${PACKAGE_BASE}${PROGRAM_SUFFIX})
10 include_directories(${TOP_SRC_DIR}/src)
12 add_subdirectory(frontends)
13 add_subdirectory(graphics)
14 add_subdirectory(insets)
15 add_subdirectory(mathed)
16 add_subdirectory(support)
17 add_subdirectory(tex2lyx)
19 add_subdirectory(client)
22 file(GLOB lyx_sources ${TOP_SRC_DIR}/src/${LYX_CPP_FILES})
23 file(GLOB lyx_headers ${TOP_SRC_DIR}/src/${LYX_HPP_FILES})
25 list(REMOVE_ITEM lyx_sources
26 ${TOP_SRC_DIR}/src/AspellChecker.cpp
27 ${TOP_SRC_DIR}/src/HunspellChecker.cpp
28 ${TOP_SRC_DIR}/src/Variables.cpp
29 ${TOP_SRC_DIR}/src/Section.cpp)
31 list(REMOVE_ITEM lyx_headers
32 ${TOP_SRC_DIR}/src/AspellChecker.h
33 ${TOP_SRC_DIR}/src/HunspellChecker.h
34 ${TOP_SRC_DIR}/src/Variables.h
35 ${TOP_SRC_DIR}/src/Section.h)
38 list(APPEND lyx_sources ${TOP_SRC_DIR}/src/HunspellChecker.cpp)
39 list(APPEND lyx_headers ${TOP_SRC_DIR}/src/HunspellChecker.h)
43 include_directories(${ASPELL_INCLUDE_DIR})
44 list(APPEND lyx_sources ${TOP_SRC_DIR}/src/AspellChecker.cpp)
45 list(APPEND lyx_headers ${TOP_SRC_DIR}/src/AspellChecker.h)
48 include_directories(${CMAKE_CURRENT_BINARY_DIR}
49 ${ZLIB_INCLUDE_DIR} ${QT_INCLUDES})
55 lyx_const_touched_files(_allinone lyx_sources)
56 set(lyx_sources ${_allinone_files})
59 if (LYX_LEAK_DETECTION)
60 configure_file(${vld_path}/vld.ini ${CMAKE_CURRENT_BINARY_DIR}/vld.ini COPYONLY)
61 configure_file(${vld_path}/vld.ini ${CMAKE_CURRENT_BINARY_DIR}/memory_leak_report.txt COPYONLY)
62 set(vld_files ${CMAKE_CURRENT_BINARY_DIR}/vld.ini ${CMAKE_CURRENT_BINARY_DIR}/memory_leak_report.txt)
65 add_executable(${_lyx}
72 target_link_libraries(${_lyx}
85 target_link_libraries(${_lyx} ${ASPELL_LIBRARY})
89 target_link_libraries(${_lyx} "-bind_at_load")
90 target_link_libraries(${_lyx} "-framework Carbon")
94 target_link_libraries(${_lyx} ole32)
97 project_source_group("${GROUP_CODE}" lyx_sources lyx_headers)
99 install(TARGETS ${_lyx} DESTINATION bin)