2011-05-10 17:44:41 +00:00
|
|
|
|
# This file is part of LyX, the document processor.
|
|
|
|
|
# Licence details can be found in the file COPYING.
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2006-2011 Peter K<>mmel, <syntheticpp@gmx.net>
|
|
|
|
|
#
|
|
|
|
|
|
2014-07-21 08:49:05 +02:00
|
|
|
|
project(frontend_qt)
|
2011-05-10 17:44:41 +00:00
|
|
|
|
|
2019-07-21 00:44:17 +02:00
|
|
|
|
file(GLOB frontends_qt_sources ${TOP_SRC_DIR}/src/frontends/qt/${LYX_CPP_FILES})
|
2017-11-26 18:50:53 +01:00
|
|
|
|
if (LYX_USE_FILEDIALOG MATCHES "NATIVE")
|
2019-07-21 00:44:17 +02:00
|
|
|
|
set_property(SOURCE "${TOP_SRC_DIR}/src/frontends/qt/FileDialog.cpp" PROPERTY COMPILE_FLAGS -DUSE_NATIVE_FILEDIALOG=1)
|
2017-11-26 18:50:53 +01:00
|
|
|
|
endif()
|
2019-07-21 00:44:17 +02:00
|
|
|
|
file(GLOB moc_files ${TOP_SRC_DIR}/src/frontends/qt/${LYX_MOC_FILES})
|
2011-05-10 17:44:41 +00:00
|
|
|
|
|
2014-07-21 08:49:05 +02:00
|
|
|
|
list(REMOVE_ITEM frontends_qt_sources ${moc_files} .)
|
2019-07-21 00:44:17 +02:00
|
|
|
|
list(REMOVE_ITEM frontends_qt_sources ${TOP_SRC_DIR}/src/frontends/qt/liblyxqt4.cpp)
|
2011-05-10 17:44:41 +00:00
|
|
|
|
|
2019-07-21 00:44:17 +02:00
|
|
|
|
file(GLOB frontends_qt_headers ${TOP_SRC_DIR}/src/frontends/qt/${LYX_HPP_FILES})
|
|
|
|
|
file(GLOB frontend_qt_UI ${TOP_SRC_DIR}/src/frontends/qt/ui/*.ui)
|
2011-05-10 17:44:41 +00:00
|
|
|
|
|
2019-07-21 00:44:17 +02:00
|
|
|
|
lyx_add_msvc_pch(frontends_qt)
|
2011-05-10 17:44:41 +00:00
|
|
|
|
|
2014-07-21 08:49:05 +02:00
|
|
|
|
lyx_automoc(${frontends_qt_sources})
|
2011-05-10 17:44:41 +00:00
|
|
|
|
|
2014-07-21 08:49:05 +02:00
|
|
|
|
lyx_add_ui_files(frontends_qt_sources ui_files ${frontend_qt_UI})
|
2011-05-10 17:44:41 +00:00
|
|
|
|
|
2014-07-21 08:49:05 +02:00
|
|
|
|
add_definitions(-DQT_GENUINE_STR -DLYX_BUILD_QT_FRONTEND)
|
2011-05-10 17:44:41 +00:00
|
|
|
|
|
|
|
|
|
include_directories(
|
2019-07-21 00:44:17 +02:00
|
|
|
|
${TOP_SRC_DIR}/src/frontends/qt
|
2011-05-10 17:44:41 +00:00
|
|
|
|
${QT_INCLUDES}
|
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
|
|
|
|
|
if(LYX_MERGE_FILES)
|
2014-07-21 08:49:05 +02:00
|
|
|
|
lyx_const_touched_files(_allinone frontends_qt_sources)
|
|
|
|
|
set(depends_moc_uic ${frontends_qt_headers} ${ui_files})
|
2011-05-10 17:44:41 +00:00
|
|
|
|
set_source_files_properties(_allinone_const.C PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}")
|
|
|
|
|
set_source_files_properties(_allinone_touched.C PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}")
|
2014-07-21 08:49:05 +02:00
|
|
|
|
add_library(frontend_qt ${library_type}
|
|
|
|
|
${_allinone_files} ${frontends_qt_headers} ${ui_files} ${resource_files})
|
2011-05-10 17:44:41 +00:00
|
|
|
|
else()
|
2014-07-21 08:49:05 +02:00
|
|
|
|
add_library(frontend_qt ${library_type} ${frontends_qt_sources} ${frontends_qt_headers} ${ui_files} ${resource_files})
|
2011-05-10 17:44:41 +00:00
|
|
|
|
endif()
|
2021-06-19 10:48:49 +02:00
|
|
|
|
set_target_properties(frontend_qt PROPERTIES FOLDER "applications/LyX" QT_NO_UNICODE_DEFINES TRUE)
|
2011-05-10 17:44:41 +00:00
|
|
|
|
|
2014-03-09 10:24:41 +01:00
|
|
|
|
if(Qt5Core_FOUND AND APPLE)
|
2015-05-19 08:11:01 +02:00
|
|
|
|
qt_use_modules(frontend_qt Core Gui Widgets Concurrent Svg MacExtras)
|
2014-03-09 10:24:41 +01:00
|
|
|
|
else()
|
2014-12-26 16:53:31 +01:00
|
|
|
|
if (Qt5WinExtras_FOUND)
|
2015-05-19 08:11:01 +02:00
|
|
|
|
qt_use_modules(frontend_qt Core Gui Widgets Concurrent Svg WinExtras)
|
2014-12-26 16:53:31 +01:00
|
|
|
|
else()
|
2015-05-19 08:11:01 +02:00
|
|
|
|
qt_use_modules(frontend_qt Core Gui Widgets Concurrent Svg)
|
2014-12-26 16:53:31 +01:00
|
|
|
|
endif()
|
2014-03-09 10:24:41 +01:00
|
|
|
|
endif()
|
2014-07-21 08:49:05 +02:00
|
|
|
|
target_link_libraries(frontend_qt
|
2011-05-10 17:44:41 +00:00
|
|
|
|
frontends
|
|
|
|
|
${QT_QTCORE_LIBRARY}
|
|
|
|
|
${QT_QTGUI_LIBRARY})
|
|
|
|
|
|
2014-07-25 22:03:59 +02:00
|
|
|
|
lyx_add_gcc_pch(frontend_qt)
|
2011-05-10 17:44:41 +00:00
|
|
|
|
|
|
|
|
|
if(WIN32)
|
2014-07-21 08:49:05 +02:00
|
|
|
|
target_link_libraries(frontend_qt gdi32)
|
2011-05-10 17:44:41 +00:00
|
|
|
|
endif()
|
|
|
|
|
|
2014-07-21 08:49:05 +02:00
|
|
|
|
project_source_group("${GROUP_CODE}" frontends_qt_sources frontends_qt_headers)
|
2011-05-10 17:44:41 +00:00
|
|
|
|
|
2014-07-21 08:49:05 +02:00
|
|
|
|
source_group("Uic files" FILES ${frontend_qt_UI})
|
2011-05-10 17:44:41 +00:00
|
|
|
|
|