mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-23 20:58:55 -05:00
Added MD5 checksum check on kvasd binary download.
Made kvasd download failure a fatal build error. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4015 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
0cd70bb808
commit
7da17d01de
27
CMake/download_kvasd.cmake
Normal file
27
CMake/download_kvasd.cmake
Normal file
@ -0,0 +1,27 @@
|
||||
#
|
||||
# CMake script to fetch kvasd binary for the current platform
|
||||
#
|
||||
set (kvasd_NAME https://svn.code.sf.net/p/wsjt/wsjt/trunk/kvasd-binary/${SYSTEM_NAME}/kvasd${EXECUTABLE_SUFFIX})
|
||||
message (STATUS "file: ${kvasd_NAME}")
|
||||
if (APPLE)
|
||||
set (__kvasd_md5sum 198dbdde1e4b04f9940f63731097ee35)
|
||||
endif (APPLE)
|
||||
if (WIN32)
|
||||
set (__kvasd_md5sum 7b16809e51126a01bd02aed44427510c)
|
||||
endif (WIN32)
|
||||
if (UNIX)
|
||||
set (__kvasd_md5sum 77d5eef0215783fa74478ab411ac32ca)
|
||||
endif (UNIX)
|
||||
file (
|
||||
DOWNLOAD ${kvasd_NAME} contrib/kvasd${EXECUTABLE_SUFFIX}
|
||||
TIMEOUT 10
|
||||
STATUS kvasd_STATUS
|
||||
LOG kvasd_LOG
|
||||
SHOW_PROGRESS
|
||||
EXPECTED_MD5 ${__kvasd_md5sum}
|
||||
)
|
||||
list (GET kvasd_STATUS 0 kvasd_RC)
|
||||
if (kvasd_RC)
|
||||
message (WARNING "${kvasd_STATUS}")
|
||||
message (FATAL_ERROR "${kvasd_LOG}")
|
||||
endif (kvasd_RC)
|
@ -526,22 +526,15 @@ endif ()
|
||||
|
||||
|
||||
#
|
||||
# fetch kvasd
|
||||
# fetch and validate kvasd
|
||||
#
|
||||
set (kvasd_NAME https://svn.code.sf.net/p/wsjt/wsjt/trunk/kvasd-binary/${CMAKE_SYSTEM_NAME}/kvasd${CMAKE_EXECUTABLE_SUFFIX})
|
||||
file (
|
||||
DOWNLOAD ${kvasd_NAME} contrib/kvasd${CMAKE_EXECUTABLE_SUFFIX}
|
||||
TIMEOUT 10
|
||||
STATUS kvasd_STATUS
|
||||
LOG kvasd_LOG
|
||||
SHOW_PROGRESS
|
||||
add_custom_command (
|
||||
OUTPUT contrib/kvasd${CMAKE_EXECUTABLE_SUFFIX}
|
||||
COMMAND ${CMAKE_COMMAND} -D SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -D EXECUTABLE_SUFFIX=${CMAKE_EXECUTABLE_SUFFIX} -P ${CMAKE_SOURCE_DIR}/CMake/download_kvasd.cmake
|
||||
DEPENDS CMake/download_kvasd.cmake
|
||||
COMMENT "Downloading kvasd for ${CMAKE_SYSTEM_NAME}"
|
||||
VERBATIM
|
||||
)
|
||||
message (${kvasd_LOG})
|
||||
list (GET kvasd_STATUS 0 kvasd_RC)
|
||||
if (kvasd_RC)
|
||||
message (WARNING "${kvasd_STATUS}")
|
||||
endif (kvasd_RC)
|
||||
add_custom_target (kvasd DEPENDS contrib/kvasd${CMAKE_EXECUTABLE_SUFFIX})
|
||||
|
||||
|
||||
# UI generation
|
||||
@ -589,7 +582,7 @@ qt5_use_modules (jt9 Core)
|
||||
#qt5_use_modules (ConfigTest Widgets OpenGL Network Multimedia)
|
||||
|
||||
# build the main application
|
||||
add_executable (wsjtx WIN32 MACOSX_BUNDLE ${wsjtx_CXXSRCS} ${wsjtx_GENUISRCS} wsjtx.rc ${WSJTX_ICON_FILE} ${wsjtx_RESOURCES_RCC})
|
||||
add_executable (wsjtx WIN32 MACOSX_BUNDLE ${wsjtx_CXXSRCS} ${wsjtx_GENUISRCS} wsjtx.rc ${WSJTX_ICON_FILE} ${wsjtx_RESOURCES_RCC} contrib/kvasd${CMAKE_EXECUTABLE_SUFFIX})
|
||||
qt5_use_modules (wsjtx Widgets OpenGL Network Multimedia)
|
||||
|
||||
set_target_properties (wsjtx PROPERTIES
|
||||
@ -603,7 +596,6 @@ set_target_properties (wsjtx PROPERTIES
|
||||
)
|
||||
|
||||
target_link_libraries (wsjtx wsjt wsjt_qt ${hamlib_LIBRARIES} ${FFTW3_LIBRARIES})
|
||||
add_dependencies (wsjtx kvasd)
|
||||
|
||||
if (WIN32)
|
||||
set_target_properties (
|
||||
|
Loading…
Reference in New Issue
Block a user