]> git.lyx.org Git - features.git/blob - development/cmake/src/support/CMakeLists.txt
cmake: remove boost_filesystem, add automoc to support, link against QtCore
[features.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 file(GLOB support_sources ${TOP_SRC_DIR}/src/support/${LYX_CPP_FILES})
10 file(GLOB support_headers ${TOP_SRC_DIR}/src/support/${LYX_HPP_FILES})
11
12 file(GLOB support_minizip_sources ${TOP_SRC_DIR}/src/support/minizip/*.c)
13 file(GLOB support_minizip_cpp_sources ${TOP_SRC_DIR}/src/support/minizip/*.cpp)
14 file(GLOB support_minizip_headers ${TOP_SRC_DIR}/src/support/minizip/*.h)
15
16 list(REMOVE_ITEM support_sources        
17         ${TOP_SRC_DIR}/src/support/os_win32.cpp
18         ${TOP_SRC_DIR}/src/support/os_unix.cpp
19         ${TOP_SRC_DIR}/src/support/os_cygwin.cpp
20         ${TOP_SRC_DIR}/src/support/os_os2.C
21         ${TOP_SRC_DIR}/src/support/atexit.c
22         ${TOP_SRC_DIR}/src/support/strerror.c
23         ${TOP_SRC_DIR}/src/support/minizip/iowin32.h
24         ${TOP_SRC_DIR}/src/support/minizip/iowin32.c)
25
26 lyx_add_msvc_pch(support)
27
28 lyx_automoc(${support_sources})
29         
30 include_directories(${TOP_SRC_DIR}/src/support
31         ${TOP_SRC_DIR}/src/support/minizip
32         ${QT_INCLUDES}
33         ${ICONV_INCLUDE_DIR})
34
35
36 if(NOT MERGE_FILES)
37         set(support_sources ${support_sources} ${support_minizip_sources} ${support_minizip_cpp_sources})
38         set(support_headers ${support_headers} ${support_minizip_headers})
39         add_library(support ${library_type} ${support_sources} ${support_headers})
40 else()
41         lyx_const_touched_files(_allinone  support_sources)
42                 set(depends_moc ${support_headers})
43         set_source_files_properties(_allinone_const.C
44                 PROPERTIES OBJECT_DEPENDS "${depends_moc}")
45         set_source_files_properties(_allinone_touched.C
46                 PROPERTIES OBJECT_DEPENDS "${depends_moc}")     
47         add_library(support ${library_type} ${_allinone_files}
48                 ${support_minizip_sources} ${support_minizip_cpp_sources} ${support_headers})
49 endif()
50
51
52 target_link_libraries(support boost_signals  ${QT_QTCORE_LIBRARY} )
53
54 if(WIN32)
55         target_link_libraries(support shlwapi)
56 endif()
57
58 project_source_group("${GROUP_CODE}" support_sources support_headers)
59