add cmake option to use Qt or native file dialogs
This commit is contained in:
@@ -170,6 +170,11 @@ OPTION(FREECAD_USE_EXTERNAL_SMESH "Use system installed smesh instead of the bun
|
||||
OPTION(FREECAD_USE_EXTERNAL_KDL "Use system installed orocos-kdl instead of the bundled." OFF)
|
||||
OPTION(FREECAD_USE_FREETYPE "Builds the features using FreeType libs" ON)
|
||||
OPTION(FREECAD_BUILD_DEBIAN "Prepare for a build of a Debian package" OFF)
|
||||
if (WIN32 OR APPLE)
|
||||
OPTION(FREECAD_USE_QT_FILEDIALOG "Use Qt's file dialog instead of the native one." OFF)
|
||||
else()
|
||||
OPTION(FREECAD_USE_QT_FILEDIALOG "Use Qt's file dialog instead of the native one." ON)
|
||||
endif()
|
||||
|
||||
# https://blog.kitware.com/constraining-values-with-comboboxes-in-cmake-cmake-gui/
|
||||
set(FREECAD_USE_OCC_VARIANT "Community Edition" CACHE STRING "Official OpenCASCADE version or community edition")
|
||||
|
||||
@@ -1195,6 +1195,10 @@ endif(MSVC)
|
||||
|
||||
add_library(FreeCADGui SHARED ${FreeCADGui_SRCS})
|
||||
|
||||
if (FREECAD_USE_QT_FILEDIALOG)
|
||||
set_source_files_properties(FileDialog.cpp PROPERTIES COMPILE_FLAGS -DUSE_QT_FILEDIALOG)
|
||||
endif()
|
||||
|
||||
target_link_libraries(FreeCADGui ${FreeCADGui_LIBS})
|
||||
|
||||
SET_BIN_DIR(FreeCADGui FreeCADGui)
|
||||
|
||||
@@ -48,10 +48,6 @@
|
||||
|
||||
using namespace Gui;
|
||||
|
||||
#if defined(FC_OS_LINUX)
|
||||
#undef USE_QT_FILEDIALOG
|
||||
#endif
|
||||
|
||||
|
||||
/* TRANSLATOR Gui::FileDialog */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user