1 # This file is part of LyX, the document processor.
2 # Licence details can be found in the file COPYING.
4 # Copyright (c) 2006, Peter Kümmel, <syntheticpp@gmx.net>
9 file(GLOB frontends_qt4_sources
10 ${TOP_SRC_DIR}/src/frontends/qt4/${LYX_CPP_FILES})
11 file(GLOB moc_files ${TOP_SRC_DIR}/src/frontends/qt4/${LYX_MOC_FILES})
12 list(REMOVE_ITEM frontends_qt4_sources ${moc_files} .)
14 file(GLOB frontends_qt4_headers
15 ${TOP_SRC_DIR}/src/frontends/qt4/${LYX_HPP_FILES})
16 file(GLOB frontend_qt4_UI
17 ${TOP_SRC_DIR}/src/frontends/qt4/ui/*.ui)
19 lyx_add_msvc_pch(frontends_qt4)
21 lyx_automoc(${frontends_qt4_sources})
23 lyx_add_ui_files(frontends_qt4_sources ui_files ${frontend_qt4_UI})
25 file(GLOB_RECURSE frontend_qt4_images ${TOP_SRC_DIR}/lib/images/*.png)
26 set(resource_name ${CMAKE_CURRENT_BINARY_DIR}/Resources.qrc)
27 lyx_qt_resources_file(${resource_name} "${TOP_SRC_DIR}/lib/" frontend_qt4_images)
28 qt4_add_resources(resource_files ${resource_name})
31 add_definitions(-DQT_GENUINE_STR -DLYX_BUILD_QT4_FRONTEND)
34 ${TOP_SRC_DIR}/src/frontends/qt4
36 ${CMAKE_CURRENT_BINARY_DIR})
39 lyx_const_touched_files(_allinone frontends_qt4_sources)
40 set(depends_moc_uic ${frontends_qt4_headers} ${ui_files})
41 set_source_files_properties(_allinone_const.C
42 PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}")
43 set_source_files_properties(_allinone_touched.C
44 PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}")
45 add_library(frontend_qt4 ${library_type}
46 ${_allinone_files} ${frontends_qt4_headers} ${ui_files} ${resource_files})
48 add_library(frontend_qt4 ${library_type}
49 ${frontends_qt4_sources} ${frontends_qt4_headers} ${ui_files} ${resource_files})
53 target_link_libraries(frontend_qt4
58 lyx_add_gcc_pch(frontend_qt4)
61 target_link_libraries(frontend_qt4 Gdi32)
64 project_source_group("${GROUP_CODE}"
65 frontends_qt4_sources frontends_qt4_headers)
67 source_group("Uic files" FILES ${frontend_qt4_UI})