From 0c117ea3db646d2b1fe5979faf4f4c9c6e44b9f9 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 21 Jul 2017 10:48:20 +0200 Subject: [PATCH 1/5] [gsl] Add a "d" debug postfix See https://github.com/Microsoft/vcpkg/issues/1196#issuecomment-305751793 for details --- ports/gsl/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/gsl/CMakeLists.txt b/ports/gsl/CMakeLists.txt index 45abb5bd2..eb38a4431 100644 --- a/ports/gsl/CMakeLists.txt +++ b/ports/gsl/CMakeLists.txt @@ -48,6 +48,10 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/gsl_types.h "${GSLTYPES_H}") file(GLOB_RECURSE PUBLIC_HEADERS gsl*.h) list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/gsl_types.h) +# The debug libraries have a "d" postfix so that CMake's FindGSL.cmake +# module can distinguish between Release and Debug libraries +set(CMAKE_DEBUG_POSTFIX "d") + add_library(gslcblas ${CBLAS_SOURCES}) set_target_properties(gslcblas PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) @@ -74,4 +78,4 @@ install(TARGETS gsl gslcblas LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ${TARGET_INSTALL_OPTIONS} -) \ No newline at end of file +) From e47238f98c3325d69e9731ab81d43b17a8372363 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 21 Jul 2017 10:50:34 +0200 Subject: [PATCH 2/5] [gsl] Bump version number --- ports/gsl/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/gsl/CONTROL b/ports/gsl/CONTROL index a18b341c9..62d0c7e8e 100644 --- a/ports/gsl/CONTROL +++ b/ports/gsl/CONTROL @@ -1,3 +1,3 @@ Source: gsl -Version: 2.3-1 +Version: 2.3-2 Description: The GNU Scientific Library is a numerical library for C and C++ programmers From 809eb64c97e6ec459cd1e1d601e916100395529e Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 21 Jul 2017 12:26:24 -0700 Subject: [PATCH 3/5] [cxxopts] init port required by #1248 --- ports/cxxopts/CONTROL | 3 +++ ports/cxxopts/portfile.cmake | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 ports/cxxopts/CONTROL create mode 100644 ports/cxxopts/portfile.cmake diff --git a/ports/cxxopts/CONTROL b/ports/cxxopts/CONTROL new file mode 100644 index 000000000..e1f571b11 --- /dev/null +++ b/ports/cxxopts/CONTROL @@ -0,0 +1,3 @@ +Source: cxxopts +Version: 1.3.0 +Description: This is a lightweight C++ option parser library, supporting the standard GNU style syntax for options diff --git a/ports/cxxopts/portfile.cmake b/ports/cxxopts/portfile.cmake new file mode 100644 index 000000000..c45da3a05 --- /dev/null +++ b/ports/cxxopts/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jarro2783/cxxopts + REF v1.3.0 + SHA512 0c02716cdc1ca83f64c3757685042580e06c894ac51986a8df971ed30b8dd6d49448f2c9f61fff947fb34c48055f11cac446b54a9294bc880d78d91081c379b4 + HEAD_REF master +) +file(INSTALL ${SOURCE_PATH}/include/cxxopts.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cxxopts RENAME copyright) +vcpkg_copy_pdbs() From c2a552b4f370edc69d3d3b0f65ff6a7e6d659418 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 21 Jul 2017 21:56:20 -0700 Subject: [PATCH 4/5] [uriparser] init required by #1369 --- ports/uriparser/CMakeLists.txt | 47 ++++++++++++++++++++++++++++++++++ ports/uriparser/CONTROL | 3 +++ ports/uriparser/portfile.cmake | 22 ++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 ports/uriparser/CMakeLists.txt create mode 100644 ports/uriparser/CONTROL create mode 100644 ports/uriparser/portfile.cmake diff --git a/ports/uriparser/CMakeLists.txt b/ports/uriparser/CMakeLists.txt new file mode 100644 index 000000000..ec7f7bf38 --- /dev/null +++ b/ports/uriparser/CMakeLists.txt @@ -0,0 +1,47 @@ +cmake_minimum_required(VERSION 3.8) +project(uriparser C CXX) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +include_directories(include) + +set(SRC + src/UriCommon.c + src/UriCommon.h + src/UriCompare.c + src/UriEscape.c + src/UriFile.c + src/UriIp4.c + src/UriIp4Base.c + src/UriIp4Base.h + src/UriNormalize.c + src/UriNormalizeBase.c + src/UriNormalizeBase.h + src/UriParse.c + src/UriParseBase.c + src/UriParseBase.h + src/UriQuery.c + src/UriRecompose.c + src/UriResolve.c + src/UriShorten.c +) + +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +add_library(uriparser ${SRC}) + +install( + TARGETS uriparser + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY include/ DESTINATION include) +endif() diff --git a/ports/uriparser/CONTROL b/ports/uriparser/CONTROL new file mode 100644 index 000000000..7bba4c357 --- /dev/null +++ b/ports/uriparser/CONTROL @@ -0,0 +1,3 @@ +Source: uriparser +Version: 0.8.4 +Description: uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C. uriparser is cross-platform, fast, supports Unicode diff --git a/ports/uriparser/portfile.cmake b/ports/uriparser/portfile.cmake new file mode 100644 index 000000000..040e3a9d7 --- /dev/null +++ b/ports/uriparser/portfile.cmake @@ -0,0 +1,22 @@ + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/uriparser-0.8.4) +vcpkg_download_distfile(ARCHIVE + URLS "https://sourceforge.net/projects/uriparser/files/Sources/0.8.4/uriparser-0.8.4.zip/download" + FILENAME "uriparser-0.8.4.zip" + SHA512 c22a98a027c4caa1d3559b1d3112f7ac567a489037d2b38f1999483f623a2e8d79fbacdc8859fe4e669a12f0f55935179f7be2f4424c61e51d1d68f6ced37185 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/uriparser RENAME copyright) From a92af9b14f37249fbf284613d7679a75d7a3b283 Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 21 Jul 2017 23:14:55 -0700 Subject: [PATCH 5/5] [libssh] init #1454 --- ports/libssh/CONTROL | 4 ++++ ports/libssh/portfile.cmake | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 ports/libssh/CONTROL create mode 100644 ports/libssh/portfile.cmake diff --git a/ports/libssh/CONTROL b/ports/libssh/CONTROL new file mode 100644 index 000000000..284d44091 --- /dev/null +++ b/ports/libssh/CONTROL @@ -0,0 +1,4 @@ +Source: libssh +Version: 0.7.5 +Description:libssh is a multiplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side +Build-Depends: zlib, openssl diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake new file mode 100644 index 000000000..8cac84063 --- /dev/null +++ b/ports/libssh/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "WindowsStore not supported") +endif() +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libssh-0.7.5) +vcpkg_download_distfile(ARCHIVE + URLS "https://red.libssh.org/attachments/download/218/libssh-0.7.5.tar.xz" + FILENAME "libssh-0.7.5.tar.xz" + SHA512 6c7f539899caaedf13d66fa2e0fac1a475ecdfe389131abcbdf908bdebc50a0b9e6b0d43e67e52aea85c32f6aa68e46ca2f50695992f82ded83489f445a8e775 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DWITH_STATIC_LIB=ON + +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake/libssh") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(INSTALL ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/static ${CURRENT_PACKAGES_DIR}/debug/lib/static) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh RENAME copyright)