Skip to content

Commit

Permalink
[liblsl] Update to 1.16.0 (#21284)
Browse files Browse the repository at this point in the history
* Start adapting liblsl for version 1.15.2

* Use vcpkg Boost package

* Minor updates

* Switch to master branch

* Update git-tree hash

* Fix hash

* Update git-tree hash

* Add missing boost dependencies

* Update git-tree hash

* Try to remove entries from ci.baseline.txt

* Use asio package from vcpkg

* Update git-tree hash

* Update version to upcoming 1.16.0

* Set liblsl license

* Update CI baseline

* Remove obsolete version

* Update reference

* Update CI baseline

Co-authored-by: chausner <chausner@users.noreply.github.com>
  • Loading branch information
chausner and chausner committed Mar 30, 2022
1 parent 16ebf7b commit 96bc551
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 22 deletions.
26 changes: 13 additions & 13 deletions ports/liblsl/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
# static builds are currently not supported since liblsl always also builds shared binaries
# which need to be deleted for vcpkg but then the CMake target can no longer be imported because it still references them
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO sccn/liblsl
REF v1.14.0 # NOTE: when updating version, also change it in the parameter to vcpkg_configure_cmake
SHA512 b4ec379339d174c457c8c1ec69f9e51ea78a738e72ecc96b9193f07b5273acb296b5b1f90c9dfe16591ecab0eef9aae9add640c1936d3769cae0bd96617205ec
REF v1.16.0 # NOTE: when updating version, also change it in the parameter to vcpkg_cmake_configure
SHA512 bfd54c6cca944ed33622da74dc1417ab75b542002c02c83bb86c917fd5968936c4b56ec734bd6d757e9fa67364f9dc85fd15ed28697ed410305df4928cf6790b
HEAD_REF master
PATCHES
use-find-package-asio.patch
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LSL_BUILD_STATIC)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DLSL_BUILD_STATIC=OFF
-DLSL_BUILD_STATIC=${LSL_BUILD_STATIC}
-DLSL_BUNDLED_BOOST=OFF # we use the boost vcpkg packages instead
-DLSL_BUNDLED_PUGIXML=OFF # we use the pugixml vcpkg package instead
-Dlslgitrevision=v1.14.0
-Dlslgitrevision=v1.16.0
-Dlslgitbranch=master
)

vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()

vcpkg_copy_tools(TOOL_NAMES lslver AUTO_CLEAN)
vcpkg_cmake_config_fixup(PACKAGE_NAME LSL CONFIG_PATH lib/cmake/LSL)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
Expand Down
15 changes: 15 additions & 0 deletions ports/liblsl/use-find-package-asio.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b47cb7f8..bd12f519 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -203,8 +203,9 @@ target_include_directories(lslobj
target_include_directories(lslobj
SYSTEM PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/thirdparty/loguru>
- $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/thirdparty/asio>
)
+find_package(asio CONFIG REQUIRED)
+target_link_libraries(lslobj PUBLIC asio::asio)
target_compile_definitions(lslobj PRIVATE
LIBLSL_EXPORTS
LOGURU_DEBUG_LOGGING=$<BOOL:${LSL_DEBUGLOG}>
29 changes: 25 additions & 4 deletions ports/liblsl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
{
"name": "liblsl",
"version-string": "1.14.0",
"port-version": 2,
"version": "1.16.0",
"description": "C++ lsl library for multi-modal time-synched data transmission over the local network",
"homepage": "https://github.com/sccn/liblsl",
"supports": "!staticcrt",
"license": "MIT",
"dependencies": [
"pugixml"
"asio",
"boost-atomic",
"boost-bind",
"boost-chrono",
"boost-config",
"boost-endian",
"boost-functional",
"boost-integer",
"boost-lexical-cast",
"boost-math",
"boost-serialization",
"boost-smart-ptr",
"boost-thread",
"boost-uuid",
"pugixml",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
3 changes: 0 additions & 3 deletions scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -535,9 +535,6 @@ liblemon:arm-uwp=fail
liblemon:x64-uwp=fail
liblo:arm-uwp=fail
liblo:x64-uwp=fail
liblsl:arm64-windows=fail
liblsl:arm-uwp=fail
liblsl:x64-uwp=fail
libmad:arm-uwp=fail
libmad:x64-uwp=fail
libmagic:x64-uwp=fail
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3697,8 +3697,8 @@
"port-version": 2
},
"liblsl": {
"baseline": "1.14.0",
"port-version": 2
"baseline": "1.16.0",
"port-version": 0
},
"liblzma": {
"baseline": "5.2.5",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/liblsl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "282fee909d2df5c818b0577a4c063c146376cef5",
"version": "1.16.0",
"port-version": 0
},
{
"git-tree": "451923eac66cd517eb01dbf297e207e0760c4414",
"version-string": "1.14.0",
Expand Down

0 comments on commit 96bc551

Please sign in to comment.