aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2017-08-16 19:26:42 +0000
committerGerald Combs <gerald@wireshark.org>2017-08-16 23:04:57 +0000
commit4136bff2d0f2a805ea2b7f8b75f78ff48ec79da0 (patch)
tree33229651f97e6c19b3729d894a03a6b7f9ab1c36 /CMakeLists.txt
parent62d60108543bab32c4299e0aa90299975e435b64 (diff)
CMake: Switch back to shipping README.txt on Windows.
Instead of trying to ship README.md, convert its line endings and make sure the result is named README.txt. Change-Id: I4e081587c73342b01633b3a31ea03068e3fc1733 Reviewed-on: https://code.wireshark.org/review/23098 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt20
1 files changed, 17 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9efbe0ee95..c8f3d1df13 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1678,10 +1678,11 @@ if (BUILD_xxx2deb)
endif()
if(WIN32)
- set(INSTALL_FILES README.md ${INSTALL_FILES})
set(TEXTIFY_FILES COPYING NEWS README.windows)
- foreach(_text_file ${TEXTIFY_FILES})
- set(INSTALL_FILES ${CMAKE_BINARY_DIR}/${_text_file}.txt ${INSTALL_FILES})
+ set(TEXTIFY_MD_FILES README.md)
+ foreach(_text_file ${TEXTIFY_FILES} ${TEXTIFY_MD_FILES})
+ string(REGEX REPLACE ".md$" "" _out_file ${_text_file})
+ set(INSTALL_FILES ${CMAKE_BINARY_DIR}/${_out_file}.txt ${INSTALL_FILES})
endforeach()
else()
set(INSTALL_FILES COPYING ${INSTALL_FILES})
@@ -1951,6 +1952,19 @@ if(WIN32)
${CMAKE_SOURCE_DIR}/${_text_file}
)
endforeach()
+ foreach(_md_file ${TEXTIFY_MD_FILES})
+ string(REGEX REPLACE ".md$" ".txt" _text_file ${_md_file})
+ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${_text_file}
+ COMMAND ${POWERSHELL_COMMAND} "${CMAKE_SOURCE_DIR}/tools/textify.ps1"
+ -Destination ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/${_md_file}
+ COMMAND ${CMAKE_COMMAND} -E rename
+ ${CMAKE_BINARY_DIR}/${_md_file}.txt
+ ${CMAKE_BINARY_DIR}/${_text_file}
+ DEPENDS
+ ${CMAKE_SOURCE_DIR}/${_text_file}
+ )
+ endforeach()
endif()
foreach(_install_file ${INSTALL_FILES})