Tested on Windows with Visual Studio 2022 Community Edition - Introduced options to build shared and static libraries. - Updated CMakeLists.txt to validate library type options. - Enhanced bootstrap.bat to include static library build options. - Added detailed build instructions to README_BUILD.md. - Modified openpnp-capture.h to handle symbol export for static libraries.
65 lines
1.5 KiB
Batchfile
65 lines
1.5 KiB
Batchfile
@ECHO OFF
|
|
ECHO Please choose build system:
|
|
ECHO 1. Visual Studio with NMake (Shared Library - Release)
|
|
ECHO 2. Visual Studio with Ninja Build (Shared Library - Release)
|
|
ECHO 3. Visual Studio with NMake (Static Library - Release)
|
|
ECHO 4. Visual Studio with NMake (Static Library - Debug)
|
|
ECHO 5. Visual Studio with Ninja Build (Static Library - Release)
|
|
ECHO 6. Visual Studio with Ninja Build (Static Library - Debug)
|
|
ECHO 7. Exit
|
|
ECHO .
|
|
|
|
CHOICE /C 1234567 /M "Enter your choice:"
|
|
|
|
IF ERRORLEVEL 7 GOTO End
|
|
IF ERRORLEVEL 6 GOTO NinjaStaticDebug
|
|
IF ERRORLEVEL 5 GOTO NinjaStaticRelease
|
|
IF ERRORLEVEL 4 GOTO VSStaticDebug
|
|
IF ERRORLEVEL 3 GOTO VSStaticRelease
|
|
IF ERRORLEVEL 2 GOTO NinjaBuild
|
|
IF ERRORLEVEL 1 GOTO VS
|
|
|
|
:VS
|
|
mkdir build
|
|
cd build
|
|
cmake -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" ..
|
|
cd ..
|
|
GOTO End
|
|
|
|
:NinjaBuild
|
|
mkdir build
|
|
cd build
|
|
cmake -DCMAKE_BUILD_TYPE=Release -G "Ninja" ..
|
|
cd ..
|
|
GOTO End
|
|
|
|
:VSStaticRelease
|
|
mkdir build
|
|
cd build
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -G "NMake Makefiles" ..
|
|
cd ..
|
|
GOTO End
|
|
|
|
:VSStaticDebug
|
|
mkdir build
|
|
cd build
|
|
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -G "NMake Makefiles" ..
|
|
cd ..
|
|
GOTO End
|
|
|
|
:NinjaStaticRelease
|
|
mkdir build
|
|
cd build
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -G "Ninja" ..
|
|
cd ..
|
|
GOTO End
|
|
|
|
:NinjaStaticDebug
|
|
mkdir build
|
|
cd build
|
|
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -G "Ninja" ..
|
|
cd ..
|
|
GOTO End
|
|
|
|
:End
|