Make OpenCascade more secondary

The opencascade patch intrusively checked against libraries but broke
some build scripts.  This restores the default cmake OCE behavior that was
changed by 2bab30d9a and makes the OpenCascade search truly secondary.
This commit is contained in:
Seth Hillbrand 2018-05-15 06:40:25 -07:00
parent 538ab0eb3f
commit 584409b2ef
4 changed files with 12 additions and 3 deletions

View File

@ -627,11 +627,16 @@ if( KICAD_SPICE )
endif()
# Find OpenCascade Community Edition, required for STEP plugin and tools
if( KICAD_USE_OCE OR KICAD_USE_OCC )
if( KICAD_USE_OCE )
set( OCC_LIBRARIES TKBinXCAF TKPCAF TKSTEP TKXDESTEP TKIGES TKXDEIGES )
find_package( OCE 0.16 REQUIRED ${OCC_LIBRARIES} )
elseif( KICAD_USE_OCC )
find_package(OpenCASCADE)
if( NOT OCC_FOUND )
MESSAGE( FATAL_ERROR "================================================================\n"
"Neither OpenCASCADE Community Edition nor OpenCASCADE was found!\n"
" KICAD_USE_OCC=True but OpenCASCADE was no found!\n"
"================================================================\n")
endif()
if( OCC_VERSION_STRING VERSION_LESS 6.8.0 )

View File

@ -13,6 +13,8 @@ include_directories(
${GLEW_INCLUDE_DIR}
${GLM_INCLUDE_DIR}
${CURL_INCLUDE_DIRS}
${OCE_INCLUDE_DIRS}
${OCC_INCLUDE_DIR}
../3d-viewer
../pcbnew
../polygon

View File

@ -13,6 +13,7 @@
#
include_directories( SYSTEM
${OCE_INCLUDE_DIRS}
${OCC_INCLUDE_DIR}
)

View File

@ -4,7 +4,8 @@ include_directories( BEFORE
${CMAKE_SOURCE_DIR}/include
)
include_directories( SYSTEM
include_directories( SYSTEM
${OCE_INCLUDE_DIRS}
${OCC_INCLUDE_DIR}
)