diff --git a/CMakeLists.txt b/CMakeLists.txt index 019fb7f..2ccf44a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -188,21 +188,7 @@ ENDIF(LIBUSB_INCLUDE_DIRS) # version.rc for Windows IF(WIN32) # Date for filling in rc file information - IF (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") - MACRO (GET_CURRENT_YEAR RESULT) - EXECUTE_PROCESS(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE ${RESULT}) - STRING(REGEX REPLACE "\n" "" ${RESULT} ${${RESULT}}) - STRING(REGEX REPLACE ".*(..)/(..)/(....).*" "\\3" ${RESULT} ${${RESULT}}) - ENDMACRO (GET_CURRENT_YEAR) - ELSE(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") - MACRO (GET_CURRENT_YEAR RESULT) - EXECUTE_PROCESS(COMMAND "date" "+%Y" OUTPUT_VARIABLE ${RESULT}) - STRING(REGEX REPLACE "\n" "" ${RESULT} ${${RESULT}}) - ENDMACRO (GET_CURRENT_YEAR) - ENDIF(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") - GET_CURRENT_YEAR(CURRENT_YEAR) - MESSAGE("Year for copyright is " ${CURRENT_YEAR}) - + STRING(TIMESTAMP CURRENT_YEAR %Y) SET(prefix ${CMAKE_INSTALL_PREFIX}) SET(RC_COMMENT "${PACKAGE_NAME} library") SET(RC_INTERNAL_NAME "${PACKAGE_NAME} ${WIN32_MODE}")