Removes the BUILD_QT5 flag and adds a new FREECAD_QT_VERSION option, which can be set to either "Auto" (default), 5, or 6. Auto detects which version of Qt is installed on the system and chooses it. If both version are installed, Qt5 is used. Note that this DOES NOT implement compiling against Qt6, it only adds the necessary cMake infrastructure to begin work on the source code changes that will be required.
42 lines
1.8 KiB
CMake
42 lines
1.8 KiB
CMake
macro(FreeCADLibpackChecks)
|
|
# ==============================================================================
|
|
|
|
if(FREECAD_LIBPACK_USE)
|
|
|
|
# checking for a unique file in LibPack location to make sure the right version of the LibPack is there
|
|
find_file(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER MANIFEST.db ${FREECAD_LIBPACK_DIR})
|
|
|
|
# don't show them in the GUI
|
|
set(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER "${FREECAD_LIBPACK_CHECKFILE_CLBUNDLER}" CACHE INTERNAL "Find libpack")
|
|
|
|
if (FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
|
set(FREECAD_LIBPACK_VERSION "CLbundler" CACHE STRING "Displays if the libpack has been found" FORCE)
|
|
include(cMake/UseLibPackCLbundler.cmake)
|
|
else(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
|
set(FREECAD_LIBPACK_VERSION "NOTFOUND" CACHE STRING "Displays if the libpack has been found" FORCE)
|
|
message(SEND_ERROR "Could not find libpack in specified location:" ${FREECAD_LIBPACK_DIR})
|
|
endif(FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
|
|
# -------------------------------- PyCXX --------------------------------
|
|
|
|
find_package(PyCXX REQUIRED)
|
|
|
|
# -------------------------------- Swig ----------------------------------
|
|
|
|
find_package(SWIG)
|
|
|
|
if(NOT SWIG_FOUND)
|
|
message("==================================================\n"
|
|
"SWIG not found, don't build SWIG binding for pivy.\n"
|
|
"==================================================\n")
|
|
endif(NOT SWIG_FOUND)
|
|
|
|
# -------------------------------- Salome SMESH --------------------------
|
|
|
|
if(NOT FREECAD_USE_EXTERNAL_SMESH)
|
|
set(SMESH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc)
|
|
endif()
|
|
|
|
endif(FREECAD_LIBPACK_USE)
|
|
|
|
endmacro(FreeCADLibpackChecks)
|