An official mirror (for now...) of the FreeCAD project. Currently maintained in sync manually by Yorik. Please check https://www.freecadweb.org for issues and pull requests https://www.freecadweb.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

88 lines
2.6 KiB

  1. # april 2020, the oldest we have to support : Ununtu 16.04 LTS (Xenial)
  2. cmake_minimum_required(VERSION 3.5.1 FATAL_ERROR)
  3. # policy CMP0072 was introduced with CMake 3.11
  4. # relates to FindOpenGL module
  5. # and cache variables OPENGL_gl_LIBRARY, OPENGL_glu_LIBRARY
  6. if (POLICY CMP0072)
  7. cmake_policy(SET CMP0072 OLD)
  8. endif(POLICY CMP0072)
  9. find_program(CCACHE_PROGRAM ccache) #This check should occur before project()
  10. if(CCACHE_PROGRAM)
  11. set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
  12. endif()
  13. project(FreeCAD)
  14. set(PACKAGE_VERSION_NAME "Vulcan")
  15. set(PACKAGE_VERSION_MAJOR "0")
  16. set(PACKAGE_VERSION_MINOR "19")
  17. set(PACKAGE_VERSION_PATCH "16100")
  18. set(PACKAGE_VERSION_SUFFIX "dev") # either "dev" for development snapshot or "" (empty string)
  19. set(FREECAD_VERSION_PATCH "0") # number of patch release (e.g. "4" for the 0.18.4 release)
  20. set(FREECAD_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}")
  21. set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
  22. set(PACKAGE_STRING "${PROJECT_NAME} ${PACKAGE_VERSION}")
  23. # include local modules
  24. include(CheckCXXCompilerFlag)
  25. include(AddFileDependencies)
  26. include(cMake/FreeCadMacros.cmake)
  27. # include helper functions/macros
  28. add_subdirectory(cMake/FreeCAD_Helpers)
  29. list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cMake")
  30. CompilerChecksAndSetups()
  31. ConfigureCMakeVariables()
  32. InitializeFreeCADBuildOptions()
  33. CheckInterModuleDependencies()
  34. FreeCADLibpackChecks()
  35. SetupDoxygen()
  36. if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
  37. SetupPython()
  38. SetupPCL()
  39. SetupPybind11()
  40. SetupBoost()
  41. SetupXercesC()
  42. find_package(ZLIB REQUIRED)
  43. find_package(PyCXX REQUIRED)
  44. SetupOpenCasCade()
  45. SetupSalomeSMESH()
  46. if (BUILD_FEM_NETGEN)
  47. find_package(NETGEN)
  48. endif(BUILD_FEM_NETGEN)
  49. # not needed at the moment
  50. #find_package(OpenCV REQUIRED)
  51. SetupSwig()
  52. SetupEigen()
  53. # This file is included directly due to some cMake macros that are defined within.
  54. # If these macro definitions are embedded within another macro, it causes problems.
  55. include(cMake/FreeCAD_Helpers/SetupQt.cmake)
  56. SetupFreetype()
  57. if(BUILD_GUI)
  58. SetupOpenGL()
  59. SetupCoin3D()
  60. SetupSpaceball()
  61. SetupShibokenAndPyside()
  62. SetupMatplotlib()
  63. endif(BUILD_GUI)
  64. endif(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
  65. if(BUILD_VR)
  66. find_package(Rift)
  67. endif(BUILD_VR)
  68. SetLibraryVersions()
  69. SetGlobalCompilerAndLinkerSettings()
  70. add_subdirectory(src)
  71. add_subdirectory(data)
  72. CreatePackagingTargets()
  73. PrintFinalReport()