2e48c1cb |
1 | #----------------------------------------------------------------------------- |
2 | # |
3 | # OpenCASCADEConfig.cmake - OpenCASCADE CMake configuration file for external projects. |
4 | # |
5 | # This file is configured by OpenCASCADE. |
6 | # |
7 | |
ada9ef40 |
8 | if(OpenCASCADE_ALREADY_INCLUDED) |
9 | return() |
10 | endif() |
11 | set(OpenCASCADE_ALREADY_INCLUDED 1) |
12 | |
2e48c1cb |
13 | # The OpenCASCADE version number |
14 | set (OpenCASCADE_MAJOR_VERSION "@OCC_VERSION_MAJOR@") |
15 | set (OpenCASCADE_MINOR_VERSION "@OCC_VERSION_MINOR@") |
16 | set (OpenCASCADE_MAINTENANCE_VERSION "@OCC_VERSION_MAINTENANCE@") |
17 | set (OpenCASCADE_DEVELOPMENT_VERSION "@OCC_VERSION_DEVELOPMENT@") |
18 | |
ada9ef40 |
19 | # Compute the installation prefix from this OpenCASCADEConfig.cmake file |
20 | # location, by going up one level + one level if "cmake" + one level if "lib". |
21 | # This is made to support different locations of CMake files: |
22 | # - in UNIX style: $INSTALL_DIR/lib/cmake/opencascade-<version> |
23 | # - in Windows style: $INSTALL_DIR/cmake |
2e48c1cb |
24 | get_filename_component (OpenCASCADE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) |
25 | get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH) |
ada9ef40 |
26 | if (OpenCASCADE_INSTALL_PREFIX MATCHES "/cmake$") |
27 | get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH) |
28 | endif() |
29 | if (OpenCASCADE_INSTALL_PREFIX MATCHES "/lib$") |
30 | get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH) |
31 | endif() |
2e48c1cb |
32 | |
33 | # Set OpenCASCADE paths to headers, binaries, libraries, resources, tests, samples, data |
34 | set (OpenCASCADE_BINARY_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_BIN@") |
35 | set (OpenCASCADE_LIBRARY_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_LIB@") |
36 | set (OpenCASCADE_SCRIPT_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_SCRIPT@") |
37 | set (OpenCASCADE_INCLUDE_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_INCLUDE@") |
38 | set (OpenCASCADE_RESOURCE_DIR "${OpenCASCADE_INSTALL_PREFIX}/@INSTALL_DIR_RESOURCE@") |
39 | |
40 | # The C and C++ flags added by OpenCASCADE to the cmake-configured flags. |
41 | set (OpenCASCADE_C_FLAGS "@CMAKE_C_FLAGS@") |
42 | set (OpenCASCADE_CXX_FLAGS "@CMAKE_CXX_FLAGS@") |
43 | @SET_OpenCASCADE_LINKER_FLAGS@ |
44 | |
45 | # List of available OpenCASCADE modules. |
46 | set (OpenCASCADE_MODULES @OCCT_MODULES_ENABLED@) |
ada9ef40 |
47 | @SET_OpenCASCADE_MODULES_TOOLKITS@ |
2e48c1cb |
48 | # List of available OpenCASCADE libraries. |
49 | set (OpenCASCADE_LIBRARIES @OCCT_LIBRARIES@) |
50 | |
51 | # OpenCASCADE global configuration options. |
52 | set (OpenCASCADE_COMPILER "@COMPILER@") |
53 | set (OpenCASCADE_BUILD_WITH_DEBUG @BUILD_WITH_DEBUG@) |
54 | set (OpenCASCADE_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@) |
55 | @SET_OpenCASCADE_BUILD_TYPE@ |
56 | |
a3d2cb24 |
57 | # Use of third-party libraries. |
2e48c1cb |
58 | set (OpenCASCADE_WITH_TCL @USE_TCL@) |
59 | set (OpenCASCADE_WITH_FREETYPE @USE_FREETYPE@) |
60 | set (OpenCASCADE_WITH_FREEIMAGE @USE_FREEIMAGE@) |
61 | set (OpenCASCADE_WITH_GL2PS @USE_GL2PS@) |
62 | set (OpenCASCADE_WITH_TBB @USE_TBB@) |
63 | set (OpenCASCADE_WITH_VTK @USE_VTK@) |
1ce0716b |
64 | set (OpenCASCADE_WITH_GLES2 @USE_GLES2@) |
2e48c1cb |
65 | @SET_OpenCASCADE_WITH_D3D@ |
66 | @SET_OpenCASCADE_WITH_GLX@ |
ada9ef40 |
67 | |
a3d2cb24 |
68 | # Import OpenCASCADE compile definitions, C and C++ flags for each installed configuration. |
69 | file(GLOB CONFIG_FILES "${CMAKE_CURRENT_LIST_DIR}/OpenCASCADECompileDefinitionsAndFlags-*.cmake") |
70 | foreach(f ${CONFIG_FILES}) |
71 | include(${f}) |
72 | endforeach() |
73 | |
ada9ef40 |
74 | if (NOT OpenCASCADE_FIND_COMPONENTS) |
75 | set (OpenCASCADE_FIND_COMPONENTS ${OpenCASCADE_MODULES}) |
76 | endif () |
77 | |
78 | # Import OpenCASCADE targets. |
79 | foreach(_comp ${OpenCASCADE_FIND_COMPONENTS}) |
80 | if (NOT ";${OpenCASCADE_MODULES};" MATCHES "${_comp}") |
81 | set(OpenCASCADE_FOUND False) |
82 | set(OpenCASCADE_NOTFOUND_MESSAGE "Specified unsupported component: ${_comp}") |
83 | if (NOT OpenCASCADE_FIND_QUIETLY) |
84 | message (ERROR ": ${OpenCASCADE_NOTFOUND_MESSAGE}") |
85 | endif() |
86 | else() |
87 | include("${CMAKE_CURRENT_LIST_DIR}/OpenCASCADE${_comp}Targets.cmake") |
88 | endif() |
89 | endforeach() |