Updated libunbound build script for windows

This commit is contained in:
WolverinDEV 2019-10-25 20:25:44 +01:00
parent 7abb1b79c3
commit 838d5c4a21

View File

@ -1,5 +1,11 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if [[ ${build_os_type} == "win32 ]]; then
echo "Windows does not require libunbound"
echo "Dont building library"
exit 0
fi
source ../scripts/build_helper.sh source ../scripts/build_helper.sh
library_path="unbound" library_path="unbound"
requires_rebuild ${library_path} requires_rebuild ${library_path}
@ -29,18 +35,6 @@ if [[ ${build_os_type} == "linux" ]]; then
check_err_exit ${library_path} "Failed to build" check_err_exit ${library_path} "Failed to build"
make install make install
check_err_exit ${library_path} "Failed to install" check_err_exit ${library_path} "Failed to install"
elif [[ ${build_os_type} == "win32" ]]; then
exit 1 #TODO
cmake ../../ -G"Visual Studio 14 2015 Win64" -DOPENSSL_NO_ASM=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=. -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded"
check_err_exit ${library_path} "Failed generate build files!"
cmake --build . --target crypto --config release -j 8
#MSBuild.exe //p:Configuration=Release //p:Platform=x64 crypto/crypto.vcxproj
check_err_exit ${library_path} "Failed to build crytp!"
cmake --build . --target ssl --config release -j 8
#MSBuild.exe //p:Configuration=Release //p:Platform=x64 ssl/ssl.vcxproj
check_err_exit ${library_path} "Failed to build ssl!"
else else
echo "Invalid OS!" echo "Invalid OS!"
exit 1 exit 1