# FindOpenCASCADE
# --------
#
# Find the OpenCASCADE libraries(Only for OpenCASCADE provided by FastCAE)
#
# Result Variables
# ^^^^^^^^^^^^^^^^
#
# The following variables will be defined:
#
# ``OpenCASCADE_FOUND`` True if OpenCASCADE found on the local system
#
# ``OpenCASCADE_VERSION`` OpenCASCADE Version(x.x.x)
#
# ``OpenCASCADE_VERSION_MAJOR`` OpenCASCADE Major Version
#
# ``OpenCASCADE_VERSION_MINOR`` OpenCASCADE Minor Version
#
# ``OpenCASCADE_VERSION_PATCH`` OpenCASCADE Patch Version
#
# ``OpenCASCADE_DIRS`` Location of OpenCASCADE(root dir)
#
# ``OpenCASCADE_INCLUDE_DIRS`` Location of OpenCASCADE header files
#
# ``OpenCASCADE_LIBRARY_DIRS`` Location of OpenCASCADE libraries
#
# ``OpenCASCADE_LIBRARIES`` List of the OpenCASCADE libraries found
#
# ``OpenCASCADE_BINARY_DIRS`` Location of OpenCASCADE binary
#

# 防止重复引入
if(FASTCAE_OpenCASCADE_ALREADY_INCLUDED)
	return()
endif()
set(FASTCAE_OpenCASCADE_ALREADY_INCLUDED 1)

set(OpenCASCADE_DIRS "${CMAKE_SOURCE_DIR}/extlib/OpenCASCADE")

set(OpenCASCADE_VERSION_MAJOR 7)
set(OpenCASCADE_VERSION_MINOR 6)
set(OpenCASCADE_VERSION_PATCH 0)

if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
	set(OpenCASCADE_INCLUDE_DIRS "${OpenCASCADE_DIRS}/inc")
	set(OpenCASCADE_LIBRARY_DIRS "${OpenCASCADE_DIRS}/win64/vc14/lib")
	set(OpenCASCADE_BINARY_DIRS "${OpenCASCADE_DIRS}/win64/vc14/bin")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
	set(OpenCASCADE_INCLUDE_DIRS "${OpenCASCADE_DIRS}/include/opencascade")
	set(OpenCASCADE_LIBRARY_DIRS "${OpenCASCADE_DIRS}/lib")
	set(OpenCASCADE_BINARY_DIRS "${OpenCASCADE_DIRS}/bin")
endif()

set(OpenCASCADE_VERSION "${OpenCASCADE_VERSION_MAJOR}.${OpenCASCADE_VERSION_MINOR}.${OpenCASCADE_VERSION_PATCH}")

macro(_populate_target_properties _target)
	add_library(${_target} SHARED IMPORTED)
	set_property(TARGET ${_target} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${OpenCASCADE_INCLUDE_DIRS})
	set_property(TARGET ${_target} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
	if(ARGC GREATER 1)
		set_property(TARGET ${_target} PROPERTY INTERFACE_LINK_LIBRARIES ARGN)
	endif()
	string(SUBSTRING ${_target} 13 -1 _target_name)
	if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
		set_target_properties(${_target} PROPERTIES
			IMPORTED_LOCATION_RELEASE "${OpenCASCADE_LIBRARY_DIRS}/lib${_target_name}.so.${OpenCASCADE_VERSION_MAJOR}.${OpenCASCADE_VERSION_MINOR}.${OpenCASCADE_VERSION_PATCH}"
			IMPORTED_SONAME_RELEASE "lib${_target_name}.so.${OpenCASCADE_VERSION_MAJOR}"
		)
	elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
		set_property(TARGET ${_target} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
		set_target_properties(${_target} PROPERTIES
			IMPORTED_IMPLIB_RELEASE "${OpenCASCADE_LIBRARY_DIRS}/${_target_name}.lib"
			IMPORTED_LOCATION_RELEASE "${OpenCASCADE_BINARY_DIRS}/${_target_name}.dll"
			IMPORTED_IMPLIB_DEBUG "${OpenCASCADE_LIBRARY_DIRS}d/${_target_name}.lib"
			IMPORTED_LOCATION_DEBUG "${OpenCASCADE_BINARY_DIRS}d/${_target_name}.dll"
		)
	endif()
endmacro()

add_library(OpenCASCADE::Freetype SHARED IMPORTED)
add_library(OpenCASCADE::Tcl86 SHARED IMPORTED)
add_library(OpenCASCADE::Tk86 SHARED IMPORTED)
set_property(TARGET OpenCASCADE::Freetype APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_property(TARGET OpenCASCADE::Tcl86 APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_property(TARGET OpenCASCADE::Tk86 APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
	set_target_properties(OpenCASCADE::Freetype PROPERTIES
		IMPORTED_LOCATION_RELEASE "${OpenCASCADE_LIBRARY_DIRS}/libfreetype.so.6"
	)
	set_target_properties(OpenCASCADE::Tcl86 PROPERTIES
		IMPORTED_LOCATION_RELEASE "${OpenCASCADE_LIBRARY_DIRS}/libtcl8.6.so"
	)
	set_target_properties(OpenCASCADE::Tk86 PROPERTIES
		IMPORTED_LOCATION_RELEASE "${OpenCASCADE_LIBRARY_DIRS}/libtk8.6.so"
	)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
	set_property(TARGET OpenCASCADE::Freetype APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
	set_property(TARGET OpenCASCADE::Tcl86 APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
	set_property(TARGET OpenCASCADE::Tk86 APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
	set_target_properties(OpenCASCADE::Freetype PROPERTIES
		IMPORTED_IMPLIB_RELEASE "${OpenCASCADE_LIBRARY_DIRS}/freetype.lib"
		IMPORTED_LOCATION_RELEASE "${OpenCASCADE_BINARY_DIRS}/freetype.dll"
		IMPORTED_IMPLIB_DEBUG "${OpenCASCADE_LIBRARY_DIRS}d/freetype.lib"
		IMPORTED_LOCATION_DEBUG "${OpenCASCADE_BINARY_DIRS}d/freetype.dll"
	)
	set_target_properties(OpenCASCADE::Tcl86 PROPERTIES
		IMPORTED_IMPLIB_RELEASE "${OpenCASCADE_LIBRARY_DIRS}/tcl86.lib"
		IMPORTED_LOCATION_RELEASE "${OpenCASCADE_BINARY_DIRS}/tcl86.dll"
		IMPORTED_IMPLIB_DEBUG "${OpenCASCADE_LIBRARY_DIRS}d/tcl86.lib"
		IMPORTED_LOCATION_DEBUG "${OpenCASCADE_BINARY_DIRS}d/tcl86.dll"
	)
	set_target_properties(OpenCASCADE::Tk86 PROPERTIES
		IMPORTED_IMPLIB_RELEASE "${OpenCASCADE_LIBRARY_DIRS}/tk86.lib"
		IMPORTED_LOCATION_RELEASE "${OpenCASCADE_BINARY_DIRS}/tk86.dll"
		IMPORTED_IMPLIB_DEBUG "${OpenCASCADE_LIBRARY_DIRS}d/tk86.lib"
		IMPORTED_LOCATION_DEBUG "${OpenCASCADE_BINARY_DIRS}d/tk86.dll"
	)
endif()

# List of available OpenCASCADE libraries for each module
set (OpenCASCADE_FoundationClasses_LIBRARIES OpenCASCADE::TKernel OpenCASCADE::TKMath)
set (OpenCASCADE_ModelingData_LIBRARIES OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKGeomBase OpenCASCADE::TKBRep)
set (OpenCASCADE_ModelingAlgorithms_LIBRARIES OpenCASCADE::TKGeomAlgo OpenCASCADE::TKTopAlgo OpenCASCADE::TKPrim OpenCASCADE::TKBO OpenCASCADE::TKShHealing OpenCASCADE::TKBool OpenCASCADE::TKHLR OpenCASCADE::TKFillet OpenCASCADE::TKOffset OpenCASCADE::TKFeat OpenCASCADE::TKMesh OpenCASCADE::TKXMesh)
set (OpenCASCADE_Visualization_LIBRARIES OpenCASCADE::TKService OpenCASCADE::TKV3d OpenCASCADE::TKOpenGl OpenCASCADE::TKMeshVS OpenCASCADE::TKIVtk)
set (OpenCASCADE_ApplicationFramework_LIBRARIES OpenCASCADE::TKCDF OpenCASCADE::TKLCAF OpenCASCADE::TKCAF OpenCASCADE::TKBinL OpenCASCADE::TKXmlL OpenCASCADE::TKBin OpenCASCADE::TKXml OpenCASCADE::TKStdL OpenCASCADE::TKStd OpenCASCADE::TKTObj OpenCASCADE::TKBinTObj OpenCASCADE::TKXmlTObj OpenCASCADE::TKVCAF)
set (OpenCASCADE_DataExchange_LIBRARIES OpenCASCADE::TKXSBase OpenCASCADE::TKSTEPBase OpenCASCADE::TKSTEPAttr OpenCASCADE::TKSTEP209 OpenCASCADE::TKSTEP OpenCASCADE::TKIGES OpenCASCADE::TKXCAF OpenCASCADE::TKXDEIGES OpenCASCADE::TKXDESTEP OpenCASCADE::TKSTL OpenCASCADE::TKVRML OpenCASCADE::TKXmlXCAF OpenCASCADE::TKBinXCAF OpenCASCADE::TKRWMesh)
set (OpenCASCADE_Draw_LIBRARIES OpenCASCADE::TKDraw OpenCASCADE::TKTopTest OpenCASCADE::TKOpenGlTest OpenCASCADE::TKViewerTest OpenCASCADE::TKXSDRAW OpenCASCADE::TKDCAF OpenCASCADE::TKXDEDRAW OpenCASCADE::TKTObjDRAW OpenCASCADE::TKQADraw OpenCASCADE::TKIVtkDraw)

# List of available OpenCASCADE libraries.
set (OpenCASCADE_LIBRARIES OpenCASCADE::Freetype OpenCASCADE::Tcl86 OpenCASCADE::Tk86 OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKGeomBase OpenCASCADE::TKBRep OpenCASCADE::TKGeomAlgo OpenCASCADE::TKTopAlgo OpenCASCADE::TKPrim OpenCASCADE::TKBO OpenCASCADE::TKShHealing OpenCASCADE::TKBool OpenCASCADE::TKHLR OpenCASCADE::TKFillet OpenCASCADE::TKOffset OpenCASCADE::TKFeat OpenCASCADE::TKMesh OpenCASCADE::TKXMesh OpenCASCADE::TKService OpenCASCADE::TKV3d OpenCASCADE::TKOpenGl OpenCASCADE::TKMeshVS OpenCASCADE::TKIVtk OpenCASCADE::TKCDF OpenCASCADE::TKLCAF OpenCASCADE::TKCAF OpenCASCADE::TKBinL OpenCASCADE::TKXmlL OpenCASCADE::TKBin OpenCASCADE::TKXml OpenCASCADE::TKStdL OpenCASCADE::TKStd OpenCASCADE::TKTObj OpenCASCADE::TKBinTObj OpenCASCADE::TKXmlTObj OpenCASCADE::TKVCAF OpenCASCADE::TKXSBase OpenCASCADE::TKSTEPBase OpenCASCADE::TKSTEPAttr OpenCASCADE::TKSTEP209 OpenCASCADE::TKSTEP OpenCASCADE::TKIGES OpenCASCADE::TKXCAF OpenCASCADE::TKXDEIGES OpenCASCADE::TKXDESTEP OpenCASCADE::TKSTL OpenCASCADE::TKVRML OpenCASCADE::TKXmlXCAF OpenCASCADE::TKBinXCAF OpenCASCADE::TKRWMesh OpenCASCADE::TKDraw OpenCASCADE::TKTopTest OpenCASCADE::TKOpenGlTest OpenCASCADE::TKViewerTest OpenCASCADE::TKXSDRAW OpenCASCADE::TKDCAF OpenCASCADE::TKXDEDRAW OpenCASCADE::TKTObjDRAW OpenCASCADE::TKQADraw OpenCASCADE::TKIVtkDraw)

_populate_target_properties(OpenCASCADE::TKernel)
_populate_target_properties(OpenCASCADE::TKMath OpenCASCADE::TKernel)

_populate_target_properties(OpenCASCADE::TKG2d OpenCASCADE::TKernel OpenCASCADE::TKMath)
_populate_target_properties(OpenCASCADE::TKG3d OpenCASCADE::TKMath OpenCASCADE::TKernel OpenCASCADE::TKG2d)
_populate_target_properties(OpenCASCADE::TKGeomBase OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKG2d OpenCASCADE::TKG3d)
_populate_target_properties(OpenCASCADE::TKBRep OpenCASCADE::TKMath OpenCASCADE::TKernel OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKGeomBase)

_populate_target_properties(OpenCASCADE::TKGeomAlgo OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKG3d OpenCASCADE::TKG2d OpenCASCADE::TKGeomBase OpenCASCADE::TKBRep)
_populate_target_properties(OpenCASCADE::TKTopAlgo OpenCASCADE::TKMath OpenCASCADE::TKernel OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKGeomBase OpenCASCADE::TKBRep OpenCASCADE::TKGeomAlgo)
_populate_target_properties(OpenCASCADE::TKPrim OpenCASCADE::TKBRep OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKG2d OpenCASCADE::TKGeomBase OpenCASCADE::TKG3d OpenCASCADE::TKTopAlgo)
_populate_target_properties(OpenCASCADE::TKBO OpenCASCADE::TKBRep OpenCASCADE::TKTopAlgo OpenCASCADE::TKMath OpenCASCADE::TKernel OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKGeomAlgo OpenCASCADE::TKGeomBase OpenCASCADE::TKPrim OpenCASCADE::TKShHealing)
_populate_target_properties(OpenCASCADE::TKShHealing OpenCASCADE::TKBRep OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKG2d OpenCASCADE::TKTopAlgo OpenCASCADE::TKG3d OpenCASCADE::TKGeomBase OpenCASCADE::TKGeomAlgo)
_populate_target_properties(OpenCASCADE::TKBool OpenCASCADE::TKBRep OpenCASCADE::TKTopAlgo OpenCASCADE::TKMath OpenCASCADE::TKernel OpenCASCADE::TKPrim OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKShHealing OpenCASCADE::TKGeomBase OpenCASCADE::TKGeomAlgo OpenCASCADE::TKBO)
_populate_target_properties(OpenCASCADE::TKHLR OpenCASCADE::TKBRep OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKGeomBase OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKGeomAlgo OpenCASCADE::TKTopAlgo)
_populate_target_properties(OpenCASCADE::TKFillet OpenCASCADE::TKBRep OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKGeomBase OpenCASCADE::TKGeomAlgo OpenCASCADE::TKG2d OpenCASCADE::TKTopAlgo OpenCASCADE::TKG3d OpenCASCADE::TKBool OpenCASCADE::TKShHealing OpenCASCADE::TKBO)
_populate_target_properties(OpenCASCADE::TKOffset OpenCASCADE::TKFillet OpenCASCADE::TKBRep OpenCASCADE::TKTopAlgo OpenCASCADE::TKMath OpenCASCADE::TKernel OpenCASCADE::TKGeomBase OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKGeomAlgo OpenCASCADE::TKShHealing OpenCASCADE::TKBO OpenCASCADE::TKPrim OpenCASCADE::TKBool)
_populate_target_properties(OpenCASCADE::TKFeat OpenCASCADE::TKBRep OpenCASCADE::TKTopAlgo OpenCASCADE::TKGeomAlgo OpenCASCADE::TKMath OpenCASCADE::TKernel OpenCASCADE::TKGeomBase OpenCASCADE::TKPrim OpenCASCADE::TKG2d OpenCASCADE::TKBO OpenCASCADE::TKG3d OpenCASCADE::TKBool OpenCASCADE::TKShHealing)
_populate_target_properties(OpenCASCADE::TKMesh OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKBRep OpenCASCADE::TKTopAlgo OpenCASCADE::TKShHealing OpenCASCADE::TKGeomBase OpenCASCADE::TKG3d OpenCASCADE::TKG2d)
_populate_target_properties(OpenCASCADE::TKXMesh OpenCASCADE::TKBRep OpenCASCADE::TKMath OpenCASCADE::TKernel OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKMesh)

_populate_target_properties(OpenCASCADE::TKService OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::Freetype)
_populate_target_properties(OpenCASCADE::TKV3d OpenCASCADE::TKBRep OpenCASCADE::TKMath OpenCASCADE::TKernel OpenCASCADE::TKService OpenCASCADE::TKShHealing OpenCASCADE::TKTopAlgo OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKGeomBase OpenCASCADE::TKMesh OpenCASCADE::TKGeomAlgo OpenCASCADE::TKHLR OpenCASCADE::Freetype)
_populate_target_properties(OpenCASCADE::TKOpenGl OpenCASCADE::TKernel OpenCASCADE::TKService OpenCASCADE::TKMath)
_populate_target_properties(OpenCASCADE::TKMeshVS OpenCASCADE::TKV3d OpenCASCADE::TKMath OpenCASCADE::TKService OpenCASCADE::TKernel OpenCASCADE::TKG3d OpenCASCADE::TKG2d)
_populate_target_properties(OpenCASCADE::TKIVtk OpenCASCADE::TKernel OpenCASCADE::TKBRep OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKGeomAlgo OpenCASCADE::TKGeomBase OpenCASCADE::TKMath OpenCASCADE::TKMesh OpenCASCADE::TKService OpenCASCADE::TKTopAlgo OpenCASCADE::TKV3d VTK::CommonCore VTK::RenderingCore VTK::RenderingFreeType VTK::FiltersGeneral VTK::InteractionStyle VTK::RenderingOpenGL2 VTK::RenderingGL2PSOpenGL2)

_populate_target_properties(OpenCASCADE::TKCDF OpenCASCADE::TKernel)
_populate_target_properties(OpenCASCADE::TKLCAF OpenCASCADE::TKCDF OpenCASCADE::TKernel)
_populate_target_properties(OpenCASCADE::TKCAF OpenCASCADE::TKernel OpenCASCADE::TKGeomBase OpenCASCADE::TKBRep OpenCASCADE::TKTopAlgo OpenCASCADE::TKMath OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKCDF OpenCASCADE::TKLCAF OpenCASCADE::TKBO)
_populate_target_properties(OpenCASCADE::TKBinL OpenCASCADE::TKCDF OpenCASCADE::TKernel OpenCASCADE::TKLCAF)
_populate_target_properties(OpenCASCADE::TKXmlL OpenCASCADE::TKCDF OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKLCAF)
_populate_target_properties(OpenCASCADE::TKBin OpenCASCADE::TKBRep OpenCASCADE::TKMath OpenCASCADE::TKernel OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKCAF OpenCASCADE::TKCDF OpenCASCADE::TKLCAF OpenCASCADE::TKBinL)
_populate_target_properties(OpenCASCADE::TKXml OpenCASCADE::TKCDF OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKBRep OpenCASCADE::TKG2d OpenCASCADE::TKGeomBase OpenCASCADE::TKG3d OpenCASCADE::TKLCAF OpenCASCADE::TKCAF OpenCASCADE::TKXmlL)
_populate_target_properties(OpenCASCADE::TKStdL OpenCASCADE::TKernel OpenCASCADE::TKCDF OpenCASCADE::TKLCAF)
_populate_target_properties(OpenCASCADE::TKStd OpenCASCADE::TKernel OpenCASCADE::TKCDF OpenCASCADE::TKCAF OpenCASCADE::TKLCAF OpenCASCADE::TKBRep OpenCASCADE::TKMath OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKStdL)
_populate_target_properties(OpenCASCADE::TKTObj OpenCASCADE::TKCDF OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKLCAF)
_populate_target_properties(OpenCASCADE::TKBinTObj OpenCASCADE::TKCDF OpenCASCADE::TKernel OpenCASCADE::TKTObj OpenCASCADE::TKMath OpenCASCADE::TKLCAF OpenCASCADE::TKBinL)
_populate_target_properties(OpenCASCADE::TKXmlTObj OpenCASCADE::TKCDF OpenCASCADE::TKernel OpenCASCADE::TKTObj OpenCASCADE::TKMath OpenCASCADE::TKLCAF OpenCASCADE::TKXmlL)
_populate_target_properties(OpenCASCADE::TKVCAF OpenCASCADE::TKernel OpenCASCADE::TKGeomBase OpenCASCADE::TKBRep OpenCASCADE::TKTopAlgo OpenCASCADE::TKMath OpenCASCADE::TKService OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKCDF OpenCASCADE::TKLCAF OpenCASCADE::TKBO OpenCASCADE::TKCAF OpenCASCADE::TKV3d)

_populate_target_properties(OpenCASCADE::TKXSBase OpenCASCADE::TKBRep OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKTopAlgo OpenCASCADE::TKGeomBase OpenCASCADE::TKShHealing)
_populate_target_properties(OpenCASCADE::TKSTEPBase OpenCASCADE::TKernel OpenCASCADE::TKXSBase OpenCASCADE::TKMath)
_populate_target_properties(OpenCASCADE::TKSTEPAttr OpenCASCADE::TKernel OpenCASCADE::TKXSBase OpenCASCADE::TKSTEPBase)
_populate_target_properties(OpenCASCADE::TKSTEP209 OpenCASCADE::TKernel OpenCASCADE::TKXSBase OpenCASCADE::TKSTEPBase)
_populate_target_properties(OpenCASCADE::TKSTEP OpenCASCADE::TKernel OpenCASCADE::TKSTEPAttr OpenCASCADE::TKSTEP209 OpenCASCADE::TKSTEPBase OpenCASCADE::TKBRep OpenCASCADE::TKMath OpenCASCADE::TKG2d OpenCASCADE::TKShHealing OpenCASCADE::TKTopAlgo OpenCASCADE::TKG3d OpenCASCADE::TKGeomBase OpenCASCADE::TKGeomAlgo OpenCASCADE::TKXSBase)
_populate_target_properties(OpenCASCADE::TKIGES OpenCASCADE::TKBRep OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKTopAlgo OpenCASCADE::TKShHealing OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKGeomBase OpenCASCADE::TKGeomAlgo OpenCASCADE::TKPrim OpenCASCADE::TKBool OpenCASCADE::TKXSBase)
_populate_target_properties(OpenCASCADE::TKXCAF OpenCASCADE::TKBRep OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKService OpenCASCADE::TKG2d OpenCASCADE::TKTopAlgo OpenCASCADE::TKV3d OpenCASCADE::TKCDF OpenCASCADE::TKLCAF OpenCASCADE::TKG3d OpenCASCADE::TKCAF OpenCASCADE::TKVCAF)
_populate_target_properties(OpenCASCADE::TKXDEIGES OpenCASCADE::TKBRep OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKXSBase OpenCASCADE::TKCDF OpenCASCADE::TKLCAF OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKXCAF OpenCASCADE::TKIGES)
_populate_target_properties(OpenCASCADE::TKXDESTEP OpenCASCADE::TKBRep OpenCASCADE::TKSTEPAttr OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKXSBase OpenCASCADE::TKTopAlgo OpenCASCADE::TKG2d OpenCASCADE::TKCAF OpenCASCADE::TKSTEPBase OpenCASCADE::TKCDF OpenCASCADE::TKLCAF OpenCASCADE::TKG3d OpenCASCADE::TKXCAF OpenCASCADE::TKSTEP OpenCASCADE::TKShHealing)
_populate_target_properties(OpenCASCADE::TKSTL OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKBRep OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKTopAlgo)
_populate_target_properties(OpenCASCADE::TKVRML OpenCASCADE::TKBRep OpenCASCADE::TKTopAlgo OpenCASCADE::TKMath OpenCASCADE::TKGeomBase OpenCASCADE::TKernel OpenCASCADE::TKPrim OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKMesh OpenCASCADE::TKHLR OpenCASCADE::TKService OpenCASCADE::TKGeomAlgo OpenCASCADE::TKV3d OpenCASCADE::TKLCAF OpenCASCADE::TKXCAF)
_populate_target_properties(OpenCASCADE::TKXmlXCAF OpenCASCADE::TKXmlL OpenCASCADE::TKBRep OpenCASCADE::TKCDF OpenCASCADE::TKMath OpenCASCADE::TKernel OpenCASCADE::TKService OpenCASCADE::TKG2d OpenCASCADE::TKGeomBase OpenCASCADE::TKCAF OpenCASCADE::TKG3d OpenCASCADE::TKLCAF OpenCASCADE::TKXCAF OpenCASCADE::TKXml)
_populate_target_properties(OpenCASCADE::TKBinXCAF OpenCASCADE::TKBRep OpenCASCADE::TKXCAF OpenCASCADE::TKMath OpenCASCADE::TKService OpenCASCADE::TKernel OpenCASCADE::TKBinL OpenCASCADE::TKG2d OpenCASCADE::TKCAF OpenCASCADE::TKCDF OpenCASCADE::TKG3d OpenCASCADE::TKLCAF OpenCASCADE::TKBin)
_populate_target_properties(OpenCASCADE::TKRWMesh OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKMesh OpenCASCADE::TKXCAF OpenCASCADE::TKLCAF OpenCASCADE::TKV3d OpenCASCADE::TKBRep OpenCASCADE::TKG3d OpenCASCADE::TKService)

_populate_target_properties(OpenCASCADE::TKDraw OpenCASCADE::TKernel OpenCASCADE::TKG2d OpenCASCADE::TKGeomBase OpenCASCADE::TKG3d OpenCASCADE::TKMath OpenCASCADE::TKBRep OpenCASCADE::TKGeomAlgo OpenCASCADE::TKTopAlgo OpenCASCADE::TKShHealing OpenCASCADE::TKMesh OpenCASCADE::TKService OpenCASCADE::TKHLR OpenCASCADE::Tcl86 OpenCASCADE::Tk86)
_populate_target_properties(OpenCASCADE::TKTopTest OpenCASCADE::TKBRep OpenCASCADE::TKGeomAlgo OpenCASCADE::TKTopAlgo OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKBO OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKDraw OpenCASCADE::TKHLR OpenCASCADE::TKGeomBase OpenCASCADE::TKMesh OpenCASCADE::TKService OpenCASCADE::TKV3d OpenCASCADE::TKFillet OpenCASCADE::TKPrim OpenCASCADE::TKBool OpenCASCADE::TKOffset OpenCASCADE::TKFeat OpenCASCADE::TKShHealing)
_populate_target_properties(OpenCASCADE::TKOpenGlTest OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKDraw OpenCASCADE::TKOpenGl OpenCASCADE::TKService OpenCASCADE::TKV3d OpenCASCADE::TKViewerTest)
_populate_target_properties(OpenCASCADE::TKViewerTest OpenCASCADE::TKGeomBase OpenCASCADE::TKFillet OpenCASCADE::TKBRep OpenCASCADE::TKTopAlgo OpenCASCADE::TKHLR OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKService OpenCASCADE::TKShHealing OpenCASCADE::TKBool OpenCASCADE::TKPrim OpenCASCADE::TKGeomAlgo OpenCASCADE::TKG2d OpenCASCADE::TKTopTest OpenCASCADE::TKG3d OpenCASCADE::TKOffset OpenCASCADE::TKMesh OpenCASCADE::TKV3d OpenCASCADE::TKDraw OpenCASCADE::Tcl86 OpenCASCADE::Freetype)
_populate_target_properties(OpenCASCADE::TKXSDRAW OpenCASCADE::TKBRep OpenCASCADE::TKV3d OpenCASCADE::TKMath OpenCASCADE::TKernel OpenCASCADE::TKService OpenCASCADE::TKXSBase OpenCASCADE::TKMeshVS OpenCASCADE::TKG3d OpenCASCADE::TKViewerTest OpenCASCADE::TKG2d OpenCASCADE::TKSTEPBase OpenCASCADE::TKTopAlgo OpenCASCADE::TKGeomBase OpenCASCADE::TKGeomAlgo OpenCASCADE::TKMesh OpenCASCADE::TKDraw OpenCASCADE::TKSTEP OpenCASCADE::TKIGES OpenCASCADE::TKSTL OpenCASCADE::TKVRML OpenCASCADE::TKLCAF OpenCASCADE::TKDCAF OpenCASCADE::TKXCAF OpenCASCADE::TKRWMesh)
_populate_target_properties(OpenCASCADE::TKDCAF OpenCASCADE::TKGeomBase OpenCASCADE::TKBRep OpenCASCADE::TKGeomAlgo OpenCASCADE::TKernel OpenCASCADE::TKMath OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKDraw OpenCASCADE::TKCDF OpenCASCADE::TKV3d OpenCASCADE::TKService OpenCASCADE::TKLCAF OpenCASCADE::TKFillet OpenCASCADE::TKTopAlgo OpenCASCADE::TKPrim OpenCASCADE::TKBool OpenCASCADE::TKBO OpenCASCADE::TKCAF OpenCASCADE::TKVCAF OpenCASCADE::TKViewerTest OpenCASCADE::TKStd OpenCASCADE::TKStdL OpenCASCADE::TKBin OpenCASCADE::TKBinL OpenCASCADE::TKXml OpenCASCADE::TKXmlL)
_populate_target_properties(OpenCASCADE::TKXDEDRAW OpenCASCADE::TKCDF OpenCASCADE::TKBRep OpenCASCADE::TKXCAF OpenCASCADE::TKernel OpenCASCADE::TKIGES OpenCASCADE::TKV3d OpenCASCADE::TKMath OpenCASCADE::TKService OpenCASCADE::TKXSBase OpenCASCADE::TKG2d OpenCASCADE::TKCAF OpenCASCADE::TKVCAF OpenCASCADE::TKDraw OpenCASCADE::TKTopAlgo OpenCASCADE::TKLCAF OpenCASCADE::TKG3d OpenCASCADE::TKSTEPBase OpenCASCADE::TKSTEP OpenCASCADE::TKMesh OpenCASCADE::TKXSDRAW OpenCASCADE::TKXDEIGES OpenCASCADE::TKXDESTEP OpenCASCADE::TKDCAF OpenCASCADE::TKViewerTest OpenCASCADE::TKBinXCAF OpenCASCADE::TKXmlXCAF OpenCASCADE::TKVRML)
_populate_target_properties(OpenCASCADE::TKTObjDRAW OpenCASCADE::TKernel OpenCASCADE::TKCDF OpenCASCADE::TKLCAF OpenCASCADE::TKTObj OpenCASCADE::TKMath OpenCASCADE::TKDraw OpenCASCADE::TKDCAF OpenCASCADE::TKBinTObj OpenCASCADE::TKXmlTObj)
_populate_target_properties(OpenCASCADE::TKQADraw OpenCASCADE::TKBRep OpenCASCADE::TKMath OpenCASCADE::TKernel OpenCASCADE::TKService OpenCASCADE::TKG2d OpenCASCADE::TKDraw OpenCASCADE::TKV3d OpenCASCADE::TKGeomBase OpenCASCADE::TKG3d OpenCASCADE::TKViewerTest OpenCASCADE::TKCDF OpenCASCADE::TKDCAF OpenCASCADE::TKLCAF OpenCASCADE::TKFillet OpenCASCADE::TKTopAlgo OpenCASCADE::TKHLR OpenCASCADE::TKBool OpenCASCADE::TKGeomAlgo OpenCASCADE::TKPrim OpenCASCADE::TKBO OpenCASCADE::TKShHealing OpenCASCADE::TKOffset OpenCASCADE::TKFeat OpenCASCADE::TKCAF OpenCASCADE::TKVCAF OpenCASCADE::TKIGES OpenCASCADE::TKXSBase OpenCASCADE::TKMesh OpenCASCADE::TKXCAF OpenCASCADE::TKBinXCAF OpenCASCADE::TKSTEP OpenCASCADE::TKSTEPBase OpenCASCADE::TKXDESTEP OpenCASCADE::TKXSDRAW OpenCASCADE::TKSTL OpenCASCADE::TKXml OpenCASCADE::TKTObj OpenCASCADE::TKXmlL OpenCASCADE::TKBin OpenCASCADE::TKBinL OpenCASCADE::TKStd OpenCASCADE::TKStdL)
_populate_target_properties(OpenCASCADE::TKIVtkDraw OpenCASCADE::TKernel OpenCASCADE::TKBRep OpenCASCADE::TKDraw OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKGeomAlgo OpenCASCADE::TKGeomBase OpenCASCADE::TKMath OpenCASCADE::TKMesh OpenCASCADE::TKService OpenCASCADE::TKTopAlgo OpenCASCADE::TKV3d OpenCASCADE::TKOpenGl OpenCASCADE::TKIVtk VTK::IOImage VTK::ImagingCore VTK::InteractionStyle VTK::RenderingOpenGL2 VTK::RenderingGL2PSOpenGL2 OpenCASCADE::Tcl86)


include(FindPackageHandleStandardArgs)

# 如果找到所有需要的变量，并且版本匹配，则将OpenCASCADE_FOUND变量设置为TRUE
find_package_handle_standard_args(OpenCASCADE
	FOUND_VAR
		OpenCASCADE_FOUND
	REQUIRED_VARS
		OpenCASCADE_DIRS
		OpenCASCADE_INCLUDE_DIRS
		OpenCASCADE_LIBRARY_DIRS
		OpenCASCADE_LIBRARIES
		OpenCASCADE_BINARY_DIRS
	VERSION_VAR
		OpenCASCADE_VERSION
)