diff --git a/build-helpers b/build-helpers index fa82de1..ed6468e 160000 --- a/build-helpers +++ b/build-helpers @@ -1 +1 @@ -Subproject commit fa82de18241ef5c4cf4fc8328137f726b572827e +Subproject commit ed6468e2c31b2ce3c9d69a06adefef278e507971 diff --git a/libraries/build.sh b/libraries/build.sh index 0393add..5607a63 100755 --- a/libraries/build.sh +++ b/libraries/build.sh @@ -67,7 +67,7 @@ exec_script_external build_ed25519.sh ed25519 exec_script_external build_jsoncpp.sh jsoncpp #exec_script build_mysqlconnector.sh exec_script_external build_opus.sh opus -exec_script_external build_protobuf.sh protobuf +exec_script build_protobuf.sh protobuf exec_script_external build_spdlog.sh spdlog exec_script_external build_stringvariable.sh StringVariable exec_script_external build_threadpool.sh Thread-Pool diff --git a/libraries/build_protobuf.sh b/libraries/build_protobuf.sh index d36ca27..7ebbe9e 100755 --- a/libraries/build_protobuf.sh +++ b/libraries/build_protobuf.sh @@ -1,7 +1,23 @@ -cd protobuf +[[ -z "${build_helper_file}" ]] && { + echo "Missing build helper file. Please define \"build_helper_file\"" + exit 1 +} +source ${build_helper_file} +[[ $build_helpers_defined -ne 1 ]] && { + echo "Failed to include build helpers." + exit 1 +} + +requires_rebuild ${library_path} +[[ $? -eq 0 ]] && exit 0 + + +cd protobuf || exit 1 # git checkout 3.5.1.1 -cd build -cmake ../cmake/ -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_CXX_FLAGS="-std=c++11 -fPIC ${CXX_FLAGS}" -DCMAKE_C_FLAGS="${C_FLAGS}" -DCMAKE_BUILD_TYPE=RelWithDebInfo ${CMAKE_OPTIONS} -make ${CMAKE_MAKE_OPTIONS} -sudo make install -#sudo ldconfig +cd build || exit 1 +cmake ../cmake/ -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_CXX_FLAGS="-std=c++11 -fPIC ${CXX_FLAGS}" -DCMAKE_C_FLAGS="${C_FLAGS}" -DCMAKE_BUILD_TYPE=RelWithDebInfo ${CMAKE_OPTIONS} || exit 1 +make ${CMAKE_MAKE_OPTIONS} || exit 1 +sudo make install || exit 1 +#sudo ldconfig + +set_build_successful ${library_path}