CMBSuperbuildMacros.cmake 1.35 KB
Newer Older
1 2
macro (cmb_superbuild_add_pdf name outname)
  superbuild_add_project("${name}"
3
    DOWNLOAD_NO_EXTRACT 1
4 5 6 7 8 9 10 11 12 13 14 15 16 17
    DEFAULT_ON
    CONFIGURE_COMMAND
      ""
    BUILD_COMMAND
      ""
    INSTALL_COMMAND
      "${CMAKE_COMMAND}" -E copy_if_different
        <DOWNLOADED_FILE>
        "<INSTALL_DIR>/doc/${outname}")

  if (${name}_enabled)
    set("${name}_pdf" "${superbuild_install_location}/doc/${outname}")
  endif ()
endmacro ()
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

set_property(GLOBAL
  PROPERTY
    cmb_superbuild_lfs_steps
      lfs-init
      lfs-download
      lfs-checkout)

macro (cmb_superbuild_add_lfs_steps _name)
  superbuild_project_add_step(lfs-init
    COMMAND   "${GIT_EXECUTABLE}"
              lfs
              install
              --local
    DEPENDEES download
    DEPENDERS configure
34
    DEPENDS   ${ARGN}
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
    COMMENT   "Enabling LFS for ${_name}"
    WORKING_DIRECTORY <SOURCE_DIR>)

  superbuild_project_add_step(lfs-download
    COMMAND   "${GIT_EXECUTABLE}"
              lfs
              fetch
    DEPENDEES lfs-init
    DEPENDERS configure
    COMMENT   "Downloading LFS data for ${_name}"
    WORKING_DIRECTORY <SOURCE_DIR>)

  superbuild_project_add_step(lfs-checkout
    COMMAND   "${GIT_EXECUTABLE}"
              lfs
              checkout
    DEPENDEES lfs-download
    DEPENDERS configure
    COMMENT   "Checking out LFS data for ${_name}"
    WORKING_DIRECTORY <SOURCE_DIR>)
endmacro ()