2
0

LibiglOptions.cmake.sample 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # If you are cloning and compiling the libigl repository as a standalone, you
  2. # can use this file as a convenience to set default CMake options. Simply copy
  3. # this file and remove the '.sample' suffix. Then, uncomment the relevant
  4. # options as desired. Note that this file is included before `project(Libigl)`
  5. # is defined, so we can use it to define the C and C++ compilers, but some
  6. # variables such as PROJECT_SOURCE_DIR will not be defined yet. You can use
  7. # CMAKE_SOURCE_DIR instead.
  8. #
  9. # If you are using libigl as a subproject (e.g. see the libigl-example-project
  10. # template), then you do NOT need to use this file. Simply set your preferred
  11. # CMake options in the parent project, # before including libigl.
  12. ################################################################################
  13. # CMake Options
  14. ################################################################################
  15. # Specify a custom install prefix path
  16. # set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/install CACHE STRING "Install directory used by install().")
  17. # Generates a `compile_commands.json` that can be used for autocompletion
  18. # set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "Enable/Disable output of compile commands during generation.")
  19. # Use ccache to speed up compilation of repeated builds
  20. # find_program(CCACHE_PROGRAM ccache)
  21. # if(CCACHE_PROGRAM)
  22. # message(STATUS "Enabling Ccache support")
  23. # set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_PROGRAM} CACHE STRING "")
  24. # set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_PROGRAM} CACHE STRING "")
  25. # endif()
  26. # Use a specific C/C++ compiler, e.g. llvm-clang on macOS (so we can use clangd)
  27. # set(CMAKE_C_COMPILER "/usr/bin/clang" CACHE STRING "C compiler")
  28. # set(CMAKE_CXX_COMPILER "/usr/bin/clang++" CACHE STRING "C++ compiler")
  29. # Set deployment platform for macOS
  30. # set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12 CACHE STRING "macOS deployment target")
  31. # Always add colored output (e.g. when using Ninja)
  32. # add_compile_options(-fdiagnostics-color=always) # GCC
  33. # add_compile_options(-fcolor-diagnostics) # Clang
  34. # add_compile_options(-ftime-trace) # Clang
  35. ################################################################################
  36. # Libigl Options
  37. ################################################################################
  38. # Build options
  39. # option(LIBIGL_BUILD_TESTS "Build libigl unit test" OFF)
  40. # option(LIBIGL_BUILD_TUTORIALS "Build libigl tutorial" OFF)
  41. # option(LIBIGL_INSTALL "Enable installation of libigl targets" OFF)
  42. # option(LIBIGL_USE_STATIC_LIBRARY "Use libigl as static library" OFF)
  43. # Module options
  44. # option(LIBIGL_EMBREE "Build target igl::embree" ON)
  45. # option(LIBIGL_GLFW "Build target igl::glfw" ON)
  46. # option(LIBIGL_IMGUI "Build target igl::imgui" ON)
  47. # option(LIBIGL_OPENGL "Build target igl::opengl" ON)
  48. # option(LIBIGL_STB "Build target igl::stb" ON)
  49. # option(LIBIGL_PREDICATES "Build target igl::predicates" ON)
  50. # option(LIBIGL_XML "Build target igl::xml" ON)
  51. # option(LIBIGL_COPYLEFT_CGAL "Build target igl_copyleft::cgal" ON)
  52. # option(LIBIGL_COPYLEFT_COMISO "Build target igl_copyleft::comiso" ON)
  53. # option(LIBIGL_COPYLEFT_CORE "Build target igl_copyleft::core" ON)
  54. # option(LIBIGL_COPYLEFT_CORK "Build target igl_copyleft::cork" ON)
  55. # option(LIBIGL_COPYLEFT_TETGEN "Build target igl_copyleft::tetgen" ON)
  56. # option(LIBIGL_RESTRICTED_MATLAB "Build target igl_restricted::matlab" ON)
  57. # option(LIBIGL_RESTRICTED_MOSEK "Build target igl_restricted::mosek" ON)
  58. # option(LIBIGL_RESTRICTED_TRIANGLE "Build target igl_restricted::triangle" ON)
  59. ################################################################################
  60. # FetchContent Options
  61. ################################################################################
  62. # option(FETCHCONTENT_FULLY_DISCONNECTED "Disables all attempts to download or update content and assumes source dirs already exist" ON)
  63. # option(FETCHCONTENT_UPDATES_DISCONNECTED "Enables UPDATE_DISCONNECTED behavior for all content population" ON)
  64. # option(FETCHCONTENT_QUIET "Enables QUIET option for all content population" ON)
  65. # set(FETCHCONTENT_BASE_DIR "${CMAKE_SOURCE_DIR}/external" CACHE PATH "Directory under which to collect all populated content")