Merge branch 'master' into rdkafka-init

This commit is contained in:
myd7349 2019-06-14 07:55:33 +08:00
commit 1e9b8dd1b4
586 changed files with 6470 additions and 7258 deletions

View File

@ -37,7 +37,7 @@ The best way to use installed libraries with CMake is via the toolchain file `sc
In Visual Studio, you can create a New Project (or open an existing one). All installed libraries are immediately ready to be `#include`'d and used in your project without additional configuration.
For more information, see our [using a package](docs/examples/installing-and-using-packages.md) example for the specifics.
For more information, see our [using a package](docs/examples/installing-and-using-packages.md) example for the specifics. If your library is not present in vcpkg catalog, you can open an [issue on the GitHub repo](https://github.com/microsoft/vcpkg/issues) where the dev team and the community can see it and potentially create the port file for this library.
Additional notes on macOS and Linux support can be found in the [official announcement](https://blogs.msdn.microsoft.com/vcblog/2018/04/24/announcing-a-single-c-library-manager-for-linux-macos-and-windows-vcpkg/).

View File

@ -56,7 +56,7 @@ Version: 2019-3-21
```
#### Description
A description of the library
A description of the library.
By convention the first line of the description is a summary of the library. An optional detailed description follows. The detailed description can be multiple lines, all starting with whitespace.
@ -70,6 +70,14 @@ Description: Mosquitto is an open source message broker that implements the MQ T
to machine" messaging such as with low power sensors or mobile devices such as phones, embedded computers or microcontrollers like the Arduino.
````
#### Homepage
The URL of the homepage for the library where a user is able to find additional documentation or the original source code.
Example:
```no-highlight
Homepage: https://github.com/Microsoft/vcpkg
```
#### Build-Depends
Comma separated list of vcpkg ports the library has a dependency on.

View File

@ -1,4 +1,5 @@
Source: alembic
Version: 1.7.11
Build-Depends: ilmbase, hdf5
Description: Alembic is an open framework for storing and sharing scene data that includes a C++ library, a file format, and client plugins and applications. http://alembic.io/
Description: Alembic is an open framework for storing and sharing scene data that includes a C++ library, a file format, and client plugins and applications.
Homepage: http://alembic.io/

View File

@ -1,3 +1,4 @@
Source: anax
Version: 2.1.0-5
Description: An open source C++ entity system. <https://github.com/miguelmartin75/anax>
Description: An open source C++ entity system.
Homepage: https://github.com/miguelmartin75/anax

3
ports/any-lite/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: any-lite
Version: 0.2.0
Description: A C++17-like any, a type-safe container for single values of any type for C++98, C++11 and later in a single-file header-only library

View File

@ -0,0 +1,31 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO martinmoene/any-lite
REF v0.2.0
SHA512 703900d7bac96d41f903b6cabba4bce15ef3cf7ef0a6a66de76230498ededff110e43d68d4a3fd6996869b2edd001f69bd53039a214d06b774ce99518f384a68
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DANY_LITE_OPT_BUILD_TESTS=OFF
-DANY_LITE_OPT_BUILD_EXAMPLES=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(
CONFIG_PATH lib/cmake/${PORT}
)
file( REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug
${CURRENT_PACKAGES_DIR}/lib
)
file( INSTALL
${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright
)

View File

@ -1,4 +1,4 @@
Source: arb
Version: 2.11.1-2
Version: 2.16.0
Description: a C library for arbitrary-precision interval arithmetic
Build-Depends: flint

View File

@ -0,0 +1,24 @@
diff --git a/acb_dirichlet/stieltjes.c b/acb_dirichlet/stieltjes.c
index ad6937b..4ca9690 100644
--- a/acb_dirichlet/stieltjes.c
+++ b/acb_dirichlet/stieltjes.c
@@ -340,16 +340,16 @@ stieltjes_mag(double n)
return t;
}
-static double _hypot(double x, double y) { return sqrt(x * x + y * y); }
+static double __hypot(double x, double y) { return sqrt(x * x + y * y); }
/* log2 magnitude of integrand at z = x+yi; alpha = a+bi */
static double
integrand_mag(double n, double x, double y, double a, double b)
{
double t, u;
- t = log(_hypot(a - y, b + x));
+ t = log(__hypot(a - y, b + x));
u = atan2(b + x, a - y);
- t = log(_hypot(t,u)) * (n+1) - 2.0 * 3.1415926535897932 * x;
+ t = log(__hypot(t,u)) * (n+1) - 2.0 * 3.1415926535897932 * x;
return t * 1.44269504088896341;
}

View File

@ -5,9 +5,10 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO fredrik-johansson/arb
REF 2.11.1
SHA512 7a014da5208b55f20c7a3cd3eb51070b09ae107b04cbbd6329925780c2ab4d7c38e1fb3619f21456fa806939818370fcae921f59eb013661b6bdd3d0971e3353
REF 2.16.0
SHA512 171c965aeb03cd2830df8a53990403c6da480a94d44385dadfbb2d02697f7c03e8b9a217094b0ad93f796d889a1564f4b9ae9db35ef9de90f61bb2e3220911be
HEAD_REF master
PATCHES fix-build-error.patch
)
file(REMOVE ${SOURCE_PATH}/CMakeLists.txt)
@ -21,9 +22,8 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
# Remove duplicate headers
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/arb RENAME copyright)
# Remove duplicate headers
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

4
ports/argparse/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: argparse
Version: 2019-06-10
Description: Argument parser for modern C++
Homepage: https://github.com/p-ranav/argparse

View File

@ -0,0 +1,30 @@
# header-only library
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO p-ranav/argparse
REF 2c71311b5fa49b7d65e6628375f2748d58830856
SHA512 08a28a3fb424befe7df9a428fbad8e2687a1b331d7099bfaca2c3e04d8d4b4888e99d481226407bf90bfce282388545b09e4125128215cc95dc56fb313641bf6
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DARGPARSE_BUILD_TESTS=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
# Handle copyright
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
# CMake integration test
vcpkg_test_cmake(PACKAGE_NAME ${PORT})

View File

@ -1,3 +1,4 @@
Source: armadillo
Version: 2019-04-16-f00d3225
Version: 2019-04-16-1
Description: Armadillo is a high quality linear algebra library (matrix maths) for the C++ language, aiming towards a good balance between speed and ease of use
Build-Depends: openblas (!osx), clapack (!osx)

View File

@ -1,29 +1,35 @@
include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_gitlab(
GITLAB_URL https://gitlab.com
OUT_SOURCE_PATH SOURCE_PATH
REPO conradsnicta/armadillo-code
REF f00d3225b1c005775044369723f31cecc3cd6569
SHA512 ca3574edf5de8c752867403c3856ed9569fbed2ce9729585cae59be5751493c2e71121319b0a812e2ea56baada6b6f62fbc84ce6f1efb362347e5fd4141ccf1b
HEAD_REF 9.400.x
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DDETECT_HDF5=false
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/Armadillo/CMake TARGET_PATH share/armadillo)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/Armadillo RENAME copyright)
include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_gitlab(
GITLAB_URL https://gitlab.com
OUT_SOURCE_PATH SOURCE_PATH
REPO conradsnicta/armadillo-code
REF f00d3225b1c005775044369723f31cecc3cd6569
SHA512 ca3574edf5de8c752867403c3856ed9569fbed2ce9729585cae59be5751493c2e71121319b0a812e2ea56baada6b6f62fbc84ce6f1efb362347e5fd4141ccf1b
HEAD_REF 9.400.x
PATCHES
remove_custom_modules.patch
)
file(REMOVE ${SOURCE_PATH}/cmake_aux/Modules/ARMA_FindBLAS.cmake)
file(REMOVE ${SOURCE_PATH}/cmake_aux/Modules/ARMA_FindLAPACK.cmake)
file(REMOVE ${SOURCE_PATH}/cmake_aux/Modules/ARMA_FindOpenBLAS.cmake)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DDETECT_HDF5=false
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/armadillo/CMake TARGET_PATH share/armadillo)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/armadillo RENAME copyright)

View File

@ -0,0 +1,17 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0959127..9fea721 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -176,10 +176,9 @@ else()
include(ARMA_FindMKL)
include(ARMA_FindACMLMP)
include(ARMA_FindACML)
- include(ARMA_FindOpenBLAS)
include(ARMA_FindATLAS)
- include(ARMA_FindBLAS)
- include(ARMA_FindLAPACK)
+ find_package(BLAS)
+ find_package(LAPACK)
message(STATUS " MKL_FOUND = ${MKL_FOUND}" )
message(STATUS " ACMLMP_FOUND = ${ACMLMP_FOUND}" )

33
ports/asio/CMakeLists.txt Normal file
View File

@ -0,0 +1,33 @@
cmake_minimum_required(VERSION 3.8)
project(asio)
add_library(asio INTERFACE)
# Always use "ASIO_STANDALONE" to avoid boost dependency
file(READ "asio/include/asio/detail/config.hpp" _contents)
string(REPLACE "defined(ASIO_STANDALONE)" "!defined(VCPKG_DISABLE_ASIO_STANDALONE)" _contents "${_contents}")
file(WRITE "asio/include/asio/detail/config.hpp" "${_contents}")
# Export target
install(TARGETS asio
EXPORT asio
INCLUDES DESTINATION include/
)
install(EXPORT asio
DESTINATION "share/asio"
FILE asio-targets.cmake
)
install(DIRECTORY
asio/include/asio
DESTINATION include/
FILES_MATCHING
PATTERN "*.hpp"
PATTERN "*.ipp"
)
install(FILES
asio/include/asio.hpp
DESTINATION include/
)

View File

@ -1,3 +1,3 @@
Source: asio
Version: 1.12.2
Version: 1.12.2-1
Description: Asio is a cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach.

View File

@ -0,0 +1,6 @@
include ("${CMAKE_CURRENT_LIST_DIR}/asio-targets.cmake")
add_library(asio::asio INTERFACE IMPORTED)
target_link_libraries(asio::asio INTERFACE asio)
get_target_property(_ASIO_INCLUDE_DIR asio INTERFACE_INCLUDE_DIRECTORIES)
set(ASIO_INCLUDE_DIR "${_ASIO_INCLUDE_DIR}")

View File

@ -9,13 +9,21 @@ vcpkg_from_github(
HEAD_REF master
)
# CMake install
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH "share/asio")
file(INSTALL
${CMAKE_CURRENT_LIST_DIR}/asio-config.cmake
DESTINATION ${CURRENT_PACKAGES_DIR}/share/asio/
)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/asio/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
# Copy the asio header files
file(INSTALL ${SOURCE_PATH}/asio/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp" PATTERN "*.ipp")
# Always use "ASIO_STANDALONE" to avoid boost dependency
file(READ "${CURRENT_PACKAGES_DIR}/include/asio/detail/config.hpp" _contents)
string(REPLACE "defined(ASIO_STANDALONE)" "!defined(VCPKG_DISABLE_ASIO_STANDALONE)" _contents "${_contents}")
file(WRITE "${CURRENT_PACKAGES_DIR}/include/asio/detail/config.hpp" "${_contents}")

View File

@ -1,4 +1,4 @@
Source: assimp
Version: 4.1.0-4
Version: 4.1.0-5
Description: The Open Asset import library
Build-Depends: zlib, rapidjson

View File

@ -9,6 +9,7 @@ vcpkg_from_github(
PATCHES
dont-overwrite-prefix-path.patch
uninitialized-variable.patch
remove-useless-path.patch
)
file(REMOVE ${SOURCE_PATH}/cmake-modules/FindZLIB.cmake)
@ -26,19 +27,14 @@ vcpkg_configure_cmake(
-DASSIMP_BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-DASSIMP_BUILD_ASSIMP_TOOLS=OFF
-DASSIMP_INSTALL_PDB=OFF
-DZLIB_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include
-DZLIB_FOUND=1
OPTIONS_RELEASE
-DZLIB_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/zlib.lib
-DZLIB_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/zlib.lib
OPTIONS_DEBUG
-DZLIB_LIBRARIES=${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib
-DZLIB_LIBRARY=${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib
#-DSYSTEM_IRRXML=ON # Wait for the built-in irrxml to synchronize with port irrlich, add dependencies and enable this macro
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/assimp-4.1")
FILE(GLOB lib_cmake_directories RELATIVE "${CURRENT_PACKAGES_DIR}" "${CURRENT_PACKAGES_DIR}/lib/cmake/assimp-*")
list(GET lib_cmake_directories 0 lib_cmake_directory)
vcpkg_fixup_cmake_targets(CONFIG_PATH "${lib_cmake_directory}")
vcpkg_copy_pdbs()
@ -51,8 +47,13 @@ string(REPLACE "get_filename_component(ASSIMP_ROOT_DIR \"\${_PREFIX}\" PATH)"
"set(ASSIMP_ROOT_DIR \${_PREFIX})" ASSIMP_CONFIG ${ASSIMP_CONFIG})
if(WIN32)
string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})"
"set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES}.lib debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/\${ASSIMP_LIBRARIES}d.lib)" ASSIMP_CONFIG ${ASSIMP_CONFIG})
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})"
"set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES}.lib debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/\${ASSIMP_LIBRARIES}d.lib)" ASSIMP_CONFIG ${ASSIMP_CONFIG})
else()
string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})"
"set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/\${ASSIMP_LIBRARIES}.lib \${ASSIMP_LIBRARY_DIRS}/IrrXML.lib debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/\${ASSIMP_LIBRARIES}d.lib \${ASSIMP_LIBRARY_DIRS}/../debug/lib/IrrXMLd.lib)" ASSIMP_CONFIG ${ASSIMP_CONFIG})
endif()
else()
string(REPLACE "set( ASSIMP_LIBRARIES \${ASSIMP_LIBRARIES})"
"set( ASSIMP_LIBRARIES optimized \${ASSIMP_LIBRARY_DIRS}/lib\${ASSIMP_LIBRARIES}.a \${ASSIMP_LIBRARY_DIRS}/libIrrXML.a \${ASSIMP_LIBRARY_DIRS}/libz.a debug \${ASSIMP_LIBRARY_DIRS}/../debug/lib/lib\${ASSIMP_LIBRARIES}d.a \${ASSIMP_LIBRARY_DIRS}/../debug/lib/libIrrXMLd.a \${ASSIMP_LIBRARY_DIRS}/../debug/lib/libz.a)" ASSIMP_CONFIG ${ASSIMP_CONFIG})

View File

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a20cee..4fcb8dd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -108,7 +108,6 @@ if (WIN32)
endif()
IF(MSVC)
- SET (CMAKE_PREFIX_PATH "D:\\libs\\devil")
OPTION( ASSIMP_INSTALL_PDB
"Install MSVC debug files."
ON

View File

@ -1,4 +1,5 @@
Source: autobahn
Version: 18.4.1
Build-Depends: websocketpp, msgpack, boost-asio, boost-thread
Description: WAMP for C++ in Boost/Asio https://crossbar.io/autobahn
Description: WAMP for C++ in Boost/Asio
Homepage: https://crossbar.io/autobahn

View File

@ -1,4 +1,4 @@
Source: avro-c
Version: 1.8.2-1
Version: 1.8.2-2
Description: Apache Avro is a data serialization system
Build-Depends: jansson, liblzma, zlib

View File

@ -0,0 +1,20 @@
diff --git a/lang/c/src/CMakeLists.txt b/lang/c/src/CMakeLists.txt
index c21f1ce..accb0e3 100644
--- a/lang/c/src/CMakeLists.txt
+++ b/lang/c/src/CMakeLists.txt
@@ -85,13 +85,13 @@ source_group(Avro FILES ${AVRO_SRC})
string(REPLACE ":" "." LIBAVRO_DOT_VERSION ${LIBAVRO_VERSION})
add_library(avro-static STATIC ${AVRO_SRC})
-target_link_libraries(avro-static ${JANSSON_LIBRARIES} ${CODEC_LIBRARIES} ${THREADS_LIBRARIES})
+target_link_libraries(avro-static jansson::jansson ${CODEC_LIBRARIES} ${THREADS_LIBRARIES})
set_target_properties(avro-static PROPERTIES OUTPUT_NAME avro)
if (NOT WIN32)
# TODO: Create Windows DLLs. See http://www.cmake.org/Wiki/BuildingWinDLL
add_library(avro-shared SHARED ${AVRO_SRC})
-target_link_libraries(avro-shared ${JANSSON_LIBRARIES} ${CODEC_LIBRARIES} ${THREADS_LIBRARIES})
+target_link_libraries(avro-shared jansson::jansson ${CODEC_LIBRARIES} ${THREADS_LIBRARIES})
set_target_properties(avro-shared PROPERTIES
OUTPUT_NAME avro
SOVERSION ${LIBAVRO_DOT_VERSION})

View File

@ -13,14 +13,12 @@ vcpkg_from_github(
REF release-1.8.2
SHA512 a48cc353aadd45ad2c8593bf89ec3f1ddb0fcd364b79dd002a60a54d49cab714b46eee8bd6dc47b13588b9eead49c754dfe05f6aff735752fca8d2cd35ae8649
HEAD_REF master
PATCHES
avro.patch
avro-pr-217.patch
fix-build-error.patch # Since jansson updated, use jansson::jansson instead of the macro ${JANSSON_LIBRARIES}
)
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/avro.patch
${CMAKE_CURRENT_LIST_DIR}/avro-pr-217.patch)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/lang/c
PREFER_NINJA

View File

@ -1,3 +1,3 @@
Source: aws-c-common
Version: 0.3.0
Version: 0.3.11
Description: AWS common library for C

View File

@ -0,0 +1,20 @@
diff --git a/cmake/AwsCFlags.cmake b/cmake/AwsCFlags.cmake
index 5ceb11c..9d0aa12 100644
--- a/cmake/AwsCFlags.cmake
+++ b/cmake/AwsCFlags.cmake
@@ -38,15 +38,6 @@ function(aws_set_common_properties target)
# Disable unknown pragma warnings
list(APPEND AWS_C_FLAGS /wd4068)
- string(TOUPPER "${CMAKE_BUILD_TYPE}" _CMAKE_BUILD_TYPE)
- if(STATIC_CRT)
- string(REPLACE "/MD" "/MT" _FLAGS "${CMAKE_C_FLAGS_${_CMAKE_BUILD_TYPE}}")
- else()
- string(REPLACE "/MT" "/MD" _FLAGS "${CMAKE_C_FLAGS_${_CMAKE_BUILD_TYPE}}")
- endif()
- string(REPLACE " " ";" _FLAGS "${_FLAGS}")
- list(APPEND AWS_C_FLAGS "${_FLAGS}")
-
else()
list(APPEND AWS_C_FLAGS -Wall -Werror -Wstrict-prototypes)

View File

@ -0,0 +1,13 @@
diff --git a/include/aws/common/byte_buf.h b/include/aws/common/byte_buf.h
index 545b06d..c579c82 100644
--- a/include/aws/common/byte_buf.h
+++ b/include/aws/common/byte_buf.h
@@ -21,6 +21,8 @@
#include <string.h>
+#pragma warning(disable: 4068)
+
/**
* Represents a length-delimited binary string or buffer. If byte buffer points
* to constant memory or memory that should otherwise not be freed by this

View File

@ -3,9 +3,12 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO awslabs/aws-c-common
REF v0.3.0
SHA512 604b4289f19be662f15dc5ba80c20b78856975332b485796f979580e45f8d778eb8ce0cc2c02dcbaf27bc1159f473e02676cd951b674b7c8478ed26438a04541
REF v0.3.11
SHA512 da845f748aecfff61209f542f4eac8d46738af52ce980d5c8315397f859429dfd9e4bf989ddf2fbe938d1efb33dce9c531c92cbe53388b1d1082d5caa97e8750
HEAD_REF master
PATCHES
fix-dependencey-build-error.patch # This patch fixes dependency port compilation failure
disable-internal-crt-option.patch # Disable internal crt option because vcpkg contains crt processing flow
)
vcpkg_configure_cmake(

View File

@ -1,5 +1,5 @@
Source: azure-c-shared-utility
Version: 2019-05-16
Version: 2019-05-16.1
Description: Azure C SDKs common code
Build-Depends: curl (linux), openssl (linux), azure-macro-utils-c, umock-c

View File

@ -6,8 +6,8 @@ if("public-preview" IN_LIST FEATURES)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-c-shared-utility
REF bc83cba1230e98988ae5cd2328f4dcf8c49d5866
SHA512 48947709f9c07c8a910d40066a52b746f9ab15543837f44207b787674efd2b11e7a7eb849c88e20984f0e2141e5611f6d6edea39c8b82687f371c08ab274bd7b
REF f0642196af85aeb4f2717d9cc11176290f321fb8
SHA512 fd8ee6e2be11c13f7388e57eb9c98397b6cb026ca370131db55b6118908701cdff2a1eaabb89bfe84591d6ee17163d06b7b86ad615216203bcbf0c8595d45452
HEAD_REF master
PATCHES no-double-expand-cmake.patch
)

View File

@ -1,5 +1,5 @@
Source: azure-iot-sdk-c
Version: 2019-05-16
Version: 2019-05-16.1
Build-Depends: azure-uamqp-c, azure-umqtt-c, azure-c-shared-utility, parson, azure-uhttp-c, azure-macro-utils-c, umock-c
Description: A C99 SDK for connecting devices to Microsoft Azure IoT services

View File

@ -6,8 +6,8 @@ if("public-preview" IN_LIST FEATURES)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-iot-sdk-c
REF 68d9964daa3e6754f6f8d98bbbd637b0967d4d29
SHA512 5492ab06ae3686c7a167d63620d6ca00024dd52d46627d7958569f1ec0cfca1b56151d54b8c7975f127f655018c10e830747ef84a0cdc66a44e903e25b2dc985
REF f3f9538960d9b29033e52522dd63e985ba970504
SHA512 f8ce98d62425da4bec1c9e99b7b662a615d90a9407e03f7ce31a56fb8848f6bda1a39156bbabf351383e490dc3438d842136220dcf08efb1560e21d9ac76a0ba
HEAD_REF public-preview
PATCHES improve-external-deps.patch
)

View File

@ -1,5 +1,5 @@
Source: azure-macro-utils-c
Version: 2019-05-16
Version: 2019-05-16.1
Description: A library of macros for the Azure IoT SDK Suite
Build-Depends:

View File

@ -2,4 +2,5 @@ Source: azure-storage-cpp
Version: 6.1.0
Build-Depends: cpprestsdk[core], atlmfc (windows), boost-log (!windows&!uwp), boost-locale (!windows&!uwp), libxml2 (!windows&!uwp), libuuid (!windows&!uwp&!osx), gettext
Description: Microsoft Azure Storage Client SDK for C++
A client library for working with Microsoft Azure storage services including blobs, files, tables, and queues. This client library enables working with the Microsoft Azure storage services which include the blob service for storing binary and text data, the file service for storing binary and text data, the table service for storing structured non-relational data, and the queue service for storing messages that may be accessed by a client. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/
A client library for working with Microsoft Azure storage services including blobs, files, tables, and queues. This client library enables working with the Microsoft Azure storage services which include the blob service for storing binary and text data, the file service for storing binary and text data, the table service for storing structured non-relational data, and the queue service for storing messages that may be accessed by a client.
Homepage: http://blogs.msdn.com/b/windowsazurestorage/

View File

@ -1,5 +1,5 @@
Source: azure-uamqp-c
Version: 2019-05-16
Version: 2019-05-16.1
Build-Depends: azure-c-shared-utility, azure-macro-utils-c, umock-c
Description: AMQP library for C

View File

@ -6,8 +6,8 @@ if("public-preview" IN_LIST FEATURES)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-uamqp-c
REF 13f009ddd50a2837f651b0237de17db5f24c3af9
SHA512 649e1826c02a25c57031e1cf1ae92ff15f7caadd064d1dff4aa4ee579598af58ae03f778138cdf26918c1500ca1b8678a6f88c0ae24fd6fca37dab7b81b34984
REF 5ceebf6ec8d1973cfa80804077c7cef23d3b36af
SHA512 6dc7ffc386339db54ff387760119ae5ffd564642cd18d0dc177e6302167cc3b40bdd0f4d9e50478db8d2760166b15058b53b9eb2d1c160f234693a59ac762a75
HEAD_REF master
)
else()

View File

@ -1,5 +1,5 @@
Source: azure-uhttp-c
Version: 2019-05-16
Version: 2019-05-16.1
Build-Depends: azure-c-shared-utility, azure-macro-utils-c, umock-c
Description: Azure HTTP Library written in C

View File

@ -6,8 +6,8 @@ if("public-preview" IN_LIST FEATURES)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-uhttp-c
REF 43dce924b32818f8ab851f972cffebc204edc5c4
SHA512 0e5e9e7dac0c8a1a01cea2fd9ef068f988ad3453f978957cbcb009126637fe5810001e273e7b300b4540914705a89250d96df652c4bb2c7f5348cd8ce7240d70
REF b8976adff02e543fc00e7db59eae9ce78dd014fe
SHA512 65ddccc07831309c4f3f8546bb1a45a6eff84674013311a15c99389d4fc33eaf2ef3da6c7c8e4bb03d32955d12c978190e7badb597379a9fefda4ebcf18827ec
HEAD_REF master
)
else()

View File

@ -1,5 +1,5 @@
Source: azure-umqtt-c
Version: 2019-05-16
Version: 2019-05-16.1
Build-Depends: azure-c-shared-utility, azure-macro-utils-c, umock-c
Description: General purpose library for communication over the mqtt protocol

View File

@ -6,8 +6,8 @@ if("public-preview" IN_LIST FEATURES)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Azure/azure-umqtt-c
REF ea9f6112d002bdff55c94df327bc7effc8393c78
SHA512 68fdc22eb07d32cb9cf489d878db3be8326225e3a067153af7b9e29eabc8ee25162507b7e8921b71b83d42703d5a3d8e040f4a9e61a19540789432e2cecb782f
REF c37883fbb05218fd940b87899a116af240f90c40
SHA512 21bbe6dfafcc96d35775ab83a75334fbfd41a55a82a7da483d5ff179aa3792424851f250007c9603ef17c789d8b23b1a8b81580fc2cf793fd00b487c321fdba3
HEAD_REF master
)
else()

View File

@ -0,0 +1,257 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8d386ca5..b94d6358 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,6 +27,10 @@ include(CTest)
cmake_minimum_required(VERSION 3.1)
+# Customize CMake options by passing "-D<OPTION_NAME>=ON|OFF" in your command line
+option(build_cord "Install cord" ON)
+option(build_tests "Install library tests" ON)
+option(install_headers "Install header files" ON)
option(enable_threads "TODO" OFF) #TODO Support it
option(enable_parallel_mark "Parallelize marking and free list construction" ON)
option(enable_thread_local_alloc "Turn on thread-local allocation optimization" ON)
@@ -52,22 +56,13 @@ add_definitions("-DALL_INTERIOR_POINTERS -DNO_EXECUTE_PERMISSION")
if (APPLE)
if ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "")
- set(CMAKE_OSX_ARCHITECTURES "ppc;i386;x86_64"
+ set(CMAKE_OSX_ARCHITECTURES "x86_64;i386"
CACHE STRING "Build architectures for Mac OS X" FORCE)
endif()
-elseif (WIN32)
+elseif (MSVC)
add_definitions("-D_CRT_SECURE_NO_DEPRECATE")
endif()
-#LIBATOMIC #TODO
-#ADD_LIBRARY(atomic_ops STATIC )
-#SET_TARGET_PROPERTIES(atomic_ops PROPERTIES COMPILE_FLAGS -DNO_DEBUGGING)
-
-
-#LIBGC
-
-include_directories(include)
-include_directories(libatomic_ops/src)
set(SRC alloc.c reclaim.c allchblk.c misc.c mach_dep.c os_dep.c
mark_rts.c headers.c mark.c obj_map.c blacklst.c finalize.c
@@ -82,12 +77,6 @@ if (enable_threads)
set(LIBS ${LIBS} ${Threads_LIBRARIES})
endif()
-#IF(Threads_FOUND)
-# ADD_DEFINITIONS("")
-#ELSE
-# MESSAGE("Parallel mark requires enable_threads ON" )
-#ENDIF(Threads_FOUND)
-
if (enable_cplusplus)
set(SRC ${SRC} gc_cpp.cc)
endif()
@@ -141,7 +130,7 @@ if (CMAKE_USE_PTHREADS_INIT)
if (enable_parallel_mark)
add_definitions("-DHANDLE_FORK")
endif()
- endif(enable_handle_fork)
+ endif()
set(SRC ${SRC} darwin_stop_world.c)
#TODO darwin_threads=true
endif()
@@ -158,10 +147,10 @@ if (CMAKE_USE_WIN32_THREADS_INIT)
add_definitions("-DTHREAD_LOCAL_ALLOC")
set(SRC ${SRC} thread_local_alloc.c)
endif()
- endif(enable_parallel_mark)
+ endif()
add_definitions("-DEMPTY_GETENV_RESULTS")
set(SRC ${SRC} win32_threads.c)
-endif(CMAKE_USE_WIN32_THREADS_INIT)
+endif()
if (enable_gcj_support)
add_definitions("-DGC_GCJ_SUPPORT")
@@ -169,7 +158,7 @@ if (enable_gcj_support)
add_definitions("-DGC_ENABLE_SUSPEND_THREAD")
endif()
set(SRC ${SRC} gcj_mlc.c)
-endif(enable_gcj_support)
+endif()
if (enable_disclaim)
add_definitions("-DENABLE_DISCLAIM")
@@ -195,7 +184,7 @@ if (enable_gc_debug)
add_definitions("-DMAKE_BACK_GRAPH")
set(SRC ${SRC} backgraph.c)
endif()
-endif(enable_gc_debug)
+endif()
if (enable_redirect_malloc)
if (enable_gc_debug)
@@ -206,7 +195,7 @@ if (enable_redirect_malloc)
add_definitions("-DREDIRECT_MALLOC=GC_malloc")
endif()
add_definitions("-DGC_USE_DLOPEN_WRAP")
-endif(enable_redirect_malloc)
+endif()
if (enable_munmap)
add_definitions("-DUSE_MMAP -DUSE_MUNMAP")
@@ -240,19 +229,44 @@ if (enable_checksums)
endif()
add_definitions("-DCHECKSUMS")
set(SRC ${SRC} checksums.c)
-endif(enable_checksums)
-
-add_library(gc-lib STATIC ${SRC})
-set_target_properties(gc-lib PROPERTIES
- COMPILE_DEFINITIONS GC_NOT_DLL)
-#TODO TARGET_LINK_LIBRARIES(... ... ${LIBS})
+endif()
-add_library(gcmt-lib STATIC ${SRC})
-set_target_properties(gcmt-lib PROPERTIES
- COMPILE_DEFINITIONS GC_NOT_DLL)
+# Create target
+add_library(gc ${SRC})
+target_include_directories(gc
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+ $<INSTALL_INTERFACE:include>
+)
+if (NOT BUILD_SHARED_LIBS)
+ target_compile_definitions(gc PRIVATE GC_NOT_DLL)
+else()
+ target_compile_definitions(gc PRIVATE GC_DLL)
+endif()
-add_library(gcmt-dll SHARED ${SRC})
+# Install library
+install(
+ TARGETS gc
+ EXPORT gcExports
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ INCLUDES DESTINATION include
+)
+
+# Install headers
+if (install_headers)
+ file(GLOB BDWGC_HEADERS "include/*.h")
+ install(FILES ${BDWGC_HEADERS} DESTINATION include/gc)
+
+ file(GLOB BDWGC_EXTRA_HEADERS "include/extra/*.h")
+ install(FILES ${BDWGC_EXTRA_HEADERS} DESTINATION include)
+endif()
-add_subdirectory(cord)
+if (build_cord)
+ add_subdirectory(cord)
+endif()
-add_subdirectory(tests)
+if (build_tests)
+ add_subdirectory(tests)
+endif()
diff --git a/cord/CMakeLists.txt b/cord/CMakeLists.txt
index 17077370..21818d4e 100644
--- a/cord/CMakeLists.txt
+++ b/cord/CMakeLists.txt
@@ -11,11 +11,11 @@
# modified is included with the above copyright notice.
##
+add_executable(cord cordbscs.c cordxtra.c tests/de.c tests/de_win.c)
+set_target_properties(cord PROPERTIES COMPILE_DEFINITIONS GC_NOT_DLL)
+target_link_libraries(cord PRIVATE gc)
+
if (WIN32)
- add_executable(cord cordbscs.c cordxtra.c
- tests/de.c tests/de_win.c)
set_target_properties(cord PROPERTIES WIN32_EXECUTABLE TRUE)
- set_target_properties(cord PROPERTIES COMPILE_DEFINITIONS GC_NOT_DLL)
- target_link_libraries(cord gc-lib)
- target_link_libraries(cord gdi32)
+ target_link_libraries(cord PRIVATE gdi32)
endif()
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index c6bcc7d7..32a021e7 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -14,8 +14,6 @@
# modified is included with the above copyright notice.
##
-add_definitions("-DGC_NOT_DLL")
-
# Compile some tests as C++ to test extern "C" in header files.
if (enable_cplusplus)
set_source_files_properties(leak_test.c test.c
@@ -23,51 +21,51 @@ if (enable_cplusplus)
endif()
add_executable(gctest WIN32 test.c)
-target_link_libraries(gctest gc-lib)
+target_link_libraries(gctest PRIVATE gc)
add_test(NAME gctest COMMAND gctest)
add_executable(hugetest huge_test.c)
-target_link_libraries(hugetest gc-lib)
+target_link_libraries(hugetest PRIVATE gc)
add_test(NAME hugetest COMMAND hugetest)
add_executable(leaktest leak_test.c)
-target_link_libraries(leaktest gc-lib)
+target_link_libraries(leaktest PRIVATE gc)
add_test(NAME leaktest COMMAND leaktest)
add_executable(middletest middle.c)
-target_link_libraries(middletest gc-lib)
+target_link_libraries(middletest PRIVATE gc)
add_test(NAME middletest COMMAND middletest)
add_executable(realloc_test realloc_test.c)
-target_link_libraries(realloc_test gc-lib)
+target_link_libraries(realloc_test PRIVATE gc)
add_test(NAME realloc_test COMMAND realloc_test)
add_executable(smashtest smash_test.c)
-target_link_libraries(smashtest gc-lib)
+target_link_libraries(smashtest PRIVATE gc)
add_test(NAME smashtest COMMAND smashtest)
if (enable_gc_debug)
add_executable(tracetest trace_test.c)
- target_link_libraries(tracetest gc-lib)
+ target_link_libraries(tracetest PRIVATE gc)
add_test(NAME tracetest COMMAND tracetest)
endif()
if (enable_cplusplus)
# TODO add_executable(test_cpp test_cpp.cc)
- # target_link_libraries(test_cpp gc-lib)
+ # target_link_libraries(test_cpp PRIVATE gc)
# add_test(NAME test_cpp COMMAND test_cpp)
endif()
if (enable_disclaim)
add_executable(disclaim_bench disclaim_bench.c)
- target_link_libraries(disclaim_bench gc-lib)
+ target_link_libraries(disclaim_bench PRIVATE gc)
add_test(NAME disclaim_bench COMMAND disclaim_bench)
add_executable(disclaim_test disclaim_test.c)
- target_link_libraries(disclaim_test gc-lib)
+ target_link_libraries(disclaim_test PRIVATE gc)
add_test(NAME disclaim_test COMMAND disclaim_test)
add_executable(disclaim_weakmap_test disclaim_weakmap_test.c)
- target_link_libraries(disclaim_weakmap_test gc-lib)
+ target_link_libraries(disclaim_weakmap_test PRIVATE gc)
add_test(NAME disclaim_weakmap_test COMMAND disclaim_weakmap_test)
endif()

3
ports/bdwgc/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: bdwgc
Version: 8.0.4-1
Description: The Boehm-Demers-Weiser conservative C/C++ Garbage Collector (libgc, bdwgc, boehm-gc)

View File

@ -0,0 +1,31 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ivmai/bdwgc
# REF v8.0.4
# SHA512 f3c178c9cab9d9df9ecdad5ac5661c916518d29b0eaca24efe569cb757c386c118ad4389851107597d99ff1bbe99b46383cce73dfd01be983196aa57c9626a4a
REF 0c8905e84d16bd5e14ed91e21904fd7ab9d197e2
SHA512 b38fe86d0dfaacd502971e39ea7df83a3dbf5542711f6b0462b7a6d48dbcf43da07a41a60ee96bca6403a2d2adaac0815a64667f3c80549ca57c5ebbe0e9672d
HEAD_REF master
PATCHES
001-install-libraries.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-Dbuild_tests=OFF
-Dbuild_cord=OFF
OPTIONS_DEBUG
-Dinstall_headers=OFF
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/README.QUICK DESTINATION ${CURRENT_PACKAGES_DIR}/share/bdwgc RENAME copyright)

View File

@ -9,8 +9,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/benchmark
REF v1.5
SHA512 a57122340c4f9a8e434ec70098916aef7c49d5d8312a30e4753f54bacc1099b146698b66c12f9ef116f7cadc93c604809a905c0e259aecf63aa2553390a1b609
REF v1.5.0
SHA512 a0df9aa3d03f676e302c76d83b436de36eea0a8517ab50a8f5a11c74ccc68a1f5128fa02474901002d8e6b5a4d290ef0272a798ff4670eab3e2d78dc86bb6cd3
HEAD_REF master
)

View File

@ -1,3 +1,3 @@
Source: berkeleydb
Version: 4.8.30-2
Description: A high-performance embedded database for key/value data.
Description: BDB - A high-performance embedded database for key/value data.

View File

@ -1,4 +1,4 @@
Source: blaze
Version: 3.5
Build-Depends: clapack, boost-exception
Build-Depends: clapack (!osx), boost-exception
Description: Blaze is an open-source, high-performance C++ math library for dense and sparse arithmetic.

View File

@ -1,5 +1,6 @@
Source: bond
Maintainer: bond@microsoft.com
Version: 7.0.2-2
Description: Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services. <https://github.com/Microsoft/bond>
Description: Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services.
Homepage: https://github.com/Microsoft/bond
Build-Depends: rapidjson, boost-config, boost-utility, boost-assign

View File

@ -1,5 +1,5 @@
# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-thread
Version: 1.70.0
Version: 1.70.0-1
Build-Depends: boost-algorithm, boost-assert, boost-atomic, boost-bind, boost-build, boost-chrono, boost-concept-check, boost-config, boost-container, boost-container-hash, boost-core, boost-date-time, boost-detail, boost-exception, boost-function, boost-integer, boost-intrusive, boost-io, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-optional, boost-predef, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi
Description: Boost thread module

View File

@ -1,13 +1,13 @@
diff --git a/include/boost/thread/win32/thread_primitives.hpp b/include/boost/thread/win32/thread_primitives.hpp
index 5e378f7..6144621 100644
--- a/include/boost/thread/win32/thread_primitives.hpp
+++ b/include/boost/thread/win32/thread_primitives.hpp
@@ -70,7 +70,7 @@ namespace boost
{
namespace win32
{
- namespace detail { typedef ticks_type (WINAPI *gettickcount64_t)(); }
+ namespace detail { typedef ticks_type (__stdcall *gettickcount64_t)(); }
extern BOOST_THREAD_DECL boost::detail::win32::detail::gettickcount64_t gettickcount64;
enum event_type
diff --git a/include/boost/thread/win32/thread_primitives.hpp b/include/boost/thread/win32/thread_primitives.hpp
index e075140..d60ab36 100644
--- a/include/boost/thread/win32/thread_primitives.hpp
+++ b/include/boost/thread/win32/thread_primitives.hpp
@@ -70,7 +70,7 @@ namespace boost
{
namespace win32
{
- namespace detail { typedef ticks_type (BOOST_WINAPI_WINAPI_CC *gettickcount64_t)(); }
+ namespace detail { typedef ticks_type (__stdcall *gettickcount64_t)(); }
extern BOOST_THREAD_DECL boost::detail::win32::detail::gettickcount64_t gettickcount64;
enum event_type

View File

@ -1,3 +1,4 @@
Source: box2d
Version: 2.3.1-374664b-2
Description: Box2D (http://box2d.org) is an open source C++ engine for simulating rigid bodies in 2D.
Description: An open source C++ engine for simulating rigid bodies in 2D.
Homepage: http://box2d.org

3
ports/byte-lite/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: byte-lite
Version: 0.2.0
Description: A C++17-like byte type for C++98, C++11 and later in a single-file header-only library

View File

@ -0,0 +1,31 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO martinmoene/byte-lite
REF v0.2.0
SHA512 eefc730a39453dfc367a4478a84d4825cd85721d3c332a57321d0a5c3040a4d45921603ff24220f968dd21df61acea856ae30db8bae6c1e835a1755fb03c84b7
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBYTE_LITE_OPT_BUILD_TESTS=OFF
-DBYTE_LITE_OPT_BUILD_EXAMPLES=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(
CONFIG_PATH lib/cmake/${PORT}
)
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug
${CURRENT_PACKAGES_DIR}/lib
)
file(INSTALL
${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright
)

View File

@ -167,9 +167,6 @@ find_package(Freetype REQUIRED)
find_package(unofficial-glib CONFIG REQUIRED)
find_package(unofficial-fontconfig CONFIG REQUIRED)
find_package(unofficial-pixman CONFIG REQUIRED)
if(APPLE)
find_package(Threads REQUIRED)
endif()
# Cairo needs to be told which features of FreeType are availible
add_definitions(
@ -193,7 +190,11 @@ endif()
add_library(cairo ${SOURCES})
target_link_libraries(cairo PRIVATE gdi32 msimg32 user32 ZLIB::ZLIB PNG::PNG Freetype::Freetype unofficial::pixman::pixman-1 unofficial::fontconfig::fontconfig)
target_link_libraries(cairo PRIVATE ZLIB::ZLIB PNG::PNG Freetype::Freetype unofficial::pixman::pixman-1 unofficial::fontconfig::fontconfig)
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_link_libraries(cairo PRIVATE gdi32 msimg32 user32)
endif()
# GObject support module

View File

@ -1,4 +1,4 @@
Source: cairo
Version: 1.16.0
Version: 1.16.0-1
Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
Build-Depends: zlib, libpng, pixman, glib, freetype, fontconfig

View File

@ -5,8 +5,10 @@
*/
/* Always for Win32 */
#ifdef _WIN32
#define CAIRO_HAS_WIN32_SURFACE 1
#define CAIRO_HAS_WIN32_FONT 1
#endif
/* Require libpng */
#define CAIRO_HAS_PNG_FUNCTIONS 1

View File

@ -1,4 +1,5 @@
Source: capnproto
Version: 0.7.0-1
Description: Data interchange format and capability-based RPC system https://capnproto.org/
Description: Data interchange format and capability-based RPC system
Homepage: https://capnproto.org/
Build-Depends: zlib

View File

@ -1,4 +1,4 @@
Source: catch2
Version: 2.7.2
Description: A modern, header-only test framework for unit testing.
Issues, PRs and changelogs can be found at https://github.com/catchorg/Catch2
Homepage: https://github.com/catchorg/Catch2

View File

@ -1,3 +1,3 @@
Source: celero
Version: 2.4.0-1
Version: 2.5.0-1
Description: Celero is a modern cross-platform (Windows, Linux, MacOS) Microbenchmarking library for C++.

View File

@ -3,8 +3,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO DigitalInBlue/Celero
REF 9f41c21e35b04d7d65dcb0aff4c962f6e5f2cbc3
SHA512 62a4803e61cf9e876c09cc68be07d4bfa31f291d3ced23e092347bf43b48086b3ba7862fc454082f42263d9ec0c260e8ba58da5c0c461ebff9c871209784e2a7
REF 6f24a1d98db4fee41ddd2f615cf490a5b514795a
SHA512 7dc8cecd2aac7bd312bfa01013f290fbfac8a43d07cc0d884e9b446c29a6c233e800f9bd3d03551f6e3b1ee2424cf90571f16590b23fc9333900fcc82143d048
HEAD_REF master
)

View File

@ -1,949 +0,0 @@
diff --git a/cmake/FindGflags.cmake b/cmake/FindGflags.cmake
deleted file mode 100644
index 32c04ea..0000000
--- a/cmake/FindGflags.cmake
+++ /dev/null
@@ -1,591 +0,0 @@
-# Ceres Solver - A fast non-linear least squares minimizer
-# Copyright 2015 Google Inc. All rights reserved.
-# http://ceres-solver.org/
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# * Redistributions of source code must retain the above copyright notice,
-# this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following disclaimer in the documentation
-# and/or other materials provided with the distribution.
-# * Neither the name of Google Inc. nor the names of its contributors may be
-# used to endorse or promote products derived from this software without
-# specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-# Author: alexs.mac@gmail.com (Alex Stewart)
-#
-
-# FindGflags.cmake - Find Google gflags logging library.
-#
-# This module will attempt to find gflags, either via an exported CMake
-# configuration (generated by gflags >= 2.1 which are built with CMake), or
-# by performing a standard search for all gflags components. The order of
-# precedence for these two methods of finding gflags is controlled by:
-# GFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION.
-#
-# This module defines the following variables:
-#
-# GFLAGS_FOUND: TRUE iff gflags is found.
-# GFLAGS_INCLUDE_DIRS: Include directories for gflags.
-# GFLAGS_LIBRARIES: Libraries required to link gflags.
-# GFLAGS_NAMESPACE: The namespace in which gflags is defined. In versions of
-# gflags < 2.1, this was google, for versions >= 2.1 it is
-# by default gflags, although can be configured when building
-# gflags to be something else (i.e. google for legacy
-# compatibility).
-# FOUND_INSTALLED_GFLAGS_CMAKE_CONFIGURATION: True iff the version of gflags
-# found was built & installed /
-# exported as a CMake package.
-#
-# The following variables control the behaviour of this module when an exported
-# gflags CMake configuration is not found.
-#
-# GFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION: TRUE/FALSE, iff TRUE then
-# then prefer using an exported CMake configuration
-# generated by gflags >= 2.1 over searching for the
-# gflags components manually. Otherwise (FALSE)
-# ignore any exported gflags CMake configurations and
-# always perform a manual search for the components.
-# Default: TRUE iff user does not define this variable
-# before we are called, and does NOT specify either
-# GFLAGS_INCLUDE_DIR_HINTS or GFLAGS_LIBRARY_DIR_HINTS
-# otherwise FALSE.
-# GFLAGS_INCLUDE_DIR_HINTS: List of additional directories in which to
-# search for gflags includes, e.g: /timbuktu/include.
-# GFLAGS_LIBRARY_DIR_HINTS: List of additional directories in which to
-# search for gflags libraries, e.g: /timbuktu/lib.
-#
-# The following variables are also defined by this module, but in line with
-# CMake recommended FindPackage() module style should NOT be referenced directly
-# by callers (use the plural variables detailed above instead). These variables
-# do however affect the behaviour of the module via FIND_[PATH/LIBRARY]() which
-# are NOT re-called (i.e. search for library is not repeated) if these variables
-# are set with valid values _in the CMake cache_. This means that if these
-# variables are set directly in the cache, either by the user in the CMake GUI,
-# or by the user passing -DVAR=VALUE directives to CMake when called (which
-# explicitly defines a cache variable), then they will be used verbatim,
-# bypassing the HINTS variables and other hard-coded search locations.
-#
-# GFLAGS_INCLUDE_DIR: Include directory for gflags, not including the
-# include directory of any dependencies.
-# GFLAGS_LIBRARY: gflags library, not including the libraries of any
-# dependencies.
-
-# Reset CALLERS_CMAKE_FIND_LIBRARY_PREFIXES to its value when FindGflags was
-# invoked, necessary for MSVC.
-macro(GFLAGS_RESET_FIND_LIBRARY_PREFIX)
- if (MSVC AND CALLERS_CMAKE_FIND_LIBRARY_PREFIXES)
- set(CMAKE_FIND_LIBRARY_PREFIXES "${CALLERS_CMAKE_FIND_LIBRARY_PREFIXES}")
- endif()
-endmacro(GFLAGS_RESET_FIND_LIBRARY_PREFIX)
-
-# Called if we failed to find gflags or any of it's required dependencies,
-# unsets all public (designed to be used externally) variables and reports
-# error message at priority depending upon [REQUIRED/QUIET/<NONE>] argument.
-macro(GFLAGS_REPORT_NOT_FOUND REASON_MSG)
- unset(GFLAGS_FOUND)
- unset(GFLAGS_INCLUDE_DIRS)
- unset(GFLAGS_LIBRARIES)
- # Do not use unset, as we want to keep GFLAGS_NAMESPACE in the cache,
- # but simply clear its value.
- set(GFLAGS_NAMESPACE "" CACHE STRING
- "gflags namespace (google or gflags)" FORCE)
-
- # Make results of search visible in the CMake GUI if gflags has not
- # been found so that user does not have to toggle to advanced view.
- mark_as_advanced(CLEAR GFLAGS_INCLUDE_DIR
- GFLAGS_LIBRARY
- GFLAGS_NAMESPACE)
-
- gflags_reset_find_library_prefix()
-
- # Note <package>_FIND_[REQUIRED/QUIETLY] variables defined by FindPackage()
- # use the camelcase library name, not uppercase.
- if (Gflags_FIND_QUIETLY)
- message(STATUS "Failed to find gflags - " ${REASON_MSG} ${ARGN})
- elseif (Gflags_FIND_REQUIRED)
- message(FATAL_ERROR "Failed to find gflags - " ${REASON_MSG} ${ARGN})
- else()
- # Neither QUIETLY nor REQUIRED, use no priority which emits a message
- # but continues configuration and allows generation.
- message("-- Failed to find gflags - " ${REASON_MSG} ${ARGN})
- endif ()
- return()
-endmacro(GFLAGS_REPORT_NOT_FOUND)
-
-# Verify that all variable names passed as arguments are defined (can be empty
-# but must be defined) or raise a fatal error.
-macro(GFLAGS_CHECK_VARS_DEFINED)
- foreach(CHECK_VAR ${ARGN})
- if (NOT DEFINED ${CHECK_VAR})
- message(FATAL_ERROR "Ceres Bug: ${CHECK_VAR} is not defined.")
- endif()
- endforeach()
-endmacro(GFLAGS_CHECK_VARS_DEFINED)
-
-# Use check_cxx_source_compiles() to compile trivial test programs to determine
-# the gflags namespace. This works on all OSs except Windows. If using Visual
-# Studio, it fails because msbuild forces check_cxx_source_compiles() to use
-# CMAKE_BUILD_TYPE=Debug for the test project, which usually breaks detection
-# because MSVC requires that the test project use the same build type as gflags,
-# which would normally be built in Release.
-#
-# Defines: GFLAGS_NAMESPACE in the caller's scope with the detected namespace,
-# which is blank (empty string, will test FALSE is CMake conditionals)
-# if detection failed.
-function(GFLAGS_CHECK_GFLAGS_NAMESPACE_USING_TRY_COMPILE)
- # Verify that all required variables are defined.
- gflags_check_vars_defined(
- GFLAGS_INCLUDE_DIR GFLAGS_LIBRARY)
- # Ensure that GFLAGS_NAMESPACE is always unset on completion unless
- # we explicitly set if after having the correct namespace.
- set(GFLAGS_NAMESPACE "" PARENT_SCOPE)
-
- include(CheckCXXSourceCompiles)
- # Setup include path & link library for gflags for CHECK_CXX_SOURCE_COMPILES.
- set(CMAKE_REQUIRED_INCLUDES ${GFLAGS_INCLUDE_DIR})
- set(CMAKE_REQUIRED_LIBRARIES ${GFLAGS_LIBRARY} ${GFLAGS_LINK_LIBRARIES})
- # First try the (older) google namespace. Note that the output variable
- # MUST be unique to the build type as otherwise the test is not repeated as
- # it is assumed to have already been performed.
- check_cxx_source_compiles(
- "#include <gflags/gflags.h>
- int main(int argc, char * argv[]) {
- google::ParseCommandLineFlags(&argc, &argv, true);
- return 0;
- }"
- GFLAGS_IN_GOOGLE_NAMESPACE)
- if (GFLAGS_IN_GOOGLE_NAMESPACE)
- set(GFLAGS_NAMESPACE google PARENT_SCOPE)
- return()
- endif()
-
- # Try (newer) gflags namespace instead. Note that the output variable
- # MUST be unique to the build type as otherwise the test is not repeated as
- # it is assumed to have already been performed.
- set(CMAKE_REQUIRED_INCLUDES ${GFLAGS_INCLUDE_DIR})
- set(CMAKE_REQUIRED_LIBRARIES ${GFLAGS_LIBRARY} ${GFLAGS_LINK_LIBRARIES})
- check_cxx_source_compiles(
- "#include <gflags/gflags.h>
- int main(int argc, char * argv[]) {
- gflags::ParseCommandLineFlags(&argc, &argv, true);
- return 0;
- }"
- GFLAGS_IN_GFLAGS_NAMESPACE)
- if (GFLAGS_IN_GFLAGS_NAMESPACE)
- set(GFLAGS_NAMESPACE gflags PARENT_SCOPE)
- return()
- endif (GFLAGS_IN_GFLAGS_NAMESPACE)
-endfunction(GFLAGS_CHECK_GFLAGS_NAMESPACE_USING_TRY_COMPILE)
-
-# Use regex on the gflags headers to attempt to determine the gflags namespace.
-# Checks both gflags.h (contained namespace on versions < 2.1.2) and
-# gflags_declare.h, which contains the namespace on versions >= 2.1.2.
-# In general, this method should only be used when
-# GFLAGS_CHECK_GFLAGS_NAMESPACE_USING_TRY_COMPILE() cannot be used, or has
-# failed.
-#
-# Defines: GFLAGS_NAMESPACE in the caller's scope with the detected namespace,
-# which is blank (empty string, will test FALSE is CMake conditionals)
-# if detection failed.
-function(GFLAGS_CHECK_GFLAGS_NAMESPACE_USING_REGEX)
- # Verify that all required variables are defined.
- gflags_check_vars_defined(GFLAGS_INCLUDE_DIR)
- # Ensure that GFLAGS_NAMESPACE is always undefined on completion unless
- # we explicitly set if after having the correct namespace.
- set(GFLAGS_NAMESPACE "" PARENT_SCOPE)
-
- # Scan gflags.h to identify what namespace gflags was built with. On
- # versions of gflags < 2.1.2, gflags.h was configured with the namespace
- # directly, on >= 2.1.2, gflags.h uses the GFLAGS_NAMESPACE #define which
- # is defined in gflags_declare.h, we try each location in turn.
- set(GFLAGS_HEADER_FILE ${GFLAGS_INCLUDE_DIR}/gflags/gflags.h)
- if (NOT EXISTS ${GFLAGS_HEADER_FILE})
- gflags_report_not_found(
- "Could not find file: ${GFLAGS_HEADER_FILE} "
- "containing namespace information in gflags install located at: "
- "${GFLAGS_INCLUDE_DIR}.")
- endif()
- file(READ ${GFLAGS_HEADER_FILE} GFLAGS_HEADER_FILE_CONTENTS)
-
- string(REGEX MATCH "namespace [A-Za-z]+"
- GFLAGS_NAMESPACE "${GFLAGS_HEADER_FILE_CONTENTS}")
- string(REGEX REPLACE "namespace ([A-Za-z]+)" "\\1"
- GFLAGS_NAMESPACE "${GFLAGS_NAMESPACE}")
-
- if (NOT GFLAGS_NAMESPACE)
- gflags_report_not_found(
- "Failed to extract gflags namespace from header file: "
- "${GFLAGS_HEADER_FILE}.")
- endif (NOT GFLAGS_NAMESPACE)
-
- if (GFLAGS_NAMESPACE STREQUAL "google" OR
- GFLAGS_NAMESPACE STREQUAL "gflags")
- # Found valid gflags namespace from gflags.h.
- set(GFLAGS_NAMESPACE "${GFLAGS_NAMESPACE}" PARENT_SCOPE)
- return()
- endif()
-
- # Failed to find gflags namespace from gflags.h, gflags is likely a new
- # version, check gflags_declare.h, which in newer versions (>= 2.1.2) contains
- # the GFLAGS_NAMESPACE #define, which is then referenced in gflags.h.
- set(GFLAGS_DECLARE_FILE ${GFLAGS_INCLUDE_DIR}/gflags/gflags_declare.h)
- if (NOT EXISTS ${GFLAGS_DECLARE_FILE})
- gflags_report_not_found(
- "Could not find file: ${GFLAGS_DECLARE_FILE} "
- "containing namespace information in gflags install located at: "
- "${GFLAGS_INCLUDE_DIR}.")
- endif()
- file(READ ${GFLAGS_DECLARE_FILE} GFLAGS_DECLARE_FILE_CONTENTS)
-
- string(REGEX MATCH "#define GFLAGS_NAMESPACE [A-Za-z]+"
- GFLAGS_NAMESPACE "${GFLAGS_DECLARE_FILE_CONTENTS}")
- string(REGEX REPLACE "#define GFLAGS_NAMESPACE ([A-Za-z]+)" "\\1"
- GFLAGS_NAMESPACE "${GFLAGS_NAMESPACE}")
-
- if (NOT GFLAGS_NAMESPACE)
- gflags_report_not_found(
- "Failed to extract gflags namespace from declare file: "
- "${GFLAGS_DECLARE_FILE}.")
- endif (NOT GFLAGS_NAMESPACE)
-
- if (GFLAGS_NAMESPACE STREQUAL "google" OR
- GFLAGS_NAMESPACE STREQUAL "gflags")
- # Found valid gflags namespace from gflags.h.
- set(GFLAGS_NAMESPACE "${GFLAGS_NAMESPACE}" PARENT_SCOPE)
- return()
- endif()
-endfunction(GFLAGS_CHECK_GFLAGS_NAMESPACE_USING_REGEX)
-
-# Protect against any alternative find_package scripts for this library having
-# been called previously (in a client project) which set GFLAGS_FOUND, but not
-# the other variables we require / set here which could cause the search logic
-# here to fail.
-unset(GFLAGS_FOUND)
-
-# -----------------------------------------------------------------
-# By default, if the user has expressed no preference for using an exported
-# gflags CMake configuration over performing a search for the installed
-# components, and has not specified any hints for the search locations, then
-# prefer a gflags exported configuration if available.
-if (NOT DEFINED GFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION
- AND NOT GFLAGS_INCLUDE_DIR_HINTS
- AND NOT GFLAGS_LIBRARY_DIR_HINTS)
- message(STATUS "No preference for use of exported gflags CMake configuration "
- "set, and no hints for include/library directories provided. "
- "Defaulting to preferring an installed/exported gflags CMake configuration "
- "if available.")
- set(GFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION TRUE)
-endif()
-
-if (GFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION)
- # Try to find an exported CMake configuration for gflags, as generated by
- # gflags versions >= 2.1.
- #
- # We search twice, s/t we can invert the ordering of precedence used by
- # find_package() for exported package build directories, and installed
- # packages (found via CMAKE_SYSTEM_PREFIX_PATH), listed as items 6) and 7)
- # respectively in [1].
- #
- # By default, exported build directories are (in theory) detected first, and
- # this is usually the case on Windows. However, on OS X & Linux, the install
- # path (/usr/local) is typically present in the PATH environment variable
- # which is checked in item 4) in [1] (i.e. before both of the above, unless
- # NO_SYSTEM_ENVIRONMENT_PATH is passed). As such on those OSs installed
- # packages are usually detected in preference to exported package build
- # directories.
- #
- # To ensure a more consistent response across all OSs, and as users usually
- # want to prefer an installed version of a package over a locally built one
- # where both exist (esp. as the exported build directory might be removed
- # after installation), we first search with NO_CMAKE_PACKAGE_REGISTRY which
- # means any build directories exported by the user are ignored, and thus
- # installed directories are preferred. If this fails to find the package
- # we then research again, but without NO_CMAKE_PACKAGE_REGISTRY, so any
- # exported build directories will now be detected.
- #
- # To prevent confusion on Windows, we also pass NO_CMAKE_BUILDS_PATH (which
- # is item 5) in [1]), to not preferentially use projects that were built
- # recently with the CMake GUI to ensure that we always prefer an installed
- # version if available.
- #
- # [1] http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:find_package
- find_package(gflags QUIET
- NO_MODULE
- NO_CMAKE_PACKAGE_REGISTRY
- NO_CMAKE_BUILDS_PATH)
- if (gflags_FOUND)
- message(STATUS "Found installed version of gflags: ${gflags_DIR}")
- else(gflags_FOUND)
- # Failed to find an installed version of gflags, repeat search allowing
- # exported build directories.
- message(STATUS "Failed to find installed gflags CMake configuration, "
- "searching for gflags build directories exported with CMake.")
- # Again pass NO_CMAKE_BUILDS_PATH, as we know that gflags is exported and
- # do not want to treat projects built with the CMake GUI preferentially.
- find_package(gflags QUIET
- NO_MODULE
- NO_CMAKE_BUILDS_PATH)
- if (gflags_FOUND)
- message(STATUS "Found exported gflags build directory: ${gflags_DIR}")
- endif(gflags_FOUND)
- endif(gflags_FOUND)
-
- set(FOUND_INSTALLED_GFLAGS_CMAKE_CONFIGURATION ${gflags_FOUND})
-
- # gflags v2.1 - 2.1.2 shipped with a bug in their gflags-config.cmake [1]
- # whereby gflags_LIBRARIES = "gflags", but there was no imported target
- # called "gflags", they were called: gflags[_nothreads]-[static/shared].
- # As this causes linker errors when gflags is not installed in a location
- # on the current library paths, detect if this problem is present and
- # fix it.
- #
- # [1] https://github.com/gflags/gflags/issues/110
- if (gflags_FOUND)
- # NOTE: This is not written as additional conditions in the outer
- # if (gflags_FOUND) as the NOT TARGET "${gflags_LIBRARIES}"
- # condition causes problems if gflags is not found.
- if (${gflags_VERSION} VERSION_LESS 2.1.3 AND
- NOT TARGET "${gflags_LIBRARIES}")
- message(STATUS "Detected broken gflags install in: ${gflags_DIR}, "
- "version: ${gflags_VERSION} <= 2.1.2 which defines gflags_LIBRARIES = "
- "${gflags_LIBRARIES} which is not an imported CMake target, see: "
- "https://github.com/gflags/gflags/issues/110. Attempting to fix by "
- "detecting correct gflags target.")
- # Ordering here expresses preference for detection, specifically we do not
- # want to use the _nothreads variants if the full library is available.
- list(APPEND CHECK_GFLAGS_IMPORTED_TARGET_NAMES
- gflags-shared gflags-static
- gflags_nothreads-shared gflags_nothreads-static)
- foreach(CHECK_GFLAGS_TARGET ${CHECK_GFLAGS_IMPORTED_TARGET_NAMES})
- if (TARGET ${CHECK_GFLAGS_TARGET})
- message(STATUS "Found valid gflags target: ${CHECK_GFLAGS_TARGET}, "
- "updating gflags_LIBRARIES.")
- set(gflags_LIBRARIES ${CHECK_GFLAGS_TARGET})
- break()
- endif()
- endforeach()
- if (NOT TARGET ${gflags_LIBRARIES})
- message(STATUS "Failed to fix detected broken gflags install in: "
- "${gflags_DIR}, version: ${gflags_VERSION} <= 2.1.2, none of the "
- "imported targets for gflags: ${CHECK_GFLAGS_IMPORTED_TARGET_NAMES} "
- "are defined. Will continue with a manual search for gflags "
- "components. We recommend you build/install a version of gflags > "
- "2.1.2 (or master).")
- set(FOUND_INSTALLED_GFLAGS_CMAKE_CONFIGURATION FALSE)
- endif()
- endif()
- endif()
-
- if (FOUND_INSTALLED_GFLAGS_CMAKE_CONFIGURATION)
- message(STATUS "Detected gflags version: ${gflags_VERSION}")
- set(GFLAGS_FOUND ${gflags_FOUND})
- set(GFLAGS_INCLUDE_DIR ${gflags_INCLUDE_DIR})
- set(GFLAGS_LIBRARY ${gflags_LIBRARIES})
-
- # gflags does not export the namespace in their CMake configuration, so
- # use our function to determine what it should be, as it can be either
- # gflags or google dependent upon version & configuration.
- #
- # NOTE: We use the regex method to determine the namespace here, as
- # check_cxx_source_compiles() will not use imported targets, which
- # is what gflags will be in this case.
- gflags_check_gflags_namespace_using_regex()
-
- if (NOT GFLAGS_NAMESPACE)
- gflags_report_not_found(
- "Failed to determine gflags namespace using regex for gflags "
- "version: ${gflags_VERSION} exported here: ${gflags_DIR} using CMake.")
- endif (NOT GFLAGS_NAMESPACE)
- else (FOUND_INSTALLED_GFLAGS_CMAKE_CONFIGURATION)
- message(STATUS "Failed to find an installed/exported CMake configuration "
- "for gflags, will perform search for installed gflags components.")
- endif (FOUND_INSTALLED_GFLAGS_CMAKE_CONFIGURATION)
-endif(GFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION)
-
-if (NOT GFLAGS_FOUND)
- # Either failed to find an exported gflags CMake configuration, or user
- # told us not to use one. Perform a manual search for all gflags components.
-
- # Handle possible presence of lib prefix for libraries on MSVC, see
- # also GFLAGS_RESET_FIND_LIBRARY_PREFIX().
- if (MSVC)
- # Preserve the caller's original values for CMAKE_FIND_LIBRARY_PREFIXES
- # s/t we can set it back before returning.
- set(CALLERS_CMAKE_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}")
- # The empty string in this list is important, it represents the case when
- # the libraries have no prefix (shared libraries / DLLs).
- set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "" "${CMAKE_FIND_LIBRARY_PREFIXES}")
- endif (MSVC)
-
- # Search user-installed locations first, so that we prefer user installs
- # to system installs where both exist.
- list(APPEND GFLAGS_CHECK_INCLUDE_DIRS
- /usr/local/include
- /usr/local/homebrew/include # Mac OS X
- /opt/local/var/macports/software # Mac OS X.
- /opt/local/include
- /usr/include)
- list(APPEND GFLAGS_CHECK_PATH_SUFFIXES
- gflags/include # Windows (for C:/Program Files prefix).
- gflags/Include ) # Windows (for C:/Program Files prefix).
-
- list(APPEND GFLAGS_CHECK_LIBRARY_DIRS
- /usr/local/lib
- /usr/local/homebrew/lib # Mac OS X.
- /opt/local/lib
- /usr/lib)
- list(APPEND GFLAGS_CHECK_LIBRARY_SUFFIXES
- gflags/lib # Windows (for C:/Program Files prefix).
- gflags/Lib ) # Windows (for C:/Program Files prefix).
-
- # Search supplied hint directories first if supplied.
- find_path(GFLAGS_INCLUDE_DIR
- NAMES gflags/gflags.h
- HINTS ${GFLAGS_INCLUDE_DIR_HINTS}
- PATHS ${GFLAGS_CHECK_INCLUDE_DIRS}
- PATH_SUFFIXES ${GFLAGS_CHECK_PATH_SUFFIXES})
- if (NOT GFLAGS_INCLUDE_DIR OR
- NOT EXISTS ${GFLAGS_INCLUDE_DIR})
- gflags_report_not_found(
- "Could not find gflags include directory, set GFLAGS_INCLUDE_DIR "
- "to directory containing gflags/gflags.h")
- endif (NOT GFLAGS_INCLUDE_DIR OR
- NOT EXISTS ${GFLAGS_INCLUDE_DIR})
-
- find_library(GFLAGS_LIBRARY NAMES gflags
- HINTS ${GFLAGS_LIBRARY_DIR_HINTS}
- PATHS ${GFLAGS_CHECK_LIBRARY_DIRS}
- PATH_SUFFIXES ${GFLAGS_CHECK_LIBRARY_SUFFIXES})
- if (NOT GFLAGS_LIBRARY OR
- NOT EXISTS ${GFLAGS_LIBRARY})
- gflags_report_not_found(
- "Could not find gflags library, set GFLAGS_LIBRARY "
- "to full path to libgflags.")
- endif (NOT GFLAGS_LIBRARY OR
- NOT EXISTS ${GFLAGS_LIBRARY})
-
- # gflags typically requires a threading library (which is OS dependent), note
- # that this defines the CMAKE_THREAD_LIBS_INIT variable. If we are able to
- # detect threads, we assume that gflags requires it.
- find_package(Threads QUIET)
- set(GFLAGS_LINK_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
- # On Windows (including MinGW), the Shlwapi library is used by gflags if
- # available.
- if (WIN32)
- include(CheckIncludeFileCXX)
- check_include_file_cxx("shlwapi.h" HAVE_SHLWAPI)
- if (HAVE_SHLWAPI)
- list(APPEND GFLAGS_LINK_LIBRARIES shlwapi.lib)
- endif(HAVE_SHLWAPI)
- endif (WIN32)
-
- # Mark internally as found, then verify. GFLAGS_REPORT_NOT_FOUND() unsets
- # if called.
- set(GFLAGS_FOUND TRUE)
-
- # Identify what namespace gflags was built with.
- if (GFLAGS_INCLUDE_DIR AND NOT GFLAGS_NAMESPACE)
- # To handle Windows peculiarities / CMake bugs on MSVC we try two approaches
- # to detect the gflags namespace:
- #
- # 1) Try to use check_cxx_source_compiles() to compile a trivial program
- # with the two choices for the gflags namespace.
- #
- # 2) [In the event 1) fails] Use regex on the gflags headers to try to
- # determine the gflags namespace. Whilst this is less robust than 1),
- # it does avoid any interaction with msbuild.
- gflags_check_gflags_namespace_using_try_compile()
-
- if (NOT GFLAGS_NAMESPACE)
- # Failed to determine gflags namespace using check_cxx_source_compiles()
- # method, try and obtain it using regex on the gflags headers instead.
- message(STATUS "Failed to find gflags namespace using using "
- "check_cxx_source_compiles(), trying namespace regex instead, "
- "this is expected on Windows.")
- gflags_check_gflags_namespace_using_regex()
-
- if (NOT GFLAGS_NAMESPACE)
- gflags_report_not_found(
- "Failed to determine gflags namespace either by "
- "check_cxx_source_compiles(), or namespace regex.")
- endif (NOT GFLAGS_NAMESPACE)
- endif (NOT GFLAGS_NAMESPACE)
- endif (GFLAGS_INCLUDE_DIR AND NOT GFLAGS_NAMESPACE)
-
- # Make the GFLAGS_NAMESPACE a cache variable s/t the user can view it, and could
- # overwrite it in the CMake GUI.
- set(GFLAGS_NAMESPACE "${GFLAGS_NAMESPACE}" CACHE STRING
- "gflags namespace (google or gflags)" FORCE)
-
- # gflags does not seem to provide any record of the version in its
- # source tree, thus cannot extract version.
-
- # Catch case when caller has set GFLAGS_NAMESPACE in the cache / GUI
- # with an invalid value.
- if (GFLAGS_NAMESPACE AND
- NOT GFLAGS_NAMESPACE STREQUAL "google" AND
- NOT GFLAGS_NAMESPACE STREQUAL "gflags")
- gflags_report_not_found(
- "Caller defined GFLAGS_NAMESPACE:"
- " ${GFLAGS_NAMESPACE} is not valid, not google or gflags.")
- endif ()
- # Catch case when caller has set GFLAGS_INCLUDE_DIR in the cache / GUI and
- # thus FIND_[PATH/LIBRARY] are not called, but specified locations are
- # invalid, otherwise we would report the library as found.
- if (GFLAGS_INCLUDE_DIR AND
- NOT EXISTS ${GFLAGS_INCLUDE_DIR}/gflags/gflags.h)
- gflags_report_not_found(
- "Caller defined GFLAGS_INCLUDE_DIR:"
- " ${GFLAGS_INCLUDE_DIR} does not contain gflags/gflags.h header.")
- endif (GFLAGS_INCLUDE_DIR AND
- NOT EXISTS ${GFLAGS_INCLUDE_DIR}/gflags/gflags.h)
- # TODO: This regex for gflags library is pretty primitive, we use lowercase
- # for comparison to handle Windows using CamelCase library names, could
- # this check be better?
- string(TOLOWER "${GFLAGS_LIBRARY}" LOWERCASE_GFLAGS_LIBRARY)
- if (GFLAGS_LIBRARY AND
- NOT "${LOWERCASE_GFLAGS_LIBRARY}" MATCHES ".*gflags[^/]*")
- gflags_report_not_found(
- "Caller defined GFLAGS_LIBRARY: "
- "${GFLAGS_LIBRARY} does not match gflags.")
- endif (GFLAGS_LIBRARY AND
- NOT "${LOWERCASE_GFLAGS_LIBRARY}" MATCHES ".*gflags[^/]*")
-
- gflags_reset_find_library_prefix()
-
-endif(NOT GFLAGS_FOUND)
-
-# Set standard CMake FindPackage variables if found.
-if (GFLAGS_FOUND)
- set(GFLAGS_INCLUDE_DIRS ${GFLAGS_INCLUDE_DIR})
- set(GFLAGS_LIBRARIES ${GFLAGS_LIBRARY} ${GFLAGS_LINK_LIBRARIES})
-endif (GFLAGS_FOUND)
-
-# Handle REQUIRED / QUIET optional arguments.
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Gflags DEFAULT_MSG
- GFLAGS_INCLUDE_DIRS GFLAGS_LIBRARIES GFLAGS_NAMESPACE)
-
-# Only mark internal variables as advanced if we found gflags, otherwise
-# leave them visible in the standard GUI for the user to set manually.
-if (GFLAGS_FOUND)
- mark_as_advanced(FORCE GFLAGS_INCLUDE_DIR
- GFLAGS_LIBRARY
- GFLAGS_NAMESPACE
- gflags_DIR) # Autogenerated by find_package(gflags)
-endif (GFLAGS_FOUND)
diff --git a/cmake/FindGlog.cmake b/cmake/FindGlog.cmake
deleted file mode 100644
index 979dced..0000000
--- a/cmake/FindGlog.cmake
+++ /dev/null
@@ -1,346 +0,0 @@
-# Ceres Solver - A fast non-linear least squares minimizer
-# Copyright 2015 Google Inc. All rights reserved.
-# http://ceres-solver.org/
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# * Redistributions of source code must retain the above copyright notice,
-# this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following disclaimer in the documentation
-# and/or other materials provided with the distribution.
-# * Neither the name of Google Inc. nor the names of its contributors may be
-# used to endorse or promote products derived from this software without
-# specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-# Author: alexs.mac@gmail.com (Alex Stewart)
-#
-
-# FindGlog.cmake - Find Google glog logging library.
-#
-# This module defines the following variables:
-#
-# GLOG_FOUND: TRUE iff glog is found.
-# GLOG_INCLUDE_DIRS: Include directories for glog.
-# GLOG_LIBRARIES: Libraries required to link glog.
-# FOUND_INSTALLED_GLOG_CMAKE_CONFIGURATION: True iff the version of glog found
-# was built & installed / exported
-# as a CMake package.
-#
-# The following variables control the behaviour of this module:
-#
-# GLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION: TRUE/FALSE, iff TRUE then
-# then prefer using an exported CMake configuration
-# generated by glog > 0.3.4 over searching for the
-# glog components manually. Otherwise (FALSE)
-# ignore any exported glog CMake configurations and
-# always perform a manual search for the components.
-# Default: TRUE iff user does not define this variable
-# before we are called, and does NOT specify either
-# GLOG_INCLUDE_DIR_HINTS or GLOG_LIBRARY_DIR_HINTS
-# otherwise FALSE.
-# GLOG_INCLUDE_DIR_HINTS: List of additional directories in which to
-# search for glog includes, e.g: /timbuktu/include.
-# GLOG_LIBRARY_DIR_HINTS: List of additional directories in which to
-# search for glog libraries, e.g: /timbuktu/lib.
-#
-# The following variables are also defined by this module, but in line with
-# CMake recommended FindPackage() module style should NOT be referenced directly
-# by callers (use the plural variables detailed above instead). These variables
-# do however affect the behaviour of the module via FIND_[PATH/LIBRARY]() which
-# are NOT re-called (i.e. search for library is not repeated) if these variables
-# are set with valid values _in the CMake cache_. This means that if these
-# variables are set directly in the cache, either by the user in the CMake GUI,
-# or by the user passing -DVAR=VALUE directives to CMake when called (which
-# explicitly defines a cache variable), then they will be used verbatim,
-# bypassing the HINTS variables and other hard-coded search locations.
-#
-# GLOG_INCLUDE_DIR: Include directory for glog, not including the
-# include directory of any dependencies.
-# GLOG_LIBRARY: glog library, not including the libraries of any
-# dependencies.
-
-# Reset CALLERS_CMAKE_FIND_LIBRARY_PREFIXES to its value when
-# FindGlog was invoked.
-macro(GLOG_RESET_FIND_LIBRARY_PREFIX)
- if (MSVC AND CALLERS_CMAKE_FIND_LIBRARY_PREFIXES)
- set(CMAKE_FIND_LIBRARY_PREFIXES "${CALLERS_CMAKE_FIND_LIBRARY_PREFIXES}")
- endif()
-endmacro(GLOG_RESET_FIND_LIBRARY_PREFIX)
-
-# Called if we failed to find glog or any of it's required dependencies,
-# unsets all public (designed to be used externally) variables and reports
-# error message at priority depending upon [REQUIRED/QUIET/<NONE>] argument.
-macro(GLOG_REPORT_NOT_FOUND REASON_MSG)
- unset(GLOG_FOUND)
- unset(GLOG_INCLUDE_DIRS)
- unset(GLOG_LIBRARIES)
- # Make results of search visible in the CMake GUI if glog has not
- # been found so that user does not have to toggle to advanced view.
- mark_as_advanced(CLEAR GLOG_INCLUDE_DIR
- GLOG_LIBRARY)
-
- glog_reset_find_library_prefix()
-
- # Note <package>_FIND_[REQUIRED/QUIETLY] variables defined by FindPackage()
- # use the camelcase library name, not uppercase.
- if (Glog_FIND_QUIETLY)
- message(STATUS "Failed to find glog - " ${REASON_MSG} ${ARGN})
- elseif (Glog_FIND_REQUIRED)
- message(FATAL_ERROR "Failed to find glog - " ${REASON_MSG} ${ARGN})
- else()
- # Neither QUIETLY nor REQUIRED, use no priority which emits a message
- # but continues configuration and allows generation.
- message("-- Failed to find glog - " ${REASON_MSG} ${ARGN})
- endif ()
- return()
-endmacro(GLOG_REPORT_NOT_FOUND)
-
-# Protect against any alternative find_package scripts for this library having
-# been called previously (in a client project) which set GLOG_FOUND, but not
-# the other variables we require / set here which could cause the search logic
-# here to fail.
-unset(GLOG_FOUND)
-
-# -----------------------------------------------------------------
-# By default, if the user has expressed no preference for using an exported
-# glog CMake configuration over performing a search for the installed
-# components, and has not specified any hints for the search locations, then
-# prefer a glog exported configuration if available.
-if (NOT DEFINED GLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION
- AND NOT GLOG_INCLUDE_DIR_HINTS
- AND NOT GLOG_LIBRARY_DIR_HINTS)
- message(STATUS "No preference for use of exported glog CMake configuration "
- "set, and no hints for include/library directories provided. "
- "Defaulting to preferring an installed/exported glog CMake configuration "
- "if available.")
- set(GLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION TRUE)
-endif()
-
-if (GLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION)
- # Try to find an exported CMake configuration for glog, as generated by
- # glog versions > 0.3.4
- #
- # We search twice, s/t we can invert the ordering of precedence used by
- # find_package() for exported package build directories, and installed
- # packages (found via CMAKE_SYSTEM_PREFIX_PATH), listed as items 6) and 7)
- # respectively in [1].
- #
- # By default, exported build directories are (in theory) detected first, and
- # this is usually the case on Windows. However, on OS X & Linux, the install
- # path (/usr/local) is typically present in the PATH environment variable
- # which is checked in item 4) in [1] (i.e. before both of the above, unless
- # NO_SYSTEM_ENVIRONMENT_PATH is passed). As such on those OSs installed
- # packages are usually detected in preference to exported package build
- # directories.
- #
- # To ensure a more consistent response across all OSs, and as users usually
- # want to prefer an installed version of a package over a locally built one
- # where both exist (esp. as the exported build directory might be removed
- # after installation), we first search with NO_CMAKE_PACKAGE_REGISTRY which
- # means any build directories exported by the user are ignored, and thus
- # installed directories are preferred. If this fails to find the package
- # we then research again, but without NO_CMAKE_PACKAGE_REGISTRY, so any
- # exported build directories will now be detected.
- #
- # To prevent confusion on Windows, we also pass NO_CMAKE_BUILDS_PATH (which
- # is item 5) in [1]), to not preferentially use projects that were built
- # recently with the CMake GUI to ensure that we always prefer an installed
- # version if available.
- #
- # NOTE: We use the NAMES option as glog erroneously uses 'google-glog' as its
- # project name when built with CMake, but exports itself as just 'glog'.
- # On Linux/OS X this does not break detection as the project name is
- # not used as part of the install path for the CMake package files,
- # e.g. /usr/local/lib/cmake/glog, where the <glog> suffix is hardcoded
- # in glog's CMakeLists. However, on Windows the project name *is*
- # part of the install prefix: C:/Program Files/google-glog/[include,lib].
- # However, by default CMake checks:
- # C:/Program Files/<FIND_PACKAGE_ARGUMENT_NAME='glog'> which does not
- # exist and thus detection fails. Thus we use the NAMES to force the
- # search to use both google-glog & glog.
- #
- # [1] http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:find_package
- find_package(glog QUIET
- NAMES google-glog glog
- NO_MODULE
- NO_CMAKE_PACKAGE_REGISTRY
- NO_CMAKE_BUILDS_PATH)
- if (glog_FOUND)
- message(STATUS "Found installed version of glog: ${glog_DIR}")
- else()
- # Failed to find an installed version of glog, repeat search allowing
- # exported build directories.
- message(STATUS "Failed to find installed glog CMake configuration, "
- "searching for glog build directories exported with CMake.")
- # Again pass NO_CMAKE_BUILDS_PATH, as we know that glog is exported and
- # do not want to treat projects built with the CMake GUI preferentially.
- find_package(glog QUIET
- NAMES google-glog glog
- NO_MODULE
- NO_CMAKE_BUILDS_PATH)
- if (glog_FOUND)
- message(STATUS "Found exported glog build directory: ${glog_DIR}")
- endif(glog_FOUND)
- endif(glog_FOUND)
-
- set(FOUND_INSTALLED_GLOG_CMAKE_CONFIGURATION ${glog_FOUND})
-
- if (FOUND_INSTALLED_GLOG_CMAKE_CONFIGURATION)
- message(STATUS "Detected glog version: ${glog_VERSION}")
- set(GLOG_FOUND ${glog_FOUND})
- # glog wraps the include directories into the exported glog::glog target.
- set(GLOG_INCLUDE_DIR "")
- set(GLOG_LIBRARY glog::glog)
- else (FOUND_INSTALLED_GLOG_CMAKE_CONFIGURATION)
- message(STATUS "Failed to find an installed/exported CMake configuration "
- "for glog, will perform search for installed glog components.")
- endif (FOUND_INSTALLED_GLOG_CMAKE_CONFIGURATION)
-endif(GLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION)
-
-if (NOT GLOG_FOUND)
- # Either failed to find an exported glog CMake configuration, or user
- # told us not to use one. Perform a manual search for all glog components.
-
- # Handle possible presence of lib prefix for libraries on MSVC, see
- # also GLOG_RESET_FIND_LIBRARY_PREFIX().
- if (MSVC)
- # Preserve the caller's original values for CMAKE_FIND_LIBRARY_PREFIXES
- # s/t we can set it back before returning.
- set(CALLERS_CMAKE_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}")
- # The empty string in this list is important, it represents the case when
- # the libraries have no prefix (shared libraries / DLLs).
- set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "" "${CMAKE_FIND_LIBRARY_PREFIXES}")
- endif (MSVC)
-
- # Search user-installed locations first, so that we prefer user installs
- # to system installs where both exist.
- list(APPEND GLOG_CHECK_INCLUDE_DIRS
- /usr/local/include
- /usr/local/homebrew/include # Mac OS X
- /opt/local/var/macports/software # Mac OS X.
- /opt/local/include
- /usr/include)
- # Windows (for C:/Program Files prefix).
- list(APPEND GLOG_CHECK_PATH_SUFFIXES
- glog/include
- glog/Include
- Glog/include
- Glog/Include
- google-glog/include # CMake installs with project name prefix.
- google-glog/Include)
-
- list(APPEND GLOG_CHECK_LIBRARY_DIRS
- /usr/local/lib
- /usr/local/homebrew/lib # Mac OS X.
- /opt/local/lib
- /usr/lib)
- # Windows (for C:/Program Files prefix).
- list(APPEND GLOG_CHECK_LIBRARY_SUFFIXES
- glog/lib
- glog/Lib
- Glog/lib
- Glog/Lib
- google-glog/lib # CMake installs with project name prefix.
- google-glog/Lib)
-
- # Search supplied hint directories first if supplied.
- find_path(GLOG_INCLUDE_DIR
- NAMES glog/logging.h
- HINTS ${GLOG_INCLUDE_DIR_HINTS}
- PATHS ${GLOG_CHECK_INCLUDE_DIRS}
- PATH_SUFFIXES ${GLOG_CHECK_PATH_SUFFIXES})
- if (NOT GLOG_INCLUDE_DIR OR
- NOT EXISTS ${GLOG_INCLUDE_DIR})
- glog_report_not_found(
- "Could not find glog include directory, set GLOG_INCLUDE_DIR "
- "to directory containing glog/logging.h")
- endif (NOT GLOG_INCLUDE_DIR OR
- NOT EXISTS ${GLOG_INCLUDE_DIR})
-
- find_library(GLOG_LIBRARY NAMES glog
- HINTS ${GLOG_LIBRARY_DIR_HINTS}
- PATHS ${GLOG_CHECK_LIBRARY_DIRS}
- PATH_SUFFIXES ${GLOG_CHECK_LIBRARY_SUFFIXES})
- if (NOT GLOG_LIBRARY OR
- NOT EXISTS ${GLOG_LIBRARY})
- glog_report_not_found(
- "Could not find glog library, set GLOG_LIBRARY "
- "to full path to libglog.")
- endif (NOT GLOG_LIBRARY OR
- NOT EXISTS ${GLOG_LIBRARY})
-
- # Mark internally as found, then verify. GLOG_REPORT_NOT_FOUND() unsets
- # if called.
- set(GLOG_FOUND TRUE)
-
- # Glog does not seem to provide any record of the version in its
- # source tree, thus cannot extract version.
-
- # Catch case when caller has set GLOG_INCLUDE_DIR in the cache / GUI and
- # thus FIND_[PATH/LIBRARY] are not called, but specified locations are
- # invalid, otherwise we would report the library as found.
- if (GLOG_INCLUDE_DIR AND
- NOT EXISTS ${GLOG_INCLUDE_DIR}/glog/logging.h)
- glog_report_not_found(
- "Caller defined GLOG_INCLUDE_DIR:"
- " ${GLOG_INCLUDE_DIR} does not contain glog/logging.h header.")
- endif (GLOG_INCLUDE_DIR AND
- NOT EXISTS ${GLOG_INCLUDE_DIR}/glog/logging.h)
- # TODO: This regex for glog library is pretty primitive, we use lowercase
- # for comparison to handle Windows using CamelCase library names, could
- # this check be better?
- string(TOLOWER "${GLOG_LIBRARY}" LOWERCASE_GLOG_LIBRARY)
- if (GLOG_LIBRARY AND
- NOT "${LOWERCASE_GLOG_LIBRARY}" MATCHES ".*glog[^/]*")
- glog_report_not_found(
- "Caller defined GLOG_LIBRARY: "
- "${GLOG_LIBRARY} does not match glog.")
- endif (GLOG_LIBRARY AND
- NOT "${LOWERCASE_GLOG_LIBRARY}" MATCHES ".*glog[^/]*")
-
- glog_reset_find_library_prefix()
-
-endif(NOT GLOG_FOUND)
-
-# Set standard CMake FindPackage variables if found.
-if (GLOG_FOUND)
- set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIR})
- set(GLOG_LIBRARIES ${GLOG_LIBRARY})
-endif (GLOG_FOUND)
-
-# If we are using an exported CMake glog target, the include directories are
-# wrapped into the target itself, and do not have to be (and are not)
-# separately specified. In which case, we should not add GLOG_INCLUDE_DIRS
-# to the list of required variables in order that glog be reported as found.
-if (FOUND_INSTALLED_GLOG_CMAKE_CONFIGURATION)
- set(GLOG_REQUIRED_VARIABLES GLOG_LIBRARIES)
-else()
- set(GLOG_REQUIRED_VARIABLES GLOG_INCLUDE_DIRS GLOG_LIBRARIES)
-endif()
-
-# Handle REQUIRED / QUIET optional arguments.
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Glog DEFAULT_MSG
- ${GLOG_REQUIRED_VARIABLES})
-
-# Only mark internal variables as advanced if we found glog, otherwise
-# leave them visible in the standard GUI for the user to set manually.
-if (GLOG_FOUND)
- mark_as_advanced(FORCE GLOG_INCLUDE_DIR
- GLOG_LIBRARY
- glog_DIR) # Autogenerated by find_package(glog)
-endif (GLOG_FOUND)

View File

@ -1,11 +1,10 @@
Source: ceres
Version: 1.14.0-3
# eigen is always required by CMake, even if it isn't used.
Version: 1.14.0-4
Build-Depends: glog, eigen3
Description: non-linear optimization package
Feature: lapack
Build-Depends: clapack
Build-Depends: clapack (!osx)
Description: Use Lapack in Ceres
Feature: suitesparse

View File

@ -17,11 +17,16 @@ vcpkg_from_github(
PATCHES
0001_add_missing_include_path.patch
0002_cmakelists_fixes.patch
0003_remove_unnecessary_cmake_modules.patch
0004_use_glog_target.patch
0005_fix_exported_ceres_config.patch
0003_use_glog_target.patch
0004_fix_exported_ceres_config.patch
)
file(REMOVE ${SOURCE_PATH}/cmake/FindGflags.cmake)
file(REMOVE ${SOURCE_PATH}/cmake/FindGlog.cmake)
#file(REMOVE ${SOURCE_PATH}/cmake/FindEigen.cmake)
file(REMOVE ${SOURCE_PATH}/cmake/FindSuiteSparse.cmake)
#file(REMOVE ${SOURCE_PATH}/cmake/FindTBB.cmake)
set(SUITESPARSE OFF)
if("suitesparse" IN_LIST FEATURES)
set(SUITESPARSE ON)
@ -59,14 +64,12 @@ vcpkg_configure_cmake(
-DEIGENSPARSE=${EIGENSPARSE}
-DLAPACK=${LAPACK}
-DSUITESPARSE=${SUITESPARSE}
-DGFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION=ON
-DGLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION=OFF # TheiaSfm doesn't work well with this.
-DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT_VALUE}
)
vcpkg_install_cmake()
if(WIN32)
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake")
else()
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib${LIB_SUFFIX}/cmake/Ceres")
@ -75,7 +78,7 @@ endif()
vcpkg_copy_pdbs()
# Changes target search path
if(WIN32)
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
file(READ ${CURRENT_PACKAGES_DIR}/share/ceres/CeresConfig.cmake CERES_TARGETS)
string(REPLACE "get_filename_component(CURRENT_ROOT_INSTALL_DIR\n \${CERES_CURRENT_CONFIG_DIR}/../"
"get_filename_component(CURRENT_ROOT_INSTALL_DIR\n \${CERES_CURRENT_CONFIG_DIR}/../../" CERES_TARGETS "${CERES_TARGETS}")

6
ports/cjson/CONTROL Normal file
View File

@ -0,0 +1,6 @@
Source: cjson
Version: 1.7.10-1
Description: Ultralightweight JSON parser in ANSI C
Feature: utils
Description: Enable building the cJSON_Utils library

View File

@ -0,0 +1,34 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 033a882..6e2b2e4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,7 +149,13 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/library_config/libcjson.pc.in"
install(FILES cJSON.h DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/cjson")
install (FILES "${CMAKE_CURRENT_BINARY_DIR}/libcjson.pc" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig")
-install(TARGETS "${CJSON_LIB}" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}" EXPORT "${CJSON_LIB}")
+install(TARGETS "${CJSON_LIB}"
+ EXPORT "${CJSON_LIB}"
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}"
+ LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}"
+ RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}"
+ INCLUDES DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}"
+)
if (BUILD_SHARED_AND_STATIC_LIBS)
install(TARGETS "${CJSON_LIB}-static" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}")
endif()
@@ -186,7 +192,13 @@ if(ENABLE_CJSON_UTILS)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/library_config/libcjson_utils.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/libcjson_utils.pc" @ONLY)
- install(TARGETS "${CJSON_UTILS_LIB}" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}" EXPORT "${CJSON_UTILS_LIB}")
+ install(TARGETS "${CJSON_UTILS_LIB}"
+ EXPORT "${CJSON_UTILS_LIB}"
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}"
+ LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}"
+ RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}"
+ INCLUDES DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}"
+ )
if (BUILD_SHARED_AND_STATIC_LIBS)
install(TARGETS "${CJSON_UTILS_LIB}-static" DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}")
endif()

View File

@ -0,0 +1,63 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO DaveGamble/cJSON
REF v1.7.10
SHA512 f8d7c9fe798b51ec3c69cabe4124d2f6372f0e6d282285e3ca951c58c971a9a520d87550530d750ff7f8055c0b6ff566f237b9af9eb345cf4f4fc4ff8c910740
HEAD_REF master
PATCHES
fix-install-path.patch
)
if("utils" IN_LIST FEATURES)
set(ENABLE_CJSON_UTILS ON)
else()
set(ENABLE_CJSON_UTILS OFF)
endif()
if(CMAKE_HOST_WIN32)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_PUBLIC_SYMBOLS)
else()
set(ENABLE_PUBLIC_SYMBOLS OFF)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_SHARED_AND_STATIC_LIBS=OFF
-DCJSON_OVERRIDE_BUILD_SHARED_LIBS=OFF
-DENABLE_PUBLIC_SYMBOLS=${ENABLE_PUBLIC_SYMBOLS}
-DENABLE_TARGET_EXPORT=ON # Export CMake config files
-DENABLE_CJSON_UTILS=${ENABLE_CJSON_UTILS}
-DENABLE_CJSON_TEST=OFF
-DENABLE_FUZZING=OFF
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cJSON)
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share
)
file(READ ${CURRENT_PACKAGES_DIR}/include/cjson/cJSON.h _contents)
if(ENABLE_PUBLIC_SYMBOLS)
string(REPLACE "defined(CJSON_HIDE_SYMBOLS)" "0 /* defined(CJSON_HIDE_SYMBOLS) */" _contents "${_contents}")
string(REPLACE "defined(CJSON_EXPORT_SYMBOLS)" "0 /* defined(CJSON_EXPORT_SYMBOLS) */" _contents "${_contents}")
string(REPLACE "defined(CJSON_IMPORT_SYMBOLS)" "1 /* defined(CJSON_IMPORT_SYMBOLS) */" _contents "${_contents}")
else()
string(REPLACE "defined(CJSON_HIDE_SYMBOLS)" "1 /* defined(CJSON_HIDE_SYMBOLS) */" _contents "${_contents}")
endif()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/cjson/cJSON.h "${_contents}")
# Handle copyright
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
# CMake integration test
vcpkg_test_cmake(PACKAGE_NAME ${PORT})

View File

@ -1,4 +1,4 @@
Source: clapack
Version: 3.2.1-4
Version: 3.2.1-6
Description: CLAPACK (f2c'ed version of LAPACK)
Build-Depends: openblas (!osx)

View File

@ -0,0 +1,198 @@
#.rst:
# clapack config for vcpkg
# ------------
#
# Find the clapack includes and library.
#
# Result Variables
# ^^^^^^^^^^^^^^^^
#
# This script defines the following variables:
#
# ``CLAPACK_FOUND``
# True if clapack library found
#
# ``CLAPACK_VERSION``
# Containing the clapack version tag (manually defined)
#
# ``CLAPACK_INCLUDE_DIR``
# Location of clapack headers
#
# ``CLAPACK_LIBRARY``
# List of libraries to link with when using clapack
#
# Result Targets
# ^^^^^^^^^^^^^^
#
# This script defines the following targets:
#
# ``clapack::clapack``
# Target to use clapack
#
# Compatibility Variables
# ^^^^^^^^^^^^^^^^^^^^^^^
#
# This script defines the following variables for compatibility reasons:
#
# ``F2C_FOUND``
# True if f2c (fortran-to-c wrap layer) library found
#
# ``F2C_INCLUDE_DIR``
# Location of clapack headers
#
# ``F2C_LIBRARY``
# Library containing the fortran-to-c wrap layer, necessary for clapack and automatically included when used
#
# ``LAPACK_FOUND``
# True if clapack library found
#
# ``LAPACK_VERSION``
# Containing the clapack version tag (manually defined)
#
# ``LAPACK_INCLUDE_DIR``
# Location of clapack headers
#
# ``LAPACK_LIBRARY``
# List of libraries to link with when using clapack
#
# Compatibility Targets
# ^^^^^^^^^^^^^^
#
# This script defines the following targets for compatibility reasons:
#
# ``lapack``
# Target to use lapack
include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
include(${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake)
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
set(CLAPACK_VERSION "3.2.1")
if(UNIX)
find_library(ADDITIONAL_LAPACK_LIBRARY m)
endif()
if(NOT F2C_LIBRARY)
find_library(F2C_LIBRARY_RELEASE NAMES f2c libf2c)
find_library(F2C_LIBRARY_DEBUG NAMES f2cd libf2cd)
list(APPEND F2C_LIBRARY_RELEASE ${ADDITIONAL_LAPACK_LIBRARY})
list(APPEND F2C_LIBRARY_DEBUG ${ADDITIONAL_LAPACK_LIBRARY})
select_library_configurations(F2C)
endif()
find_package(BLAS)
if(NOT LAPACK_LIBRARY)
find_library(LAPACK_LIBRARY_RELEASE NAMES lapack)
find_library(LAPACK_LIBRARY_DEBUG NAMES lapackd)
list(APPEND LAPACK_LIBRARY_RELEASE ${F2C_LIBRARY_RELEASE})
list(APPEND LAPACK_LIBRARY_DEBUG ${F2C_LIBRARY_DEBUG})
select_library_configurations(LAPACK)
endif()
list(APPEND LAPACK_LIBRARY ${BLAS_LIBRARIES})
set(F2C_LIBRARIES "${F2C_LIBRARY}" CACHE STRING "" FORCE)
set(LAPACK_VERSION "${CLAPACK_VERSION}" CACHE STRING "" FORCE)
set(LAPACK_LIBRARIES "${LAPACK_LIBRARY}" CACHE STRING "" FORCE)
set(CLAPACK_LIBRARY "${LAPACK_LIBRARY}" CACHE STRING "" FORCE)
set(CLAPACK_LIBRARIES "${LAPACK_LIBRARY}" CACHE STRING "" FORCE)
if(NOT F2C_INCLUDE_DIR)
find_path(F2C_INCLUDE_DIR NAMES f2c.h)
endif()
if(NOT LAPACK_INCLUDE_DIR)
find_path(LAPACK_INCLUDE_DIR NAMES clapack.h)
endif()
list(APPEND LAPACK_INCLUDE_DIR ${F2C_INCLUDE_DIR})
set(LAPACK_INCLUDE_DIRS "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE)
set(CLAPACK_INCLUDE_DIR "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE)
set(CLAPACK_INCLUDE_DIRS "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE)
set(F2C_INCLUDE_DIRS "${F2C_INCLUDE_DIR}" CACHE PATH "" FORCE)
if(WIN32)
string( REPLACE ".lib" ".dll" LAPACK_LIBRARY_RELEASE_DLL "${LAPACK_LIBRARY_RELEASE}" )
string( REPLACE ".lib" ".dll" LAPACK_LIBRARY_DEBUG_DLL "${LAPACK_LIBRARY_DEBUG}" )
string( REPLACE ".lib" ".dll" F2C_LIBRARY_RELEASE_DLL "${F2C_LIBRARY_RELEASE}" )
string( REPLACE ".lib" ".dll" F2C_LIBRARY_DEBUG_DLL "${F2C_LIBRARY_DEBUG}" )
endif()
find_package_handle_standard_args(CLAPACK DEFAULT_MSG CLAPACK_LIBRARY CLAPACK_INCLUDE_DIR)
mark_as_advanced(CLAPACK_INCLUDE_DIR CLAPACK_LIBRARY)
find_package_handle_standard_args(LAPACK DEFAULT_MSG LAPACK_LIBRARY LAPACK_INCLUDE_DIR)
mark_as_advanced(LAPACK_INCLUDE_DIR LAPACK_LIBRARY)
find_package_handle_standard_args(F2C DEFAULT_MSG F2C_LIBRARY F2C_INCLUDE_DIR)
mark_as_advanced(F2C_INCLUDE_DIR F2C_LIBRARY)
#TARGETS
if( CLAPACK_FOUND AND NOT TARGET clapack::clapack )
if( EXISTS "${LAPACK_LIBRARY_RELEASE_DLL}" )
add_library( clapack::clapack SHARED IMPORTED )
set_target_properties( clapack::clapack PROPERTIES
IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE_DLL}"
IMPORTED_IMPLIB "${LAPACK_LIBRARY_RELEASE}"
INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}"
IMPORTED_CONFIGURATIONS Release
IMPORTED_LINK_INTERFACE_LANGUAGES "C" )
if( EXISTS "${LAPACK_LIBRARY_DEBUG_DLL}" )
set_property( TARGET clapack::clapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
set_target_properties( clapack::clapack PROPERTIES
IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG_DLL}"
IMPORTED_IMPLIB_DEBUG "${LAPACK_LIBRARY_DEBUG}" )
endif()
else()
add_library( clapack::clapack UNKNOWN IMPORTED )
set_target_properties( clapack::clapack PROPERTIES
IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE}"
INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}"
IMPORTED_CONFIGURATIONS Release
IMPORTED_LINK_INTERFACE_LANGUAGES "C" )
if( EXISTS "${LAPACK_LIBRARY_DEBUG}" )
set_property( TARGET clapack::clapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
set_target_properties( clapack::clapack PROPERTIES
IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG}" )
endif()
endif()
endif()
if( CLAPACK_FOUND AND NOT TARGET lapack )
if( EXISTS "${LAPACK_LIBRARY_RELEASE_DLL}" )
add_library( lapack SHARED IMPORTED )
set_target_properties( lapack PROPERTIES
IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE_DLL}"
IMPORTED_IMPLIB "${LAPACK_LIBRARY_RELEASE}"
INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}"
IMPORTED_CONFIGURATIONS Release
IMPORTED_LINK_INTERFACE_LANGUAGES "C" )
if( EXISTS "${LAPACK_LIBRARY_DEBUG_DLL}" )
set_property( TARGET lapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
set_target_properties( lapack PROPERTIES
IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG_DLL}"
IMPORTED_IMPLIB_DEBUG "${LAPACK_LIBRARY_DEBUG}" )
endif()
else()
add_library( lapack UNKNOWN IMPORTED )
set_target_properties( lapack PROPERTIES
IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE}"
INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}"
IMPORTED_CONFIGURATIONS Release
IMPORTED_LINK_INTERFACE_LANGUAGES "C" )
if( EXISTS "${LAPACK_LIBRARY_DEBUG}" )
set_property( TARGET lapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug )
set_target_properties( lapack PROPERTIES
IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG}" )
endif()
endif()
endif()
set(LAPACK_LIBRARY "${LAPACK_LIBRARY}" CACHE STRING "" FORCE)
set(F2C_LIBRARY "${F2C_LIBRARY}" CACHE STRING "" FORCE)
set(LAPACK_LIBRARY_RELEASE "${LAPACK_LIBRARY_RELEASE}" CACHE STRING "" FORCE)
set(LAPACK_LIBRARY_DEBUG "${LAPACK_LIBRARY_DEBUG}" CACHE STRING "" FORCE)
set(F2C_LIBRARY_RELEASE "${F2C_LIBRARY_RELEASE}" CACHE STRING "" FORCE)
set(F2C_LIBRARY_DEBUG "${F2C_LIBRARY_DEBUG}" CACHE STRING "" FORCE)

View File

@ -1,18 +0,0 @@
diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt
index ca1473f..fa54e94 100644
--- a/F2CLIBS/libf2c/CMakeLists.txt
+++ b/F2CLIBS/libf2c/CMakeLists.txt
@@ -63,3 +63,13 @@ if(UNIX)
target_link_libraries(f2c m)
endif()
set_property(TARGET f2c PROPERTY PREFIX lib)
+install(TARGETS f2c
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
+
+install(TARGETS arithchk
+ RUNTIME DESTINATION tools
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
+

View File

@ -1,46 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8c53def..9e0e398 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,10 +1,10 @@
cmake_minimum_required(VERSION 2.6)
project(CLAPACK C)
-enable_testing()
+#enable_testing()
include(CTest)
# BLAS_LIBRARIES
-find_package(BLAS REQUIRED)
+find_package(OpenBLAS REQUIRED)
if(WIN32 AND NOT CYGWIN)
set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/winsecond.c)
@@ -14,7 +14,7 @@ else()
set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/second.c)
set(DSECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/dsecnd.c)
endif()
-enable_testing()
+#enable_testing()
option(USE_BLAS_WRAP "pre-pend f2c_ to each function in blas" OFF)
if(NOT USE_BLAS_WRAP)
# _zrotg_ seems to be missing in the wrap header
@@ -25,7 +25,7 @@ add_subdirectory(F2CLIBS)
# add_subdirectory(BLAS)
add_subdirectory(SRC)
-add_subdirectory(TESTING)
+#add_subdirectory(TESTING)
set(CLAPACK_VERSION 3.2.1)
set(CPACK_PACKAGE_VERSION_MAJOR 3)
set(CPACK_PACKAGE_VERSION_MINOR 2)
@@ -38,6 +38,6 @@ include(CPack)
# ${CLAPACK_BINARY_DIR}/clapack-config.cmake @ONLY)
install(FILES
- ${CMAKE_CURRENT_LIST_DIR}/include/clapack.h
- ${CMAKE_CURRENT_LIST_DIR}/include/f2c.h
- DESTINATION include)
\ No newline at end of file
+ ${CMAKE_CURRENT_LIST_DIR}/INCLUDE/clapack.h
+ ${CMAKE_CURRENT_LIST_DIR}/INCLUDE/f2c.h
+ DESTINATION include)

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +0,0 @@
diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt
index 2bdbd05..ca1473f 100644
--- a/F2CLIBS/libf2c/CMakeLists.txt
+++ b/F2CLIBS/libf2c/CMakeLists.txt
@@ -59,4 +59,7 @@ endif()
include_directories(${CLAPACK_SOURCE_DIR}/F2CLIBS/libf2c)
include_directories(${CLAPACK_BINARY_DIR}/F2CLIBS/libf2c)
add_library(f2c STATIC ${OFILES} ${CMAKE_CURRENT_BINARY_DIR}/arith.h)
+if(UNIX)
+ target_link_libraries(f2c m)
+endif()
set_property(TARGET f2c PROPERTY PREFIX lib)

View File

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c729d95..2b15e31 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.6)
project(CLAPACK C)
-find_package(BLAS REQUIRED)
+find_package(OpenBLAS REQUIRED)
if(WIN32 AND NOT CYGWIN)
set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/winsecond.c)

View File

@ -1,45 +1,43 @@
include(vcpkg_common_functions)
if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
message(FATAL_ERROR "openblas can only be built for x64 currently")
endif()
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/clapack-3.2.1-CMAKE)
vcpkg_download_distfile(ARCHIVE
URLS "http://www.netlib.org/clapack/clapack-3.2.1-CMAKE.tgz"
FILENAME "clapack-3.2.1.tgz"
SHA512 cf19c710291ddff3f6ead7d86bdfdeaebca21291d9df094bf0a8ef599546b007757fb2dbb19b56511bb53ef7456eac0c73973b9627bf4d02982c856124428b49
URLS "http://www.netlib.org/clapack/clapack-3.2.1-CMAKE.tgz"
FILENAME "clapack-3.2.1.tgz"
SHA512 cf19c710291ddff3f6ead7d86bdfdeaebca21291d9df094bf0a8ef599546b007757fb2dbb19b56511bb53ef7456eac0c73973b9627bf4d02982c856124428b49
)
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(ADDITIONAL_PATCH "openblas_linux.patch")
endif()
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
use-other-blas-and-install-include.patch
link-to-math-lib.patch
remove_internal_blas.patch
${ADDITIONAL_PATCH}
)
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-linux-build.patch"
)
endif()
if(NOT VCPKG_CMAKE_SYSTEM_NAME)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/lapack.def DESTINATION ${SOURCE_PATH}/SRC)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DCMAKE_DEBUG_POSTFIX=d
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
#TODO: fix the official exported targets, since they are broken (luckily it seems that no-one uses them for now)
vcpkg_fixup_cmake_targets(CONFIG_PATH share/clapack)
#we install a cmake wrapper since the official FindLAPACK module in cmake does find clapack easily, unfortunately...
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/lapack)
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/FindLAPACK.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/lapack)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/clapack)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/clapack/COPYING ${CURRENT_PACKAGES_DIR}/share/clapack/copyright)
vcpkg_copy_pdbs()
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/clapack RENAME copyright)

View File

@ -0,0 +1,84 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 320ccc6..284e9d3 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 2.6)
project(CLAPACK C)
-enable_testing()
-include(CTest)
+find_package(BLAS REQUIRED)
if(WIN32 AND NOT CYGWIN)
set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/winsecond.c)
@@ -11,7 +10,6 @@ else()
set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/second.c)
set(DSECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/dsecnd.c)
endif()
-enable_testing()
option(USE_BLAS_WRAP "pre-pend f2c_ to each function in blas" OFF)
if(NOT USE_BLAS_WRAP)
# _zrotg_ seems to be missing in the wrap header
@@ -19,16 +17,15 @@ if(NOT USE_BLAS_WRAP)
endif()
include_directories(${CLAPACK_SOURCE_DIR}/INCLUDE)
add_subdirectory(F2CLIBS)
-add_subdirectory(BLAS)
add_subdirectory(SRC)
-add_subdirectory(TESTING)
set(CLAPACK_VERSION 3.2.1)
-set(CPACK_PACKAGE_VERSION_MAJOR 3)
-set(CPACK_PACKAGE_VERSION_MINOR 2)
-set(CPACK_PACKAGE_VERSION_PATCH 1)
-include(CPack)
-export(TARGETS f2c blas lapack FILE clapack-targets.cmake)
+export(TARGETS f2c lapack FILE ${CMAKE_INSTALL_PREFIX}/share/clapack/clapack-targets.cmake)
configure_file(${CLAPACK_SOURCE_DIR}/clapack-config-version.cmake.in
- ${CLAPACK_BINARY_DIR}/clapack-config-version.cmake @ONLY)
+ ${CMAKE_INSTALL_PREFIX}/share/clapack/clapack-config-version.cmake @ONLY)
configure_file(${CLAPACK_SOURCE_DIR}/clapack-config.cmake.in
- ${CLAPACK_BINARY_DIR}/clapack-config.cmake @ONLY)
+ ${CMAKE_INSTALL_PREFIX}/share/clapack/clapack-config.cmake @ONLY)
+install(FILES
+ ${CMAKE_CURRENT_LIST_DIR}/INCLUDE/clapack.h
+ ${CMAKE_CURRENT_LIST_DIR}/INCLUDE/f2c.h
+ DESTINATION include)
+
diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt
index 43d7b3f..6fa3598 100755
--- a/F2CLIBS/libf2c/CMakeLists.txt
+++ b/F2CLIBS/libf2c/CMakeLists.txt
@@ -60,3 +60,11 @@ include_directories(${CLAPACK_SOURCE_DIR}/F2CLIBS/libf2c)
include_directories(${CLAPACK_BINARY_DIR}/F2CLIBS/libf2c)
add_library(f2c ${OFILES} ${CMAKE_CURRENT_BINARY_DIR}/arith.h)
set_property(TARGET f2c PROPERTY PREFIX lib)
+if(UNIX)
+ target_link_libraries(f2c m)
+endif()
+install(TARGETS f2c
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
+
diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt
index ac4cce3..07dc8c7 100755
--- a/SRC/CMakeLists.txt
+++ b/SRC/CMakeLists.txt
@@ -376,5 +376,9 @@ if(BUILD_COMPLEX16)
set(ALLOBJ ${ZLASRC} ${ALLAUX} ${DZLAUX})
endif()
add_library(lapack ${ALLOBJ} ${ALLXOBJ})
-target_link_libraries(lapack blas)
+target_link_libraries(lapack ${BLAS_LIBRARIES} f2c)
+install(TARGETS lapack
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
diff --git a/clapack-config.cmake.in b/clapack-config.cmake.in
index cd19f1d..597f474 100755
--- a/clapack-config.cmake.in
+++ b/clapack-config.cmake.in
@@ -1 +1 @@
-include("@CLAPACK_BINARY_DIR@/clapack-targets.cmake")
+include("@CLAPACK_BINARY_DIR@/clapack-targets.cmake")

View File

@ -1,103 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 320ccc6..8c53def 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,9 @@ project(CLAPACK C)
enable_testing()
include(CTest)
+# BLAS_LIBRARIES
+find_package(BLAS REQUIRED)
+
if(WIN32 AND NOT CYGWIN)
set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/winsecond.c)
set(DSECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/windsecnd.c)
@@ -19,7 +22,8 @@ if(NOT USE_BLAS_WRAP)
endif()
include_directories(${CLAPACK_SOURCE_DIR}/INCLUDE)
add_subdirectory(F2CLIBS)
-add_subdirectory(BLAS)
+
+# add_subdirectory(BLAS)
add_subdirectory(SRC)
add_subdirectory(TESTING)
set(CLAPACK_VERSION 3.2.1)
@@ -27,8 +31,13 @@ set(CPACK_PACKAGE_VERSION_MAJOR 3)
set(CPACK_PACKAGE_VERSION_MINOR 2)
set(CPACK_PACKAGE_VERSION_PATCH 1)
include(CPack)
-export(TARGETS f2c blas lapack FILE clapack-targets.cmake)
-configure_file(${CLAPACK_SOURCE_DIR}/clapack-config-version.cmake.in
- ${CLAPACK_BINARY_DIR}/clapack-config-version.cmake @ONLY)
-configure_file(${CLAPACK_SOURCE_DIR}/clapack-config.cmake.in
- ${CLAPACK_BINARY_DIR}/clapack-config.cmake @ONLY)
+# export(TARGETS f2c blas lapack FILE clapack-targets.cmake)
+# configure_file(${CLAPACK_SOURCE_DIR}/clapack-config-version.cmake.in
+# ${CLAPACK_BINARY_DIR}/clapack-config-version.cmake @ONLY)
+# configure_file(${CLAPACK_SOURCE_DIR}/clapack-config.cmake.in
+# ${CLAPACK_BINARY_DIR}/clapack-config.cmake @ONLY)
+
+install(FILES
+ ${CMAKE_CURRENT_LIST_DIR}/include/clapack.h
+ ${CMAKE_CURRENT_LIST_DIR}/include/f2c.h
+ DESTINATION include)
\ No newline at end of file
diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt
index 43d7b3f..2bdbd05 100644
--- a/F2CLIBS/libf2c/CMakeLists.txt
+++ b/F2CLIBS/libf2c/CMakeLists.txt
@@ -58,5 +58,5 @@ if(WIN32)
endif()
include_directories(${CLAPACK_SOURCE_DIR}/F2CLIBS/libf2c)
include_directories(${CLAPACK_BINARY_DIR}/F2CLIBS/libf2c)
-add_library(f2c ${OFILES} ${CMAKE_CURRENT_BINARY_DIR}/arith.h)
+add_library(f2c STATIC ${OFILES} ${CMAKE_CURRENT_BINARY_DIR}/arith.h)
set_property(TARGET f2c PROPERTY PREFIX lib)
diff --git a/INCLUDE/clapack.h b/INCLUDE/clapack.h
index d22da98..5ef0a5b 100644
--- a/INCLUDE/clapack.h
+++ b/INCLUDE/clapack.h
@@ -3,6 +3,8 @@
#ifndef __CLAPACK_H
#define __CLAPACK_H
+#include "f2c.h"
+
/* Subroutine */ int caxpy_(integer *n, complex *ca, complex *cx, integer *
incx, complex *cy, integer *incy);
diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt
index ac4cce3..0548c8d 100644
--- a/SRC/CMakeLists.txt
+++ b/SRC/CMakeLists.txt
@@ -375,6 +375,17 @@ endif()
if(BUILD_COMPLEX16)
set(ALLOBJ ${ZLASRC} ${ALLAUX} ${DZLAUX})
endif()
-add_library(lapack ${ALLOBJ} ${ALLXOBJ})
-target_link_libraries(lapack blas)
+if(BUILD_SHARED_LIBS AND MSVC)
+ add_library(lapack SHARED ${ALLOBJ} ${ALLXOBJ} ${CMAKE_CURRENT_LIST_DIR}/lapack.def)
+else()
+ add_library(lapack ${ALLOBJ} ${ALLXOBJ})
+endif(BUILD_SHARED_LIBS AND MSVC)
+
+
+target_link_libraries(lapack ${BLAS_LIBRARIES} f2c)
+
+install(TARGETS lapack
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
diff --git a/TESTING/MATGEN/CMakeLists.txt b/TESTING/MATGEN/CMakeLists.txt
index b2cb47a..54fa7a8 100644
--- a/TESTING/MATGEN/CMakeLists.txt
+++ b/TESTING/MATGEN/CMakeLists.txt
@@ -65,5 +65,5 @@ endif()
if(BUILD_COMPLEX16)
set(ALLOBJ $(ZMATGEN) $(DZATGEN))
endif()
-add_library(tmglib ${ALLOBJ} )
+add_library(tmglib STATIC ${ALLOBJ} )

View File

@ -0,0 +1,4 @@
set(LAPACK_PREV_MODULE_PATH ${CMAKE_MODULE_PATH})
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
_find_package(${ARGS})
set(CMAKE_MODULE_PATH ${LAPACK_PREV_MODULE_PATH})

View File

@ -1,3 +1,4 @@
Source: cli11
Version: 1.8.0
Description: CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface. <https://github.com/CLIUtils/CLI11>
Description: CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.
Homepage: https://github.com/CLIUtils/CLI11

View File

@ -1,139 +1,121 @@
cmake_minimum_required(VERSION 3.11)
project(Clp LANGUAGES C CXX)
set(PROJECT_VERSION 1.16.11)
set(PROJECT_VERSION_MAJOR 1)
set(PROJECT_VERSION_MINOR 16)
set(PROJECT_VERSION_PATCH 11)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/cmake")
if(MSVC)
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} /bigobj /MP /wd4996 /wd4819 /wd4251 /wd4267 /wd4244 /wd4275"
)
endif(MSVC)
if(APPLE)
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override -Wno-unused-command-line-argument -Wno-unused-result -Wno-exceptions"
)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9"
CACHE STRING "Minimum OS X deployment version")
endif(APPLE)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# options
option(BUILD_SHARED_LIBS "" ON)
#
# Introduce variables: * CMAKE_INSTALL_LIBDIR * CMAKE_INSTALL_BINDIR
include(GNUInstallDirs)
# Include module with fuction 'write_basic_package_version_file'
include(CMakePackageConfigHelpers)
# Layout. This works for all platforms: * <prefix>/lib*/cmake/<PROJECT-NAME> *
# <prefix>/lib*/ * <prefix>/include/
set(config_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
# Configuration
set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake")
set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake")
set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
set(namespace "Coin::")
# Packages
find_package(CoinUtils REQUIRED)
find_package(Osi REQUIRED)
# Add sources
include_directories(Clp/src/)
include_directories(Clp/src/OsiClp)
file(GLOB CLP_SOURCES
Clp/src/*.hpp
Clp/src/*.cpp
Clp/src/OsiClp/*.hpp
Clp/src/OsiClp/*.cpp)
file(GLOB CLP_REMOVE
Clp/src/ClpCholeskyMumps.cpp
Clp/src/ClpCholeskyUfl.cpp
Clp/src/ClpCholeskyWssmp.cpp
Clp/src/ClpCholeskyWssmpKKT.cpp
Clp/src/ClpMain.cpp
Clp/src/*Abc*.cpp
Clp/src/ClpCholeskyMumps.hpp
Clp/src/ClpCholeskyUfl.hpp
Clp/src/ClpCholeskyWssmp.hpp
Clp/src/ClpCholeskyWssmpKKT.hpp
Clp/src/ClpMain.hpp
Clp/src/*Abc*.hpp
Clp/src/*Abc*.h)
list(REMOVE_ITEM CLP_SOURCES ${CLP_REMOVE})
add_library(${PROJECT_NAME} ${CLP_SOURCES})
target_include_directories(${PROJECT_NAME}
PUBLIC $<INSTALL_INTERFACE:include/coin>)
target_compile_definitions(${PROJECT_NAME}
PUBLIC
-DHAVE_CMATH
-D_CRT_SECURE_NO_WARNINGS
-DCOIN_HAS_CLP)
target_link_libraries(${PROJECT_NAME} PRIVATE Coin::CoinUtils Coin::Osi)
install(TARGETS ${PROJECT_NAME}
EXPORT "${TARGETS_EXPORT_NAME}"
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES
DESTINATION include)
install(DIRECTORY Clp/src/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/coin
FILES_MATCHING
PATTERN "*.h"
PATTERN "*.hpp"
PATTERN "config_default.h"
EXCLUDE)
install(DIRECTORY Clp/src/OsiClp/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/coin
FILES_MATCHING
PATTERN "*.h"
PATTERN "*.hpp"
PATTERN "config_default.h"
EXCLUDE)
#
# Install Libraries
#
# Configure '<PROJECT-NAME>ConfigVersion.cmake' Use: * PROJECT_VERSION
write_basic_package_version_file("${version_config}"
COMPATIBILITY SameMajorVersion)
# Configure '<PROJECT-NAME>Config.cmake' Use variables: * TARGETS_EXPORT_NAME *
# PROJECT_NAME
configure_package_config_file("Config.cmake.in"
"${project_config}"
INSTALL_DESTINATION
"${config_install_dir}")
# Config * <prefix>/lib/cmake/Foo/FooConfig.cmake *
# <prefix>/lib/cmake/Foo/FooConfigVersion.cmake
install(FILES "${project_config}" "${version_config}"
DESTINATION "${config_install_dir}")
# Config * <prefix>/lib/cmake/Foo/FooTargets.cmake
install(EXPORT "${TARGETS_EXPORT_NAME}"
NAMESPACE "${namespace}"
DESTINATION "${config_install_dir}")
cmake_minimum_required(VERSION 3.11)
project(Clp LANGUAGES C CXX)
set(PROJECT_VERSION 1.16.11)
set(PROJECT_VERSION_MAJOR 1)
set(PROJECT_VERSION_MINOR 16)
set(PROJECT_VERSION_PATCH 11)
set(CMAKE_CXX_STANDARD 14)
set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed")
set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed")
set(INSTALL_INCLUDE_DIR "include/Coin" CACHE PATH "Path where headers will be installed")
set(INSTALL_CMAKE_DIR "share/${PROJECT_NAME}" CACHE PATH "Path where cmake configs will be installed")
# Make relative paths absolute (needed later on)
set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR})
foreach(p LIB BIN INCLUDE CMAKE)
set(var INSTALL_${p}_DIR)
if(NOT IS_ABSOLUTE "${${var}}")
set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
endif()
endforeach()
if(MSVC)
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} /bigobj /MP /wd4996 /wd4819 /wd4251 /wd4267 /wd4244 /wd4275"
)
endif()
if(APPLE)
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override -Wno-unused-command-line-argument -Wno-unused-result -Wno-exceptions"
)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9"
CACHE STRING "Minimum OS X deployment version")
endif()
find_package(CoinUtils REQUIRED)
find_package(Osi REQUIRED)
file(GLOB CLP_SOURCES
Clp/src/*.hpp
Clp/src/*.cpp
Clp/src/OsiClp/*.hpp
Clp/src/OsiClp/*.cpp)
file(GLOB CLP_REMOVE
Clp/src/ClpCholeskyMumps.cpp
Clp/src/ClpCholeskyUfl.cpp
Clp/src/ClpCholeskyWssmp.cpp
Clp/src/ClpCholeskyWssmpKKT.cpp
Clp/src/ClpMain.cpp
Clp/src/*Abc*.cpp
Clp/src/ClpCholeskyMumps.hpp
Clp/src/ClpCholeskyUfl.hpp
Clp/src/ClpCholeskyWssmp.hpp
Clp/src/ClpCholeskyWssmpKKT.hpp
Clp/src/ClpMain.hpp
Clp/src/*Abc*.hpp
Clp/src/*Abc*.h)
list(REMOVE_ITEM CLP_SOURCES ${CLP_REMOVE})
add_library(${PROJECT_NAME} ${CLP_SOURCES})
target_include_directories(${PROJECT_NAME}
PUBLIC
$<INSTALL_INTERFACE:${RELATIVE_INSTALL_INCLUDE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Clp/src/>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Clp/src/OsiClp>)
if(MSVC)
target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()
target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_CMATH)
target_compile_definitions(${PROJECT_NAME} PUBLIC COIN_HAS_CLP)
target_link_libraries(${PROJECT_NAME} PRIVATE Coin::CoinUtils Coin::Osi)
install(DIRECTORY Clp/src/
DESTINATION ${INSTALL_INCLUDE_DIR}
FILES_MATCHING
PATTERN "*.h"
PATTERN "*.hpp"
PATTERN "config_default.h" EXCLUDE)
install(DIRECTORY Clp/src/OsiClp/
DESTINATION ${INSTALL_INCLUDE_DIR}
FILES_MATCHING
PATTERN "*.h"
PATTERN "*.hpp"
PATTERN "config_default.h" EXCLUDE)
install(TARGETS ${PROJECT_NAME}
EXPORT "${PROJECT_NAME}Targets"
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin)
include(CMakePackageConfigHelpers)
set(version_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}ConfigVersion.cmake")
set(project_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}Config.cmake")
set(namespace "Coin::")
write_basic_package_version_file("${version_config}"
COMPATIBILITY SameMajorVersion)
configure_package_config_file("Config.cmake.in"
"${project_config}"
INSTALL_DESTINATION
"${INSTALL_CMAKE_DIR}")
install(FILES "${project_config}" "${version_config}"
DESTINATION "${INSTALL_CMAKE_DIR}")
install(EXPORT "${PROJECT_NAME}Targets"
NAMESPACE "${namespace}"
DESTINATION "${INSTALL_CMAKE_DIR}")

View File

@ -1,4 +1,4 @@
Source: clp
Version: 1.17.2
Description: Clp (Coin-or linear programming) is an open-source linear programming solver written in C++. It is primarily meant to be used as a callable library, but a basic, stand-alone executable version is also available.
Build-Depends: coinutils, osi
Source: clp
Version: 1.17.2-1
Description: Clp (Coin-or linear programming) is an open-source linear programming solver written in C++. It is primarily meant to be used as a callable library, but a basic, stand-alone executable version is also available.
Build-Depends: coinutils, osi

View File

@ -1,5 +1,5 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
check_required_components("@PROJECT_NAME@")
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
check_required_components("@PROJECT_NAME@")

View File

@ -19,8 +19,12 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Clp")
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") #on case-sensitive filesystems, it's necessary to rename and make it lowercase
vcpkg_fixup_cmake_targets(CONFIG_PATH share/Clp)
else()
vcpkg_fixup_cmake_targets()
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/clp RENAME copyright)

View File

@ -8,17 +8,28 @@ set(PROJECT_VERSION_MINOR 10)
set(PROJECT_VERSION_PATCH 14)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed")
set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed")
set(INSTALL_INCLUDE_DIR "include/Coin" CACHE PATH "Path where headers will be installed")
set(INSTALL_CMAKE_DIR "share/${PROJECT_NAME}" CACHE PATH "Path where cmake configs will be installed")
# Make relative paths absolute (needed later on)
set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR})
foreach(p LIB BIN INCLUDE CMAKE)
set(var INSTALL_${p}_DIR)
if(NOT IS_ABSOLUTE "${${var}}")
set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
endif()
endforeach()
if(MSVC)
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} /bigobj /MP /wd4996 /wd4819 /wd4251 /wd4267 /wd4244 /wd4275"
)
endif(MSVC)
endif()
if(APPLE)
set(
CMAKE_CXX_FLAGS
@ -26,84 +37,59 @@ if(APPLE)
)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9"
CACHE STRING "Minimum OS X deployment version")
endif(APPLE)
endif()
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# options
option(BUILD_SHARED_LIBS "" ON)
#
# install
#
# Introduce variables: * CMAKE_INSTALL_LIBDIR * CMAKE_INSTALL_BINDIR
include(GNUInstallDirs)
# Include module with fuction 'write_basic_package_version_file'
include(CMakePackageConfigHelpers)
# Layout. This works for all platforms: * <prefix>/lib*/cmake/<PROJECT-NAME> *
# <prefix>/lib*/ * <prefix>/include/
set(config_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
# Configuration
set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake")
set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake")
set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
set(namespace "Coin::")
#
# Add sources
#
include_directories(CoinUtils/src)
include(CheckIncludeFileCXX)
include(CheckIncludeFile)
check_include_file_cxx("cmath" HAVE_CMATH)
check_include_file_cxx("cfloat" HAVE_CFLOAT)
if(NOT HAVE_CMATH OR NOT HAVE_CFLOAT)
message(FATAL_ERROR "Missing necessary include files, like cmath or cfloat")
endif()
file(GLOB UTILS_SOURCES
CoinUtils/src/*.hpp
CoinUtils/src/*.cpp
CoinUtils/src/*.h)
add_library(${PROJECT_NAME} ${UTILS_SOURCES})
target_include_directories(${PROJECT_NAME}
PUBLIC $<INSTALL_INTERFACE:include/coin>)
target_compile_definitions(${PROJECT_NAME}
PUBLIC
$<INSTALL_INTERFACE:-DHAVE_CMATH>
$<INSTALL_INTERFACE:-D_CRT_SECURE_NO_WARNINGS>)
target_include_directories(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:${RELATIVE_INSTALL_INCLUDE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/CoinUtils/src>)
install(TARGETS ${PROJECT_NAME}
EXPORT "${TARGETS_EXPORT_NAME}"
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES
DESTINATION include)
if(MSVC)
target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()
target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_CMATH HAVE_CFLOAT)
install(DIRECTORY CoinUtils/src/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/coin
DESTINATION ${INSTALL_INCLUDE_DIR}
FILES_MATCHING
PATTERN "*.h"
PATTERN "*.hpp")
#
# Install Libraries
#
# Configure '<PROJECT-NAME>ConfigVersion.cmake' Use: * PROJECT_VERSION
install(TARGETS ${PROJECT_NAME}
EXPORT "${PROJECT_NAME}Targets"
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin)
include(CMakePackageConfigHelpers)
set(version_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}ConfigVersion.cmake")
set(project_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}Config.cmake")
set(namespace "Coin::")
write_basic_package_version_file("${version_config}"
COMPATIBILITY SameMajorVersion)
# Configure '<PROJECT-NAME>Config.cmake' Use variables: * TARGETS_EXPORT_NAME *
# PROJECT_NAME
configure_package_config_file("Config.cmake.in"
"${project_config}"
INSTALL_DESTINATION
"${config_install_dir}")
"${INSTALL_CMAKE_DIR}")
# Config * <prefix>/lib/cmake/Foo/FooConfig.cmake *
# <prefix>/lib/cmake/Foo/FooConfigVersion.cmake
install(FILES "${project_config}" "${version_config}"
DESTINATION "${config_install_dir}")
DESTINATION "${INSTALL_CMAKE_DIR}")
# Config * <prefix>/lib/cmake/Foo/FooTargets.cmake
install(EXPORT "${TARGETS_EXPORT_NAME}"
install(EXPORT "${PROJECT_NAME}Targets"
NAMESPACE "${namespace}"
DESTINATION "${config_install_dir}")
DESTINATION "${INSTALL_CMAKE_DIR}")

View File

@ -1,3 +1,3 @@
Source: coinutils
Version: 2.11.2
Version: 2.11.2-1
Description: CoinUtils (Coin-or Utilities) is an open-source collection of classes and functions that are generally useful to more than one COIN-OR project

View File

@ -1,5 +1,5 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
check_required_components("@PROJECT_NAME@")

View File

@ -19,10 +19,12 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/CoinUtils")
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") #on case-sensitive filesystems, it's necessary to rename and make it lowercase
vcpkg_fixup_cmake_targets(CONFIG_PATH share/CoinUtils)
else()
vcpkg_fixup_cmake_targets()
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/coinutils RENAME copyright)

View File

@ -1,6 +1,7 @@
Source: corrade
Version: 2019.01-1
Description: C++11/C++14 multiplatform utility library http://magnum.graphics/corrade/
Description: C++11/C++14 multiplatform utility library
Homepage: http://magnum.graphics/corrade/
Default-Features: interconnect, pluginmanager, testsuite, utility
Feature: interconnect

View File

@ -1,4 +1,4 @@
Source: cppcms
Version: 1.1.0-2
Version: 1.2.1
Description: CppCMS is a Free High Performance Web Development Framework (not a CMS) aimed at Rapid Web Application Development
Build-Depends: icu, pcre, openssl, zlib

View File

@ -5,8 +5,8 @@ vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO artyom-beilis/cppcms
REF v1.1.0
SHA512 cfc77f28ddee05b8a350fff1dbd7c09adcf008b8662d4f977b203dee50b5fadae97df499a655ebb48263a7448e0bdca514c8ac52ea805bf33e48612dabaa69f4
REF b72b19915794d1af63c9a9e9bea58e20a4ad93d4
SHA512 e99d34d14fbde22be725ac2c0bec069fb584e45c66767af75efaf454ca61a7a5e57434bf86109f910884c72202b8cf98fe16505e7d3d30d9218abd4d8b27d5df
)
vcpkg_find_acquire_program(PYTHON2)
@ -27,5 +27,5 @@ file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe)
file(REMOVE ${EXE_FILES})
# Handle copyright
file(COPY ${SOURCE_PATH}/LGPLv3.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppcms)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppcms/LGPLv3.txt ${CURRENT_PACKAGES_DIR}/share/cppcms/copyright)
file(COPY ${SOURCE_PATH}/MIT.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppcms)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppcms/MIT.TXT ${CURRENT_PACKAGES_DIR}/share/cppcms/copyright)

3
ports/cppcodec/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: cppcodec
Version: 0.2
Description: Header-only C++11 library to encode/decode base64, base64url, base32, base32hex and hex (a.k.a. base16) as specified in RFC 4648, plus Crockford's base32.

View File

@ -0,0 +1,24 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO tplgy/cppcodec
REF v0.2
SHA512 50c9c81cdb12560c87e513e1fd22c1ad24ea37b7d20a0e3044d43fb887f4c6494c69468e4d0811cd2fc1ae8fdb01b01cfb9f3cfdd8611d4bb0221cbd38cbead3
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_TESTING=OFF
)
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1,3 +1,3 @@
Source: cryptopp
Version: 8.1.0
Version: 8.1.0-1
Description: Crypto++ is a free C++ class library of cryptographic schemes.

View File

@ -26,6 +26,14 @@ vcpkg_from_github(
file(COPY ${CMAKE_SOURCE_PATH}/cryptopp-config.cmake DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_SOURCE_PATH}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
# disable assembly on OSX to fix broken build
if(APPLE)
set(CRYPTOPP_DISABLE_ASM "ON")
else()
set(CRYPTOPP_DISABLE_ASM "OFF")
endif()
# Dynamic linking should be avoided for Crypto++ to reduce the attack surface,
# so generate a static lib for both dynamic and static vcpkg targets.
# See also:
@ -40,6 +48,7 @@ vcpkg_configure_cmake(
-DBUILD_STATIC=ON
-DBUILD_TESTING=OFF
-DBUILD_DOCUMENTATION=OFF
-DDISABLE_ASM=${CRYPTOPP_DISABLE_ASM}
)
vcpkg_install_cmake()

View File

@ -1,5 +1,5 @@
Source: curl
Version: 7.65.0
Version: 7.65.0-1
Build-Depends: zlib
Description: A library for transferring data with URLs
Default-Features: ssl

View File

@ -123,9 +123,9 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# the native CMAKE_EXECUTABLE_SUFFIX does not work in portfiles, so emulate it
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") # Windows
set(EXECUTABLE_SUFFIX ".exe")
set(EXECUTABLE_SUFFIX ".exe")
else()
set(EXECUTABLE_SUFFIX "")
set(EXECUTABLE_SUFFIX "")
endif()
if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/curl${EXECUTABLE_SUFFIX}")
@ -134,9 +134,9 @@ if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/curl${EXECUTABLE_SUFFIX}")
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/curl)
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(READ "${CURRENT_PACKAGES_DIR}/share/curl/curl-target-release.cmake" RELEASE_MODULE)
file(READ "${CURRENT_PACKAGES_DIR}/share/curl/CURLTargets-release.cmake" RELEASE_MODULE)
string(REPLACE "\${_IMPORT_PREFIX}/bin/curl${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/curl/curl${EXECUTABLE_SUFFIX}" RELEASE_MODULE "${RELEASE_MODULE}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/curl/curl-target-release.cmake" "${RELEASE_MODULE}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/curl/CURLTargets-release.cmake" "${RELEASE_MODULE}")
endif()
endif()

View File

@ -1,3 +1,3 @@
Source: darts-clone
Version: 1767ab87cffe
Version: 1767ab87cffe-1
Description: A static double-array trie structure

View File

@ -23,4 +23,6 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/Makefile.am)
file(INSTALL ${SOURCE_PATH}/COPYING.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/darts-clone RENAME copyright)

View File

@ -1,3 +1,3 @@
Source: dcmtk
Version: 3.6.3-1
Version: 3.6.4
Description: This DICOM ToolKit (DCMTK) package consists of source code, documentation and installation instructions for a set of software libraries and applications implementing part of the DICOM/MEDICOM Standard.

Some files were not shown because too many files have changed in this diff Show More