forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[openmvs] add new port, fix one of the dependencies [cgal] along the …
…road
- Loading branch information
Showing
5 changed files
with
117 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
From a0bfaee9ebed49fb65c93d7fb00a0c24c1898841 Mon Sep 17 00:00:00 2001 | ||
From: Laurent Rineau <[email protected]> | ||
Date: Fri, 10 May 2019 17:31:17 +0200 | ||
Subject: [PATCH 1/2] Consider CGAL as an imported target | ||
|
||
--- | ||
Installation/lib/cmake/CGAL/CGALConfig.cmake | 6 +++++- | ||
1 file changed, 5 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/Installation/lib/cmake/CGAL/CGALConfig.cmake b/Installation/lib/cmake/CGAL/CGALConfig.cmake | ||
index c2b0aed549d..08d757aad7f 100644 | ||
--- a/Installation/lib/cmake/CGAL/CGALConfig.cmake | ||
+++ b/Installation/lib/cmake/CGAL/CGALConfig.cmake | ||
@@ -116,7 +116,11 @@ include(CGAL_setup_target_dependencies) | ||
foreach(cgal_lib ${CGAL_LIBRARIES}) | ||
set(WITH_${cgal_lib} TRUE) | ||
if(${cgal_lib}_FOUND AND NOT TARGET ${cgal_lib}) | ||
- add_library(${cgal_lib} INTERFACE) | ||
+ if(CGAL_BUILDING_LIBS) | ||
+ add_library(${cgal_lib} INTERFACE) | ||
+ else() | ||
+ add_library(${cgal_lib} INTERFACE IMPORTED GLOBAL) | ||
+ endif() | ||
if(NOT TARGET CGAL::${cgal_lib}) | ||
add_library(CGAL::${cgal_lib} ALIAS ${cgal_lib}) | ||
endif() | ||
|
||
From c2e8365303b97669fe50ea2427c9943049575be4 Mon Sep 17 00:00:00 2001 | ||
From: Laurent Rineau <[email protected]> | ||
Date: Fri, 10 May 2019 17:47:58 +0200 | ||
Subject: [PATCH 2/2] Actually, it can only work with CMake>=3.11 | ||
|
||
--- | ||
Installation/lib/cmake/CGAL/CGALConfig.cmake | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/Installation/lib/cmake/CGAL/CGALConfig.cmake b/Installation/lib/cmake/CGAL/CGALConfig.cmake | ||
index 08d757aad7f..8ef95a85c94 100644 | ||
--- a/Installation/lib/cmake/CGAL/CGALConfig.cmake | ||
+++ b/Installation/lib/cmake/CGAL/CGALConfig.cmake | ||
@@ -116,7 +116,7 @@ include(CGAL_setup_target_dependencies) | ||
foreach(cgal_lib ${CGAL_LIBRARIES}) | ||
set(WITH_${cgal_lib} TRUE) | ||
if(${cgal_lib}_FOUND AND NOT TARGET ${cgal_lib}) | ||
- if(CGAL_BUILDING_LIBS) | ||
+ if(CGAL_BUILDING_LIBS OR CMAKE_VERSION VERSION_LESS "3.11") | ||
add_library(${cgal_lib} INTERFACE) | ||
else() | ||
add_library(${cgal_lib} INTERFACE IMPORTED GLOBAL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Source: openmvs | ||
Version: 0.9 | ||
Description: OpenMVS: open Multi-View Stereo reconstruction library | ||
Build-Depends: eigen3, opencv, ceres, cgal, boost, vcglib, glew |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
include(vcpkg_common_functions) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO cdcseacave/openMVS | ||
REF v0.9 | ||
SHA512 a1081ee8562324137273846526c6570c77b35dba6a1a46df4e67f19cf7d0a1a4d4f6091b9444b66e0ca322f466b418ce4535d0c7ce10000df389cbe615f0c0b6 | ||
HEAD_REF master | ||
) | ||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
) | ||
|
||
vcpkg_install_cmake() | ||
|
||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) | ||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OpenMVS TARGET_PATH share/openmvs) | ||
|
||
#somehow the native CMAKE_EXECUTABLE_SUFFIX does not work, so here we emulate it | ||
if(CMAKE_HOST_WIN32) | ||
set(EXECUTABLE_SUFFIX ".exe") | ||
else() | ||
set(EXECUTABLE_SUFFIX "") | ||
endif() | ||
|
||
if("all" IN_LIST FEATURES) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMVS/DensifyPointCloud${EXECUTABLE_SUFFIX}) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMVS/InterfaceCOLMAP${EXECUTABLE_SUFFIX}) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMVS/InterfaceVisualSFM${EXECUTABLE_SUFFIX}) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMVS/ReconstructMesh${EXECUTABLE_SUFFIX}) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMVS/RefineMesh${EXECUTABLE_SUFFIX}) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMVS/TextureMesh${EXECUTABLE_SUFFIX}) | ||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/openmvs/) | ||
if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/OpenMVS/DensifyPointCloud${EXECUTABLE_SUFFIX}") | ||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/OpenMVS/DensifyPointCloud${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openmvs/DensifyPointCloud${EXECUTABLE_SUFFIX}) | ||
endif() | ||
if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/OpenMVS/InterfaceCOLMAP${EXECUTABLE_SUFFIX}") | ||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/OpenMVS/InterfaceCOLMAP${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openmvs/InterfaceCOLMAP${EXECUTABLE_SUFFIX}) | ||
endif() | ||
if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/OpenMVS/InterfaceVisualSFM${EXECUTABLE_SUFFIX}") | ||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/OpenMVS/InterfaceVisualSFM${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openmvs/InterfaceVisualSFM${EXECUTABLE_SUFFIX}) | ||
endif() | ||
if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/OpenMVS/ReconstructMesh${EXECUTABLE_SUFFIX}") | ||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/OpenMVS/ReconstructMesh${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openmvs/ReconstructMesh${EXECUTABLE_SUFFIX}) | ||
endif() | ||
if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/OpenMVS/RefineMesh${EXECUTABLE_SUFFIX}") | ||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/OpenMVS/RefineMesh${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openmvs/RefineMesh${EXECUTABLE_SUFFIX}) | ||
endif() | ||
if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/OpenMVS/TextureMesh${EXECUTABLE_SUFFIX}") | ||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/OpenMVS/TextureMesh${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openmvs/TextureMesh${EXECUTABLE_SUFFIX}) | ||
endif() | ||
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/openmvs) | ||
endif() | ||
|
||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static) | ||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) | ||
endif() | ||
|
||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmvs RENAME copyright) |