mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
Testing - Samples build on GH #331
Add GitHub Action to build CSharp sample on Windows Add MFC and Qt sample build actions Improve CASROOT assignment logic in env.build.sh and env.install.sh for better compatibility with binary directories
This commit is contained in:
@@ -23,7 +23,7 @@ if [ "$1" == "@BIN_LETTER@" ]; then
|
||||
|
||||
export CSF_OCCTBinPath="@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"
|
||||
export CSF_OCCTLibPath="@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@"
|
||||
export CSF_OCCTIncludePath="@CMAKE_BINARY_DIR@/inc"
|
||||
export CSF_OCCTIncludePath="@CMAKE_BINARY_DIR@/@INSTALL_DIR_INCLUDE@"
|
||||
export CSF_OCCTResourcePath="@CMAKE_SOURCE_DIR@/src"
|
||||
export CSF_OCCTDataPath="@CMAKE_SOURCE_DIR@/data"
|
||||
export CSF_OCCTSamplesPath="@CMAKE_SOURCE_DIR@/samples"
|
||||
|
@@ -1,10 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
aCurrentPath="$PWD"
|
||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
||||
cd ${aCurrentPath}
|
||||
|
||||
# ----- For compatibility with external application using CASROOT -----
|
||||
if [ "${CASROOT}" == "" ]; then
|
||||
export CASROOT="${aScriptPath}"
|
||||
# Get the last directory name from the path
|
||||
lastDir=$(basename "$aScriptPath")
|
||||
# Check if last directory is exactly bin, bind, or bini
|
||||
if [ "$lastDir" = "bin" ] || [ "$lastDir" = "bind" ] || [ "$lastDir" = "bini" ]; then
|
||||
# If path contains binary folder, go one level up
|
||||
export CASROOT=$(cd "$aScriptPath/.." && pwd)
|
||||
else
|
||||
# Keep current location
|
||||
export CASROOT="${aScriptPath}"
|
||||
fi
|
||||
cd ${aCurrentPath}
|
||||
fi
|
||||
|
||||
# ----- Define path to 3rdparty products -----
|
||||
|
@@ -1,10 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
aCurrentPath="$PWD"
|
||||
aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD";
|
||||
cd ${aCurrentPath}
|
||||
|
||||
# ----- For compatibility with external application using CASROOT -----
|
||||
if [ "${CASROOT}" == "" ]; then
|
||||
export CASROOT="@INSTALL_DIR@"
|
||||
# Get the last directory name from the path
|
||||
lastDir=$(basename "$aScriptPath")
|
||||
# Check if last directory is exactly bin, bind, or bini
|
||||
if [ "$lastDir" = "bin" ] || [ "$lastDir" = "bind" ] || [ "$lastDir" = "bini" ]; then
|
||||
# If path contains binary folder, go one level up
|
||||
export CASROOT=$(cd "$aScriptPath/.." && pwd)
|
||||
else
|
||||
# Keep current location
|
||||
export CASROOT="${aScriptPath}"
|
||||
fi
|
||||
cd ${aCurrentPath}
|
||||
fi
|
||||
|
||||
# ----- Define path to 3rdparty products -----
|
||||
|
Reference in New Issue
Block a user