aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorThomas Fussell <thomas.fussell@gmail.com>2016-12-04 00:30:37 +0100
committerThomas Fussell <thomas.fussell@gmail.com>2016-12-04 00:30:37 +0100
commit937c246ac2aa6ec11a02d0cb36a4e50919842c8a (patch)
tree42dce11b9e3c6100831d2a8d1cc0995fc35d57d7 /ports
parenta710f67e5281480ab22d0ef372d376696f5fc8ab (diff)
downloadvcpkg-937c246ac2aa6ec11a02d0cb36a4e50919842c8a.tar.gz
vcpkg-937c246ac2aa6ec11a02d0cb36a4e50919842c8a.zip
initial commit of xlnt port
Diffstat (limited to 'ports')
-rw-r--r--ports/xlnt/CONTROL3
-rw-r--r--ports/xlnt/portfile.cmake49
2 files changed, 52 insertions, 0 deletions
diff --git a/ports/xlnt/CONTROL b/ports/xlnt/CONTROL
new file mode 100644
index 000000000..2cd806e70
--- /dev/null
+++ b/ports/xlnt/CONTROL
@@ -0,0 +1,3 @@
+Source: xlnt
+Version: 0.9.1
+Description: Cross-platform user-friendly xlsx library for C++14
diff --git a/ports/xlnt/portfile.cmake b/ports/xlnt/portfile.cmake
new file mode 100644
index 000000000..639bb1c23
--- /dev/null
+++ b/ports/xlnt/portfile.cmake
@@ -0,0 +1,49 @@
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ set(STATIC "OFF")
+else()
+ set(STATIC "ON")
+endif()
+
+include(vcpkg_common_functions)
+find_program(GIT git)
+
+set(GIT_URL "https://github.com/tfussell/xlnt.git")
+set(GIT_REV "f33e8870123042b8420f87b82673c11014f6babd")
+
+if(NOT EXISTS "${DOWNLOADS}/xlnt.git")
+ message(STATUS "Cloning")
+ vcpkg_execute_required_process(
+ COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/xlnt.git
+ WORKING_DIRECTORY ${DOWNLOADS}
+ LOGNAME clone
+ )
+endif()
+message(STATUS "Cloning done")
+
+if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git")
+ message(STATUS "Adding worktree")
+ vcpkg_execute_required_process(
+ COMMAND ${GIT} worktree add -f --detach ${CURRENT_BUILDTREES_DIR}/src ${GIT_REV}
+ WORKING_DIRECTORY ${DOWNLOADS}/xlnt.git
+ LOGNAME worktree
+ )
+ message(STATUS "Updating sumbodules")
+ vcpkg_execute_required_process(
+ COMMAND ${GIT} submodule update --init --remote
+ WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src
+ LOGNAME submodule
+ )
+endif()
+message(STATUS "Adding worktree and updating sumbodules done")
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src
+ OPTIONS -DTESTS=OFF -DSAMPLES=OFF -DBENCHMARKS=OFF -DSTATIC=${STATIC}
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/LICENCE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/xlnt RENAME copyright)
+
+vcpkg_copy_pdbs()