Skip to content

Commit

Permalink
libserialport 0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalkbrenner committed Feb 6, 2025
1 parent 600a66b commit d268b94
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 10 deletions.
2 changes: 1 addition & 1 deletion platforms/linux/aarch64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

IO_BOARDS_SHA=f1a06654721f62f080441732d4c82d0a0c821582
LIBSERIALPORT_SHA=fd20b0fc5a34cd7f776e4af6c763f59041de223b
LIBSERIALPORT_SHA=21b3dfe5f68c205be4086469335fd2fc2ce11ed2
YAML_CPP_VERSION=0.8.0

NUM_PROCS=$(nproc)
Expand Down
2 changes: 1 addition & 1 deletion platforms/linux/x64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

IO_BOARDS_SHA=f1a06654721f62f080441732d4c82d0a0c821582
LIBSERIALPORT_SHA=fd20b0fc5a34cd7f776e4af6c763f59041de223b
LIBSERIALPORT_SHA=21b3dfe5f68c205be4086469335fd2fc2ce11ed2
YAML_CPP_VERSION=0.8.0

NUM_PROCS=$(nproc)
Expand Down
2 changes: 1 addition & 1 deletion platforms/macos/arm64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

IO_BOARDS_SHA=f1a06654721f62f080441732d4c82d0a0c821582
LIBSERIALPORT_SHA=fd20b0fc5a34cd7f776e4af6c763f59041de223b
LIBSERIALPORT_SHA=21b3dfe5f68c205be4086469335fd2fc2ce11ed2
YAML_CPP_VERSION=0.8.0

NUM_PROCS=$(sysctl -n hw.ncpu)
Expand Down
2 changes: 1 addition & 1 deletion platforms/macos/x64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

IO_BOARDS_SHA=f1a06654721f62f080441732d4c82d0a0c821582
LIBSERIALPORT_SHA=fd20b0fc5a34cd7f776e4af6c763f59041de223b
LIBSERIALPORT_SHA=21b3dfe5f68c205be4086469335fd2fc2ce11ed2
YAML_CPP_VERSION=0.8.0

NUM_PROCS=$(sysctl -n hw.ncpu)
Expand Down
9 changes: 6 additions & 3 deletions platforms/win/x64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

IO_BOARDS_SHA=f1a06654721f62f080441732d4c82d0a0c821582
LIBSERIALPORT_SHA=fd20b0fc5a34cd7f776e4af6c763f59041de223b
LIBSERIALPORT_SHA=21b3dfe5f68c205be4086469335fd2fc2ce11ed2
YAML_CPP_VERSION=0.8.0

echo "Building libraries..."
Expand Down Expand Up @@ -35,10 +35,13 @@ curl -sL https://github.com/sigrokproject/libserialport/archive/${LIBSERIALPORT_
unzip libserialport.zip
cd libserialport-$LIBSERIALPORT_SHA
cp libserialport.h ../../third-party/include
patch libserialport.vcxproj < ../../platforms/win/x64/libserialport/001.patch
msbuild.exe libserialport.sln -p:Configuration=Release -p:Platform=x64
cp x64/Release/libserialport.lib ../../third-party/build-libs/win/x64/
cp x64/Release/libserialport.dll ../../third-party/runtime-libs/win/x64/
cp x64/Release/libserialport64.lib ../../third-party/build-libs/win/x64
cp x64/Release/libserialport64.dll ../../third-party/runtime-libs/win/x64
cd ..


#
# build libyaml-cpp and copy to platform/arch
#
Expand Down
24 changes: 24 additions & 0 deletions platforms/win/x64/libserialport/001.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--- libserialport.vcxproj 2024-01-06 08:32:48
+++ libserialport.vcxproj 2024-01-06 08:46:52
@@ -49,12 +49,14 @@
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <TargetName>libserialport64</TargetName>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <TargetName>libserialport64</TargetName>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
@@ -81,4 +83,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
7 changes: 4 additions & 3 deletions platforms/win/x86/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

IO_BOARDS_SHA=f1a06654721f62f080441732d4c82d0a0c821582
LIBSERIALPORT_SHA=fd20b0fc5a34cd7f776e4af6c763f59041de223b
LIBSERIALPORT_SHA=21b3dfe5f68c205be4086469335fd2fc2ce11ed2
YAML_CPP_VERSION=0.8.0

echo "Building libraries..."
Expand Down Expand Up @@ -36,9 +36,10 @@ unzip libserialport.zip
cd libserialport-$LIBSERIALPORT_SHA
cp libserialport.h ../../third-party/include
msbuild.exe libserialport.sln -p:Configuration=Release -p:Platform=x86
cp Release/libserialport.lib ../../third-party/build-libs/win/x86/
cp Release/libserialport.dll ../../third-party/runtime-libs/win/x86/
cp Release/libserialport.lib ../../third-party/build-libs/win/x86
cp Release/libserialport.dll ../../third-party/runtime-libs/win/x86
cd ..

#
# build libyaml-cpp and copy to platform/arch
#
Expand Down

0 comments on commit d268b94

Please sign in to comment.