fix and improve handling of BUILD_QT5 option
This commit is contained in:
@@ -184,7 +184,6 @@ MESSAGE(STATUS "cmake: ${CMAKE_VERSION}")
|
||||
# ==============================================================================
|
||||
|
||||
# Switch to build FreeCAD with Qt5
|
||||
OPTION(BUILD_QT5 "Build with Qt5." OFF)
|
||||
OPTION(BUILD_GUI "Build FreeCAD Gui. Otherwise you have only the command line and the Python import module." ON)
|
||||
OPTION(FREECAD_USE_EXTERNAL_ZIPIOS "Use system installed zipios++ instead of the bundled." OFF)
|
||||
OPTION(FREECAD_USE_EXTERNAL_SMESH "Use system installed smesh instead of the bundled." OFF)
|
||||
@@ -218,6 +217,11 @@ if(MSVC)
|
||||
ENDIF()
|
||||
ELSE()
|
||||
set(FREECAD_LIBPACK_DIR ${CMAKE_SOURCE_DIR} CACHE PATH "Directory of the FreeCAD LibPack")
|
||||
IF(EXISTS ${FREECAD_LIBPACK_DIR}/lib/Qt5Core.lib)
|
||||
OPTION(BUILD_QT5 "Build with Qt5." ON)
|
||||
ELSE()
|
||||
OPTION(BUILD_QT5 "Build with Qt5." OFF)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
SET(LIBPACK_FOUND OFF)
|
||||
@@ -236,15 +240,12 @@ if(MSVC)
|
||||
SET(COPY_LIBPACK_BIN_TO_BUILD ON)
|
||||
OPTION(FREECAD_COPY_LIBPACK_BIN_TO_BUILD "Copy larger libpack dependency 'bin' folder to the build direcctory." OFF)
|
||||
ENDIF()
|
||||
# Default Qt5 ON if present in libpack
|
||||
IF(EXISTS ${CMAKE_BINARY_DIR}/bin/Qt5Core.dll)
|
||||
OPTION(BUILD_QT5 "Build with Qt5." OFF)
|
||||
ENDIF()
|
||||
ELSE()
|
||||
MESSAGE("Libpack NOT found.\nIf you intend to use a Windows libpack, set the FREECAD_LIBPACK_DIR to the libpack directory.")
|
||||
MESSAGE(STATUS "Visit: https://github.com/apeltauer/FreeCAD/releases/ for Windows libpack downloads.")
|
||||
ENDIF()
|
||||
ELSE(MSVC)
|
||||
OPTION(BUILD_QT5 "Build with Qt5." ON)
|
||||
OPTION(FREECAD_LIBPACK_USE "Use the LibPack to Build FreeCAD (only Win32 so far)." OFF)
|
||||
SET(FREECAD_LIBPACK_DIR "" CACHE PATH "Directory of the FreeCAD LibPack")
|
||||
ENDIF(MSVC)
|
||||
|
||||
Reference in New Issue
Block a user