diff options
Diffstat (limited to 'vcpkg/ports/tinythread')
| -rw-r--r-- | vcpkg/ports/tinythread/CMakeLists.txt | 21 | ||||
| -rw-r--r-- | vcpkg/ports/tinythread/portfile.cmake | 23 | ||||
| -rw-r--r-- | vcpkg/ports/tinythread/vcpkg.json | 13 |
3 files changed, 57 insertions, 0 deletions
diff --git a/vcpkg/ports/tinythread/CMakeLists.txt b/vcpkg/ports/tinythread/CMakeLists.txt new file mode 100644 index 0000000..57e9721 --- /dev/null +++ b/vcpkg/ports/tinythread/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 3.8.0) + +project(tinythread) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +include_directories(source) + +add_library(tinythread source/tinythread.cpp) + +install( + TARGETS tinythread + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES source/tinythread.h source/fast_mutex.h DESTINATION include) +endif() diff --git a/vcpkg/ports/tinythread/portfile.cmake b/vcpkg/ports/tinythread/portfile.cmake new file mode 100644 index 0000000..0061ee0 --- /dev/null +++ b/vcpkg/ports/tinythread/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "http://tinythreadpp.bitsnbites.eu/files/TinyThread%2B%2B-1.1-src.tar.bz2" + FILENAME "TinyThread++-1.1.tar.bz2" + SHA512 407f54fcf3f68dd7fec25e9e0749a1803dffa5d52d606905155714d29f519b5eae64ff654b11768fecc32c0123a78c48be37c47993e0caf157a63349a2f869c6 +) + +vcpkg_extract_source_archive( + SOURCE_PATH + ARCHIVE "${ARCHIVE}" +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_cmake_install() + +file(INSTALL "${SOURCE_PATH}/README.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/tinythread/vcpkg.json b/vcpkg/ports/tinythread/vcpkg.json new file mode 100644 index 0000000..27ffb8c --- /dev/null +++ b/vcpkg/ports/tinythread/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "tinythread", + "version": "1.1", + "port-version": 6, + "description": "Implements a fairly compatible subset of the C++11 thread management classes", + "homepage": "https://tinythreadpp.bitsnbites.eu/", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} |