]> git.lyx.org Git - features.git/blob - development/cmake/src/client/CMakeLists.txt
Add use of installed boost libraries
[features.git] / development / cmake / src / client / 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) 2008, 2009 Peter Kümmel, <syntheticpp@gmx.net>
5 # Copyright (c) 2008, 2009 Kornel Benko, <Kornel.Benko@berlin.de>
6 #
7
8 set(_lyxclient lyxclient${PROGRAM_SUFFIX})
9 project(${_lyxclient})
10
11 file(GLOB _lyxclient_sources ${TOP_SRC_DIR}/src/client/*.cpp)
12 file(GLOB _lyxclient_headers ${TOP_SRC_DIR}/src/client/*.h)
13 list(REMOVE_ITEM _lyxclient_headers "${TOP_SRC_DIR}/src/client/pch.h")
14
15 include_directories(BEFORE "${TOP_SRC_DIR}/src/client"
16   "${TOP_SRC_DIR}/boost" ${ZLIB_INCLUDE_DIR})
17
18 add_executable(${_lyxclient} ${_lyxclient_sources} ${_lyxclient_headers})
19
20 if(Boost_FOUND)
21   target_link_libraries(${_lyxclient} ${Boost_LIBRARIES})
22 else()
23   target_link_libraries(${_lyxclient} boost_regex)
24 endif()
25
26 target_link_libraries(${_lyxclient}
27         support
28         ${LIBINTL_LIBRARIES}
29         ${ICONV_LIBRARY}
30         ${QT_QTCORE_LIBRARY}
31         ${QT_QTGUI_LIBRARY}
32         )
33
34 if (ASPELL_FOUND)
35         target_link_libraries(${_lyxclient} ${ASPELL_LIBRARY})
36 endif()
37
38 if (APPLE)
39         target_link_libraries(${_lyxclient} "-framework Carbon")
40 endif()
41
42 install(TARGETS ${_lyxclient} DESTINATION bin)
43