CMake/Utilities/Release/Cygwin/CMakeLists.txt
Kitware Robot 9db3116226 Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00

26 lines
1.1 KiB
CMake

file(GLOB INSTALLED_CURSES /usr/bin/cygncurses-*.dll)
set(MAX 0)
foreach(f ${INSTALLED_CURSES})
if(NOT "${f}" MATCHES "\\+")
string(REGEX REPLACE ".*-([0-9]*).dll" "\\1" NUMBER "${f}")
if(NUMBER GREATER MAX)
set(MAX ${NUMBER})
endif()
endif()
endforeach()
string(REGEX REPLACE "/usr/bin/" "\\1" NUMBER "${f}")
set(CMAKE_NCURSES_VERSION "libncurses${MAX}")
message(STATUS "Using curses version: libncurses${MAX}")
configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-setup.hint.in"
"${CMake_BINARY_DIR}/setup.hint")
configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/README.cygwin.in"
"${CMake_BINARY_DIR}/Docs/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.README")
install_files(/share/doc/Cygwin FILES
${CMake_BINARY_DIR}/Docs/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.README
)
configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-package.sh.in"
${CPACK_CYGWIN_BUILD_SCRIPT})
configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-patch.diff.in"
${CPACK_CYGWIN_PATCH_FILE})