File tree Expand file tree Collapse file tree 1 file changed +47
-1
lines changed
Expand file tree Collapse file tree 1 file changed +47
-1
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.22)
22
33project (jsonata
4- VERSION 1.0 .0
4+ VERSION 0.1 .0
55 DESCRIPTION "JSONata for C++"
66 LANGUAGES CXX
77)
@@ -260,3 +260,49 @@ if(JSONATA_BUILD_TESTS)
260260 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
261261 )
262262endif ()
263+
264+ # ----------------------------------------------------------------------------
265+ # Source packaging (CPack)
266+ # ----------------------------------------------------------------------------
267+
268+ # Basic package metadata
269+ set (CPACK_PACKAGE_NAME "${PROJECT_NAME} " )
270+ set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION} " )
271+ set (CPACK_PACKAGE_VERSION "${PROJECT_VERSION} " )
272+
273+ # Create a source tar.gz suitable for GitHub Releases and FetchContent_Declare
274+ set (CPACK_SOURCE_GENERATOR "TGZ;ZIP" )
275+ set (CPACK_SOURCE_PACKAGE_FILE_NAME "v${PROJECT_VERSION} " )
276+ set (CPACK_SOURCE_TOPLEVEL_TAG OFF )
277+
278+ # Ignore typical build and VCS artifacts in the source package
279+ set (CPACK_SOURCE_IGNORE_FILES
280+ # VCS / tooling
281+ "/\\ .git/"
282+ "/\\ .github/"
283+ "/\\ .idea/"
284+ "/\\ .vscode/"
285+ "\\ .DS_Store$"
286+ "~$"
287+ "\\ .swp$"
288+ "\\ .swo$"
289+ "\\ .tmp$"
290+
291+ # CMake/build outputs
292+ "/_CPack_Packages/"
293+ "/\\ .cache/"
294+ "/build/"
295+ "/build-.*?/"
296+ "/CMakeFiles/"
297+ "/CMakeFiles$"
298+ "/CMakeCache\\ .txt$"
299+ "/cmake_install\\ .cmake$"
300+ "/Makefile$"
301+ "/Testing/"
302+ "/install_manifest\\ .txt$"
303+
304+ # Generated tests
305+ "/test/gen/"
306+ )
307+
308+ include (CPack)
You can’t perform that action at this time.
0 commit comments