Skip to content

Commit

Permalink
Merge pull request #234 from ityuhui/yh-lws-os-0501
Browse files Browse the repository at this point in the history
Use the libwebsockets-dev package provided by the operating system
  • Loading branch information
k8s-ci-robot committed May 1, 2024
2 parents 6d5918e + 4a760d5 commit e7d709d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 33 deletions.
10 changes: 1 addition & 9 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,7 @@ ARG VARIANT="jammy"
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}

RUN apt-get update && \
apt-get install -qq -y git libssl-dev libcurl4-openssl-dev uncrustify cmake g++

RUN git clone https://github.com/warmcat/libwebsockets --depth 1 --branch v4.2-stable && \
cd libwebsockets && \
mkdir build && \
cd build && \
cmake -DLWS_WITHOUT_TESTAPPS=ON -DLWS_WITHOUT_TEST_SERVER=ON-DLWS_WITHOUT_TEST_SERVER_EXTPOLL=ON \
-DLWS_WITHOUT_TEST_PING=ON -DLWS_WITHOUT_TEST_CLIENT=ON -DCMAKE_C_FLAGS="-fpic" -DCMAKE_INSTALL_PREFIX=/usr/local .. && \
make && make install
apt-get install -qq -y git libssl-dev libcurl4-openssl-dev libwebsockets-dev uncrustify cmake g++

# Build pre-requisite: libyaml
RUN git clone https://github.com/yaml/libyaml --depth 1 --branch release/0.2.5 && \
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,7 @@ jobs:
- name: Prepare
run: |
sudo apt-get update
sudo apt-get install -y libssl-dev libcurl4-openssl-dev uncrustify valgrind
- name: Prepare libwebsockets
run: |
git clone https://github.com/warmcat/libwebsockets --depth 1 --branch v4.2-stable
cd libwebsockets
mkdir build
cd build
cmake .. -DLWS_WITHOUT_TESTAPPS=ON -DLWS_WITHOUT_TEST_SERVER=ON-DLWS_WITHOUT_TEST_SERVER_EXTPOLL=ON \
-DLWS_WITHOUT_TEST_PING=ON -DLWS_WITHOUT_TEST_CLIENT=ON -DCMAKE_C_FLAGS="-fpic"
make -j $(cat /proc/cpuinfo | grep processor | wc -l)
sudo make install
sudo apt-get install -y libssl-dev libcurl4-openssl-dev libwebsockets-dev uncrustify valgrind
- name: Prepare libyaml
run: |
git clone https://github.com/yaml/libyaml --depth 1 --branch release/0.2.5
Expand Down
12 changes: 1 addition & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,7 @@ git clone https://github.com/kubernetes-client/c
CLIENT_REPO_ROOT=${PWD}/c

# Install pre-requisites
sudo apt-get install libssl-dev libcurl4-openssl-dev uncrustify

# Build pre-requisite: libwebsockets
git clone https://github.com/warmcat/libwebsockets --depth 1 --branch v4.2-stable
cd libwebsockets
mkdir build
cd build
cmake -DLWS_WITHOUT_TESTAPPS=ON -DLWS_WITHOUT_TEST_SERVER=ON -DLWS_WITHOUT_TEST_SERVER_EXTPOLL=ON \
-DLWS_WITHOUT_TEST_PING=ON -DLWS_WITHOUT_TEST_CLIENT=ON -DCMAKE_C_FLAGS="-fpic" -DCMAKE_INSTALL_PREFIX=/usr/local ..
make
sudo make install
sudo apt-get install libssl-dev libcurl4-openssl-dev libwebsockets-dev uncrustify

# Build pre-requisite: libyaml
git clone https://github.com/yaml/libyaml --depth 1 --branch release/0.2.5
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/Config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
find_package(OpenSSL REQUIRED)
find_package(ZLIB REQUIRED)
find_package(yaml CONFIG REQUIRED)
find_package(libwebsockets CONFIG REQUIRED)
find_package(Libwebsockets CONFIG REQUIRED)

include("${CMAKE_CURRENT_LIST_DIR}/@pkgName@Targets.cmake")
2 changes: 1 addition & 1 deletion kubernetes/PreTarget.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ list(APPEND HDRS
include/generic.h
include/utils.h)

find_package(libwebsockets CONFIG REQUIRED)
find_package(Libwebsockets CONFIG REQUIRED)
find_package(yaml CONFIG REQUIRED)

0 comments on commit e7d709d

Please sign in to comment.