Skip to content

Commit

Permalink
update build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
luc committed Nov 27, 2023
1 parent 6694379 commit ecea278
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions externals/prebuild_scripts/build_opencv_w_contrib_for_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ cmake \
../..

# finally build it
make -j8
make -j16

# copy all into install folder
make install
Expand All @@ -85,8 +85,9 @@ cd ../.. # back to opencv
# Make build folder for release version
rm -rf $BUILD_R
mkdir $BUILD_R
echo "$BUILD_R and $BUILD_D"
cd $BUILD_R

#
# Run cmake to configure and generate the make files
cmake \
-DCMAKE_CONFIGURATION_TYPES=Release \
Expand All @@ -110,15 +111,17 @@ cmake \
../..

# finally build it
make -j8
make -j16

# copy all into install folder
make install
cd ../.. # back to opencv

# Create zip folder for debug and release version
rm -rf $ZIPFOLDER
mkdir $ZIPFOLDER
mkdir -p "$ZIPFOLDER"

echo "$PWD/$BUILD_R/install/include $PWD/$ZIPFOLDER/include"
cp -R $BUILD_R/install/include $ZIPFOLDER/include
cp -R $BUILD_R/install/lib $ZIPFOLDER/Release
cp -R $BUILD_D/install/lib $ZIPFOLDER/Debug
Expand All @@ -131,8 +134,9 @@ fi
cp LICENSE $ZIPFOLDER
cp README.md $ZIPFOLDER

if [ -d "../../prebuilt/$ZIPFILE" ]; then
rm -rf ../../prebuilt/$ZIPFILE
if [ -d "../prebuilt/$ZIPFILE" ]; then
rm -rf "../prebuilt/$ZIPFILE"
fi

mv $ZIPFOLDER ../../prebuilt
cp -r $ZIPFOLDER ../../prebuilt

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
:: To enable downloading prebuilds copy
set PATH=%PATH%;C:\Program Files (x86)\Git\bin
set MAX_NUM_CPU_CORES=6
set CMAKE_GENERATOR="Visual Studio 16 2019"
::set CMAKE_GENERATOR="Visual Studio 16 2019"
set CMAKE_ARCHITECTURE=x64
set OPENCV_VERSION=%1
set SLPROJECT_ROOT=%2
Expand Down

0 comments on commit ecea278

Please sign in to comment.