From e452df24a46cd88621d162777bd9dd5df1f40ccc Mon Sep 17 00:00:00 2001 From: Michael Baentsch <57787676+baentsch@users.noreply.github.com> Date: Mon, 4 Mar 2024 07:01:58 +0100 Subject: [PATCH] Enable shared build & fix build script (#157) * add build_shared as per different suggestions * deploy liboqs if not installed * create install dir if not present --- oqs-scripts/build_liboqs.sh | 2 +- oqs-scripts/build_openssh.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/oqs-scripts/build_liboqs.sh b/oqs-scripts/build_liboqs.sh index 7c4ed5abb86f..6e172d57d165 100755 --- a/oqs-scripts/build_liboqs.sh +++ b/oqs-scripts/build_liboqs.sh @@ -14,6 +14,6 @@ PREFIX=${PREFIX:-"`pwd`/oqs"} cd oqs-scripts/tmp/liboqs rm -rf build mkdir build && cd build -cmake .. -GNinja -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${PREFIX} +cmake .. -GNinja -DBUILD_SHARED_LIBS=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${PREFIX} ninja ninja install diff --git a/oqs-scripts/build_openssh.sh b/oqs-scripts/build_openssh.sh index fee22281414b..ecf8052c9eca 100755 --- a/oqs-scripts/build_openssh.sh +++ b/oqs-scripts/build_openssh.sh @@ -33,4 +33,9 @@ if [ "x${CIRCLECI}" == "xtrue" ] || [ "x${TRAVIS}" == "xtrue" ]; then else make -j fi +# check whether INSTALL_PREFIX/lib exists to support shared OQS builds +if [ ! -d $INSTALL_PREFIX/lib ]; then + mkdir -p $INSTALL_PREFIX + cp -R oqs/lib $INSTALL_PREFIX +fi make install