diff options
| author | chausner <chausner@users.noreply.github.com> | 2019-02-22 19:58:17 +0100 |
|---|---|---|
| committer | Codiferous <44823842+Codiferous@users.noreply.github.com> | 2019-02-22 10:58:17 -0800 |
| commit | 4db5f02b8bf9b206b7508a0f4169eff7dfd188ca (patch) | |
| tree | 80bc781c3c4c2738597f64e0fd207846dba34708 | |
| parent | 2140d3c5eb5ec5e54254db032093e7697d7ec8fe (diff) | |
| download | vcpkg-4db5f02b8bf9b206b7508a0f4169eff7dfd188ca.tar.gz vcpkg-4db5f02b8bf9b206b7508a0f4169eff7dfd188ca.zip | |
[liblsl] Add port for sccn/liblsl (#5410)
| -rw-r--r-- | ports/liblsl/CONTROL | 3 | ||||
| -rw-r--r-- | ports/liblsl/fix-runtime-destination.patch | 13 | ||||
| -rw-r--r-- | ports/liblsl/hardcode-version.patch | 31 | ||||
| -rw-r--r-- | ports/liblsl/portfile.cmake | 31 |
4 files changed, 78 insertions, 0 deletions
diff --git a/ports/liblsl/CONTROL b/ports/liblsl/CONTROL new file mode 100644 index 000000000..0d2d95b1d --- /dev/null +++ b/ports/liblsl/CONTROL @@ -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
diff --git a/ports/liblsl/fix-runtime-destination.patch b/ports/liblsl/fix-runtime-destination.patch new file mode 100644 index 000000000..a2bdbfbbe --- /dev/null +++ b/ports/liblsl/fix-runtime-destination.patch @@ -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
diff --git a/ports/liblsl/hardcode-version.patch b/ports/liblsl/hardcode-version.patch new file mode 100644 index 000000000..e7343271e --- /dev/null +++ b/ports/liblsl/hardcode-version.patch @@ -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}) + diff --git a/ports/liblsl/portfile.cmake b/ports/liblsl/portfile.cmake new file mode 100644 index 000000000..d8670d7e3 --- /dev/null +++ b/ports/liblsl/portfile.cmake @@ -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)
|
