diff options
| author | Phil Christensen <philc@microsoft.com> | 2018-12-04 14:05:12 -0800 |
|---|---|---|
| committer | Phil Christensen <philc@microsoft.com> | 2018-12-04 14:05:12 -0800 |
| commit | e712374b2831c4d04fc3b37373ed5cf041a3713e (patch) | |
| tree | 3c1be3898e52d0e01cfc842be7ea553e8fe0bafb /ports/entityx | |
| parent | 7f80cbdeb02a126a610f3a3262eaefa9c9f9b938 (diff) | |
| parent | f6d32cc644a6f0fb9adb1bb3c3fd4905e8d61e2e (diff) | |
| download | vcpkg-e712374b2831c4d04fc3b37373ed5cf041a3713e.tar.gz vcpkg-e712374b2831c4d04fc3b37373ed5cf041a3713e.zip | |
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/philc/4889
Diffstat (limited to 'ports/entityx')
| -rw-r--r-- | ports/entityx/CONTROL | 2 | ||||
| -rw-r--r-- | ports/entityx/enable-std14.patch | 12 | ||||
| -rw-r--r-- | ports/entityx/fix-cmake.patch | 40 | ||||
| -rw-r--r-- | ports/entityx/portfile.cmake | 47 |
4 files changed, 67 insertions, 34 deletions
diff --git a/ports/entityx/CONTROL b/ports/entityx/CONTROL index cbf618e0a..dacd86ee9 100644 --- a/ports/entityx/CONTROL +++ b/ports/entityx/CONTROL @@ -1,3 +1,3 @@ Source: entityx -Version: 1.2.0-1 +Version: 1.2.0-2 Description: EntityX - A fast, type-safe C++ Entity-Component system. <https://github.com/alecthomas/entityx> diff --git a/ports/entityx/enable-std14.patch b/ports/entityx/enable-std14.patch new file mode 100644 index 000000000..06eff08ee --- /dev/null +++ b/ports/entityx/enable-std14.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 23f5063..1fa10b8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -24,6 +24,7 @@ set(ENTITYX_BUILD_SHARED true CACHE BOOL "Build shared libraries?")
+ include(${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
+ include(CheckCXXSourceCompiles)
+
++set(CMAKE_CXX_STANDARD 14)
+ # Default compiler args
+ if(0)
+ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "(GNU|.*Clang)")
diff --git a/ports/entityx/fix-cmake.patch b/ports/entityx/fix-cmake.patch new file mode 100644 index 000000000..143cc52b1 --- /dev/null +++ b/ports/entityx/fix-cmake.patch @@ -0,0 +1,40 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 87309bf..23f5063 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -25,6 +25,7 @@ include(${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
+ include(CheckCXXSourceCompiles)
+
+ # Default compiler args
++if(0)
+ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "(GNU|.*Clang)")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Werror -Wall -Wextra -Wno-unused-parameter -Wno-error=unused-variable -Wno-error=sign-compare -std=c++11")
+ set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
+@@ -41,6 +42,7 @@ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+ set(CMAKE_CXX_FLAGS_RELEASE "/Ox -DNDEBUG")
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Ox /Zi /FS /DEBUG")
+ endif()
++endif()
+
+ # if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weverything -Wno-c++98-compat -Wno-shadow -Wno-padded -Wno-missing-noreturn -Wno-global-constructors")
+@@ -156,9 +158,9 @@ endif (ENTITYX_BUILD_TESTING)
+
+ configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/entityx/config.h.in
+- ${CMAKE_CURRENT_SOURCE_DIR}/entityx/config.h
++ ${CMAKE_CURRENT_BINARY_DIR}/entityx/config.h
+ )
+-
++include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+ if (NOT WINDOWS OR CYGWIN)
+ set(entityx_libs -lentityx)
+@@ -179,6 +181,7 @@ install(
+ DESTINATION "include"
+ FILES_MATCHING PATTERN "*.h"
+ )
++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/entityx/config.h DESTINATION include/entityx)
+
+ install(
+ TARGETS ${install_libs}
diff --git a/ports/entityx/portfile.cmake b/ports/entityx/portfile.cmake index d35fb9da3..5df7da6cd 100644 --- a/ports/entityx/portfile.cmake +++ b/ports/entityx/portfile.cmake @@ -1,42 +1,23 @@ -# 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() - -if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") - message(FATAL_ERROR "Entityx only supports dynamic CRT linkage") -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_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO alecthomas/entityx + REF 1.2.0 + SHA512 682aa302cb4495666aab2c0b39a286f88cb28046bc8b2deb603402105e15e4b9692e32807077abc3f465e42a4e0f34a7e69169bc74fc5579a5c3d0e17b02fdb8 + HEAD_REF master + PATCHES + fix-cmake.patch + enable-std14.patch +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 - -DENTITYX_BUILD_SHARED=${SHARED_FLAG} - -DENTITYX_BUILD_TESTING=false + -DENTITYX_BUILD_TESTING=false ) vcpkg_install_cmake() |
