OpenCASCADEConfig.cmake 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. #-----------------------------------------------------------------------------
  2. #
  3. # OpenCASCADEConfig.cmake - OpenCASCADE CMake configuration file for external projects.
  4. #
  5. # This file is configured by OpenCASCADE.
  6. #
  7. if(OpenCASCADE_ALREADY_INCLUDED)
  8. return()
  9. endif()
  10. set(OpenCASCADE_ALREADY_INCLUDED 1)
  11. # The OpenCASCADE version number
  12. set (OpenCASCADE_MAJOR_VERSION "7")
  13. set (OpenCASCADE_MINOR_VERSION "6")
  14. set (OpenCASCADE_MAINTENANCE_VERSION "0")
  15. set (OpenCASCADE_DEVELOPMENT_VERSION "")
  16. # Compute the installation prefix from this OpenCASCADEConfig.cmake file
  17. # location, by going up one level + one level if "cmake" + one level if "lib".
  18. # This is made to support different locations of CMake files:
  19. # - in UNIX style: $INSTALL_DIR/lib/cmake/opencascade-<version>
  20. # - in Windows style: $INSTALL_DIR/cmake
  21. # - in Android style: $INSTALL_DIR/libs/$CMAKE_ANDROID_ARCH_ABI/cmake/opencascade-<version>
  22. get_filename_component (OpenCASCADE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
  23. get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
  24. if (OpenCASCADE_INSTALL_PREFIX MATCHES "/cmake$")
  25. get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
  26. endif()
  27. if (OpenCASCADE_INSTALL_PREFIX MATCHES "/lib$")
  28. get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
  29. endif()
  30. if (OpenCASCADE_INSTALL_PREFIX MATCHES "/libs/${CMAKE_ANDROID_ARCH_ABI}$")
  31. get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
  32. get_filename_component (OpenCASCADE_INSTALL_PREFIX "${OpenCASCADE_INSTALL_PREFIX}" PATH)
  33. endif()
  34. # Set OpenCASCADE paths to headers, binaries, libraries, resources, tests, samples, data
  35. set (OpenCASCADE_BINARY_DIR "${OpenCASCADE_INSTALL_PREFIX}/bin")
  36. set (OpenCASCADE_LIBRARY_DIR "${OpenCASCADE_INSTALL_PREFIX}/lib")
  37. set (OpenCASCADE_SCRIPT_DIR "${OpenCASCADE_INSTALL_PREFIX}/bin")
  38. set (OpenCASCADE_INCLUDE_DIR "${OpenCASCADE_INSTALL_PREFIX}/include/opencascade")
  39. set (OpenCASCADE_RESOURCE_DIR "${OpenCASCADE_INSTALL_PREFIX}/share/opencascade/resources")
  40. # The C and C++ flags added by OpenCASCADE to the cmake-configured flags.
  41. set (OpenCASCADE_C_FLAGS " -fexceptions -fPIC")
  42. set (OpenCASCADE_CXX_FLAGS "-std=c++0x -fPIC -fexceptions -fPIC -Wall -Wextra")
  43. set (OpenCASCADE_LINKER_FLAGS "-lm ")
  44. # List of available OpenCASCADE modules.
  45. set (OpenCASCADE_MODULES FoundationClasses;ModelingData;ModelingAlgorithms;Visualization;ApplicationFramework;DataExchange;Draw)
  46. # List of available OpenCASCADE libraries for each module
  47. set (OpenCASCADE_FoundationClasses_LIBRARIES TKernel;TKMath)
  48. set (OpenCASCADE_ModelingData_LIBRARIES TKG2d;TKG3d;TKGeomBase;TKBRep)
  49. set (OpenCASCADE_ModelingAlgorithms_LIBRARIES TKGeomAlgo;TKTopAlgo;TKPrim;TKBO;TKShHealing;TKBool;TKHLR;TKFillet;TKOffset;TKFeat;TKMesh;TKXMesh)
  50. set (OpenCASCADE_Visualization_LIBRARIES TKService;TKV3d;TKOpenGl;TKMeshVS;TKIVtk)
  51. set (OpenCASCADE_ApplicationFramework_LIBRARIES TKCDF;TKLCAF;TKCAF;TKBinL;TKXmlL;TKBin;TKXml;TKStdL;TKStd;TKTObj;TKBinTObj;TKXmlTObj;TKVCAF)
  52. set (OpenCASCADE_DataExchange_LIBRARIES TKXSBase;TKSTEPBase;TKSTEPAttr;TKSTEP209;TKSTEP;TKIGES;TKXCAF;TKXDEIGES;TKXDESTEP;TKSTL;TKVRML;TKXmlXCAF;TKBinXCAF;TKRWMesh)
  53. set (OpenCASCADE_Draw_LIBRARIES TKDraw;TKTopTest;TKOpenGlTest;TKViewerTest;TKXSDRAW;TKDCAF;TKXDEDRAW;TKTObjDRAW;TKQADraw;TKIVtkDraw)
  54. # List of available OpenCASCADE libraries.
  55. set (OpenCASCADE_LIBRARIES TKernel;TKMath;TKG2d;TKG3d;TKGeomBase;TKBRep;TKGeomAlgo;TKTopAlgo;TKPrim;TKBO;TKShHealing;TKBool;TKHLR;TKFillet;TKOffset;TKFeat;TKMesh;TKXMesh;TKService;TKV3d;TKOpenGl;TKMeshVS;TKIVtk;TKCDF;TKLCAF;TKCAF;TKBinL;TKXmlL;TKBin;TKXml;TKStdL;TKStd;TKTObj;TKBinTObj;TKXmlTObj;TKVCAF;TKXSBase;TKSTEPBase;TKSTEPAttr;TKSTEP209;TKSTEP;TKIGES;TKXCAF;TKXDEIGES;TKXDESTEP;TKSTL;TKVRML;TKXmlXCAF;TKBinXCAF;TKRWMesh;TKDraw;TKTopTest;TKOpenGlTest;TKViewerTest;TKXSDRAW;TKDCAF;TKXDEDRAW;TKTObjDRAW;TKQADraw;TKIVtkDraw)
  56. # OpenCASCADE global configuration options.
  57. set (OpenCASCADE_COMPILER "gcc")
  58. set (OpenCASCADE_BUILD_WITH_DEBUG )
  59. set (OpenCASCADE_BUILD_SHARED_LIBS ON)
  60. set (OpenCASCADE_BUILD_TYPE "Release")
  61. # Use of third-party libraries.
  62. set (OpenCASCADE_WITH_TCL ON)
  63. set (OpenCASCADE_WITH_FREETYPE YES)
  64. set (OpenCASCADE_WITH_FREEIMAGE OFF)
  65. set (OpenCASCADE_WITH_TBB OFF)
  66. set (OpenCASCADE_WITH_VTK YES)
  67. set (OpenCASCADE_WITH_FFMPEG OFF)
  68. set (OpenCASCADE_WITH_GLES2 OFF)
  69. # Import OpenCASCADE compile definitions, C and C++ flags for each installed configuration.
  70. file(GLOB CONFIG_FILES "${CMAKE_CURRENT_LIST_DIR}/OpenCASCADECompileDefinitionsAndFlags-*.cmake")
  71. foreach(f ${CONFIG_FILES})
  72. include(${f})
  73. endforeach()
  74. if (NOT OpenCASCADE_FIND_COMPONENTS)
  75. set (OpenCASCADE_FIND_COMPONENTS ${OpenCASCADE_MODULES})
  76. endif ()
  77. # Import OpenCASCADE targets.
  78. foreach(_comp ${OpenCASCADE_FIND_COMPONENTS})
  79. if (NOT ";${OpenCASCADE_MODULES};" MATCHES "${_comp}")
  80. set(OpenCASCADE_FOUND False)
  81. set(OpenCASCADE_NOTFOUND_MESSAGE "Specified unsupported component: ${_comp}")
  82. if (NOT OpenCASCADE_FIND_QUIETLY)
  83. message (ERROR ": ${OpenCASCADE_NOTFOUND_MESSAGE}")
  84. endif()
  85. else()
  86. include("${CMAKE_CURRENT_LIST_DIR}/OpenCASCADE${_comp}Targets.cmake")
  87. endif()
  88. endforeach()