Skip to content

Commit

Permalink
Adding zstd
Browse files Browse the repository at this point in the history
  • Loading branch information
WolverinDEV committed Jul 31, 2020
1 parent 8c26435 commit fe5e57b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/config/tearoot-server.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ SET(jsoncpp_DIR "${LIBRARY_PATH}/jsoncpp/${BUILD_OUTPUT}/lib/cmake/jsoncpp/")
SET(yaml-cpp_ROOT_DIR "${LIBRARY_PATH}/yaml-cpp/${BUILD_OUTPUT}/share/cmake/yaml-cpp/")
SET(nice_DIR "${LIBRARY_PATH}/libnice/${BUILD_OS_TYPE}_${BUILD_OS_ARCH}/")
SET(glib20_DIR "${LIBRARY_PATH}/glibc/${BUILD_OS_TYPE}_${BUILD_OS_ARCH}/")
SET(zstd_DIR "${LIBRARY_PATH}/zstd/build/cmake/${BUILD_OUTPUT}/lib/cmake/zstd/")

#glibc/linux_amd64/lib/
list(APPEND CMAKE_MODULE_PATH "${LIBRARY_PATH}/protobuf/${BUILD_OUTPUT}/lib/cmake/")
Expand Down
23 changes: 23 additions & 0 deletions libraries/build_zstd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

[[ -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

_fpic=""
[[ ${build_os_type} == "linux" ]] && _fpic="-fPIC"
_std_options=""
[[ ${build_os_type} == "linux" ]] && _std_options="-static-libstdc++"
cmake_build ${library_path}/build/cmake/ -DZSTD_BUILD_PROGRAMS=OFF -DCMAKE_CXX_FLAGS="${_fpic} ${_std_options}" -DCMAKE_BUILD_TYPE=RelWithDebInfo
check_err_exit ${library_path} "Failed to build zstd!"
set_build_successful ${library_path}

0 comments on commit fe5e57b

Please sign in to comment.