Skip to content

Commit

Permalink
Add cmake switch to choose between official OpenCascade version and c…
Browse files Browse the repository at this point in the history
…ommunity edition
  • Loading branch information
wwmayer committed Nov 17, 2016
1 parent 8724eae commit aba8006
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Expand Up @@ -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)

Expand Down
5 changes: 4 additions & 1 deletion cMake/FindOpenCasCade.cmake
Expand Up @@ -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
Expand Down

0 comments on commit aba8006

Please sign in to comment.