lib3mf.cmake 621 B

123456789101112131415161718192021222324252627
  1. # Build lib3mf
  2. # The GitHub release (tag) we want to use
  3. SET(LIB3MF_TAG v2.1.1)
  4. SET(LIB3MF_PREFIX lib3mf)
  5. SET(LIB3MF_URL https://github.com/3MFConsortium/lib3mf)
  6. # Configure lib3mf
  7. SET(LIB3MF_TESTS OFF CACHE INTERNAL "")
  8. SET(BUILD_SHARED_LIBS ON CACHE INTERNAL "")
  9. # Add lib3mf
  10. FETCHCONTENT_DECLARE(
  11. ${LIB3MF_PREFIX}
  12. PREFIX ${LIB3MF_PREFIX}
  13. GIT_REPOSITORY ${LIB3MF_URL}
  14. GIT_TAG ${LIB3MF_TAG}
  15. )
  16. FETCHCONTENT_GETPROPERTIES(${LIB3MF_PREFIX})
  17. IF(NOT ${LIB3MF_PREFIX}_POPULATED)
  18. FETCHCONTENT_POPULATE(${LIB3MF_PREFIX})
  19. ADD_SUBDIRECTORY(${${LIB3MF_PREFIX}_SOURCE_DIR} ${${LIB3MF_PREFIX}_BINARY_DIR})
  20. ENDIF()