early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,9 @@
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(EABase CONFIG REQUIRED)
# Provide path for scripts
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
include(${CMAKE_CURRENT_LIST_DIR}/EASTLTargets.cmake)

View File

@@ -0,0 +1,14 @@
diff --git a/scripts/CMake/CommonCppFlags.cmake b/scripts/CMake/CommonCppFlags.cmake
index 08b6af5..281665e 100644
--- a/scripts/CMake/CommonCppFlags.cmake
+++ b/scripts/CMake/CommonCppFlags.cmake
@@ -74,6 +74,9 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
endif()
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++latest /W4 /permissive-")
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.31.30911.95")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:static_assert-")
+ endif()
endif()

View File

@@ -0,0 +1,75 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e8700dc..6d3e2f1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,12 +4,17 @@
cmake_minimum_required(VERSION 3.1)
project(EASTL CXX)
+include(GNUInstallDirs)
+include(CMakePackageConfigHelpers)
+
#-------------------------------------------------------------------------------------------
# Options
#-------------------------------------------------------------------------------------------
option(EASTL_BUILD_BENCHMARK "Enable generation of build files for benchmark" OFF)
option(EASTL_BUILD_TESTS "Enable generation of build files for tests" OFF)
+find_package(EABase CONFIG REQUIRED)
+
#-------------------------------------------------------------------------------------------
# Compiler Flags
#-------------------------------------------------------------------------------------------
@@ -41,7 +46,10 @@ add_definitions(-DEASTL_OPENSOURCE=1)
#-------------------------------------------------------------------------------------------
# Include dirs
#-------------------------------------------------------------------------------------------
-target_include_directories(EASTL PUBLIC include)
+target_include_directories(EASTL PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+ )
#-------------------------------------------------------------------------------------------
# Dependencies
@@ -50,5 +58,39 @@ if (NOT TARGET EABase)
add_subdirectory(test/packages/EABase)
endif()
-target_link_libraries(EASTL EABase)
+target_link_libraries(EASTL PUBLIC EABase)
+
+# create and install an export set for eabase target as EABase::EABase
+set(EASTL_CMAKE_CONFIG_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/EASTL")
+
+configure_package_config_file(
+ EASTLConfig.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/EASTLConfig.cmake
+ INSTALL_DESTINATION ${EASTL_CMAKE_CONFIG_DESTINATION}
+)
+
+# create and install an export set for Terra target as Terra
+install(
+ TARGETS EASTL EXPORT EASTLTargets
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+
+install(EXPORT EASTLTargets DESTINATION ${EASTL_CMAKE_CONFIG_DESTINATION})
+
+write_basic_package_version_file(
+ "${CMAKE_CURRENT_BINARY_DIR}/EASTLConfigVersion.cmake"
+ VERSION 3.16.05
+ COMPATIBILITY SameMajorVersion
+)
+
+install(TARGETS EASTL LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+install(DIRECTORY "include/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+
+install(
+ FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/EASTLConfig.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/EASTLConfigVersion.cmake"
+ DESTINATION ${EASTL_CMAKE_CONFIG_DESTINATION}
+)

36
externals/vcpkg/ports/eastl/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,36 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO electronicarts/EASTL
REF e8bdd5531ed79c30ccef2fd71e070f5ab9f1222a #v3.18.00
SHA512 3e5d97a77b8610a2efdb9156b47c91e8a8dd5629ff95ea6d2c65016b067ab645df5beddc8c7f93d89c3d1a6f404ff71282efc6db9885a6e6240fa444fe2be79c
HEAD_REF master
PATCHES
fix_cmake_install.patch
Fix-error-C2338.patch
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/EASTLConfig.cmake.in" DESTINATION "${SOURCE_PATH}")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DEASTL_BUILD_TESTS=OFF
-DEASTL_BUILD_BENCHMARK=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/EASTL)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_copy_pdbs()
# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(INSTALL "${SOURCE_PATH}/3RDPARTYLICENSES.TXT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
# CommonCppFlags used by EAThread
file(INSTALL "${SOURCE_PATH}/scripts/CMake/CommonCppFlags.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

19
externals/vcpkg/ports/eastl/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,19 @@
{
"name": "eastl",
"version-string": "3.18.00",
"port-version": 2,
"description": "Electronic Arts Standard Template Library. It is a C++ template library of containers, algorithms, and iterators useful for runtime and tool development across multiple platforms. It is a fairly extensive and robust implementation of such a library and has an emphasis on high performance above all other considerations.",
"homepage": "https://github.com/electronicarts/EASTL",
"license": "BSD-3-Clause",
"dependencies": [
"eabase",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}