2006-09-15 17:05:20 +00:00
|
|
|
|
# This file is part of LyX, the document processor.
|
|
|
|
|
# Licence details can be found in the file COPYING.
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2006, Peter K<>mmel, <syntheticpp@gmx.net>
|
|
|
|
|
#
|
|
|
|
|
|
2009-02-10 22:21:39 +00:00
|
|
|
|
set(_lyx ${PACKAGE_BASE}${PROGRAM_SUFFIX})
|
|
|
|
|
project(${_lyx})
|
2006-06-11 11:57:25 +00:00
|
|
|
|
|
|
|
|
|
include_directories(${TOP_SRC_DIR}/src)
|
|
|
|
|
|
2009-01-03 10:53:24 +00:00
|
|
|
|
add_subdirectory(frontends)
|
|
|
|
|
add_subdirectory(graphics)
|
|
|
|
|
add_subdirectory(insets)
|
|
|
|
|
add_subdirectory(mathed)
|
|
|
|
|
add_subdirectory(support)
|
|
|
|
|
add_subdirectory(tex2lyx)
|
|
|
|
|
if (UNIX)
|
|
|
|
|
add_subdirectory(client)
|
|
|
|
|
endif()
|
2006-06-11 11:57:25 +00:00
|
|
|
|
|
2007-04-23 16:52:27 +00:00
|
|
|
|
file(GLOB lyx_sources ${TOP_SRC_DIR}/src/${LYX_CPP_FILES})
|
2010-01-26 12:40:51 +00:00
|
|
|
|
file(GLOB moc_files ${TOP_SRC_DIR}/src/${LYX_MOC_FILES})
|
|
|
|
|
list(REMOVE_ITEM lyx_sources ${moc_files} .)
|
2007-04-23 16:52:27 +00:00
|
|
|
|
file(GLOB lyx_headers ${TOP_SRC_DIR}/src/${LYX_HPP_FILES})
|
2006-06-16 16:43:17 +00:00
|
|
|
|
|
|
|
|
|
list(REMOVE_ITEM lyx_sources
|
2010-01-22 18:40:49 +00:00
|
|
|
|
${TOP_SRC_DIR}/src/EnchantChecker.cpp
|
2009-08-01 17:24:13 +00:00
|
|
|
|
${TOP_SRC_DIR}/src/AspellChecker.cpp
|
|
|
|
|
${TOP_SRC_DIR}/src/HunspellChecker.cpp
|
2007-04-26 04:41:58 +00:00
|
|
|
|
${TOP_SRC_DIR}/src/Variables.cpp
|
2010-04-23 08:13:48 +00:00
|
|
|
|
${TOP_SRC_DIR}/src/Section.cpp
|
2010-07-13 09:39:05 +00:00
|
|
|
|
${TOP_SRC_DIR}/src/lyxcore.cpp
|
|
|
|
|
${TOP_SRC_DIR}/src/lyxinsets.cpp
|
|
|
|
|
${TOP_SRC_DIR}/src/lyxmathed.cpp)
|
2009-01-03 10:53:24 +00:00
|
|
|
|
|
2010-07-07 21:13:39 +00:00
|
|
|
|
if(NOT APPLE)
|
|
|
|
|
list(REMOVE_ITEM lyx_sources
|
|
|
|
|
${TOP_SRC_DIR}/src/AppleSpellChecker.cpp)
|
|
|
|
|
list(REMOVE_ITEM lyx_headers
|
|
|
|
|
${TOP_SRC_DIR}/src/AppleSpellChecker.h)
|
|
|
|
|
endif()
|
|
|
|
|
|
2009-08-01 17:24:13 +00:00
|
|
|
|
list(REMOVE_ITEM lyx_headers
|
2010-01-22 18:40:49 +00:00
|
|
|
|
${TOP_SRC_DIR}/src/EnchantChecker.h
|
2009-08-01 17:24:13 +00:00
|
|
|
|
${TOP_SRC_DIR}/src/AspellChecker.h
|
|
|
|
|
${TOP_SRC_DIR}/src/HunspellChecker.h
|
|
|
|
|
${TOP_SRC_DIR}/src/Variables.h
|
|
|
|
|
${TOP_SRC_DIR}/src/Section.h)
|
|
|
|
|
|
|
|
|
|
if (HUNSPELL_FOUND)
|
|
|
|
|
list(APPEND lyx_sources ${TOP_SRC_DIR}/src/HunspellChecker.cpp)
|
|
|
|
|
list(APPEND lyx_headers ${TOP_SRC_DIR}/src/HunspellChecker.h)
|
2009-07-13 07:44:00 +00:00
|
|
|
|
endif()
|
|
|
|
|
|
2009-01-03 10:53:24 +00:00
|
|
|
|
if (ASPELL_FOUND)
|
2009-08-01 17:24:13 +00:00
|
|
|
|
include_directories(${ASPELL_INCLUDE_DIR})
|
|
|
|
|
list(APPEND lyx_sources ${TOP_SRC_DIR}/src/AspellChecker.cpp)
|
|
|
|
|
list(APPEND lyx_headers ${TOP_SRC_DIR}/src/AspellChecker.h)
|
2007-08-28 17:07:02 +00:00
|
|
|
|
endif()
|
2006-06-11 11:57:25 +00:00
|
|
|
|
|
2010-01-22 18:40:49 +00:00
|
|
|
|
if (ENCHANT_FOUND)
|
|
|
|
|
include_directories("${ENCHANT_INCLUDE_DIR}")
|
|
|
|
|
list(APPEND lyx_sources ${TOP_SRC_DIR}/src/EnchantChecker.cpp)
|
|
|
|
|
list(APPEND lyx_headers ${TOP_SRC_DIR}/src/EnchantChecker.h)
|
|
|
|
|
endif()
|
|
|
|
|
|
2010-05-31 09:50:24 +00:00
|
|
|
|
lyx_automoc(${TOP_SRC_DIR}/src/Compare.cpp)
|
|
|
|
|
if (WIN32)
|
|
|
|
|
lyx_automoc(${TOP_SRC_DIR}/src/Server.cpp)
|
|
|
|
|
endif()
|
2009-08-22 17:37:56 +00:00
|
|
|
|
|
2007-11-11 19:45:43 +00:00
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}
|
2009-05-16 18:48:41 +00:00
|
|
|
|
${ZLIB_INCLUDE_DIR} ${QT_INCLUDES})
|
2006-06-11 11:57:25 +00:00
|
|
|
|
|
2006-10-23 19:04:29 +00:00
|
|
|
|
lyx_add_msvc_pch(lyx)
|
2006-10-23 13:32:46 +00:00
|
|
|
|
|
2007-03-20 22:13:21 +00:00
|
|
|
|
|
2010-07-06 19:47:16 +00:00
|
|
|
|
if (LYX_MERGE_FILES)
|
2009-08-01 17:24:13 +00:00
|
|
|
|
lyx_const_touched_files(_allinone lyx_sources)
|
|
|
|
|
set(lyx_sources ${_allinone_files})
|
2007-08-28 17:07:02 +00:00
|
|
|
|
endif()
|
2006-10-23 13:32:46 +00:00
|
|
|
|
|
2010-07-06 19:47:16 +00:00
|
|
|
|
if (LYX_VLD)
|
2007-12-02 11:17:01 +00:00
|
|
|
|
configure_file(${vld_path}/vld.ini ${CMAKE_CURRENT_BINARY_DIR}/vld.ini COPYONLY)
|
|
|
|
|
configure_file(${vld_path}/vld.ini ${CMAKE_CURRENT_BINARY_DIR}/memory_leak_report.txt COPYONLY)
|
|
|
|
|
set(vld_files ${CMAKE_CURRENT_BINARY_DIR}/vld.ini ${CMAKE_CURRENT_BINARY_DIR}/memory_leak_report.txt)
|
|
|
|
|
endif()
|
|
|
|
|
|
2010-06-30 08:35:52 +00:00
|
|
|
|
if(WIN32)
|
|
|
|
|
set(FILE_RC ${CMAKE_SOURCE_DIR}/lyx.rc)
|
|
|
|
|
message(STATUS "Using icon defined in resource file: ${FILE_RC}")
|
|
|
|
|
endif()
|
|
|
|
|
|
2009-02-10 22:21:39 +00:00
|
|
|
|
add_executable(${_lyx}
|
2006-11-14 10:06:07 +00:00
|
|
|
|
${WIN32_CONSOLE}
|
2009-01-03 10:53:24 +00:00
|
|
|
|
${lyx_sources}
|
2006-06-16 16:43:17 +00:00
|
|
|
|
${lyx_headers}
|
2007-12-02 11:17:01 +00:00
|
|
|
|
${vld_files}
|
2010-06-30 08:35:52 +00:00
|
|
|
|
${FILE_RC}
|
2009-01-03 10:53:24 +00:00
|
|
|
|
)
|
2006-06-11 11:57:25 +00:00
|
|
|
|
|
2009-12-03 22:08:08 +00:00
|
|
|
|
lyx_add_gcc_pch(${_lyx})
|
2009-12-03 21:58:44 +00:00
|
|
|
|
|
2009-02-10 22:21:39 +00:00
|
|
|
|
target_link_libraries(${_lyx}
|
2006-06-11 11:57:25 +00:00
|
|
|
|
mathed
|
|
|
|
|
insets
|
|
|
|
|
frontends
|
2007-08-28 17:07:02 +00:00
|
|
|
|
frontend_qt4
|
2006-06-11 11:57:25 +00:00
|
|
|
|
graphics
|
|
|
|
|
support
|
2008-04-19 08:47:33 +00:00
|
|
|
|
${LIBINTL_LIBRARIES}
|
|
|
|
|
${ICONV_LIBRARY}
|
2007-12-02 11:17:01 +00:00
|
|
|
|
${QT_QTMAIN_LIBRARY}
|
|
|
|
|
${vld_dll})
|
2006-06-11 11:57:25 +00:00
|
|
|
|
|
2009-08-02 10:44:05 +00:00
|
|
|
|
if (HUNSPELL_FOUND)
|
|
|
|
|
target_link_libraries(${_lyx} ${HUNSPELL_LIBRARY})
|
|
|
|
|
endif()
|
2009-01-03 10:53:24 +00:00
|
|
|
|
if (ASPELL_FOUND)
|
2009-02-10 22:21:39 +00:00
|
|
|
|
target_link_libraries(${_lyx} ${ASPELL_LIBRARY})
|
2007-08-28 17:07:02 +00:00
|
|
|
|
endif()
|
2010-01-22 18:40:49 +00:00
|
|
|
|
if (ENCHANT_FOUND)
|
|
|
|
|
target_link_libraries(${_lyx} ${ENCHANT_LIBRARY})
|
|
|
|
|
endif()
|
2006-09-03 17:51:53 +00:00
|
|
|
|
|
2009-01-03 10:53:24 +00:00
|
|
|
|
if (APPLE)
|
2009-02-10 22:21:39 +00:00
|
|
|
|
target_link_libraries(${_lyx} "-bind_at_load")
|
|
|
|
|
target_link_libraries(${_lyx} "-framework Carbon")
|
2007-08-28 17:07:02 +00:00
|
|
|
|
endif()
|
2007-01-29 23:20:36 +00:00
|
|
|
|
|
2009-01-03 10:53:24 +00:00
|
|
|
|
if (MINGW)
|
2009-02-10 22:21:39 +00:00
|
|
|
|
target_link_libraries(${_lyx} ole32)
|
2008-04-19 10:17:40 +00:00
|
|
|
|
endif()
|
|
|
|
|
|
2006-09-03 23:50:16 +00:00
|
|
|
|
project_source_group("${GROUP_CODE}" lyx_sources lyx_headers)
|
2006-09-03 17:51:53 +00:00
|
|
|
|
|
2009-02-10 22:21:39 +00:00
|
|
|
|
install(TARGETS ${_lyx} DESTINATION bin)
|
2007-05-02 20:59:48 +00:00
|
|
|
|
|