File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,3 +58,5 @@ Can be installed ob Ubuntu using `sudo apt install pybind11-dev libconcurrentque
5858```
59593 . Install ` sudo cmake --install build `
60603 . Uninstall ` sudo xargs rm < build/install_manifest.txt `
61+
62+ The configure script also supports custom install prefix. You can either use the ` -p | --prefix ` flag, or specify the ` PYTHON_UDL_INTERFACE_PREFIX ` environment variable.
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ BUILD_TYPE="Debug"
77BUILD_DIR=" build"
88BUILD_EXAMPLES=OFF
99BUILD_TESTS=OFF
10+ PYTHON_UDL_INTERFACE_PREFIX=" ${PYTHON_UDL_INTERFACE_PREFIX:-/ usr/ local} "
1011
1112# Parse arguments
1213while [[ " $# " -gt 0 ]]; do
@@ -25,12 +26,17 @@ while [[ "$#" -gt 0 ]]; do
2526 -t | --tests)
2627 BUILD_TESTS=ON
2728 ;;
29+ -p | --prefix)
30+ PYTHON_UDL_INTERFACE_PREFIX=" $2 "
31+ shift
32+ ;;
2833 -h | --help)
29- echo " Usage: ./configure.sh [-t Debug|Release|RelWithDebInfo|MinSizeRel] [-d build_dir] [-e ]"
34+ echo " Usage: ./configure.sh [options ]"
3035 echo " -m | --mode : Build type (default: Debug)"
3136 echo " -d | --dir : Build directory (default: build)"
3237 echo " -e | --examples : Enable building examples (default: OFF)"
3338 echo " -t | --tests : Enable building tests (default: OFF)"
39+ echo " -p | --prefix : Install prefix (default: /usr/local or \$ PYTHON_UDL_INTERFACE_PREFIX)"
3440 exit 0
3541 ;;
3642 * )
@@ -46,13 +52,15 @@ echo " Build type : $BUILD_TYPE"
4652echo " Build dir : $BUILD_DIR "
4753echo " Build examples : $BUILD_EXAMPLES "
4854echo " Build tests : $BUILD_TESTS "
55+ echo " Install prefix : $PYTHON_UDL_INTERFACE_PREFIX "
4956
5057# Create build directory
5158mkdir -p " $BUILD_DIR "
5259
5360# Run CMake configuration
5461cmake -B " $BUILD_DIR " \
5562 -DCMAKE_BUILD_TYPE=" $BUILD_TYPE " \
63+ -DCMAKE_INSTALL_PREFIX=" $PYTHON_UDL_INTERFACE_PREFIX " \
5664 -DBUILD_EXAMPLES=" $BUILD_EXAMPLES " \
5765 -DBUILD_TESTS=" $BUILD_TESTS " \
5866 -S .
You can’t perform that action at this time.
0 commit comments