forked from osmocom/wireshark
cmake: make Cygwin optional
Cygwin is not needed if the documentation is not built (i.e. asciidoc, docbook, xsltproc are not needed). Via Chocolatey the following packages can be installed: git, winflexbison, strawberryperl. Change-Id: Ib13d144321cf6d2ed5c3346a2ae271de983deada Reviewed-on: https://code.wireshark.org/review/21316 Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
parent
46b105d513
commit
35f620c533
|
@ -55,12 +55,15 @@ if (WIN32)
|
|||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2\\/;native]"
|
||||
)
|
||||
|
||||
if(${CYGWIN_INSTALL_PATH} STREQUAL "CYGWIN_INSTALL_PATH-NOTFOUND")
|
||||
message(FATAL_ERROR "Cygwin installation path was not detected. You can set it with WIRESHARK_CYGWIN_INSTALL_PATH environment variable.")
|
||||
else()
|
||||
mark_as_advanced(
|
||||
CYGWIN_INSTALL_PATH
|
||||
)
|
||||
if(NOT CYGWIN_INSTALL_PATH)
|
||||
if(WIRESHARK_CYGWIN_INSTALL_PATH)
|
||||
message(FATAL_ERROR "WIRESHARK_CYGWIN_INSTALL_PATH was specified, but Cygwin was not found.")
|
||||
else()
|
||||
message(WARNING "Cygwin installation path was not detected. You can set it with WIRESHARK_CYGWIN_INSTALL_PATH environment variable.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
CYGWIN_INSTALL_PATH
|
||||
)
|
||||
endif ()
|
||||
|
|
|
@ -20,7 +20,7 @@ include( FindPackageHandleStandardArgs )
|
|||
find_package_handle_standard_args( SH DEFAULT_MSG SH_EXECUTABLE )
|
||||
|
||||
# Ensure this is Cygwin bash
|
||||
if( WIN32 )
|
||||
if( WIN32 AND CYGWIN_INSTALL_PATH )
|
||||
execute_process( COMMAND ${SH_EXECUTABLE} --version OUTPUT_VARIABLE SH_VERSION )
|
||||
string( FIND "${SH_VERSION}" "cygwin" SH_IS_CYGWIN )
|
||||
if( ${SH_IS_CYGWIN} LESS 0 )
|
||||
|
|
Loading…
Reference in New Issue