mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 17:41:09 +08:00
[lcm] Disable unexpected components. Only install one flavor. Don't delete DLL.
This commit is contained in:
parent
21ef72d02a
commit
9c6698ab34
@ -1,5 +1,5 @@
|
||||
Source: lcm
|
||||
Version: 1.3.95
|
||||
Version: 1.3.95-1
|
||||
Build-Depends: glib
|
||||
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.
|
||||
|
19
ports/lcm/only-install-one-flavor.patch
Normal file
19
ports/lcm/only-install-one-flavor.patch
Normal 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}
|
@ -8,15 +8,24 @@ vcpkg_from_github(
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/only-install-one-flavor.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()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
@ -25,9 +34,22 @@ 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(COPY ${CURRENT_PACKAGES_DIR}/bin/lcm-gen.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/lcm)
|
||||
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(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/lcm RENAME copyright)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
Loading…
x
Reference in New Issue
Block a user