1 # This file is part of LyX, the document processor.
2 # Licence details can be found in the file COPYING.
4 # Copyright (c) 2006-2011 Peter Kümmel, <syntheticpp@gmx.net>
9 file(GLOB frontends_qt_sources ${TOP_SRC_DIR}/src/frontends/qt/${LYX_CPP_FILES})
10 if (LYX_USE_FILEDIALOG MATCHES "NATIVE")
11 set_property(SOURCE "${TOP_SRC_DIR}/src/frontends/qt/FileDialog.cpp" PROPERTY COMPILE_FLAGS -DUSE_NATIVE_FILEDIALOG=1)
13 file(GLOB moc_files ${TOP_SRC_DIR}/src/frontends/qt/${LYX_MOC_FILES})
15 list(REMOVE_ITEM frontends_qt_sources ${moc_files} .)
16 list(REMOVE_ITEM frontends_qt_sources ${TOP_SRC_DIR}/src/frontends/qt/liblyxqt4.cpp)
18 file(GLOB frontends_qt_headers ${TOP_SRC_DIR}/src/frontends/qt/${LYX_HPP_FILES})
19 file(GLOB frontend_qt_UI ${TOP_SRC_DIR}/src/frontends/qt/ui/*.ui)
21 lyx_add_msvc_pch(frontends_qt)
23 lyx_automoc(${frontends_qt_sources})
25 lyx_add_ui_files(frontends_qt_sources ui_files ${frontend_qt_UI})
27 add_definitions(-DQT_GENUINE_STR -DLYX_BUILD_QT_FRONTEND)
30 ${TOP_SRC_DIR}/src/frontends/qt
32 ${CMAKE_CURRENT_BINARY_DIR})
35 lyx_const_touched_files(_allinone frontends_qt_sources)
36 set(depends_moc_uic ${frontends_qt_headers} ${ui_files})
37 set_source_files_properties(_allinone_const.C PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}")
38 set_source_files_properties(_allinone_touched.C PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}")
39 add_library(frontend_qt ${library_type}
40 ${_allinone_files} ${frontends_qt_headers} ${ui_files} ${resource_files})
42 add_library(frontend_qt ${library_type} ${frontends_qt_sources} ${frontends_qt_headers} ${ui_files} ${resource_files})
44 set_target_properties(frontend_qt PROPERTIES FOLDER "applications/LyX")
46 if(Qt5Core_FOUND AND APPLE)
47 qt_use_modules(frontend_qt Core Gui Widgets Concurrent Svg MacExtras)
49 if (Qt5WinExtras_FOUND)
50 qt_use_modules(frontend_qt Core Gui Widgets Concurrent Svg WinExtras)
52 qt_use_modules(frontend_qt Core Gui Widgets Concurrent Svg)
55 target_link_libraries(frontend_qt
60 lyx_add_gcc_pch(frontend_qt)
63 target_link_libraries(frontend_qt gdi32)
66 project_source_group("${GROUP_CODE}" frontends_qt_sources frontends_qt_headers)
68 source_group("Uic files" FILES ${frontend_qt_UI})