aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-08-01 18:32:07 -0700
committerGitHub <noreply@github.com>2017-08-01 18:32:07 -0700
commitf8ee92bacefaa95347b6c1eec5fda4dcf4666fe4 (patch)
treea2cd74a9c509aca04cc8c43cbe5c989720a36172
parentebc875df58a9441e30fab54e7ba84418e6bf8238 (diff)
parent88a5b96ea442bb87ff8c6a43d5fbd94dfc984cb9 (diff)
downloadvcpkg-f8ee92bacefaa95347b6c1eec5fda4dcf4666fe4.tar.gz
vcpkg-f8ee92bacefaa95347b6c1eec5fda4dcf4666fe4.zip
Merge pull request #1571 from jasjuang/master
New port: g2o
-rw-r--r--ports/g2o/CONTROL4
-rw-r--r--ports/g2o/portfile.cmake42
2 files changed, 46 insertions, 0 deletions
diff --git a/ports/g2o/CONTROL b/ports/g2o/CONTROL
new file mode 100644
index 000000000..00ec4d963
--- /dev/null
+++ b/ports/g2o/CONTROL
@@ -0,0 +1,4 @@
+Source: g2o
+Version: 20170730_git-1
+Build-Depends: suitesparse, eigen3, clapack, ceres
+Description: g2o: A General Framework for Graph Optimization http://openslam.org/g2o.html
diff --git a/ports/g2o/portfile.cmake b/ports/g2o/portfile.cmake
new file mode 100644
index 000000000..bdfa20f62
--- /dev/null
+++ b/ports/g2o/portfile.cmake
@@ -0,0 +1,42 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO RainerKuemmerle/g2o
+ REF 20170730_git
+ SHA512 a85e3f79e6a8bd0f81a9a1a7a01227779100d9f4ebd0ae9c03537bbdcc246018f292b53045f027bbe28ecf63b98de2f22f5528c992c93c9790eb6a3a40995903
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DG2O_BUILD_EXAMPLES=OFF
+ -DG2O_BUILD_APPS=OFF
+)
+
+vcpkg_install_cmake()
+
+vcpkg_copy_pdbs()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(GLOB_RECURSE HEADERS "${CURRENT_PACKAGES_DIR}/include/*")
+ foreach(HEADER ${HEADERS})
+ file(READ ${HEADER} HEADER_CONTENTS)
+ string(REPLACE "#ifdef G2O_SHARED_LIBS" "#if 1" HEADER_CONTENTS "${HEADER_CONTENTS}")
+ file(WRITE ${HEADER} "${HEADER_CONTENTS}")
+ endforeach()
+endif()
+
+file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe)
+file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
+if(EXE OR DEBUG_EXE)
+ file(REMOVE ${EXE} ${DEBUG_EXE})
+endif()
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+# Put the license file where vcpkg expects it
+file(COPY ${SOURCE_PATH}/doc/license-bsd.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/g2o/)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/g2o/license-bsd.txt ${CURRENT_PACKAGES_DIR}/share/g2o/copyright)