2012-08-13 21:47:32 +04:00
|
|
|
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})
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endforeach()
|
2012-08-13 21:47:32 +04:00
|
|
|
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"
|
2007-02-01 00:48:22 +03:00
|
|
|
"${CMake_BINARY_DIR}/setup.hint")
|
2012-08-13 21:47:32 +04:00
|
|
|
configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/README.cygwin.in"
|
2014-02-26 17:58:45 +04:00
|
|
|
"${CMake_BINARY_DIR}/Docs/${CPACK_PACKAGE_FILE_NAME}-${CPACK_CYGWIN_PATCH_NUMBER}.README")
|
2012-08-13 21:47:32 +04:00
|
|
|
install_files(/share/doc/Cygwin FILES
|
2014-02-26 17:58:45 +04:00
|
|
|
${CMake_BINARY_DIR}/Docs/${CPACK_PACKAGE_FILE_NAME}-${CPACK_CYGWIN_PATCH_NUMBER}.README
|
2007-02-01 00:48:22 +03:00
|
|
|
)
|
2012-08-13 21:47:32 +04:00
|
|
|
configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-package.sh.in"
|
2007-02-01 00:48:22 +03:00
|
|
|
${CPACK_CYGWIN_BUILD_SCRIPT})
|
2012-08-13 21:47:32 +04:00
|
|
|
configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-patch.diff.in"
|
2007-02-01 00:48:22 +03:00
|
|
|
${CPACK_CYGWIN_PATCH_FILE})
|
|
|
|
|