https://github.com/root-project/root
Tip revision: 39967e6bf736268509af1cb5f9f233d51db3a634 authored by Pere Mato on 08 October 2015, 09:43:42 UTC
Update ROOT version files to v6.04/04.
Update ROOT version files to v6.04/04.
Tip revision: 39967e6
FindOCC.cmake
# - Try to find OpenCASCADE libraries
### Does not test what version has been found,though
### that could be done by parsing Standard_Version.hxx
# Once done, this will define
# OCC_FOUND - true if OCC has been found
# OCC_INCLUDE_DIR - the OCC include dir
# OCC_LIBRARIES (not cached) - full path of OCC libraries
set(_occdirs ${CASROOT} ${CASS_DIR} $ENV{CASROOT} /opt/occ)
find_path(OCC_INCLUDE_DIR
NAMES Standard_Real.hxx
HINTS ${_occdirs} /usr/include/opencascade
PATH_SUFFIXES inc
DOC "Specify the directory containing Standard_Real.hxx")
foreach(_libname ${OCC_FIND_COMPONENTS})
list(APPEND OCC_REQUIRED_LIBRARIES OCC_${_libname}_LIBRARY)
find_library(OCC_${_libname}_LIBRARY $
NAMES ${_libname}
HINTS ${_occdirs}
PATH_SUFFIXES lib)
if(OCC_${_libname}_LIBRARY)
list(APPEND OCC_LIBRARIES ${OCC_${_libname}_LIBRARY})
endif()
endforeach()
# handle the QUIETLY and REQUIRED arguments and set OCC_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OCC DEFAULT_MSG OCC_INCLUDE_DIR ${OCC_REQUIRED_LIBRARIES})
mark_as_advanced(OCC_INCLUDE_DIR ${OCC_REQUIRED_LIBRARIES})