Merge pull request #341 from wwmayer/occ_switch

Add cmake switch to choose between official OpenCascade version and c…
This commit is contained in:
wwmayer 2016-11-17 21:10:51 +01:00 committed by GitHub
commit 140a14c58c
2 changed files with 11 additions and 1 deletions

View File

@ -158,6 +158,13 @@ OPTION(FREECAD_USE_EXTERNAL_KDL "Use system installed orocos-kdl instead of the
OPTION(FREECAD_USE_FREETYPE "Builds the features using FreeType libs" ON)
OPTION(FREECAD_BUILD_DEBIAN "Prepare for a build of a Debian package" OFF)
# 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")
set_property(CACHE FREECAD_USE_OCC_VARIANT PROPERTY STRINGS
"Official Version"
"Community Edition"
)
if(APPLE)
OPTION(FREECAD_CREATE_MAC_APP "Create app bundle on install" OFF)

View File

@ -23,7 +23,10 @@ if(NOT DEFINED OCE_DIR)
endif()
endif()
find_package(OCE QUIET)
if(${FREECAD_USE_OCC_VARIANT} MATCHES "Community Edition")
find_package(OCE QUIET)
endif()
if(OCE_FOUND)
message(STATUS "-- OpenCASCADE Community Edition has been found.")
# Disable this define. For more details see bug #0001872