aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxahon <chernikov.i123@gmail.com>2020-08-08 05:39:55 +0700
committerGitHub <noreply@github.com>2020-08-07 15:39:55 -0700
commit728c54951fa4489387650f70f0aebf41ae0a834b (patch)
tree6396deddb9496281c11589cf48531d01d9c12101
parent9e853cf17ca6fb77a8877da61419b913805c71cc (diff)
downloadvcpkg-728c54951fa4489387650f70f0aebf41ae0a834b.tar.gz
vcpkg-728c54951fa4489387650f70f0aebf41ae0a834b.zip
[tlx] Add new port (#11943)
* [tlx] Init port * Add non-windows cmake targets fixup Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Fix version * Update ports/tlx/portfile.cmake Fix the typo Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Co-authored-by: NancyLi1013 <v-ruil@microsoft.com>
-rw-r--r--ports/tlx/CONTROL4
-rw-r--r--ports/tlx/portfile.cmake38
2 files changed, 42 insertions, 0 deletions
diff --git a/ports/tlx/CONTROL b/ports/tlx/CONTROL
new file mode 100644
index 000000000..b65af7260
--- /dev/null
+++ b/ports/tlx/CONTROL
@@ -0,0 +1,4 @@
+Source: tlx
+Version: 0.5.20191212
+Homepage: https://github.com/tlx/tlx
+Description: tlx is a collection of C++ helpers and extensions universally needed, but not found in the STL
diff --git a/ports/tlx/portfile.cmake b/ports/tlx/portfile.cmake
new file mode 100644
index 000000000..525894d28
--- /dev/null
+++ b/ports/tlx/portfile.cmake
@@ -0,0 +1,38 @@
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+# TODO: Fix .dlls not producing .lib files
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO tlx/tlx
+ REF 903b9b35df8731496a90d8d74f8bedbad2517d9b
+ SHA512 17087973f2f4751538c589e9f80d2b5ea872d2e7d90659769ae3350d441bda0b64aec9a4150d01a7cf5323ce327ebd104cdca7b4a3bc4eebdf574e71e013ba6e
+ HEAD_REF master
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DVERBOSE=1
+ -DTLX_BUILD_TESTS=off
+ -DTLX_USE_GCOV=off
+ -DTLX_TRY_COMPILE_HEADERS=off
+ -DTLX_MORE_TESTS=off
+ -DTLX_BUILD_STATIC_LIBS=${BUILD_STATIC}
+ -DTLX_BUILD_SHARED_LIBS=${BUILD_SHARED}
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+if(VCPKG_TARGET_IS_WINDOWS)
+ vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake/")
+else()
+ vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/tlx")
+endif()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)