@@ -52,22 +52,22 @@ if(NOT CMAKE_CXX_EXTENSIONS)
5252 set (CMAKE_CXX_EXTENSIONS OFF )
5353endif ()
5454
55- project (ITKExamples )
55+ project (ITKSphinxExamples )
5656
5757if ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "Clang" )
5858 set (CMAKE_CXX_FLAGS "-Qunused-arguments ${CMAKE_CXX_FLAGS} " )
5959 set (CMAKE_C_FLAGS "-Qunused-arguments ${CMAKE_C_FLAGS} " )
6060endif ()
6161
6262if (CMAKE_HOST_WIN32 )
63- string (LENGTH "${ITKExamples_SOURCE_DIR } " source_len)
63+ string (LENGTH "${ITKSphinxExamples_SOURCE_DIR } " source_len)
6464 if (${source_len} GREATER 30)
6565 message (FATAL_ERROR
6666 "The source directory is currently too long, ${source_len} characters. "
6767 "Please move the Examples source directory to a shorter path."
6868 )
6969 endif ()
70- string (LENGTH "${ITKExamples_BINARY_DIR } " binary_len)
70+ string (LENGTH "${ITKSphinxExamples_BINARY_DIR } " binary_len)
7171 if (${binary_len} GREATER 30)
7272 message (FATAL_ERROR
7373 "The build directory is currently too long, ${binary_len} characters. "
@@ -82,19 +82,19 @@ if(NOT ITK_VERSION)
8282 # stand alone, ITK is required.
8383 find_package (ITK 5.2.0 REQUIRED)
8484endif ()
85- set (ITKExamples_VERSION_MAJOR ${ITK_VERSION_MAJOR} )
86- set (ITKExamples_VERSION_MINOR ${ITK_VERSION_MINOR} )
87- set (ITKExamples_VERSION_PATCH ${ITK_VERSION_PATCH} )
85+ set (ITKSphinxExamples_VERSION_MAJOR ${ITK_VERSION_MAJOR} )
86+ set (ITKSphinxExamples_VERSION_MINOR ${ITK_VERSION_MINOR} )
87+ set (ITKSphinxExamples_VERSION_PATCH ${ITK_VERSION_PATCH} )
8888
89- set (ITKExamples_VERSION
90- "${ITKExamples_VERSION_MAJOR } .${ITKExamples_VERSION_MINOR } "
89+ set (ITKSphinxExamples_VERSION
90+ "${ITKSphinxExamples_VERSION_MAJOR } .${ITKSphinxExamples_VERSION_MINOR } "
9191 )
9292
93- set (ITKExamples_RELEASE_VERSION
94- "${ITKExamples_VERSION_MAJOR } .${ITKExamples_VERSION_MINOR } .${ITKExamples_VERSION_PATCH } "
93+ set (ITKSphinxExamples_RELEASE_VERSION
94+ "${ITKSphinxExamples_VERSION_MAJOR } .${ITKSphinxExamples_VERSION_MINOR } .${ITKSphinxExamples_VERSION_PATCH } "
9595 )
9696
97- set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${ITKExamples_BINARY_DIR } /bin)
97+ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${ITKSphinxExamples_BINARY_DIR } /bin)
9898
9999include (CTest)
100100# Tests are added with add_test() can be run with the 'ctest' command line program.
@@ -104,12 +104,12 @@ configure_file(CMake/CTestCustom.cmake.in CTestCustom.cmake)
104104# ExternalData setup. We use the CMake ExternalData features to download binary
105105# files from a configurable location(s) -- including the local filesystem -- to
106106# avoid storing the potentially large files in the Git history.
107- set (CMAKE_MODULE_PATH ${ITKExamples_SOURCE_DIR } /CMake ${CMAKE_MODULE_PATH} )
107+ set (CMAKE_MODULE_PATH ${ITKSphinxExamples_SOURCE_DIR } /CMake ${CMAKE_MODULE_PATH} )
108108# The CMake magic to download the data.
109- set (ExternalData_SOURCE_ROOT "${ITKExamples_SOURCE_DIR } " )
110- set (ExternalData_BINARY_ROOT "${ITKExamples_BINARY_DIR } " )
109+ set (ExternalData_SOURCE_ROOT "${ITKSphinxExamples_SOURCE_DIR } " )
110+ set (ExternalData_BINARY_ROOT "${ITKSphinxExamples_BINARY_DIR } " )
111111
112- include (ITKExamplesExternalData )
112+ include (ITKSphinxExamplesExternalData )
113113set (_RootSubDirs
114114 CMake
115115 Formatting
@@ -125,18 +125,18 @@ set(content_links)
125125# corresponding locations in the binary tree.
126126foreach (_dir ${_RootSubDirs} )
127127 file (GLOB_RECURSE ${_dir} _content_links
128- RELATIVE "${ITKExamples_SOURCE_DIR } " "${_dir} /*.sha512" )
128+ RELATIVE "${ITKSphinxExamples_SOURCE_DIR } " "${_dir} /*.sha512" )
129129 set (content_links ${content_links} ${${_dir} _content_links})
130130endforeach ()
131131
132132foreach (link ${content_links} )
133133 string (REGEX REPLACE "\\ .sha512$" "" link ${link} )
134- ExternalData_Expand_Arguments(ITKExamplesData
134+ ExternalData_Expand_Arguments(ITKSphinxExamplesData
135135 link_location
136136 DATA{${link} }
137137 )
138138endforeach ()
139- ExternalData_Add_Target(ITKExamplesData )
139+ ExternalData_Add_Target(ITKSphinxExamplesData )
140140
141141if (${ITK_WRAP_PYTHON} )
142142 # Use the same Python interpreter as ITK to run the tests.
@@ -222,13 +222,13 @@ if(BUILD_DOCUMENTATION)
222222 # to.
223223 option (UPDATING_SUBMODULES
224224 "Set to ON when updating one of the Git submodules." OFF )
225- if (EXISTS "${ITKExamples_SOURCE_DIR } /.git" AND GIT_EXECUTABLE AND NOT "${UPDATING_SUBMODULES} " )
225+ if (EXISTS "${ITKSphinxExamples_SOURCE_DIR } /.git" AND GIT_EXECUTABLE AND NOT "${UPDATING_SUBMODULES} " )
226226 execute_process (COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
227- WORKING_DIRECTORY "${ITKExamples_SOURCE_DIR } "
227+ WORKING_DIRECTORY "${ITKSphinxExamples_SOURCE_DIR } "
228228 OUTPUT_QUIET
229229 )
230230 endif ()
231- if (NOT EXISTS "${ITKExamples_SOURCE_DIR } /Utilities/SphinxExtensions/breathelink/.git" )
231+ if (NOT EXISTS "${ITKSphinxExamples_SOURCE_DIR } /Utilities/SphinxExtensions/breathelink/.git" )
232232 message (SEND_ERROR "The git submodules are not available. Please run
233233 git submodule update --init --recursive"
234234 )
@@ -238,25 +238,25 @@ if(BUILD_DOCUMENTATION)
238238 # We must also duplicate the source tree since the images need to be present
239239 # with the source.
240240 add_custom_target (copy_sources ALL
241- COMMAND ${CMAKE_COMMAND} -E copy_directory "${ITKExamples_SOURCE_DIR } /src" "${ITKExamples_BINARY_DIR } /src"
242- COMMAND ${CMAKE_COMMAND} -E copy_directory "${ITKExamples_SOURCE_DIR } /Documentation" "${ITKExamples_BINARY_DIR } /Documentation"
243- COMMAND ${CMAKE_COMMAND} -E copy "${ITKExamples_SOURCE_DIR } /index.rst" "${ITKExamples_BINARY_DIR } /index.rst"
244- COMMAND ${CMAKE_COMMAND} -E copy_directory "${ITKExamples_SOURCE_DIR } /Formatting"
245- "${ITKExamples_BINARY_DIR } /Formatting"
246- COMMAND ${CMAKE_COMMAND} -E copy_directory "${ITKExamples_SOURCE_DIR } /Utilities"
247- "${ITKExamples_BINARY_DIR } /Utilities"
241+ COMMAND ${CMAKE_COMMAND} -E copy_directory "${ITKSphinxExamples_SOURCE_DIR } /src" "${ITKSphinxExamples_BINARY_DIR } /src"
242+ COMMAND ${CMAKE_COMMAND} -E copy_directory "${ITKSphinxExamples_SOURCE_DIR } /Documentation" "${ITKSphinxExamples_BINARY_DIR } /Documentation"
243+ COMMAND ${CMAKE_COMMAND} -E copy "${ITKSphinxExamples_SOURCE_DIR } /index.rst" "${ITKSphinxExamples_BINARY_DIR } /index.rst"
244+ COMMAND ${CMAKE_COMMAND} -E copy_directory "${ITKSphinxExamples_SOURCE_DIR } /Formatting"
245+ "${ITKSphinxExamples_BINARY_DIR } /Formatting"
246+ COMMAND ${CMAKE_COMMAND} -E copy_directory "${ITKSphinxExamples_SOURCE_DIR } /Utilities"
247+ "${ITKSphinxExamples_BINARY_DIR } /Utilities"
248248 COMMENT "Copying sources"
249249 )
250- # For unknown reasons, this was the only effective way to ensure ITKExamplesData
250+ # For unknown reasons, this was the only effective way to ensure ITKSphinxExamplesData
251251 # was built before build_html.
252- add_dependencies (copy_sources ITKExamplesData )
252+ add_dependencies (copy_sources ITKSphinxExamplesData )
253253
254- configure_file ("${ITKExamples_SOURCE_DIR } /Utilities/SphinxExtensions/RunGitStats.cmake.in"
255- "${ITKExamples_BINARY_DIR } /Utilities/SphinxExtensions/RunGitStats.cmake"
254+ configure_file ("${ITKSphinxExamples_SOURCE_DIR } /Utilities/SphinxExtensions/RunGitStats.cmake.in"
255+ "${ITKSphinxExamples_BINARY_DIR } /Utilities/SphinxExtensions/RunGitStats.cmake"
256256 @ONLY)
257257 add_custom_target (gitstats ALL
258- COMMAND ${CMAKE_COMMAND} -P "${ITKExamples_BINARY_DIR } /Utilities/SphinxExtensions/RunGitStats.cmake"
259- WORKING_DIRECTORY ${ITKExamples_BINARY_DIR }
258+ COMMAND ${CMAKE_COMMAND} -P "${ITKSphinxExamples_BINARY_DIR } /Utilities/SphinxExtensions/RunGitStats.cmake"
259+ WORKING_DIRECTORY ${ITKSphinxExamples_BINARY_DIR }
260260 COMMENT "Running gitstats"
261261 )
262262 add_dependencies (gitstats copy_sources)
@@ -267,22 +267,22 @@ if(BUILD_DOCUMENTATION)
267267 )
268268
269269 if (NOT ITKDoxygenXML_DIR)
270- include (${ITKExamples_SOURCE_DIR } /CMake/ITKDoxygenXML.cmake)
270+ include (${ITKSphinxExamples_SOURCE_DIR } /CMake/ITKDoxygenXML.cmake)
271271 endif ()
272272
273273 if (NOT ITKDoxygenTAG_DIR)
274- include (${ITKExamples_SOURCE_DIR } /CMake/ITKDoxygenTAG.cmake)
274+ include (${ITKSphinxExamples_SOURCE_DIR } /CMake/ITKDoxygenTAG.cmake)
275275 endif ()
276276
277277 # Builds the documentation.
278278 find_package (PythonInterp REQUIRED)
279279 find_package (Sphinx REQUIRED)
280280 find_program (PANDOC_BIN pandoc REQUIRED)
281281
282- set (SPHINX_CONF_DIR ${ITKExamples_BINARY_DIR } /Formatting)
283- set (SPHINX_INPUT_DIR ${ITKExamples_BINARY_DIR } )
284- set (SPHINX_DESTINATION ${ITKExamples_BINARY_DIR } )
285- set (SPHINX_DEPENDENCIES gitstats ITKDoxygenXML ITKExamplesData ITKDoxygenTAG CreateTarballs)
282+ set (SPHINX_CONF_DIR ${ITKSphinxExamples_BINARY_DIR } /Formatting)
283+ set (SPHINX_INPUT_DIR ${ITKSphinxExamples_BINARY_DIR } )
284+ set (SPHINX_DESTINATION ${ITKSphinxExamples_BINARY_DIR } )
285+ set (SPHINX_DEPENDENCIES gitstats ITKDoxygenXML ITKSphinxExamplesData ITKDoxygenTAG CreateTarballs)
286286
287287 option (DOC_WITH_LOCAL_DOXYGEN "Generate documentation with local doxygen" OFF )
288288 mark_as_advanced (DOC_WITH_LOCAL_DOXYGEN)
@@ -292,23 +292,23 @@ if(BUILD_DOCUMENTATION)
292292
293293 if (${SPHINX_HTML_OUTPUT} )
294294 install (DIRECTORY ${SPHINX_DESTINATION} /html
295- DESTINATION share/ITKExamples /doc
295+ DESTINATION share/ITKSphinxExamples /doc
296296 COMPONENT Doc
297297 PATTERN "${SPHINX_DESTINATION} /html/*"
298298 )
299299 add_custom_command (TARGET ${sphinx_target_base_name} _html
300300 POST_BUILD
301301 COMMAND ${PYTHON_EXECUTABLE}
302- ${ITKExamples_SOURCE_DIR } /Utilities/DocumentationTarball.py
302+ ${ITKSphinxExamples_SOURCE_DIR } /Utilities/DocumentationTarball.py
303303 ${SPHINX_DESTINATION} /html
304- ${ITKExamples_BINARY_DIR} /ITKExamples -${ITKExamples_RELEASE_VERSION } -html
305- WORKING_DIRECTORY ${ITKExamples_BINARY_DIR } /html
304+ ${ITKSphinxExamples_BINARY_DIR} /ITKSphinxExamples -${ITKSphinxExamples_RELEASE_VERSION } -html
305+ WORKING_DIRECTORY ${ITKSphinxExamples_BINARY_DIR } /html
306306 COMMENT "Creating html tarballs..."
307307 )
308308 install (FILES
309- ${ITKExamples_BINARY_DIR} /ITKExamples -${ITKExamples_RELEASE_VERSION } -html.tar.gz
310- ${ITKExamples_BINARY_DIR} /ITKExamples -${ITKExamples_RELEASE_VERSION } -html.zip
311- DESTINATION share/ITKExamples /doc /html
309+ ${ITKSphinxExamples_BINARY_DIR} /ITKSphinxExamples -${ITKSphinxExamples_RELEASE_VERSION } -html.tar.gz
310+ ${ITKSphinxExamples_BINARY_DIR} /ITKSphinxExamples -${ITKSphinxExamples_RELEASE_VERSION } -html.zip
311+ DESTINATION share/ITKSphinxExamples /doc /html
312312 COMPONENT Doc
313313 )
314314 endif ()
@@ -325,21 +325,21 @@ if(BUILD_DOCUMENTATION)
325325 add_custom_command (TARGET ${sphinx_target_base_name} _latex
326326 POST_BUILD
327327 COMMAND ${PDFLATEX_COMPILER}
328- ${SPHINX_DESTINATION} /latex/ITKExamples .tex
328+ ${SPHINX_DESTINATION} /latex/ITKSphinxExamples .tex
329329 -output -directory ${SPHINX_DESTINATION} /latex
330330 COMMAND ${MAKEINDEX_COMPILER}
331- ITKExamples .idx
331+ ITKSphinxExamples .idx
332332 COMMAND ${PDFLATEX_COMPILER}
333- ${SPHINX_DESTINATION} /latex/ITKExamples .tex
333+ ${SPHINX_DESTINATION} /latex/ITKSphinxExamples .tex
334334 -output -directory ${SPHINX_DESTINATION} /latex
335335 COMMAND ${CMAKE_COMMAND} -E copy
336- ${SPHINX_DESTINATION} /latex/ITKExamples .pdf
337- ${SPHINX_DESTINATION} /html/Documentation/Download/ITKExamples -${ITKExamples_RELEASE_VERSION } .pdf
336+ ${SPHINX_DESTINATION} /latex/ITKSphinxExamples .pdf
337+ ${SPHINX_DESTINATION} /html/Documentation/Download/ITKSphinxExamples -${ITKSphinxExamples_RELEASE_VERSION } .pdf
338338 WORKING_DIRECTORY ${SPHINX_DESTINATION} /latex
339339 COMMENT "Building PDF"
340340 )
341- install (FILES ${SPHINX_DESTINATION} /html/Documentation/Download/ITKExamples -${ITKExamples_RELEASE_VERSION } .pdf
342- DESTINATION share/ITKExamples /doc /pdf
341+ install (FILES ${SPHINX_DESTINATION} /html/Documentation/Download/ITKSphinxExamples -${ITKSphinxExamples_RELEASE_VERSION } .pdf
342+ DESTINATION share/ITKSphinxExamples /doc /pdf
343343 COMPONENT Doc
344344 )
345345 endif ()
@@ -350,11 +350,11 @@ if(BUILD_DOCUMENTATION)
350350 POST_BUILD
351351 COMMAND ${CMAKE_COMMAND} -E copy
352352 ${SPHINX_DESTINATION} /epub/*.epub
353- ${SPHINX_DESTINATION} /html/Documentation/Download/ITKExamples -${ITKExamples_RELEASE_VERSION } .epub
353+ ${SPHINX_DESTINATION} /html/Documentation/Download/ITKSphinxExamples -${ITKSphinxExamples_RELEASE_VERSION } .epub
354354 COMMENT "Copying EPUB"
355355 )
356- install (FILES ${SPHINX_DESTINATION} /html/Documentation/Download/ITKExamples -${ITKExamples_RELEASE_VERSION } .epub
357- DESTINATION share/ITKExamples /doc /epub
356+ install (FILES ${SPHINX_DESTINATION} /html/Documentation/Download/ITKSphinxExamples -${ITKSphinxExamples_RELEASE_VERSION } .epub
357+ DESTINATION share/ITKSphinxExamples /doc /epub
358358 COMPONENT Doc
359359 )
360360 endif ()
@@ -376,15 +376,15 @@ else()
376376 # Achieved with copy_sources target when BUILD_DOCUMENTATION enabled
377377 add_custom_target (copy_cookiecutter ALL
378378 COMMAND ${CMAKE_COMMAND} -E copy_directory
379- "${ITKExamples_SOURCE_DIR } /Utilities/CookieCutter"
380- "${ITKExamples_BINARY_DIR } /Utilities/CookieCutter"
379+ "${ITKSphinxExamples_SOURCE_DIR } /Utilities/CookieCutter"
380+ "${ITKSphinxExamples_BINARY_DIR } /Utilities/CookieCutter"
381381 COMMENT "Copy CookieCutter"
382382 )
383383endif ()
384384
385385# Configure the CreateNewExamples.py Python Script
386- configure_file ("${ITKExamples_SOURCE_DIR } /Utilities/CreateNewExample.py.in"
387- "${ITKExamples_BINARY_DIR } /Utilities/CreateNewExample.py"
386+ configure_file ("${ITKSphinxExamples_SOURCE_DIR } /Utilities/CreateNewExample.py.in"
387+ "${ITKSphinxExamples_BINARY_DIR } /Utilities/CreateNewExample.py"
388388 @ONLY)
389389
390390# Build the example executables?
0 commit comments