Skip to content

Commit

Permalink
added zedmd-client, less strict handshake
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalkbrenner committed Feb 2, 2025
1 parent d9ef6f7 commit 741aaef
Show file tree
Hide file tree
Showing 14 changed files with 1,169 additions and 43 deletions.
179 changes: 139 additions & 40 deletions CMakeLists.txt

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions platforms/linux/aarch64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

set -e

CARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251
LIBSERIALPORT_SHA=21b3dfe5f68c205be4086469335fd2fc2ce11ed2
LIBFRAMEUTIL_SHA=30048ca23d41ca0a8f7d5ab75d3f646a19a90182
SOCKPP_SHA=e6c4688a576d95f42dd7628cefe68092f6c5cd0f

NUM_PROCS=$(nproc)

echo "Building libraries..."
echo " CARGS_SHA: ${CARGS_SHA}"
echo " LIBSERIALPORT_SHA: ${LIBSERIALPORT_SHA}"
echo " LIBFRAMEUTIL_SHA: ${LIBFRAMEUTIL_SHA}"
echo " SOCKPP_SHA: ${SOCKPP_SHA}"
Expand All @@ -23,6 +25,22 @@ rm -rf external
mkdir external
cd external

#
# build cargs and copy to external
#

curl -sL https://github.com/likle/cargs/archive/${CARGS_SHA}.zip -o cargs.zip
unzip cargs.zip
cd cargs-${CARGS_SHA}
cmake \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp include/cargs.h ../../third-party/include/
cp -a build/*.so ../../third-party/runtime-libs/linux/aarch64/
cd ..

#
# build libserialport and copy to platform/arch
#
Expand Down
18 changes: 18 additions & 0 deletions platforms/linux/x64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

set -e

CARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251
LIBSERIALPORT_SHA=21b3dfe5f68c205be4086469335fd2fc2ce11ed2
LIBFRAMEUTIL_SHA=30048ca23d41ca0a8f7d5ab75d3f646a19a90182
SOCKPP_SHA=e6c4688a576d95f42dd7628cefe68092f6c5cd0f

NUM_PROCS=$(nproc)

echo "Building libraries..."
echo " CARGS_SHA: ${CARGS_SHA}"
echo " LIBSERIALPORT_SHA: ${LIBSERIALPORT_SHA}"
echo " LIBFRAMEUTIL_SHA: ${LIBFRAMEUTIL_SHA}"
echo " SOCKPP_SHA: ${SOCKPP_SHA}"
Expand All @@ -23,6 +25,22 @@ rm -rf external
mkdir external
cd external

#
# build cargs and copy to external
#

curl -sL https://github.com/likle/cargs/archive/${CARGS_SHA}.zip -o cargs.zip
unzip cargs.zip
cd cargs-${CARGS_SHA}
cmake \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp include/cargs.h ../../third-party/include/
cp -a build/*.so ../../third-party/runtime-libs/linux/x64/
cd ..

#
# build libserialport and copy to platform/arch
#
Expand Down
20 changes: 20 additions & 0 deletions platforms/macos/arm64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

set -e

CARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251
LIBSERIALPORT_SHA=21b3dfe5f68c205be4086469335fd2fc2ce11ed2
LIBFRAMEUTIL_SHA=30048ca23d41ca0a8f7d5ab75d3f646a19a90182
SOCKPP_SHA=e6c4688a576d95f42dd7628cefe68092f6c5cd0f

NUM_PROCS=$(sysctl -n hw.ncpu)

echo "Building libraries..."
echo " CARGS_SHA: ${CARGS_SHA}"
echo " LIBSERIALPORT_SHA: ${LIBSERIALPORT_SHA}"
echo " LIBFRAMEUTIL_SHA: ${LIBFRAMEUTIL_SHA}"
echo " SOCKPP_SHA: ${SOCKPP_SHA}"
Expand All @@ -23,6 +25,24 @@ rm -rf external
mkdir external
cd external

#
# build cargs and copy to external
#

curl -sL https://github.com/likle/cargs/archive/${CARGS_SHA}.zip -o cargs.zip
unzip cargs.zip
cd cargs-${CARGS_SHA}
cmake \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp include/cargs.h ../../third-party/include/
cp -a build/*.dylib ../../third-party/runtime-libs/macos/arm64/
cd ..

#
# build libserialport and copy to platform/arch
#
Expand Down
20 changes: 20 additions & 0 deletions platforms/macos/x64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

set -e

CARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251
LIBSERIALPORT_SHA=21b3dfe5f68c205be4086469335fd2fc2ce11ed2
LIBFRAMEUTIL_SHA=30048ca23d41ca0a8f7d5ab75d3f646a19a90182
SOCKPP_SHA=e6c4688a576d95f42dd7628cefe68092f6c5cd0f

NUM_PROCS=$(sysctl -n hw.ncpu)

echo "Building libraries..."
echo " CARGS_SHA: ${CARGS_SHA}"
echo " LIBSERIALPORT_SHA: ${LIBSERIALPORT_SHA}"
echo " LIBFRAMEUTIL_SHA: ${LIBFRAMEUTIL_SHA}"
echo " SOCKPP_SHA: ${SOCKPP_SHA}"
Expand All @@ -23,6 +25,24 @@ rm -rf external
mkdir external
cd external

#
# build cargs and copy to external
#

curl -sL https://github.com/likle/cargs/archive/${CARGS_SHA}.zip -o cargs.zip
unzip cargs.zip
cd cargs-${CARGS_SHA}
cmake \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp include/cargs.h ../../third-party/include/
cp -a build/*.dylib ../../third-party/runtime-libs/macos/x64/
cd ..

#
# build libserialport and copy to platform/arch
#
Expand Down
38 changes: 38 additions & 0 deletions platforms/win/x64/cargs/001.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b6f828f..6be0845 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,7 +18,7 @@
set(CMAKE_C_STANDARD 11)

# setup target and directory names
-set(LIBRARY_TARGET "cargs")
+set(LIBRARY_TARGET "cargs64")
set(INCLUDE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include")
set(SOURCE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src")

@@ -51,12 +51,12 @@
$<BUILD_INTERFACE:${INCLUDE_DIRECTORY}>
$<INSTALL_INTERFACE:include>
)
-set_target_properties(cargs PROPERTIES PUBLIC_HEADER "${INCLUDE_DIRECTORY}/cargs.h")
-set_target_properties(cargs PROPERTIES DEFINE_SYMBOL CAG_EXPORTS)
+set_target_properties(cargs64 PROPERTIES PUBLIC_HEADER "${INCLUDE_DIRECTORY}/cargs.h")
+set_target_properties(cargs64 PROPERTIES DEFINE_SYMBOL CAG_EXPORTS)

# add shared library macro
if(BUILD_SHARED_LIBS)
- target_compile_definitions(cargs PUBLIC CAG_SHARED)
+ target_compile_definitions(cargs64 PUBLIC CAG_SHARED)
endif()

# add tests
@@ -104,7 +104,7 @@
COMPATIBILITY SameMajorVersion)

# installing
-install(TARGETS cargs
+install(TARGETS cargs64
EXPORT CargsTargets)

install(FILES
20 changes: 20 additions & 0 deletions platforms/win/x64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

set -e

CARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251
LIBSERIALPORT_SHA=21b3dfe5f68c205be4086469335fd2fc2ce11ed2
LIBFRAMEUTIL_SHA=30048ca23d41ca0a8f7d5ab75d3f646a19a90182
SOCKPP_SHA=e6c4688a576d95f42dd7628cefe68092f6c5cd0f

echo "Building libraries..."
echo " CARGS_SHA: ${CARGS_SHA}"
echo " LIBSERIALPORT_SHA: ${LIBSERIALPORT_SHA}"
echo " LIBFRAMEUTIL_SHA: ${LIBFRAMEUTIL_SHA}"
echo " SOCKPP_SHA: ${SOCKPP_SHA}"
Expand All @@ -20,6 +22,24 @@ rm -rf external
mkdir external
cd external

#
# build cargs and copy to external
#

curl -sL https://github.com/likle/cargs/archive/${CARGS_SHA}.zip -o cargs.zip
unzip cargs.zip
cd cargs-${CARGS_SHA}
patch -p1 < ../../platforms/win/x64/cargs/001.patch
cmake \
-G "Visual Studio 17 2022" \
-DBUILD_SHARED_LIBS=ON \
-B build
cmake --build build --config ${BUILD_TYPE}
cp include/cargs.h ../../third-party/include/
cp build/${BUILD_TYPE}/cargs64.lib ../../third-party/build-libs/win/x64/
cp build/${BUILD_TYPE}/cargs64.dll ../../third-party/runtime-libs/win/x64/
cd ..

#
# build libserialport and copy to platform/arch
#
Expand Down
20 changes: 20 additions & 0 deletions platforms/win/x86/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

set -e

CARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251
LIBSERIALPORT_SHA=21b3dfe5f68c205be4086469335fd2fc2ce11ed2
LIBFRAMEUTIL_SHA=30048ca23d41ca0a8f7d5ab75d3f646a19a90182
SOCKPP_SHA=e6c4688a576d95f42dd7628cefe68092f6c5cd0f

echo "Building libraries..."
echo " CARGS_SHA: ${CARGS_SHA}"
echo " LIBSERIALPORT_SHA: ${LIBSERIALPORT_SHA}"
echo " LIBFRAMEUTIL_SHA: ${LIBFRAMEUTIL_SHA}"
echo " SOCKPP_SHA: ${SOCKPP_SHA}"
Expand All @@ -20,6 +22,24 @@ rm -rf external
mkdir external
cd external

#
# build cargs and copy to external
#

curl -sL https://github.com/likle/cargs/archive/${CARGS_SHA}.zip -o cargs.zip
unzip cargs.zip
cd cargs-${CARGS_SHA}
cmake \
-G "Visual Studio 17 2022" \
-DBUILD_SHARED_LIBS=ON \
-A Win32 \
-B build
cmake --build build --config ${BUILD_TYPE}
cp include/cargs.h ../../third-party/include/
cp build/${BUILD_TYPE}/cargs.lib ../../third-party/build-libs/win/x86/
cp build/${BUILD_TYPE}/cargs.dll ../../third-party/runtime-libs/win/x86/
cd ..

#
# build libserialport and copy to platform/arch
#
Expand Down
Loading

0 comments on commit 741aaef

Please sign in to comment.