early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,32 @@
diff --git a/lcm/windows/WinPorting.cpp b/lcm/windows/WinPorting.cpp
index e22acd6..b9c7e69 100644
--- a/lcm/windows/WinPorting.cpp
+++ b/lcm/windows/WinPorting.cpp
@@ -1,8 +1,8 @@
#define _WIN32_WINNT 0x0501
-#include <Mswsock.h>
#include <stdio.h>
#include <winsock2.h>
+#include <Mswsock.h>
#include "WinPorting.h"
diff --git a/lcmgen/emit_go.c b/lcmgen/emit_go.c
index c520044..b5be56a 100644
--- a/lcmgen/emit_go.c
+++ b/lcmgen/emit_go.c
@@ -6,8 +6,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef WIN32
+#include <io.h>
+#else
#include <unistd.h>
+#endif
#ifdef WIN32
+#define F_OK 0
#define __STDC_FORMAT_MACROS // Enable integer types
#endif

30
externals/vcpkg/ports/lcm/glib.link.patch vendored Executable file
View File

@@ -0,0 +1,30 @@
diff --git a/cmake/FindGLib2.cmake b/cmake/FindGLib2.cmake
index 2f1a8be45..db823b953 100644
--- a/cmake/FindGLib2.cmake
+++ b/cmake/FindGLib2.cmake
@@ -14,7 +14,7 @@ function(_glib2_find_include VAR HEADER)
find_path(GLIB2_${VAR}_INCLUDE_DIR ${HEADER}
PATHS ${_paths}
- PATH_SUFFIXES glib-2.0 glib-2.0/include
+ PATH_SUFFIXES glib-2.0 glib-2.0/include lib/glib-2.0/include
)
mark_as_advanced(GLIB2_${VAR}_INCLUDE_DIR)
endfunction()
@@ -108,6 +108,16 @@ foreach(_glib2_component ${GLib2_FIND_COMPONENTS})
endforeach()
+find_library(PCRE_LIBRARY pcre)
+set_property(TARGET GLib2::glib APPEND PROPERTY
+ INTERFACE_LINK_LIBRARIES ${PCRE_LIBRARY}
+)
+set(THREADS_PREFER_PTHREAD_FLAG ON)
+find_package(Threads)
+set_property(TARGET GLib2::glib APPEND PROPERTY
+ INTERFACE_LINK_LIBRARIES Threads::Threads
+)
+
list(APPEND GLib2_FIND_COMPONENTS glib)
set(GLib2_FIND_REQUIRED_glib TRUE)

View File

@@ -0,0 +1,19 @@
diff --git a/lcm/CMakeLists.txt b/lcm/CMakeLists.txt
index a706a85..639ec12 100644
--- a/lcm/CMakeLists.txt
+++ b/lcm/CMakeLists.txt
@@ -76,8 +76,12 @@ endif()
target_include_directories(lcm-coretypes INTERFACE
$<BUILD_INTERFACE:${lcm_SOURCE_DIR}>
)
-
-install(TARGETS lcm-coretypes lcm-static lcm
+if(BUILD_SHARED_LIBS)
+ set(INSTALL_TARGETS lcm)
+else()
+ set(INSTALL_TARGETS lcm-static)
+endif()
+install(TARGETS lcm-coretypes ${INSTALL_TARGETS}
EXPORT lcmTargets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib${LIB_SUFFIX}

58
externals/vcpkg/ports/lcm/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,58 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO lcm-proj/lcm
REF v1.4.0
SHA512 ca036aa2c31911e0bfaeab9665188c97726201267314693a1c333c4efe13ea598b39a55a19bc1d48e65462ac9d1716adfda5af86c645d59c3247192631247cc6
HEAD_REF master
PATCHES
only-install-one-flavor.patch
fix-build-error.patch
glib.link.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DLCM_ENABLE_JAVA=OFF
-DLCM_ENABLE_LUA=OFF
-DLCM_ENABLE_PYTHON=OFF
-DLCM_ENABLE_TESTS=OFF
-DLCM_INSTALL_M4MACROS=OFF
-DLCM_INSTALL_PKGCONFIG=OFF
)
vcpkg_install_cmake()
if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
else()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/lcm/cmake)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/lcm" "${CURRENT_PACKAGES_DIR}/lib/lcm")
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/aclocal")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/java")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/man")
file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe)
if(EXES)
file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/lcm)
file(REMOVE ${EXES})
endif()
file(GLOB DEBUG_EXES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
if(DEBUG_EXES)
file(REMOVE ${DEBUG_EXES})
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/lcm)
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
vcpkg_copy_pdbs()

13
externals/vcpkg/ports/lcm/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,13 @@
{
"name": "lcm",
"version": "1.4.0",
"port-version": 2,
"description": [
"Lightweight Communications and Marshalling (LCM)",
"LCM is a set of libraries and tools for message passing and data marshalling, targeted at real-time systems where high-bandwidth and low latency are critical. It provides a publish/subscribe message passing model and automatic marshalling/unmarshalling code generation with bindings for applications in a variety of programming languages."
],
"homepage": "https://github.com/lcm-proj/lcm",
"dependencies": [
"glib"
]
}