-
Notifications
You must be signed in to change notification settings - Fork 14
/
FindOpenCascade.cmake
executable file
·74 lines (62 loc) · 1.48 KB
/
FindOpenCascade.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
include( FindPackageHandleStandardArgs )
find_path( OPENCASCADE_INCLUDE_DIR Standard.hxx PATHS
$ENV{CONDA_PREFIX}/include/opencascade
$ENV{CONDA_PREFIX}/Library/include/opencascade )
set ( OCCT_MODULES
TKMath
TKernel
TKG2d
TKG3d
TKGeomBase
TKBRep
TKGeomAlgo
TKTopAlgo
TKPrim
TKShHealing
TKHLR
TKBO
TKBool
TKFeat
TKOffset
TKFillet
TKMesh
TKXMesh
TKXSBase
TKService
TKV3d
TKOpenGl
TKMeshVS
TKBin
TKBinL
TKBinTObj
TKCAF
TKCDF
TKLCAF
TKStd
TKStdL
TKTObj
TKVCAF
TKXml
TKXmlL
TKXmlTObj
TKIGES
TKSTEP
TKSTEP209
TKSTEPAttr
TKSTEPBase
TKSTL
TKXDESTEP
TKXCAF)
add_library( OPENCASCADE INTERFACE )
foreach( MOD ${OCCT_MODULES})
find_library( OPENCASCADE_LIB_${MOD} NAMES ${MOD} PATHS
$ENV{CONDA_PREFIX}/lib $ENV{CONDA_PREFIX}/Library/lib )
add_library( OPENCASCADE_${MOD} UNKNOWN IMPORTED)
set_target_properties( OPENCASCADE_${MOD}
PROPERTIES
IMPORTED_LOCATION "${OPENCASCADE_LIB_${MOD}}" )
target_link_libraries( OPENCASCADE INTERFACE OPENCASCADE_${MOD} )
list( APPEND OPENCASCADE_LIBRARIES ${OPENCASCADE_LIB_${MOD}} )
endforeach()
target_include_directories( OPENCASCADE INTERFACE ${OPENCASCADE_INCLUDE_DIR})
find_package_handle_standard_args( OPENCASCADE DEFAULT_MSG OPENCASCADE_LIBRARIES OPENCASCADE_INCLUDE_DIR )