Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Download doc with wget on windows and add a target for nsis.
[simgrid.git] / buildtools / Cmake / GenerateDocWin.cmake
diff --git a/buildtools/Cmake/GenerateDocWin.cmake b/buildtools/Cmake/GenerateDocWin.cmake
new file mode 100644 (file)
index 0000000..46ef1c6
--- /dev/null
@@ -0,0 +1,23 @@
+#### Generate the html documentation
+find_path(WGET_PATH    NAMES wget.exe  PATHS NO_DEFAULT_PATHS)
+find_path(NSIS_PATH NAMES makensis.exe  PATHS NO_DEFAULT_PATHS)
+
+message(STATUS "wget: ${WGET_PATH}")
+message(STATUS "nsis: ${NSIS_PATH}")
+
+if(WGET_PATH)
+       ADD_CUSTOM_TARGET(simgrid_documentation
+               COMMENT "Downloading the SimGrid documentation..."
+               COMMAND ${WGET_PATH}/wget.exe -r -np -nH -nd http://simgrid.gforge.inria.fr/simgrid/${release_version}/doc/
+               WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/html
+       )
+endif(WGET_PATH)
+
+if(NSIS_PATH)
+ADD_CUSTOM_TARGET(nsis
+       COMMENT "Generating the SimGrid installor for Windows..."
+       DEPENDS simgrid gras graphicator gras_stub_generator tesh simgrid-colorizer simgrid_update_xml
+       COMMAND ${NSIS_PATH}/makensis.exe simgrid.nsi
+       WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/
+)
+endif(NSIS_PATH)
\ No newline at end of file