libigl.cmake 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. cmake_minimum_required(VERSION 3.1)
  2. # https://github.com/libigl/libigl/issues/751
  3. # http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160425/351643.html
  4. if(APPLE)
  5. if(NOT CMAKE_LIBTOOL)
  6. find_program(CMAKE_LIBTOOL NAMES libtool)
  7. endif()
  8. if(CMAKE_LIBTOOL)
  9. set(CMAKE_LIBTOOL ${CMAKE_LIBTOOL} CACHE PATH "libtool executable")
  10. message(STATUS "Found libtool - ${CMAKE_LIBTOOL}")
  11. get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES)
  12. foreach(lang ${languages})
  13. # Added -c
  14. set(CMAKE_${lang}_CREATE_STATIC_LIBRARY
  15. "${CMAKE_LIBTOOL} -c -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ")
  16. endforeach()
  17. endif()
  18. endif()
  19. ### Available options ###
  20. option(LIBIGL_USE_STATIC_LIBRARY "Use libigl as static library" ON)
  21. option(LIBIGL_WITH_CGAL "Use CGAL" ON)
  22. option(LIBIGL_WITH_COMISO "Use CoMiso" ON)
  23. option(LIBIGL_WITH_CORK "Use Cork" OFF)
  24. option(LIBIGL_WITH_EMBREE "Use Embree" OFF)
  25. option(LIBIGL_WITH_MATLAB "Use Matlab" OFF)
  26. option(LIBIGL_WITH_MOSEK "Use MOSEK" OFF)
  27. option(LIBIGL_WITH_OPENGL "Use OpenGL" OFF)
  28. option(LIBIGL_WITH_OPENGL_GLFW "Use GLFW" OFF)
  29. option(LIBIGL_WITH_OPENGL_GLFW_IMGUI "Use ImGui" OFF)
  30. option(LIBIGL_WITH_PNG "Use PNG" ON)
  31. option(LIBIGL_WITH_TETGEN "Use Tetgen" ON)
  32. option(LIBIGL_WITH_TRIANGLE "Use Triangle" ON)
  33. option(LIBIGL_WITH_VIEWER "Use OpenGL viewer" OFF)
  34. option(LIBIGL_WITH_XML "Use XML" ON)
  35. option(LIBIGL_WITH_PYTHON "Use Python" OFF)
  36. if(LIBIGL_WITH_VIEWER AND (NOT LIBIGL_WITH_OPENGL_GLFW OR NOT LIBIGL_WITH_OPENGL) )
  37. message(FATAL_ERROR "LIBIGL_WITH_VIEWER=ON requires LIBIGL_WITH_OPENGL_GLFW=ON and LIBIGL_WITH_OPENGL=ON")
  38. endif()
  39. ################################################################################
  40. ### Configuration
  41. set(LIBIGL_ROOT "${CMAKE_CURRENT_LIST_DIR}/..")
  42. set(LIBIGL_SOURCE_DIR "${LIBIGL_ROOT}/include")
  43. set(LIBIGL_EXTERNAL "${LIBIGL_ROOT}/external")
  44. # Dependencies are linked as INTERFACE targets unless libigl is compiled as a static library
  45. if(LIBIGL_USE_STATIC_LIBRARY)
  46. set(IGL_SCOPE PUBLIC)
  47. else()
  48. set(IGL_SCOPE INTERFACE)
  49. endif()
  50. # Download and update 3rdparty libraries
  51. list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
  52. include(LibiglDownloadExternal)
  53. ################################################################################
  54. ### IGL Common
  55. ################################################################################
  56. add_library(igl_common INTERFACE)
  57. target_include_directories(igl_common SYSTEM INTERFACE
  58. $<BUILD_INTERFACE:${LIBIGL_SOURCE_DIR}>
  59. $<INSTALL_INTERFACE:include>
  60. )
  61. # Export igl_common as igl::common
  62. set_property(TARGET igl_common PROPERTY EXPORT_NAME igl::common)
  63. if(LIBIGL_USE_STATIC_LIBRARY)
  64. target_compile_definitions(igl_common INTERFACE -DIGL_STATIC_LIBRARY)
  65. endif()
  66. # Transitive C++11 flags
  67. include(CXXFeatures)
  68. target_compile_features(igl_common INTERFACE ${CXX11_FEATURES})
  69. # Other compilation flags
  70. if(MSVC)
  71. # Enable parallel compilation for Visual Studio
  72. target_compile_options(igl_common INTERFACE /MP /bigobj)
  73. if(LIBIGL_WITH_CGAL)
  74. target_compile_options(igl_common INTERFACE "/MD$<$<CONFIG:Debug>:d>")
  75. endif()
  76. endif()
  77. if(BUILD_SHARED_LIBS)
  78. # Generate position independent code
  79. set_target_properties(igl_common PROPERTIES INTERFACE_POSITION_INDEPENDENT_CODE ON)
  80. endif()
  81. # Eigen
  82. if(TARGET Eigen3::Eigen)
  83. # If an imported target already exists, use it
  84. target_link_libraries(igl_common INTERFACE Eigen3::Eigen)
  85. else()
  86. igl_download_eigen()
  87. target_include_directories(igl_common SYSTEM INTERFACE
  88. $<BUILD_INTERFACE:${LIBIGL_EXTERNAL}/eigen>
  89. $<INSTALL_INTERFACE:include>
  90. )
  91. endif()
  92. # C++11 Thread library
  93. find_package(Threads REQUIRED)
  94. target_link_libraries(igl_common INTERFACE ${CMAKE_THREAD_LIBS_INIT})
  95. ################################################################################
  96. ## CGAL dependencies on Windows: GMP & MPFR
  97. function(igl_download_cgal_deps)
  98. if(WIN32)
  99. igl_download_project(gmp
  100. URL https://cgal.geometryfactory.com/CGAL/precompiled_libs/auxiliary/x64/GMP/5.0.1/gmp-all-CGAL-3.9.zip
  101. URL_MD5 508c1292319c832609329116a8234c9f
  102. )
  103. igl_download_project(mpfr
  104. URL https://cgal.geometryfactory.com/CGAL/precompiled_libs/auxiliary/x64/MPFR/3.0.0/mpfr-all-CGAL-3.9.zip
  105. URL_MD5 48840454eef0ff18730050c05028734b
  106. )
  107. set(ENV{GMP_DIR} "${LIBIGL_EXTERNAL}/gmp")
  108. set(ENV{MPFR_DIR} "${LIBIGL_EXTERNAL}/mpfr")
  109. endif()
  110. endfunction()
  111. ################################################################################
  112. function(compile_igl_module module_dir)
  113. string(REPLACE "/" "_" module_name "${module_dir}")
  114. if(module_name STREQUAL "core")
  115. set(module_libname "igl")
  116. else()
  117. set(module_libname "igl_${module_name}")
  118. endif()
  119. if(LIBIGL_USE_STATIC_LIBRARY)
  120. file(GLOB SOURCES_IGL_${module_name}
  121. "${LIBIGL_SOURCE_DIR}/igl/${module_dir}/*.cpp"
  122. "${LIBIGL_SOURCE_DIR}/igl/copyleft/${module_dir}/*.cpp")
  123. add_library(${module_libname} STATIC ${SOURCES_IGL_${module_name}} ${ARGN})
  124. if(MSVC)
  125. target_compile_options(${module_libname} PRIVATE /w) # disable all warnings (not ideal but...)
  126. else()
  127. #target_compile_options(${module_libname} PRIVATE -w) # disable all warnings (not ideal but...)
  128. endif()
  129. else()
  130. add_library(${module_libname} INTERFACE)
  131. endif()
  132. target_link_libraries(${module_libname} ${IGL_SCOPE} igl_common)
  133. if(NOT module_name STREQUAL "core")
  134. target_link_libraries(${module_libname} ${IGL_SCOPE} igl)
  135. endif()
  136. # Alias target because it looks nicer
  137. message(STATUS "Creating target: igl::${module_name} (${module_libname})")
  138. add_library(igl::${module_name} ALIAS ${module_libname})
  139. # Export as igl::${module_name}
  140. set_property(TARGET ${module_libname} PROPERTY EXPORT_NAME igl::${module_name})
  141. endfunction()
  142. ################################################################################
  143. ### IGL Core
  144. ################################################################################
  145. if(LIBIGL_USE_STATIC_LIBRARY)
  146. file(GLOB SOURCES_IGL
  147. "${LIBIGL_SOURCE_DIR}/igl/*.cpp"
  148. "${LIBIGL_SOURCE_DIR}/igl/copyleft/*.cpp")
  149. endif()
  150. compile_igl_module("core" ${SOURCES_IGL})
  151. ################################################################################
  152. ### Download the python part ###
  153. if(LIBIGL_WITH_PYTHON)
  154. igl_download_pybind11()
  155. endif()
  156. ################################################################################
  157. ### Compile the CGAL part ###
  158. if(LIBIGL_WITH_CGAL)
  159. # Try to find the CGAL library
  160. # CGAL Core is needed for
  161. # `Exact_predicates_exact_constructions_kernel_with_sqrt`
  162. if(NOT TARGET CGAL::CGAL)
  163. set(CGAL_DIR "${LIBIGL_EXTERNAL}/cgal")
  164. igl_download_cgal()
  165. igl_download_cgal_deps()
  166. if(EXISTS ${LIBIGL_EXTERNAL}/boost)
  167. set(BOOST_ROOT "${LIBIGL_EXTERNAL}/boost")
  168. endif()
  169. set(CGAL_Boost_USE_STATIC_LIBS ON CACHE BOOL "" FORCE)
  170. find_package(CGAL CONFIG COMPONENTS Core PATHS ${CGAL_DIR} NO_DEFAULT_PATH)
  171. endif()
  172. # If CGAL has been found, then build the libigl module
  173. if(TARGET CGAL::CGAL AND TARGET CGAL::CGAL_Core)
  174. compile_igl_module("cgal")
  175. target_link_libraries(igl_cgal ${IGL_SCOPE} CGAL::CGAL CGAL::CGAL_Core)
  176. else()
  177. set(LIBIGL_WITH_CGAL OFF CACHE BOOL "" FORCE)
  178. endif()
  179. endif()
  180. # Helper function for `igl_copy_cgal_dll()`
  181. function(igl_copy_imported_dll src_target dst_target)
  182. get_target_property(other_libs ${src_target} INTERFACE_LINK_LIBRARIES)
  183. set(locations)
  184. list(APPEND locations ${main_lib} ${other_libs})
  185. foreach(location ${locations})
  186. string(REGEX MATCH "^(.*)\\.[^.]*$" dummy ${location})
  187. set(location "${CMAKE_MATCH_1}.dll")
  188. if(EXISTS "${location}" AND location MATCHES "^.*\\.dll$")
  189. add_custom_command(TARGET ${dst_target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${location}" $<TARGET_FILE_DIR:${dst_target}>)
  190. endif()
  191. endforeach()
  192. endfunction()
  193. # Convenient functions to copy CGAL dlls into a target (executable) destination folder (for Windows)
  194. function(igl_copy_cgal_dll target)
  195. if(WIN32 AND LIBIGL_WITH_CGAL)
  196. igl_copy_imported_dll(CGAL::CGAL ${target})
  197. igl_copy_imported_dll(CGAL::CGAL_Core ${target})
  198. endif()
  199. endfunction()
  200. ################################################################################
  201. ### Compile the CoMISo part ###
  202. # NOTE: this cmakefile works only with the
  203. # comiso available here: https://github.com/libigl/CoMISo
  204. if(LIBIGL_WITH_COMISO)
  205. compile_igl_module("comiso")
  206. if(NOT TARGET CoMISo)
  207. igl_download_comiso()
  208. add_subdirectory("${LIBIGL_EXTERNAL}/CoMISo" CoMISo)
  209. endif()
  210. target_link_libraries(igl_comiso ${IGL_SCOPE} CoMISo)
  211. endif()
  212. ################################################################################
  213. ### Compile the cork part ###
  214. if(LIBIGL_WITH_CORK)
  215. set(CORK_DIR "${LIBIGL_EXTERNAL}/cork")
  216. if(NOT TARGET cork)
  217. # call this "lib-cork" instead of "cork", otherwise cmake gets confused about
  218. # "cork" executable
  219. igl_download_cork()
  220. add_subdirectory("${CORK_DIR}" "lib-cork")
  221. endif()
  222. compile_igl_module("cork")
  223. target_include_directories(igl_cork ${IGL_SCOPE} cork)
  224. target_include_directories(igl_cork ${IGL_SCOPE} "${CORK_DIR}/src")
  225. target_link_libraries(igl_cork ${IGL_SCOPE} cork)
  226. endif()
  227. ################################################################################
  228. ### Compile the embree part ###
  229. if(LIBIGL_WITH_EMBREE)
  230. set(EMBREE_DIR "${LIBIGL_EXTERNAL}/embree")
  231. set(EMBREE_ISPC_SUPPORT OFF CACHE BOOL " " FORCE)
  232. set(EMBREE_TASKING_SYSTEM "INTERNAL" CACHE BOOL " " FORCE)
  233. set(EMBREE_TUTORIALS OFF CACHE BOOL " " FORCE)
  234. set(EMBREE_MAX_ISA NONE CACHE STRINGS " " FORCE)
  235. set(BUILD_TESTING OFF CACHE BOOL " " FORCE)
  236. # set(ENABLE_INSTALLER OFF CACHE BOOL " " FORCE)
  237. if(MSVC)
  238. # set(EMBREE_STATIC_RUNTIME OFF CACHE BOOL " " FORCE)
  239. set(EMBREE_STATIC_LIB OFF CACHE BOOL " " FORCE)
  240. else()
  241. set(EMBREE_STATIC_LIB ON CACHE BOOL " " FORCE)
  242. endif()
  243. if(NOT TARGET embree)
  244. igl_download_embree()
  245. add_subdirectory("${EMBREE_DIR}" "embree")
  246. endif()
  247. if(MSVC)
  248. add_custom_target(Copy-Embree-DLL ALL # Adds a post-build event
  249. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E
  250. $<TARGET_FILE:embree> # <--this is in-file
  251. "${CMAKE_BINARY_DIR}" # <--this is out-file path
  252. DEPENDS embree) # Execute after embree target has been built
  253. endif()
  254. compile_igl_module("embree")
  255. target_link_libraries(igl_embree ${IGL_SCOPE} embree)
  256. target_include_directories(igl_embree ${IGL_SCOPE} ${EMBREE_DIR}/include)
  257. if(NOT MSVC)
  258. target_compile_definitions(igl_embree ${IGL_SCOPE} -DENABLE_STATIC_LIB)
  259. endif()
  260. endif()
  261. ################################################################################
  262. ### Compile the matlab part ###
  263. if(LIBIGL_WITH_MATLAB)
  264. find_package(Matlab REQUIRED COMPONENTS MEX_COMPILER MX_LIBRARY ENG_LIBRARY)
  265. compile_igl_module("matlab")
  266. target_link_libraries(igl_matlab ${IGL_SCOPE} ${Matlab_LIBRARIES})
  267. target_include_directories(igl_matlab ${IGL_SCOPE} ${Matlab_INCLUDE_DIRS})
  268. endif()
  269. ################################################################################
  270. ### Compile the mosek part ###
  271. if(LIBIGL_WITH_MOSEK)
  272. find_package(MOSEK REQUIRED)
  273. compile_igl_module("mosek")
  274. target_link_libraries(igl_mosek ${IGL_SCOPE} ${MOSEK_LIBRARIES})
  275. target_include_directories(igl_mosek ${IGL_SCOPE} ${MOSEK_INCLUDE_DIRS})
  276. target_compile_definitions(igl_mosek ${IGL_SCOPE} -DLIBIGL_WITH_MOSEK)
  277. endif()
  278. ################################################################################
  279. ### Compile the opengl part ###
  280. if(LIBIGL_WITH_OPENGL)
  281. # OpenGL module
  282. find_package(OpenGL REQUIRED)
  283. compile_igl_module("opengl")
  284. target_link_libraries(igl_opengl ${IGL_SCOPE} ${OPENGL_gl_LIBRARY})
  285. target_include_directories(igl_opengl SYSTEM ${IGL_SCOPE} ${OPENGL_INCLUDE_DIR})
  286. # glad module
  287. if(NOT TARGET glad)
  288. add_subdirectory(${LIBIGL_EXTERNAL}/glad glad)
  289. endif()
  290. target_link_libraries(igl_opengl ${IGL_SCOPE} glad)
  291. endif()
  292. ################################################################################
  293. ### Compile the GLFW part ###
  294. if(LIBIGL_WITH_OPENGL_GLFW)
  295. if(TARGET igl::opengl)
  296. # GLFW module
  297. compile_igl_module("opengl/glfw")
  298. if(NOT TARGET glfw)
  299. set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL " " FORCE)
  300. set(GLFW_BUILD_TESTS OFF CACHE BOOL " " FORCE)
  301. set(GLFW_BUILD_DOCS OFF CACHE BOOL " " FORCE)
  302. set(GLFW_INSTALL OFF CACHE BOOL " " FORCE)
  303. igl_download_glfw()
  304. add_subdirectory(${LIBIGL_EXTERNAL}/glfw glfw)
  305. endif()
  306. target_link_libraries(igl_opengl_glfw ${IGL_SCOPE} igl_opengl glfw)
  307. endif()
  308. endif()
  309. ################################################################################
  310. ### Compile the ImGui part ###
  311. if(LIBIGL_WITH_OPENGL_GLFW_IMGUI)
  312. if(TARGET igl::opengl_glfw)
  313. # ImGui module
  314. compile_igl_module("opengl/glfw/imgui")
  315. if(NOT TARGET imgui)
  316. igl_download_imgui()
  317. add_subdirectory(${LIBIGL_EXTERNAL}/imgui imgui)
  318. endif()
  319. target_link_libraries(igl_opengl_glfw_imgui ${IGL_SCOPE} igl_opengl_glfw imgui)
  320. endif()
  321. endif()
  322. ################################################################################
  323. ### Compile the png part ###
  324. if(LIBIGL_WITH_PNG)
  325. # png/ module is anomalous because it also depends on opengl it really should
  326. # be moved into the opengl/ directory and namespace ...
  327. if(TARGET igl_opengl)
  328. set(STB_IMAGE_DIR "${LIBIGL_EXTERNAL}/stb_image")
  329. if(NOT TARGET stb_image)
  330. add_subdirectory("${STB_IMAGE_DIR}" "stb_image")
  331. endif()
  332. compile_igl_module("png" "")
  333. target_link_libraries(igl_png ${IGL_SCOPE} igl_stb_image igl_opengl)
  334. endif()
  335. endif()
  336. ################################################################################
  337. ### Compile the tetgen part ###
  338. if(LIBIGL_WITH_TETGEN)
  339. set(TETGEN_DIR "${LIBIGL_EXTERNAL}/tetgen")
  340. if(NOT TARGET tetgen)
  341. igl_download_tetgen()
  342. add_subdirectory("${TETGEN_DIR}" "tetgen")
  343. endif()
  344. compile_igl_module("tetgen")
  345. target_link_libraries(igl_tetgen ${IGL_SCOPE} tetgen)
  346. target_include_directories(igl_tetgen ${IGL_SCOPE} ${TETGEN_DIR})
  347. endif()
  348. ################################################################################
  349. ### Compile the triangle part ###
  350. if(LIBIGL_WITH_TRIANGLE)
  351. set(TRIANGLE_DIR "${LIBIGL_EXTERNAL}/triangle")
  352. if(NOT TARGET triangle)
  353. igl_download_triangle()
  354. add_subdirectory("${TRIANGLE_DIR}" "triangle")
  355. endif()
  356. compile_igl_module("triangle")
  357. target_link_libraries(igl_triangle ${IGL_SCOPE} triangle)
  358. target_include_directories(igl_triangle ${IGL_SCOPE} ${TRIANGLE_DIR})
  359. endif()
  360. ################################################################################
  361. ### Compile the xml part ###
  362. if(LIBIGL_WITH_XML)
  363. set(TINYXML2_DIR "${LIBIGL_EXTERNAL}/tinyxml2")
  364. if(NOT TARGET tinyxml2)
  365. igl_download_tinyxml2()
  366. add_library(tinyxml2 STATIC ${TINYXML2_DIR}/tinyxml2.cpp ${TINYXML2_DIR}/tinyxml2.h)
  367. target_include_directories(tinyxml2 PUBLIC ${TINYXML2_DIR})
  368. set_target_properties(tinyxml2 PROPERTIES
  369. COMPILE_DEFINITIONS "TINYXML2_EXPORT"
  370. VERSION "3.0.0"
  371. SOVERSION "3")
  372. endif()
  373. compile_igl_module("xml")
  374. target_link_libraries(igl_xml ${IGL_SCOPE} tinyxml2)
  375. target_include_directories(igl_xml ${IGL_SCOPE} ${TINYXML2_DIR})
  376. endif()
  377. ################################################################################
  378. ### Install and export all modules
  379. function(install_dir_files dir_name)
  380. if (dir_name STREQUAL "core")
  381. set(subpath "")
  382. else()
  383. set(subpath "/${dir_name}")
  384. endif()
  385. file(GLOB public_headers
  386. ${CMAKE_CURRENT_SOURCE_DIR}/include/igl${subpath}/*.h
  387. )
  388. set(files_to_install ${public_headers})
  389. if(NOT LIBIGL_USE_STATIC_LIBRARY)
  390. file(GLOB public_sources
  391. ${CMAKE_CURRENT_SOURCE_DIR}/include/igl${subpath}/*.cpp
  392. )
  393. endif()
  394. list(APPEND files_to_install ${public_sources})
  395. install(
  396. FILES ${files_to_install}
  397. DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/igl${subpath}
  398. )
  399. endfunction()
  400. ################################################################################
  401. include(GNUInstallDirs)
  402. include(CMakePackageConfigHelpers)
  403. # Install and export core library
  404. install(
  405. TARGETS
  406. igl
  407. igl_common
  408. EXPORT igl-export
  409. PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
  410. LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
  411. RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
  412. ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
  413. )
  414. export(
  415. TARGETS
  416. igl
  417. igl_common
  418. FILE libigl-export.cmake
  419. )
  420. # Install headers for core library
  421. install_dir_files(core)
  422. install_dir_files(copyleft)
  423. # Write package configuration file
  424. configure_package_config_file(
  425. ${CMAKE_CURRENT_LIST_DIR}/libigl-config.cmake.in
  426. ${CMAKE_BINARY_DIR}/libigl-config.cmake
  427. INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/libigl/cmake
  428. )
  429. install(
  430. FILES
  431. ${CMAKE_BINARY_DIR}/libigl-config.cmake
  432. DESTINATION
  433. ${CMAKE_INSTALL_DATADIR}/libigl/cmake
  434. )
  435. # Write export file
  436. export(EXPORT igl-export
  437. FILE "${CMAKE_BINARY_DIR}/libigl-export.cmake"
  438. )
  439. install(EXPORT igl-export DESTINATION ${CMAKE_INSTALL_DATADIR}/libigl/cmake FILE libigl-export.cmake)
  440. export(PACKAGE libigl)