From 537bded431bb850344ba0790630ddbc5fd9ef2ec Mon Sep 17 00:00:00 2001 From: Mattias Cibien Date: Tue, 29 Nov 2016 10:42:02 +0100 Subject: [PATCH 1/2] Initial anax port --- ports/anax/CONTROL | 3 +++ ports/anax/portfile.cmake | 41 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 ports/anax/CONTROL create mode 100644 ports/anax/portfile.cmake diff --git a/ports/anax/CONTROL b/ports/anax/CONTROL new file mode 100644 index 000000000..f6d285b4c --- /dev/null +++ b/ports/anax/CONTROL @@ -0,0 +1,3 @@ +Source: anax +Version: 2.1.0 +Description: An open source C++ entity system. diff --git a/ports/anax/portfile.cmake b/ports/anax/portfile.cmake new file mode 100644 index 000000000..845643992 --- /dev/null +++ b/ports/anax/portfile.cmake @@ -0,0 +1,41 @@ +# Common Ambient Variables: +# VCPKG_ROOT_DIR = +# 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/anax-2.1.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/miguelmartin75/anax/archive/v2.1.0.zip" + FILENAME "anax-2.1.0.zip" + SHA512 89f2df64add676ab48a19953b95d8eae1da9c8c5f3c0f6bc757a3bc99af6e4360c56c12d27d12c672ccd754b1f53a5e271533b381641f20e8cf3ca8ddda6cd1a +) +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 + -DBUILD_SHARED_LIBS=${SHARED_FLAG} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/anax) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/anax/LICENSE ${CURRENT_PACKAGES_DIR}/share/anax/copyright) From c6fe22929cc5c152677efede93b9f42778afa7b6 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 29 Nov 2016 02:33:07 -0800 Subject: [PATCH 2/2] [anax] BUILD_SHARED_LIBS is automatically set by vcpkg --- ports/anax/portfile.cmake | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ports/anax/portfile.cmake b/ports/anax/portfile.cmake index 845643992..ae22332cf 100644 --- a/ports/anax/portfile.cmake +++ b/ports/anax/portfile.cmake @@ -20,16 +20,8 @@ vcpkg_download_distfile(ARCHIVE ) 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 - -DBUILD_SHARED_LIBS=${SHARED_FLAG} ) vcpkg_install_cmake()