Cmake build: Add option to use native file dialog also for linux

This commit is contained in:
Kornel Benko 2017-11-26 18:50:53 +01:00
parent 601ce9f21c
commit 3b9705da19
2 changed files with 4 additions and 0 deletions

View File

@ -136,6 +136,7 @@ LYX_OPTION(ENABLE_URLTESTS "Enable for URL tests" OFF ALL)
LYX_OPTION(ENABLE_EXPORT_TESTS "Enable for export tests" OFF ALL)
LYX_OPTION(ENABLE_KEYTESTS "Enable for keytests" OFF ALL)
LYX_OPTION(ASAN "Use address sanitizer" OFF ALL)
LYX_COMBO(USE_FILEDIALOG "Use native or QT file dialog" QT NATIVE)
LYX_COMBO(USE_QT "Use Qt version as frontend" AUTO QT4 QT5)
#LYX_OPTION(3RDPARTY_BUILD "Build 3rdparty libs" OFF ALL)
LYX_OPTION(EXTERNAL_Z "OFF := Build 3rdparty lib zlib" ON ALL)

View File

@ -7,6 +7,9 @@
project(frontend_qt)
file(GLOB frontends_qt_sources ${TOP_SRC_DIR}/src/frontends/qt4/${LYX_CPP_FILES})
if (LYX_USE_FILEDIALOG MATCHES "NATIVE")
set_property(SOURCE "${TOP_SRC_DIR}/src/frontends/qt4/FileDialog.cpp" PROPERTY COMPILE_FLAGS -DUSE_NATIVE_FILEDIALOG=1)
endif()
file(GLOB moc_files ${TOP_SRC_DIR}/src/frontends/qt4/${LYX_MOC_FILES})
list(REMOVE_ITEM frontends_qt_sources ${moc_files} .)