]> git.lyx.org Git - lyx.git/blob - development/cmake/src/support/CMakeLists.txt
add support of precompiled headers for msvc, enable with -Dpch=1, disable headers...
[lyx.git] / development / cmake / src / support / 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(support)
8
9 configure_file(${TOP_SRC_DIR}/src/support/package.C.in 
10                ${CMAKE_CURRENT_BINARY_DIR}/package.C)
11
12 file(GLOB support_sources ${TOP_SRC_DIR}/src/support/*.C)
13 file(GLOB support_headers ${TOP_SRC_DIR}/src/support/*.h)
14
15 list(REMOVE_ITEM support_sources        
16         ${TOP_SRC_DIR}/src/support/os_win32.C
17         ${TOP_SRC_DIR}/src/support/os_unix.C
18         ${TOP_SRC_DIR}/src/support/os_cygwin.C
19         ${TOP_SRC_DIR}/src/support/os_os2.C
20         ${TOP_SRC_DIR}/src/support/atexit.c
21         ${TOP_SRC_DIR}/src/support/strerror.c)
22
23 lyx_add_msvc_pch(support_sources)
24
25 set(support_sources ${support_sources} ${CMAKE_CURRENT_BINARY_DIR}/package.C)
26         
27 include_directories(${TOP_SRC_DIR}/src/support ${ICONV_INCLUDE_DIR})
28
29 add_library(support STATIC ${support_sources} ${support_headers})
30
31 target_link_libraries(support boost_signals)
32
33 add_dependencies(support ${pchlibname})
34
35 if(WIN32)
36         target_link_libraries(support shlwapi)
37 endif(WIN32)
38
39 project_source_group("${GROUP_CODE}" support_sources support_headers)
40