diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-13 04:09:56 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-13 04:09:56 +0000 |
| commit | 2cd7f7c890803a8dff2a2e9c5e5e24332979d04b (patch) | |
| tree | 777acd2e7599ce3b8feb2d53c08dd679b3ce5c35 /CMakeLists.txt | |
| parent | 74c67f47c24c2aba8773ecc99272fd0f502e8df2 (diff) | |
build: add script-based installation and tar.xz releases
Generate the manual on installation and delegate copying to install.sh.
Package the compiler, manual, installer and license using the HEAD commit's
UTC timestamp and short ID, plus the target system and architecture.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c311928..b3986eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,3 +79,18 @@ add_custom_command( VERBATIM ) add_custom_target(doc DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/doc/cpsc.1") + +configure_file(cmake/Install.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/Install.cmake" @ONLY) +install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/Install.cmake") + +add_custom_target(release + COMMAND "${CMAKE_COMMAND}" + "-DCPSC_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}" + "-DCPSC_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}" + "-DCPSC_EXECUTABLE=$<TARGET_FILE:cpsc>" + "-DCPSC_PLATFORM=${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}" + -P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Release.cmake" + DEPENDS cpsc doc + COMMENT "Packaging cpsc and its manual" + VERBATIM +) |
