@@ -8,6 +8,42 @@ find_package(WIX)
88find_package (NSIS )
99find_package (GRIP )
1010
11+ ##############################################################################################################################################
12+ # Dependencies
13+ ##############################################################################################################################################
14+
15+ # packages directory
16+ set (PACKAGE_DOWNLOAD_DIR ${CMAKE_BINARY_DIR} /external)
17+ if (NOT EXISTS ${PACKAGE_DOWNLOAD_DIR} )
18+ file (MAKE_DIRECTORY ${PACKAGE_DOWNLOAD_DIR} )
19+ endif ()
20+
21+ # exprtk
22+ # As the time of this writing, HEAD revision is commit d312ba91419c9cb12c8279fd3a19096d39dfcb5e
23+ # available at https://github.com/ArashPartow/exprtk/archive/d312ba91419c9cb12c8279fd3a19096d39dfcb5e.zip
24+ # Using latest revision to get all bug fixes.
25+ set (EXPRTK_PACKAGE_URL "https://github.com/ArashPartow/exprtk/archive/master.zip" )
26+ set (EXPRTK_PACKAGE_PATH ${PACKAGE_DOWNLOAD_DIR} /exprtk.zip)
27+ if (NOT EXISTS ${EXPRTK_PACKAGE_PATH} )
28+ message (STATUS "Downloading exprtk package from ${EXPRTK_PACKAGE_URL} " )
29+ file (DOWNLOAD ${EXPRTK_PACKAGE_URL} ${EXPRTK_PACKAGE_PATH}
30+ TIMEOUT 60 # seconds
31+ TLS_VERIFY ON
32+ )
33+
34+ message (STATUS "Extracting exprtk package to ${EXPRTK_PACKAGE_PATH} " )
35+ execute_process (COMMAND ${CMAKE_COMMAND} -E tar xzf
36+ ${EXPRTK_PACKAGE_PATH}
37+ WORKING_DIRECTORY ${PACKAGE_DOWNLOAD_DIR}
38+ )
39+ endif ()
40+ set (EXPRTK_HEADER_PATH ${PACKAGE_DOWNLOAD_DIR} /exprtk-master/exprtk.hpp)
41+ if (EXISTS ${EXPRTK_HEADER_PATH} )
42+ message (STATUS "Found exprtk header file: ${EXPRTK_HEADER_PATH} " )
43+ else ()
44+ message (FATAL_ERROR "exprtk header file not found." )
45+ endif ()
46+
1147##############################################################################################################################################
1248# Standard CMake variables
1349##############################################################################################################################################
@@ -187,25 +223,25 @@ endif()
187223set (README_FILENAME README.md)
188224set (USERMANUAL_FILENAME UserManual.md)
189225
190- if (GRIP_FOUND)
191- # Convert README.md
192- execute_process (COMMAND grip README.md --export README.html --user-content --context=end2endzone/ShellAnything RESULT_VARIABLE res_var WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
193- if ("${res_var} " STREQUAL "0" )
194- set (README_FILENAME README.html)
195- else ()
196- message (FATAL_ERROR "grip failed converting README.md with res_var='${res_var} '" )
197- endif ()
198-
199- # Convert UserManual.md
200- execute_process (COMMAND grip UserManual.md --export UserManual.html --user-content --context=end2endzone/ShellAnything RESULT_VARIABLE res_var WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
201- if ("${res_var} " STREQUAL "0" )
202- set (USERMANUAL_FILENAME UserManual.html)
203- else ()
204- message (FATAL_ERROR "grip failed converting UserManual.md with res_var='${res_var} '" )
205- endif ()
206- else ()
207- message (WARNING "grip is not found on the system. grip is required for publishing markdown files to html. Files will be published as *.md files." )
208- endif ()
226+ # if (GRIP_FOUND)
227+ # # Convert README.md
228+ # execute_process(COMMAND grip README.md --export README.html --user-content --context=end2endzone/ShellAnything RESULT_VARIABLE res_var WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
229+ # if("${res_var}" STREQUAL "0")
230+ # set (README_FILENAME README.html)
231+ # else()
232+ # message(FATAL_ERROR "grip failed converting README.md with res_var='${res_var}'")
233+ # endif()
234+ #
235+ # # Convert UserManual.md
236+ # execute_process(COMMAND grip UserManual.md --export UserManual.html --user-content --context=end2endzone/ShellAnything RESULT_VARIABLE res_var WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
237+ # if("${res_var}" STREQUAL "0")
238+ # set (USERMANUAL_FILENAME UserManual.html)
239+ # else()
240+ # message(FATAL_ERROR "grip failed converting UserManual.md with res_var='${res_var}'")
241+ # endif()
242+ # else()
243+ # message(WARNING "grip is not found on the system. grip is required for publishing markdown files to html. Files will be published as *.md files.")
244+ # endif()
209245
210246
211247##############################################################################################################################################
0 commit comments