aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-11-29 13:24:46 -0800
committerAlexander Karatarakis <alkarata@microsoft.com>2016-11-29 13:24:46 -0800
commitf00ea33e4f13afe59adfa9fa1135a7b6358b4849 (patch)
tree4b2e2408064664788255d85808fa21b74c5e506c
parentb1665a96a974ad61a3124006e128e69070053d5a (diff)
parente55e05dcb31820b8b578c7ff87d94cca30916a14 (diff)
downloadvcpkg-f00ea33e4f13afe59adfa9fa1135a7b6358b4849.tar.gz
vcpkg-f00ea33e4f13afe59adfa9fa1135a7b6358b4849.zip
Merge branch 'entityx' of https://github.com/mattiascibien/vcpkg into mattiascibien-entityx
-rw-r--r--ports/entityx/CONTROL3
-rw-r--r--ports/entityx/portfile.cmake44
2 files changed, 47 insertions, 0 deletions
diff --git a/ports/entityx/CONTROL b/ports/entityx/CONTROL
new file mode 100644
index 000000000..f522fe702
--- /dev/null
+++ b/ports/entityx/CONTROL
@@ -0,0 +1,3 @@
+Source: entityx
+Version: 1.2.0
+Description: EntityX - A fast, type-safe C++ Entity-Component system. <https://github.com/alecthomas/entityx>
diff --git a/ports/entityx/portfile.cmake b/ports/entityx/portfile.cmake
new file mode 100644
index 000000000..d7bcdbe1b
--- /dev/null
+++ b/ports/entityx/portfile.cmake
@@ -0,0 +1,44 @@
+# Common Ambient Variables:
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# TARGET_TRIPLET is the current triplet (x86-windows, etc)
+# PORT is the current port name (zlib, etc)
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+#
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(STATUS "Warning: Dynamic building not supported yet. Building static.")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/entityx-1.2.0)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/alecthomas/entityx/archive/1.2.0.zip"
+ FILENAME "entityx-1.2.0.zip"
+ SHA512 4d7009f0412fbccd7bee72713d53424c3b4fa39da62b87729dd84a710a059db27e65ca27b927285c82af09997caea125d85571824133d9b71b4e3c4eebd9917c
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
+ SET(SHARED_FLAG ON)
+else()
+ SET(SHARED_FLAG OFF)
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ # OPTIONS_RELEASE -DOPTIMIZE=1
+ # OPTIONS_DEBUG -DDEBUGGABLE=1
+ -DENTITYX_BUILD_SHARED=${SHARED_FLAG}
+ -DENTITYX_BUILD_TESTING=false
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/entityx)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/entityx/COPYING ${CURRENT_PACKAGES_DIR}/share/entityx/copyright)