updated build system

This commit is contained in:
Scott E. Graves 2024-07-09 13:12:02 -05:00
parent 097507a2d9
commit 0c414fc8a6
3 changed files with 14 additions and 8 deletions

View File

@ -32,6 +32,11 @@ if(PROJECT_BUILD)
)
include(project.cmake)
if (PROJECT_VERSION)
file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/dist/version.sh "export PROJECT_VERSION=${PROJECT_VERSION}")
add_definitions(-DPROJECT_VERSION=${PROJECT_VERSION})
endif()
else()
message(STATUS "-=[CMake Settings]=-")
message(STATUS " C standard: ${CMAKE_C_STANDARD}")

View File

@ -2,12 +2,11 @@
setlocal
set VERSION=%~1
set DEST=%~2
set ARG1=%~3
set ARG2=%~4
set ARG3=%~5
set DEST=%~1
set ARG1=%~2
set ARG2=%~3
set ARG3=%~4
pushd "%~dp0%"
call mingw64 -no-start ./make_package.sh "%VERSION%" "%DEST%" "%ARG1%" "%ARG2%" "%ARG3%" 1 0 || exit 1
call mingw64 -no-start ./make_package.sh "%DEST%" "%ARG1%" "%ARG2%" "%ARG3%" 1 0 || exit 1
popd

View File

@ -1,14 +1,16 @@
#!/bin/bash
PROJECT_VERSION=$1
DEST_DIR=$(realpath $2)
TEMP_DIR=$(mktemp -d)
CURRENT_DIR=$(dirname "$0")
CURRENT_DIR=$(realpath ${CURRENT_DIR})
. "${CURRENT_DIR}/env.sh" "$3" "$4" "$5" "$6" "$7"
TEMP_DIR=$(mktemp -d)
if [ -f "../dist/version.sh" ]; then
source ../dist/version.sh
fi
function exit_and_clean() {
echo $1