@@ -171,13 +171,26 @@ endif ()
171
171
172
172
173
173
##########################################################
174
- ### Create deb and RPM
174
+ ### Create MSI,EXE, DMG, DEB/RPM
175
+ ### TODO: Check each of these builds
175
176
##########################################################
176
- IF (WIN32 )
177
- set (CPACK_GENERATOR "ZIP;NSIS" )
178
- else (WIN32 )
179
- set (CPACK_GENERATOR "TGZ;DEB;RPM" )
180
- endif (WIN32 )
177
+ set (BITNESS 32)
178
+ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
179
+ set (BITNESS 64)
180
+ endif ()
181
+ if (WIN32 )
182
+ # MSI - this needs WiX Tooset installed and a path to candle.exe
183
+ # EXE - this needs NSIS tools to be in path
184
+ set (CPACK_GENERATOR "NSIS;WIX" )
185
+ set (CPACK_SOURCE_GENERATOR "ZIP" )
186
+ set (CPACK_WIX_UPGRADE_GUID "D809598A-B513-4752-B268-0BAC403B00E4" )
187
+ elseif ( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
188
+ set (CPACK_GENERATOR "PackageMake" )
189
+ set (CPACK_SOURCE_GENERATOR "TGZ" )
190
+ else ()
191
+ set (CPACK_GENERATOR "DEB;RPM" )
192
+ set (CPACK_SOURCE_GENERATOR "TGZ" )
193
+ endif ()
181
194
182
195
set (CPACK_PACKAGE_VENDOR "HTML Tidy Advocacy Community Group" )
183
196
set (CPACK_PACKAGE_CONTACT
"[email protected] " )
@@ -186,21 +199,24 @@ set(CPACK_PACKAGE_VERSION ${LIBTIDY_VERSION})
186
199
set (CPACK_PACKAGE_VERSION_MAJOR "${TIDY_MAJOR_VERSION} " )
187
200
set (CPACK_PACKAGE_VERSION_MINOR "${TIDY_MINOR_VERSION} " )
188
201
set (CPACK_PACKAGE_VERSION_PATCH "${TIDY_POINT_VERSION} " )
202
+ set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR} /README.html" )
189
203
190
- set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR} /LICENSE.md" )
204
+ set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR} /LICENSE.txt" )
205
+ set (CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR} /README.html" )
206
+ set (CPACK_RESOURCE_FILE_WELCOME "${CMAKE_SOURCE_DIR} /README.html" )
191
207
192
208
## debian config
193
209
set (CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT} )
194
210
set (CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://www.html-tidy.org/" )
195
211
#set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc")
196
212
set (CPACK_DEBIAN_PACKAGE_SECTION "Libraries" )
197
213
198
- set (BITNESS 32)
199
- if (CMAKE_SIZEOF_VOID_P EQUAL 8)
200
- set (BITNESS 64)
201
- endif ()
214
+ set (CPACK_SOURCE_IGNORE_FILES "${CMAKE_SOURCE_DIR} /test/;${CMAKE_SOURCE_DIR} /build/;${CMAKE_SOURCE_DIR} /.git/" )
215
+
216
+ if (NOT WIN32 AND NOT APPLE )
202
217
set ( CPACK_PACKAGE_FILE_NAME "tidy5-${CPACK_PACKAGE_VERSION} -${BITNESS} bit" )
218
+ endif ()
203
219
204
- INCLUDE (CPack)
205
- # eof
220
+ include (CPack)
206
221
222
+ # eof
0 commit comments