File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 2.7 )
1+ set (ATLASES_URL "https://biomedic.doc.ic.ac.uk/brain-development/downloads/dHCP/atlases-dhcp-structural-pipeline-v1.zip" )
2+ set (ATLASES_MD5 "77e924bc17a4906f5814874009f5eca6" )
3+ set (ATLASES_DIR "${CMAKE_CURRENT_SOURCE_DIR} /atlases" )
24
3- include (${CMAKE_ROOT} /Modules/ExternalProject.cmake )
5+ set (_default ON )
6+ if (IS_DIRECTORY "${ATLASES_DIR} " )
7+ set (_default OFF )
8+ endif ()
9+ option (DrawEM_ATLASES "Whether to download DrawEM atlases during build step" ${_default} )
10+ unset (_default)
411
5- set (ATLAS_URL "https://biomedic.doc.ic.ac.uk/brain-development/downloads/dHCP/atlases-dhcp-structural-pipeline-v1.zip" )
6- set (ATLAS_MD5 77e924bc17a4906f5814874009f5eca6)
12+ if (DrawEM_ATLASES)
713
8- if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR} /atlases)
9- ExternalProject_Add (atlases
10- URL ${ATLAS_URL}
11- URL_MD5 ${ATLAS_MD5}
12- PREFIX atlases
13- CONFIGURE_COMMAND ""
14- BUILD_COMMAND ""
15- INSTALL_COMMAND ""
16- )
14+ include (ExternalProject )
1715
18- add_custom_target (atlases_move ALL
19- ${CMAKE_COMMAND} -E rename ${CMAKE_CURRENT_BINARY_DIR} /atlases/src/atlases ${CMAKE_CURRENT_SOURCE_DIR} /atlases
20- )
16+ ExternalProject_Add (atlases
17+ URL ${ATLASES_URL}
18+ URL_MD5 ${ATLASES_MD5}
19+ PREFIX atlases
20+ CONFIGURE_COMMAND ""
21+ BUILD_COMMAND ""
22+ INSTALL_COMMAND ""
23+ )
2124
22- ADD_DEPENDENCIES (atlases_move atlases )
23- endif ()
25+ ExternalProject_Add_Step (atlases rename
26+ COMMAND ${CMAKE_COMMAND} -E rename "${CMAKE_CURRENT_BINARY_DIR} /atlases/src/atlases" "${ATLASES_DIR} "
27+ COMMENT "Move extracted atlases to source directory"
28+ DEPENDEES download
29+ )
30+
31+ endif ()
Original file line number Diff line number Diff line change @@ -26,5 +26,9 @@ endif ()
2626
2727mirtk_configure_module ()
2828
29- add_subdirectory (ThirdParty/ANTs )
29+ option (DrawEM_BUILD_N4 "Whether to build ANTs N4 from sources included in DrawEM" ON )
30+ if (DrawEM_BUILD_N4)
31+ add_subdirectory (ThirdParty/ANTs )
32+ endif ()
33+
3034include (Atlases.cmake )
You can’t perform that action at this time.
0 commit comments