Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding package for Async++ #4327

Closed
wants to merge 15 commits into from
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,45 @@ __pycache__/
!triplets/arm64-windows.cmake
!triplets/x64-linux.cmake
!triplets/x64-osx.cmake

#ignore custom toolchains
/scripts/toolchains/*
#add vcpkg-designed toolchains back in
!scripts/toolchains/android.cmake
!scripts/toolchains/freebsd.cmake
!scripts/toolchains/linux.cmake
!scripts/toolchains/osx.cmake
!scripts/toolchains/windows.cmake

*.exe
*.zip

############################################################
# vcpkg - End
############################################################


############################################################
# cmake and ninja build artifacts - Start
############################################################

.DS_Store
*.o
**/build.*
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
.ninja_deps
.ninja_log
build.ninja
rules.ninja

############################################################
# cmake and ninja build artifacts - End
############################################################
4 changes: 4 additions & 0 deletions ports/asyncplusplus/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Source: asyncplusplus
Version: 1.0
Description: Async++ is a lightweight concurrency framework for C++11

30 changes: 30 additions & 0 deletions ports/asyncplusplus/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/asyncplusplus-1.0)
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/Amanieu/asyncplusplus/archive/v1.0.tar.gz"
FILENAME "asyncplusplus-1.0.zip"
SHA512 bb1fc032d2d8de49b4505e0629d48e5cfa99edfcafbf17848f160ceb320bcd993f1549095248d1a0ef8fc1ec07ecbaad6b634a770ddc1974092d373a508a5fe3
)
vcpkg_extract_source_archive(${ARCHIVE})

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)


vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(COPY ${CURRENT_BUILDTREES_DIR}/src/asyncplusplus-1.0/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/asyncplusplus)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/asyncplusplus/LICENSE ${CURRENT_PACKAGES_DIR}/share/asyncplusplus/copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(COPY ${CURRENT_PACKAGES_DIR}/debug/cmake/Async++-debug.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/Async++-debug.cmake)
file(COPY ${CURRENT_PACKAGES_DIR}/cmake/Async++-release.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/Async++-release.cmake)
file(COPY ${CURRENT_PACKAGES_DIR}/cmake/Async++.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/Async++.cmake)
file(COPY ${CURRENT_PACKAGES_DIR}/cmake/Async++Config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/Async++Config.cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake)
file(COPY ${CURRENT_PORT_DIR}/CONTROL DESTINATION ${CURRENT_PACKAGES_DIR})