@@ -126,7 +126,7 @@ endif()
126
126
# Licenses for binary packages
127
127
# ======================================================================
128
128
129
- if (0 )
129
+ # if (0)
130
130
131
131
if (EXISTS "${CMAKE_SOURCE_DIR} /LICENSE.mysql.txt" )
132
132
set (LIC_FILE "LICENSE.mysql" ) # Without ".txt" extension
@@ -142,23 +142,34 @@ else()
142
142
set (newline UNIX )
143
143
endif ()
144
144
145
- set (info_files README ${LIC_FILE} )
146
145
147
- foreach (file ${info_files} )
146
+ if (EXISTS "${CMAKE_SOURCE_DIR} /README.txt" )
147
+ set (info_files README ${LIC_FILE} )
148
+ set (CPACK_RESOURCE_FILE_README "README${info_ext} " )
149
+ else ()
150
+ set (info_files README.md CONTRIBUTING.md ${LIC_FILE} )
151
+ set (CPACK_RESOURCE_FILE_README "README.md" )
152
+ endif ()
148
153
149
- set (file_src "${CMAKE_SOURCE_DIR} /${file} .txt" )
150
- set (file_bin "${CMAKE_BINARY_DIR} /${file}${info_ext} " )
154
+ foreach (file ${info_files} )
155
+ if (${file} MATCHES "[.]*\\ .md" )
156
+ set (file_src "${CMAKE_SOURCE_DIR} /${file} " )
157
+ set (file_bin "${CMAKE_BINARY_DIR} /${file} " )
158
+ else ()
159
+ set (file_src "${CMAKE_SOURCE_DIR} /${file} .txt" )
160
+ set (file_bin "${CMAKE_BINARY_DIR} /${file}${info_ext} " )
161
+ endif ()
151
162
152
163
configure_file ("${file_src} " "${file_bin} " NEWLINE_STYLE ${newline} )
153
164
install (FILES "${file_bin} " DESTINATION ${INSTALL_DOC_DIR} COMPONENT Readme )
165
+ message ("Installing README files: ${file_bin} " )
154
166
155
167
endforeach ()
156
168
157
- set (CPACK_RESOURCE_FILE_README "README${info_ext} " )
158
169
set (CPACK_RESOURCE_FILE_LICENSE "${LIC_FILE}${info_ext} " )
159
170
#set(CPACK_RESOURCE_FILE_INSTALL "...") # FIXME
160
171
161
- endif ()
172
+ # endif()
162
173
163
174
# ======================================================================
164
175
# Specs for source package
0 commit comments