]> git.lyx.org Git - lyx.git/blob - development/cmake/src/support/CMakeLists.txt
Rename version.C.in to version.cpp.in, and Package.C.in to package.cpp.in
[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.cpp.in 
10                ${CMAKE_CURRENT_BINARY_DIR}/package.C)
11
12 file(GLOB support_sources ${TOP_SRC_DIR}/src/support/${LYX_CPP_FILES})
13 file(GLOB support_headers ${TOP_SRC_DIR}/src/support/${LYX_HPP_FILES})
14
15 list(REMOVE_ITEM support_sources        
16         ${TOP_SRC_DIR}/src/support/os_win32.cpp
17         ${TOP_SRC_DIR}/src/support/os_unix.cpp
18         ${TOP_SRC_DIR}/src/support/os_cygwin.cpp
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 set(support_sources ${support_sources} ${CMAKE_CURRENT_BINARY_DIR}/package.C)
24
25 lyx_add_msvc_pch(support)
26         
27 include_directories(${TOP_SRC_DIR}/src/support ${ICONV_INCLUDE_DIR})
28
29 if(NOT MERGE_FILES)
30         add_library(support ${library_type} ${support_sources} ${support_headers})
31 else(NOT MERGE_FILES)
32         # move to front
33         list(REMOVE_ITEM support_sources ${TOP_SRC_DIR}/src/support/convert.cpp)
34         list(APPEND support_sources ${TOP_SRC_DIR}/src/support/convert.cpp)
35         list(REMOVE_ITEM support_sources ${TOP_SRC_DIR}/src/support/lstrings.cpp)
36         list(APPEND support_sources ${TOP_SRC_DIR}/src/support/lstrings.cpp)
37         list(REVERSE support_sources)
38         lyx_const_touched_files(_allinone  support_sources)
39         add_library(support ${library_type} ${_allinone_files})
40                                         
41 endif(NOT MERGE_FILES)
42
43
44 target_link_libraries(support boost_signals)
45
46 if(WIN32)
47         target_link_libraries(support shlwapi)
48 endif(WIN32)
49
50 project_source_group("${GROUP_CODE}" support_sources support_headers)
51