LibBGCode.cmake 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. set(LibBGCode_SOURCE_DIR "" CACHE PATH "Optionally specify local LibBGCode source directory")
  2. set(_source_dir_line
  3. URL https://github.com/prusa3d/libbgcode/archive/6f43cb004ef3d3bda37dde49f6235e24d2717629.zip
  4. URL_HASH SHA256=eb5198caecb6a693a294af6a56c37b0adb1eb159a34a9c3116970b80659ee9f9)
  5. if (LibBGCode_SOURCE_DIR)
  6. set(_source_dir_line "SOURCE_DIR;${LibBGCode_SOURCE_DIR};BUILD_ALWAYS;ON")
  7. endif ()
  8. # add_cmake_project(LibBGCode_deps
  9. # ${_source_dir_line}
  10. # SOURCE_SUBDIR deps
  11. # BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/
  12. # CMAKE_ARGS
  13. # -DLibBGCode_Deps_DEP_DOWNLOAD_DIR:PATH=${${PROJECT_NAME}_DEP_DOWNLOAD_DIR}
  14. # -DDEP_CMAKE_OPTS:STRING=-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
  15. # -DLibBGCode_Deps_SELECT_ALL:BOOL=OFF
  16. # -DLibBGCode_Deps_SELECT_heatshrink:BOOL=ON
  17. # -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
  18. # -DLibBGCode_Deps_DEP_INSTALL_PREFIX=${${PROJECT_NAME}_DEP_INSTALL_PREFIX}
  19. # )
  20. add_cmake_project(LibBGCode
  21. ${_source_dir_line}
  22. CMAKE_ARGS
  23. -DLibBGCode_BUILD_TESTS:BOOL=OFF
  24. -DLibBGCode_BUILD_CMD_TOOL:BOOL=OFF
  25. )
  26. # set(DEP_LibBGCode_deps_DEPENDS ZLIB Boost)
  27. # set(DEP_LibBGCode_DEPENDS LibBGCode_deps)
  28. set(DEP_LibBGCode_DEPENDS ZLIB Boost heatshrink)