diff options
| -rw-r--r-- | ports/lcm/CONTROL | 2 | ||||
| -rw-r--r-- | ports/lcm/only-install-one-flavor.patch | 19 | ||||
| -rw-r--r-- | ports/lcm/portfile.cmake | 30 |
3 files changed, 46 insertions, 5 deletions
diff --git a/ports/lcm/CONTROL b/ports/lcm/CONTROL index e6b9803fe..0cca68404 100644 --- a/ports/lcm/CONTROL +++ b/ports/lcm/CONTROL @@ -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. diff --git a/ports/lcm/only-install-one-flavor.patch b/ports/lcm/only-install-one-flavor.patch new file mode 100644 index 000000000..d22b83c23 --- /dev/null +++ b/ports/lcm/only-install-one-flavor.patch @@ -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}
diff --git a/ports/lcm/portfile.cmake b/ports/lcm/portfile.cmake index 98f34e2ca..b50139f62 100644 --- a/ports/lcm/portfile.cmake +++ b/ports/lcm/portfile.cmake @@ -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() |
