Fix FindOpenCasCade.cmake

This commit is contained in:
Matthias Hochsteger 2020-03-02 17:04:11 +01:00
parent 63e414ff0d
commit 0bcee4d6b0

View File

@ -25,7 +25,7 @@ else(WIN32)
)
endif(WIN32)
if(OCC_LIBRARY)
if(OCC_LIBRARY AND NOT OCC_LIBRARY_DIR)
get_filename_component(OCC_LIBRARY_DIR ${OCC_LIBRARY} PATH)
endif(OCC_LIBRARY)
@ -89,7 +89,7 @@ if(OCC_VERSION_STRING VERSION_GREATER_EQUAL "7.3.0")
endif()
foreach( libname ${OCC_LIBRARY_NAMES} )
find_library( ${libname} ${libname} ${OCC_LIBRARY_DIR} )
find_library( ${libname} ${libname} ${OCC_LIBRARY_DIR} NO_DEFAULT_PATH)
set(OCC_LIBRARIES ${OCC_LIBRARIES} ${${libname}})
endforeach()