Files
create/src/Mod/Surface/Gui/CMakeLists.txt
Chris Hennes 2f7be9e782 cMake: Add support for compiling against Qt6 (#7647)
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.
2022-10-31 09:24:09 -05:00

84 lines
1.9 KiB
CMake

if(MSVC)
add_definitions(-DHAVE_ACOSH -DHAVE_ATANH -DHAVE_ASINH)
else(MSVC)
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H)
endif(MSVC)
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/src
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIRS}
${COIN3D_INCLUDE_DIRS}
${OCC_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${XercesC_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR}
)
set(SurfaceGui_LIBS
Surface
PartGui
FreeCADGui
)
qt_add_resources(SurfaceGui_QRC_SRCS Resources/Surface.qrc)
SET(SurfaceGui_UIC_SRCS
TaskFilling.ui
TaskFillingEdge.ui
TaskFillingVertex.ui
TaskGeomFillSurface.ui
TaskSections.ui
)
SET(BlendingGui_SRCS
Blending/ViewProviderBlendCurve.cpp
Blending/ViewProviderBlendCurve.h
)
SET(SurfaceGui_SRCS
${SurfaceGui_QRC_SRCS}
${SurfaceGui_UIC_HDRS}
${BlendingGui_SRCS}
TaskFilling.cpp
TaskFilling.h
TaskFillingEdge.cpp
TaskFillingEdge.h
TaskFillingVertex.cpp
TaskFillingVertex.h
TaskGeomFillSurface.cpp
TaskGeomFillSurface.h
TaskSections.cpp
TaskSections.h
AppSurfaceGui.cpp
Command.cpp
PreCompiled.cpp
PreCompiled.h
ViewProviderExtend.cpp
ViewProviderExtend.h
Workbench.cpp
Workbench.h
# ViewProviderCut.cpp
# ViewProviderCut.h
)
SET(SurfaceGuiIcon_SVG
Resources/icons/Surface_Workbench.svg
)
link_directories(${OCC_LIBRARY_DIR})
add_library(SurfaceGui SHARED ${SurfaceGui_SRCS} ${SurfaceGuiIcon_SVG})
target_link_libraries(SurfaceGui ${SurfaceGui_LIBS})
SET_BIN_DIR(SurfaceGui SurfaceGui /Mod/Surface)
SET_PYTHON_PREFIX_SUFFIX(SurfaceGui)
fc_copy_sources(SurfaceGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Surface" ${SurfaceGuiIcon_SVG})
install(TARGETS SurfaceGui DESTINATION ${CMAKE_INSTALL_LIBDIR})
INSTALL(FILES ${SurfaceGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Surface/Resources/icons")