mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[liblsl] Add port for sccn/liblsl (#5410)
This commit is contained in:
parent
2140d3c5eb
commit
4db5f02b8b
3
ports/liblsl/CONTROL
Normal file
3
ports/liblsl/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: liblsl
|
||||
Version: 1.13.0-b4
|
||||
Description: C++ lsl library for multi-modal time-synched data transmission over the local network
|
13
ports/liblsl/fix-runtime-destination.patch
Normal file
13
ports/liblsl/fix-runtime-destination.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5832a0e6..497dacd1 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -170,7 +170,7 @@ endif()
|
||||
install(TARGETS lsl
|
||||
COMPONENT liblsl
|
||||
EXPORT "${PROJECT_NAME}Config"
|
||||
- RUNTIME DESTINATION ${LSLPREFIX}lib
|
||||
+ RUNTIME DESTINATION ${LSLPREFIX}bin
|
||||
LIBRARY DESTINATION ${LSLPREFIX}lib
|
||||
INCLUDES DESTINATION ${LSLPREFIX}include
|
||||
ARCHIVE DESTINATION ${LSLPREFIX}lib
|
31
ports/liblsl/hardcode-version.patch
Normal file
31
ports/liblsl/hardcode-version.patch
Normal file
@ -0,0 +1,31 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 73e4a7a0..0f8e19f4 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -106,26 +106,6 @@ if(LSL_NO_FANCY_LIBNAME)
|
||||
set(CMAKE_DEBUG_POSTFIX "")
|
||||
endif()
|
||||
|
||||
-# try to find out which revision is currently checked out
|
||||
-find_package(Git)
|
||||
-if(GIT_FOUND)
|
||||
- execute_process(
|
||||
- COMMAND ${GIT_EXECUTABLE} describe --tags HEAD
|
||||
- WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}"
|
||||
- OUTPUT_VARIABLE lslgitrevision
|
||||
- OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
- )
|
||||
- execute_process(
|
||||
- COMMAND ${GIT_EXECUTABLE} rev-parse --symbolic-full-name --abbrev-ref @
|
||||
- WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}"
|
||||
- OUTPUT_VARIABLE lslgitbranch
|
||||
- OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
- )
|
||||
- message(STATUS "Git version information: ${lslgitbranch}/${lslgitrevision}")
|
||||
-else()
|
||||
- set(lslgitrevision "unknown")
|
||||
- set(lslgitbranch "unknown")
|
||||
-endif()
|
||||
set(LSL_VERSION_INFO "\"git:${lslgitrevision}/branch:${lslgitbranch}/build:${CMAKE_BUILD_TYPE}/compiler:${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}/boost:\" BOOST_LIB_VERSION")
|
||||
set_source_files_properties("src/lsl_freefuncs_c.cpp" PROPERTIES COMPILE_DEFINITIONS LSL_LIBRARY_INFO_STR=${LSL_VERSION_INFO})
|
||||
|
31
ports/liblsl/portfile.cmake
Normal file
31
ports/liblsl/portfile.cmake
Normal file
@ -0,0 +1,31 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO sccn/liblsl
|
||||
REF v1.13.0-b4 # NOTE: when updating version, also change it in the parameter to vcpkg_configure_cmake
|
||||
SHA512 19bc587afcff315385e7bab1f88cf4edd315acfda61a630b23ffe4c59bc0f5aa570f0a979071f2b60009bb4d4b8ce08c98c414dc5b88042556b2501f4b8dcb79
|
||||
HEAD_REF master
|
||||
PATCHES hardcode-version.patch fix-runtime-destination.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DLSL_BUILD_STATIC=OFF
|
||||
-DLSL_UNIXFOLDERS=ON
|
||||
-DLSL_NO_FANCY_LIBNAME=ON
|
||||
-Dlslgitrevision="v1.13.0-b4"
|
||||
-Dlslgitbranch="master"
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblsl RENAME copyright)
|
||||
file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblsl)
|
Loading…
x
Reference in New Issue
Block a user