mirror of https://github.com/mgba-emu/mgba.git
CMake: unix2dos, not dos2unix
This commit is contained in:
parent
eda2669780
commit
1bf29ae362
|
@ -1040,17 +1040,17 @@ endif()
|
|||
|
||||
file(GLOB READMES ${CMAKE_CURRENT_SOURCE_DIR}/README*.md)
|
||||
|
||||
find_program(DOS2UNIX NAMES dos2unix)
|
||||
find_program(UNIX2DOS NAMES unix2dos)
|
||||
find_program(MARKDOWN NAMES markdown kramdown pandoc)
|
||||
|
||||
if(UNIX OR NOT DOS2UNIX)
|
||||
if(UNIX OR NOT UNIX2DOS)
|
||||
if(UNIX OR NOT MARKDOWN)
|
||||
install(FILES ${READMES} DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT ${BINARY_NAME})
|
||||
endif()
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/CHANGES" "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT ${BINARY_NAME})
|
||||
else()
|
||||
add_custom_command(OUTPUT CHANGES.txt COMMAND ${DOS2UNIX} -n "${CMAKE_CURRENT_SOURCE_DIR}/CHANGES" "${CMAKE_CURRENT_BINARY_DIR}/CHANGES.txt" MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/CHANGES")
|
||||
add_custom_command(OUTPUT LICENSE.txt COMMAND ${DOS2UNIX} -n "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt" MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
|
||||
add_custom_command(OUTPUT CHANGES.txt COMMAND ${UNIX2DOS} -n "${CMAKE_CURRENT_SOURCE_DIR}/CHANGES" "${CMAKE_CURRENT_BINARY_DIR}/CHANGES.txt" MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/CHANGES")
|
||||
add_custom_command(OUTPUT LICENSE.txt COMMAND ${UNIX2DOS} -n "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" "${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt" MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
|
||||
add_custom_target(CHANGES ALL DEPENDS CHANGES.txt)
|
||||
add_custom_target(LICENSE ALL DEPENDS LICENSE.txt)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CHANGES.txt ${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT ${BINARY_NAME})
|
||||
|
|
Loading…
Reference in New Issue