diff options
| author | Mattias Cibien <mattias.cibien@outlook.com> | 2016-11-29 12:42:34 +0100 |
|---|---|---|
| committer | Mattias Cibien <mattias.cibien@outlook.com> | 2016-11-29 12:42:34 +0100 |
| commit | fa32afc372d42ebc120f4c20ab1e270eeea08ab8 (patch) | |
| tree | e151cbdecf0c7b18ada3d98c4b3c52dc2d4350fa | |
| parent | 372d339977dc4f8977c73ed1dde9e71ae34f40f5 (diff) | |
| download | vcpkg-fa32afc372d42ebc120f4c20ab1e270eeea08ab8.tar.gz vcpkg-fa32afc372d42ebc120f4c20ab1e270eeea08ab8.zip | |
Add entityx
| -rw-r--r-- | ports/entityx/CONTROL | 3 | ||||
| -rw-r--r-- | ports/entityx/portfile.cmake | 44 |
2 files changed, 47 insertions, 0 deletions
diff --git a/ports/entityx/CONTROL b/ports/entityx/CONTROL new file mode 100644 index 000000000..f6dab245a --- /dev/null +++ b/ports/entityx/CONTROL @@ -0,0 +1,3 @@ +Source: entityx +Version: +Description: 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) |
