mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 13:10:17 +08:00
Merge pull request #2258 from UnaNancyOwen/fix_qhull
Fix QHull port to remove static link libraries when installing dynamic link libraries
This commit is contained in:
commit
94bd9dd66e
@ -1,5 +1,5 @@
|
||||
Source: pcl
|
||||
Version: 1.8.1-6
|
||||
Version: 1.8.1-7
|
||||
Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing.
|
||||
Build-Depends: boost, eigen3, flann, qhull, vtk
|
||||
|
||||
|
16
ports/pcl/cmakelists.patch
Normal file
16
ports/pcl/cmakelists.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index d36a581fb..9b0195324 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -327,9 +327,9 @@ endif(WITH_PNG)
|
||||
# Qhull
|
||||
option(WITH_QHULL "Include convex-hull operations" TRUE)
|
||||
if(WITH_QHULL)
|
||||
- if(NOT PCL_SHARED_LIBS OR WIN32)
|
||||
+ if(NOT PCL_SHARED_LIBS)
|
||||
set(QHULL_USE_STATIC ON)
|
||||
- endif(NOT PCL_SHARED_LIBS OR WIN32)
|
||||
+ endif(NOT PCL_SHARED_LIBS)
|
||||
find_package(Qhull)
|
||||
if(QHULL_FOUND)
|
||||
include_directories(${QHULL_INCLUDE_DIRS})
|
@ -10,7 +10,8 @@ vcpkg_from_github(
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES "${CMAKE_CURRENT_LIST_DIR}/config.patch"
|
||||
PATCHES "${CMAKE_CURRENT_LIST_DIR}/cmakelists.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/config.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/config_install.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/find_flann.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/find_qhull.patch"
|
||||
|
@ -1,3 +1,3 @@
|
||||
Source: qhull
|
||||
Version: 2015.2-1
|
||||
Version: 2015.2-2
|
||||
Description: computes the convex hull, Delaunay triangulation, Voronoi diagram
|
||||
|
@ -1,15 +1,3 @@
|
||||
# Common Ambient Variables:
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
|
||||
# PORT = current port name (zlib, etc)
|
||||
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
|
||||
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
|
||||
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
|
||||
#
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
@ -22,7 +10,7 @@ vcpkg_from_github(
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
#PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DINCLUDE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/include
|
||||
-DMAN_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/doc/qhull
|
||||
@ -51,8 +39,11 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_d.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull_p.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_pd.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhull_r.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhull_rd.lib)
|
||||
else()
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhullcpp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhullcpp_d.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhullstatic.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhullstatic_d.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/qhullstatic_r.lib ${CURRENT_PACKAGES_DIR}/debug/lib/qhullstatic_rd.lib)
|
||||
endif()
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/qhull)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/qhull/README.txt ${CURRENT_PACKAGES_DIR}/share/qhull/copyright)
|
||||
|
Loading…
Reference in New Issue
Block a user