2009-09-23 19:40:25 +00:00
|
|
|
#
|
2009-09-08 07:03:57 +00:00
|
|
|
# - Find unix commands from cygwin
|
|
|
|
# This module looks for some usual Unix commands.
|
|
|
|
#
|
|
|
|
|
2013-10-04 23:23:16 +00:00
|
|
|
include( FindCygwin )
|
2009-09-08 07:03:57 +00:00
|
|
|
|
2013-10-04 23:23:16 +00:00
|
|
|
find_program( SH_EXECUTABLE
|
2009-09-08 07:03:57 +00:00
|
|
|
NAMES
|
2013-10-04 23:23:16 +00:00
|
|
|
bash
|
2009-09-08 07:03:57 +00:00
|
|
|
PATHS
|
|
|
|
${CYGWIN_INSTALL_PATH}/bin
|
|
|
|
/bin
|
|
|
|
/usr/bin
|
|
|
|
/usr/local/bin
|
|
|
|
/sbin
|
|
|
|
)
|
|
|
|
|
2013-10-04 23:23:16 +00:00
|
|
|
include( FindPackageHandleStandardArgs )
|
|
|
|
find_package_handle_standard_args( SH DEFAULT_MSG SH_EXECUTABLE )
|
2009-09-08 07:03:57 +00:00
|
|
|
|
2013-10-04 23:23:16 +00:00
|
|
|
# FIXME: Don't match on the name but check whether the argument is
|
|
|
|
# accepted or not. OTOH, if it isn't accepted, build will fail on Win.
|
|
|
|
if( WIN32 )
|
|
|
|
set( SH_FLAGS1 -o )
|
|
|
|
set( SH_FLAGS2 igncr )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
mark_as_advanced( SH_EXECUTABLE )
|
2009-09-08 07:03:57 +00:00
|
|
|
|