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.

87 lines
2.5KB

  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(AddFileDependencies)
  25. include(cMake/FreeCadMacros.cmake)
  26. # include helper functions/macros
  27. add_subdirectory(cMake/FreeCAD_Helpers)
  28. list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cMake")
  29. CompilerChecksAndSetups()
  30. ConfigureCMakeVariables()
  31. InitializeFreeCADBuildOptions()
  32. CheckInterModuleDependencies()
  33. FreeCADLibpackChecks()
  34. SetupDoxygen()
  35. if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
  36. SetupPython()
  37. SetupPCL()
  38. SetupPybind11()
  39. SetupBoost()
  40. SetupXercesC()
  41. find_package(ZLIB REQUIRED)
  42. find_package(PyCXX REQUIRED)
  43. SetupOpenCasCade()
  44. SetupSalomeSMESH()
  45. if (BUILD_FEM_NETGEN)
  46. find_package(NETGEN)
  47. endif(BUILD_FEM_NETGEN)
  48. # not needed at the moment
  49. #find_package(OpenCV REQUIRED)
  50. SetupSwig()
  51. SetupEigen()
  52. # This file is included directly due to some cMake macros that are defined within.
  53. # If these macro definitions are embedded within another macro, it causes problems.
  54. include(cMake/FreeCAD_Helpers/SetupQt.cmake)
  55. SetupFreetype()
  56. if(BUILD_GUI)
  57. SetupOpenGL()
  58. SetupCoin3D()
  59. SetupSpaceball()
  60. SetupShibokenAndPyside()
  61. SetupMatplotlib()
  62. endif(BUILD_GUI)
  63. endif(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
  64. if(BUILD_VR)
  65. find_package(Rift)
  66. endif(BUILD_VR)
  67. SetLibraryVersions()
  68. SetGlobalCompilerAndLinkerSettings()
  69. add_subdirectory(src)
  70. add_subdirectory(data)
  71. CreatePackagingTargets()
  72. PrintFinalReport()