From e76edbc426cd99cc1496980bdfd690b6c92285da Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Mon, 9 Jan 2017 12:11:06 +0100 Subject: [PATCH 001/612] ceres: add ceres-solver hunter fork v1.12.0-p0 --- cmake/configs/default.cmake | 1 + cmake/projects/ceres-solver/hunter.cmake | 35 ++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 cmake/projects/ceres-solver/hunter.cmake diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index e855c5838a..1540bed3e5 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -101,6 +101,7 @@ hunter_config(Catch VERSION 1.5.9) hunter_config(autobahn-cpp VERSION 0.2.0) hunter_config(ccv VERSION 0.7-p6) hunter_config(cereal VERSION 1.2.1-p1) +hunter_config(ceres-solver VERSION 1.12.0-p0) hunter_config(clBLAS VERSION 2.10.0-p0) hunter_config(convertutf VERSION 1.0.1) hunter_config(crashpad VERSION v0.0.1-p0) diff --git a/cmake/projects/ceres-solver/hunter.cmake b/cmake/projects/ceres-solver/hunter.cmake new file mode 100644 index 0000000000..bdf86c8473 --- /dev/null +++ b/cmake/projects/ceres-solver/hunter.cmake @@ -0,0 +1,35 @@ +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +# Load used modules +include(hunter_add_version) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) + +# use base url for hunter fork +set(_hunter_ceres_base_url_fork "https://github.com/hunter-packages/ceres-solver/archive") + +# List of versions +hunter_add_version( + PACKAGE_NAME + ceres-solver + VERSION + "1.12.0-p0" + URL + "${_hunter_ceres_base_url_fork}/v1.12.0-p0.tar.gz" + SHA1 + c8a24d83bf4b26b99fd8fc3bed28a267e6247c85 +) +# explicitly remove dependency on gflags (only needed for tests) +hunter_cmake_args(ceres-solver CMAKE_ARGS + GFLAGS=OFF + BUILD_TESTING=OFF + CMAKE_BUILD_TYPE=Release +) + +# Pick a download scheme +hunter_pick_scheme(DEFAULT url_sha1_cmake) # use scheme for cmake projects + +# Download package. +hunter_download(PACKAGE_NAME ceres-solver) + From 1fd6c0f8c75db22e8814b2ba7c36cb5bcfe12fb7 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Mon, 16 Jan 2017 15:45:48 +0100 Subject: [PATCH 002/612] ceres: add example --- examples/ceres-solver/CMakeLists.txt | 18 ++++++++++++++ examples/ceres-solver/foo.cpp | 36 ++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 examples/ceres-solver/CMakeLists.txt create mode 100644 examples/ceres-solver/foo.cpp diff --git a/examples/ceres-solver/CMakeLists.txt b/examples/ceres-solver/CMakeLists.txt new file mode 100644 index 0000000000..e1fe6607d0 --- /dev/null +++ b/examples/ceres-solver/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright (c) 2015, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-ceres-solver) + +hunter_add_package(ceres-solver) + +find_package(Ceres CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo ceres) + diff --git a/examples/ceres-solver/foo.cpp b/examples/ceres-solver/foo.cpp new file mode 100644 index 0000000000..986630a72b --- /dev/null +++ b/examples/ceres-solver/foo.cpp @@ -0,0 +1,36 @@ +#include +#include + +using ceres::AutoDiffCostFunction; +using ceres::CostFunction; +using ceres::Problem; +using ceres::Solver; +using ceres::Solve; + +struct ModelEqual2 +{ + // Calculate the residuals, + // the input parameters are the ones optimized for + template + bool operator()(const T* const x, + T* residual) const { + residual[0] = T(2) - x[0]; + return true; + } +}; +int main(int argc, char* argv[]) { + Problem problem; + // variable to optimize in place + double x = 0; + Solver::Options options; + Solver::Summary summary; + // AutoDiffCostFunction + CostFunction* cost_fun + = new AutoDiffCostFunction( + new ModelEqual2()); + problem.AddResidualBlock(cost_fun, NULL, &x); + Solve(options, &problem, &summary); + + // output optimized result + std::cout << "x: " << x << std::endl; +} From 679c464bdd12448aaff15291cfedc30147c72626 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Wed, 18 Jan 2017 10:56:47 +0100 Subject: [PATCH 003/612] ceres: remove explicit CMAKE_BUILD_TYPE --- cmake/projects/ceres-solver/hunter.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/cmake/projects/ceres-solver/hunter.cmake b/cmake/projects/ceres-solver/hunter.cmake index bdf86c8473..ed21c158c7 100644 --- a/cmake/projects/ceres-solver/hunter.cmake +++ b/cmake/projects/ceres-solver/hunter.cmake @@ -24,7 +24,6 @@ hunter_add_version( hunter_cmake_args(ceres-solver CMAKE_ARGS GFLAGS=OFF BUILD_TESTING=OFF - CMAKE_BUILD_TYPE=Release ) # Pick a download scheme From e6e450f2bc00150ae900dffac1caeb9036d142de Mon Sep 17 00:00:00 2001 From: Tom Mason Date: Sat, 11 Mar 2017 12:05:26 +0000 Subject: [PATCH 004/612] add tomcrypt package --- cmake/configs/default.cmake | 1 + cmake/projects/tomcrypt/hunter.cmake | 27 +++++++++++++++++++ examples/tomcrypt/CMakeLists.txt | 14 ++++++++++ examples/tomcrypt/main.c | 40 ++++++++++++++++++++++++++++ 4 files changed, 82 insertions(+) create mode 100644 cmake/projects/tomcrypt/hunter.cmake create mode 100644 examples/tomcrypt/CMakeLists.txt create mode 100644 examples/tomcrypt/main.c diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 7ebaab5fd1..ea628d1ff0 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -97,6 +97,7 @@ hunter_config(Sober VERSION 0.1.3) hunter_config(Sugar VERSION 1.2.2) hunter_config(TIFF VERSION 4.0.2-p3) hunter_config(tommath VERSION 1.0-p2) +hunter_config(tomcrypt VERSION 1.17-p1) hunter_config(WTL VERSION 9.1.5321) hunter_config(Washer VERSION 0.1.2) hunter_config(WinSparkle VERSION 0.4.0) diff --git a/cmake/projects/tomcrypt/hunter.cmake b/cmake/projects/tomcrypt/hunter.cmake new file mode 100644 index 0000000000..53bcc0fb3e --- /dev/null +++ b/cmake/projects/tomcrypt/hunter.cmake @@ -0,0 +1,27 @@ +# cmake/projects/Example/hunter.cmake + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +# Load used modules +include(hunter_add_version) +include(hunter_download) +include(hunter_pick_scheme) +include(hunter_cacheable) + +# List of versions here... +hunter_add_version( + PACKAGE_NAME + tomcrypt + VERSION + "1.17-p1" + URL + "https://github.com/hunter-packages/libtomcrypt/archive/1.17-p1.tar.gz" + SHA1 + 3c9c61ee441b77517525528f5c191fa19801fd30 +) + +# Pick a download scheme +hunter_pick_scheme(DEFAULT url_sha1_cmake) # use scheme for cmake projects + +hunter_cacheable(tomcrypt) +hunter_download(PACKAGE_NAME tomcrypt) diff --git a/examples/tomcrypt/CMakeLists.txt b/examples/tomcrypt/CMakeLists.txt new file mode 100644 index 0000000000..ce1d582f1f --- /dev/null +++ b/examples/tomcrypt/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(example-libtomcrypt) + +hunter_add_package(tomcrypt) + +find_package(tomcrypt CONFIG REQUIRED) + +add_executable(example-libtomcrypt main.c) +target_link_libraries(example-libtomcrypt tomcrypt::tomcrypt) diff --git a/examples/tomcrypt/main.c b/examples/tomcrypt/main.c new file mode 100644 index 0000000000..1b0248c36a --- /dev/null +++ b/examples/tomcrypt/main.c @@ -0,0 +1,40 @@ +#include +int main(void) +{ + unsigned char buffer[100], hash[MAXBLOCKSIZE]; + int idx, x; + hash_state md; + + /* register hashes .... */ + if (register_hash(&md5_desc) == -1) { + printf("Error registering MD5.\n"); + return -1; + } + + /* register other hashes ... */ + /* prompt for name and strip newline */ + printf("Enter hash name: \n"); + fgets(buffer, sizeof(buffer), stdin); + buffer[strlen(buffer) - 1] = 0; + + /* get hash index */ + idx = find_hash(buffer); + if (idx == -1) { + printf("Invalid hash name!\n"); + return -1; + } + + /* hash input until blank line */ + hash_descriptor[idx].init(&md); + while (fgets(buffer, sizeof(buffer), stdin) != NULL) + hash_descriptor[idx].process(&md, buffer, strlen(buffer)); + + hash_descriptor[idx].done(&md, hash); + + /* dump to screen */ + for (x = 0; x < hash_descriptor[idx].hashsize; x++) + printf("%02x ", hash[x]); + + printf("\n"); + return 0; +} \ No newline at end of file From 8cfa600cbe0ca3bde569176e5c41695f21ba2b10 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 15 Mar 2017 19:46:24 +0800 Subject: [PATCH 005/612] BZip2 1.0.6-p2 --- cmake/configs/default.cmake | 2 +- cmake/projects/BZip2/hunter.cmake | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 7ebaab5fd1..95726493a0 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -37,7 +37,7 @@ hunter_config(ArrayFire VERSION 3.3.1-p0) hunter_config(Assimp VERSION 3.2-p1) hunter_config(Async++ VERSION 0.0.3-hunter) hunter_config(Avahi VERSION 0.6.31) -hunter_config(BZip2 VERSION 1.0.6-p1) +hunter_config(BZip2 VERSION 1.0.6-p2) hunter_config(Boost VERSION 1.63.0) hunter_config(BoostCompute VERSION 0.5-p0) hunter_config(BoostProcess VERSION 0.5) diff --git a/cmake/projects/BZip2/hunter.cmake b/cmake/projects/BZip2/hunter.cmake index 1b526d792e..f9cd92b385 100644 --- a/cmake/projects/BZip2/hunter.cmake +++ b/cmake/projects/BZip2/hunter.cmake @@ -9,11 +9,6 @@ include(hunter_download) include(hunter_pick_scheme) include(hunter_report_broken_package) -string(COMPARE EQUAL "${CMAKE_OSX_SYSROOT}" "iphoneos" _hunter_ios) -if(_hunter_ios) - hunter_report_broken_package("BZip2 is broken on iOS") -endif() - hunter_add_version( PACKAGE_NAME BZip2 @@ -25,6 +20,17 @@ hunter_add_version( 5eae50a9a0ded0ee0ea5201001b2f4f726dbf8ed ) +hunter_add_version( + PACKAGE_NAME + BZip2 + VERSION + "1.0.6-p2" + URL + "https://github.com/hunter-packages/bzip2/archive/v1.0.6-p2.tar.gz" + SHA1 + 76d5bdd269160a87948fec676c75c2bcc6888585 +) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(BZip2) hunter_download(PACKAGE_NAME BZip2) From 975dee47a9a2894f001c7833c72895a889dac25c Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 15 Mar 2017 23:45:52 +0800 Subject: [PATCH 006/612] Add 'lzma' --- cmake/configs/default.cmake | 1 + cmake/projects/lzma/hunter.cmake | 24 ++++++++++++++++++++++++ examples/lzma/CMakeLists.txt | 16 ++++++++++++++++ examples/lzma/foo.cpp | 6 ++++++ 4 files changed, 47 insertions(+) create mode 100644 cmake/projects/lzma/hunter.cmake create mode 100644 examples/lzma/CMakeLists.txt create mode 100644 examples/lzma/foo.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 95726493a0..7ce23f864f 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -148,6 +148,7 @@ hunter_config(libsodium VERSION 1.0.10) hunter_config(libxml2 VERSION 2.9.4) hunter_config(libyuv VERSION 1514-p3) hunter_config(log4cplus VERSION 1.2.0-p0) +hunter_config(lzma VERSION 5.2.3-p0) hunter_config(mini_chromium VERSION 0.0.1-p2) hunter_config(minizip VERSION 1.0.1-p1) hunter_config(mpark_variant VERSION 1.0.0) diff --git a/cmake/projects/lzma/hunter.cmake b/cmake/projects/lzma/hunter.cmake new file mode 100644 index 0000000000..68fdba90a6 --- /dev/null +++ b/cmake/projects/lzma/hunter.cmake @@ -0,0 +1,24 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + lzma + VERSION + 5.2.3-p0 + URL + "https://github.com/hunter-packages/lzma/archive/v5.2.3-p0.tar.gz" + SHA1 + 98de5eb2f3bf361a836ee78509f311db1c54494b +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(lzma) +hunter_download(PACKAGE_NAME lzma) diff --git a/examples/lzma/CMakeLists.txt b/examples/lzma/CMakeLists.txt new file mode 100644 index 0000000000..976cf11f9d --- /dev/null +++ b/examples/lzma/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-lzma) + +hunter_add_package(lzma) +find_package(lzma CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo lzma::lzma) diff --git a/examples/lzma/foo.cpp b/examples/lzma/foo.cpp new file mode 100644 index 0000000000..0691c0a3e7 --- /dev/null +++ b/examples/lzma/foo.cpp @@ -0,0 +1,6 @@ +#include +#include + +int main() { + std::cout << "lzma version: '" << lzma_version_string() << "'" << std::endl; +} From 4623ae84a464dd7a181f24e5addf733ec18a3d10 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 16 Mar 2017 13:22:33 +0800 Subject: [PATCH 007/612] lzma 5.2.3-p1 --- cmake/configs/default.cmake | 2 +- cmake/projects/lzma/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 7ce23f864f..1bf422d58b 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -148,7 +148,7 @@ hunter_config(libsodium VERSION 1.0.10) hunter_config(libxml2 VERSION 2.9.4) hunter_config(libyuv VERSION 1514-p3) hunter_config(log4cplus VERSION 1.2.0-p0) -hunter_config(lzma VERSION 5.2.3-p0) +hunter_config(lzma VERSION 5.2.3-p1) hunter_config(mini_chromium VERSION 0.0.1-p2) hunter_config(minizip VERSION 1.0.1-p1) hunter_config(mpark_variant VERSION 1.0.0) diff --git a/cmake/projects/lzma/hunter.cmake b/cmake/projects/lzma/hunter.cmake index 68fdba90a6..194c25b0a7 100644 --- a/cmake/projects/lzma/hunter.cmake +++ b/cmake/projects/lzma/hunter.cmake @@ -19,6 +19,17 @@ hunter_add_version( 98de5eb2f3bf361a836ee78509f311db1c54494b ) +hunter_add_version( + PACKAGE_NAME + lzma + VERSION + 5.2.3-p1 + URL + "https://github.com/hunter-packages/lzma/archive/v5.2.3-p1.tar.gz" + SHA1 + 391ace8ca1ae84d3b4fb9750943749bc6b589e87 +) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(lzma) hunter_download(PACKAGE_NAME lzma) From ab64e09fa467e8ef03490da61703c2ca9e774add Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 17 Mar 2017 15:36:12 +0800 Subject: [PATCH 008/612] lzma 5.2.3-p2 --- cmake/configs/default.cmake | 2 +- cmake/projects/lzma/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 1bf422d58b..07647f5c1d 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -148,7 +148,7 @@ hunter_config(libsodium VERSION 1.0.10) hunter_config(libxml2 VERSION 2.9.4) hunter_config(libyuv VERSION 1514-p3) hunter_config(log4cplus VERSION 1.2.0-p0) -hunter_config(lzma VERSION 5.2.3-p1) +hunter_config(lzma VERSION 5.2.3-p2) hunter_config(mini_chromium VERSION 0.0.1-p2) hunter_config(minizip VERSION 1.0.1-p1) hunter_config(mpark_variant VERSION 1.0.0) diff --git a/cmake/projects/lzma/hunter.cmake b/cmake/projects/lzma/hunter.cmake index 194c25b0a7..f34635903a 100644 --- a/cmake/projects/lzma/hunter.cmake +++ b/cmake/projects/lzma/hunter.cmake @@ -30,6 +30,17 @@ hunter_add_version( 391ace8ca1ae84d3b4fb9750943749bc6b589e87 ) +hunter_add_version( + PACKAGE_NAME + lzma + VERSION + 5.2.3-p2 + URL + "https://github.com/hunter-packages/lzma/archive/v5.2.3-p2.tar.gz" + SHA1 + 758b108c2acb060ff4ddd9118d71809b3dd60427 +) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(lzma) hunter_download(PACKAGE_NAME lzma) From 853305aab8b30c640f7210eeca57677426a8cd5d Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 17 Mar 2017 17:21:12 +0800 Subject: [PATCH 009/612] Non-CMake packages: Respect 'CMAKE_POSITION_INDEPENDENT_CODE' variable --- cmake/modules/hunter_dump_cmake_flags.cmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cmake/modules/hunter_dump_cmake_flags.cmake b/cmake/modules/hunter_dump_cmake_flags.cmake index 8f4539fbb0..734635e2ca 100644 --- a/cmake/modules/hunter_dump_cmake_flags.cmake +++ b/cmake/modules/hunter_dump_cmake_flags.cmake @@ -89,6 +89,20 @@ function(hunter_dump_cmake_flags) ) endif() + string(COMPARE NOTEQUAL "${CMAKE_CXX_COMPILE_OPTIONS_PIC}" "" has_pic) + if(CMAKE_POSITION_INDEPENDENT_CODE AND has_pic) + set( + CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_PIC}" + ) + endif() + + string(COMPARE NOTEQUAL "${CMAKE_C_COMPILE_OPTIONS_PIC}" "" has_pic) + if(CMAKE_POSITION_INDEPENDENT_CODE AND has_pic) + set( + CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_COMPILE_OPTIONS_PIC}" + ) + endif() + string(COMPARE EQUAL "${x_CPPFLAGS}" "" is_empty) if(NOT is_empty) set("${x_CPPFLAGS}" "${${x_CPPFLAGS}} ${cppflags}" PARENT_SCOPE) From 3f082065dfa6e7c960ea88e177d1e6adc14e817d Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 17 Mar 2017 17:23:33 +0800 Subject: [PATCH 010/612] PACKAGE_INTERNAL_DEPS_ID update for OpenSSL, Boost and odb-boost --- cmake/projects/Boost/atomic/hunter.cmake | 2 +- cmake/projects/Boost/chrono/hunter.cmake | 2 +- cmake/projects/Boost/context/hunter.cmake | 2 +- cmake/projects/Boost/coroutine/hunter.cmake | 2 +- cmake/projects/Boost/date_time/hunter.cmake | 2 +- cmake/projects/Boost/exception/hunter.cmake | 2 +- cmake/projects/Boost/filesystem/hunter.cmake | 2 +- cmake/projects/Boost/graph/hunter.cmake | 2 +- cmake/projects/Boost/graph_parallel/hunter.cmake | 2 +- cmake/projects/Boost/hunter.cmake | 2 +- cmake/projects/Boost/hunter.cmake.in | 2 +- cmake/projects/Boost/iostreams/hunter.cmake | 2 +- cmake/projects/Boost/locale/hunter.cmake | 2 +- cmake/projects/Boost/log/hunter.cmake | 2 +- cmake/projects/Boost/math/hunter.cmake | 2 +- cmake/projects/Boost/mpi/hunter.cmake | 2 +- cmake/projects/Boost/program_options/hunter.cmake | 2 +- cmake/projects/Boost/python/hunter.cmake | 2 +- cmake/projects/Boost/random/hunter.cmake | 2 +- cmake/projects/Boost/regex/hunter.cmake | 2 +- cmake/projects/Boost/serialization/hunter.cmake | 2 +- cmake/projects/Boost/signals/hunter.cmake | 2 +- cmake/projects/Boost/system/hunter.cmake | 2 +- cmake/projects/Boost/test/hunter.cmake | 2 +- cmake/projects/Boost/thread/hunter.cmake | 2 +- cmake/projects/Boost/timer/hunter.cmake | 2 +- cmake/projects/Boost/wave/hunter.cmake | 2 +- cmake/projects/OpenSSL/hunter.cmake | 2 +- cmake/projects/odb-boost/hunter.cmake | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/cmake/projects/Boost/atomic/hunter.cmake b/cmake/projects/Boost/atomic/hunter.cmake index ee1560ce18..972fc75045 100644 --- a/cmake/projects/Boost/atomic/hunter.cmake +++ b/cmake/projects/Boost/atomic/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT atomic - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/chrono/hunter.cmake b/cmake/projects/Boost/chrono/hunter.cmake index d883bc0fe8..91cd36831e 100644 --- a/cmake/projects/Boost/chrono/hunter.cmake +++ b/cmake/projects/Boost/chrono/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT chrono - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/context/hunter.cmake b/cmake/projects/Boost/context/hunter.cmake index 4907b0d833..286e36feee 100644 --- a/cmake/projects/Boost/context/hunter.cmake +++ b/cmake/projects/Boost/context/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT context - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/coroutine/hunter.cmake b/cmake/projects/Boost/coroutine/hunter.cmake index 4787ef397a..bb3392b1b2 100644 --- a/cmake/projects/Boost/coroutine/hunter.cmake +++ b/cmake/projects/Boost/coroutine/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT coroutine - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/date_time/hunter.cmake b/cmake/projects/Boost/date_time/hunter.cmake index 0686caa060..61f05a87ad 100644 --- a/cmake/projects/Boost/date_time/hunter.cmake +++ b/cmake/projects/Boost/date_time/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT date_time - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/exception/hunter.cmake b/cmake/projects/Boost/exception/hunter.cmake index 300c43ef6a..6b058fdf53 100644 --- a/cmake/projects/Boost/exception/hunter.cmake +++ b/cmake/projects/Boost/exception/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT exception - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/filesystem/hunter.cmake b/cmake/projects/Boost/filesystem/hunter.cmake index c0adab2bb7..55c14ca60b 100644 --- a/cmake/projects/Boost/filesystem/hunter.cmake +++ b/cmake/projects/Boost/filesystem/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT filesystem - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/graph/hunter.cmake b/cmake/projects/Boost/graph/hunter.cmake index 0ee8de572b..67cb06bc72 100644 --- a/cmake/projects/Boost/graph/hunter.cmake +++ b/cmake/projects/Boost/graph/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT graph - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/graph_parallel/hunter.cmake b/cmake/projects/Boost/graph_parallel/hunter.cmake index a9f6f9121d..54d3bba3bb 100644 --- a/cmake/projects/Boost/graph_parallel/hunter.cmake +++ b/cmake/projects/Boost/graph_parallel/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT graph_parallel - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/hunter.cmake b/cmake/projects/Boost/hunter.cmake index b4c57a6dc8..afa4bf5301 100644 --- a/cmake/projects/Boost/hunter.cmake +++ b/cmake/projects/Boost/hunter.cmake @@ -245,4 +245,4 @@ hunter_add_version( hunter_pick_scheme(DEFAULT url_sha1_boost) hunter_cacheable(Boost) -hunter_download(PACKAGE_NAME Boost PACKAGE_INTERNAL_DEPS_ID "9") +hunter_download(PACKAGE_NAME Boost PACKAGE_INTERNAL_DEPS_ID "10") diff --git a/cmake/projects/Boost/hunter.cmake.in b/cmake/projects/Boost/hunter.cmake.in index ea1e7e1d7d..f42fac00e4 100644 --- a/cmake/projects/Boost/hunter.cmake.in +++ b/cmake/projects/Boost/hunter.cmake.in @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT boost_component - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/iostreams/hunter.cmake b/cmake/projects/Boost/iostreams/hunter.cmake index 767ac0a9e2..b91e2a626d 100644 --- a/cmake/projects/Boost/iostreams/hunter.cmake +++ b/cmake/projects/Boost/iostreams/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT iostreams - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/locale/hunter.cmake b/cmake/projects/Boost/locale/hunter.cmake index e95fb1e7f5..f67e6ec137 100644 --- a/cmake/projects/Boost/locale/hunter.cmake +++ b/cmake/projects/Boost/locale/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT locale - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/log/hunter.cmake b/cmake/projects/Boost/log/hunter.cmake index 4e70cdc02a..2a39d35517 100644 --- a/cmake/projects/Boost/log/hunter.cmake +++ b/cmake/projects/Boost/log/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT log - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/math/hunter.cmake b/cmake/projects/Boost/math/hunter.cmake index b3862adede..4253f66fed 100644 --- a/cmake/projects/Boost/math/hunter.cmake +++ b/cmake/projects/Boost/math/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT math - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/mpi/hunter.cmake b/cmake/projects/Boost/mpi/hunter.cmake index 3d0c3936fa..1422ad0f37 100644 --- a/cmake/projects/Boost/mpi/hunter.cmake +++ b/cmake/projects/Boost/mpi/hunter.cmake @@ -26,5 +26,5 @@ hunter_download( Boost PACKAGE_COMPONENT mpi - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/program_options/hunter.cmake b/cmake/projects/Boost/program_options/hunter.cmake index d3c3be2715..377610a858 100644 --- a/cmake/projects/Boost/program_options/hunter.cmake +++ b/cmake/projects/Boost/program_options/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT program_options - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/python/hunter.cmake b/cmake/projects/Boost/python/hunter.cmake index b635fe8e10..02ef8145ff 100644 --- a/cmake/projects/Boost/python/hunter.cmake +++ b/cmake/projects/Boost/python/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT python - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/random/hunter.cmake b/cmake/projects/Boost/random/hunter.cmake index 3115770522..ad66cba0c3 100644 --- a/cmake/projects/Boost/random/hunter.cmake +++ b/cmake/projects/Boost/random/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT random - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/regex/hunter.cmake b/cmake/projects/Boost/regex/hunter.cmake index fde68c12b7..f3af40bb57 100644 --- a/cmake/projects/Boost/regex/hunter.cmake +++ b/cmake/projects/Boost/regex/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT regex - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/serialization/hunter.cmake b/cmake/projects/Boost/serialization/hunter.cmake index 58f90491c6..a24f328928 100644 --- a/cmake/projects/Boost/serialization/hunter.cmake +++ b/cmake/projects/Boost/serialization/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT serialization - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/signals/hunter.cmake b/cmake/projects/Boost/signals/hunter.cmake index 8e0bf2696c..aaae3b6a57 100644 --- a/cmake/projects/Boost/signals/hunter.cmake +++ b/cmake/projects/Boost/signals/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT signals - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/system/hunter.cmake b/cmake/projects/Boost/system/hunter.cmake index eb03ebac25..d16eb9e30e 100644 --- a/cmake/projects/Boost/system/hunter.cmake +++ b/cmake/projects/Boost/system/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT system - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/test/hunter.cmake b/cmake/projects/Boost/test/hunter.cmake index 76034a60ae..2db1153979 100644 --- a/cmake/projects/Boost/test/hunter.cmake +++ b/cmake/projects/Boost/test/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT test - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/thread/hunter.cmake b/cmake/projects/Boost/thread/hunter.cmake index eef5743ca3..c3999730bf 100644 --- a/cmake/projects/Boost/thread/hunter.cmake +++ b/cmake/projects/Boost/thread/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT thread - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/timer/hunter.cmake b/cmake/projects/Boost/timer/hunter.cmake index f1b08dd1ac..f0136adbb5 100644 --- a/cmake/projects/Boost/timer/hunter.cmake +++ b/cmake/projects/Boost/timer/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT timer - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/Boost/wave/hunter.cmake b/cmake/projects/Boost/wave/hunter.cmake index 856401d108..05f5174bd7 100644 --- a/cmake/projects/Boost/wave/hunter.cmake +++ b/cmake/projects/Boost/wave/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT wave - PACKAGE_INTERNAL_DEPS_ID "9" + PACKAGE_INTERNAL_DEPS_ID "10" ) diff --git a/cmake/projects/OpenSSL/hunter.cmake b/cmake/projects/OpenSSL/hunter.cmake index 5e7c5c5764..55c71759ab 100755 --- a/cmake/projects/OpenSSL/hunter.cmake +++ b/cmake/projects/OpenSSL/hunter.cmake @@ -263,4 +263,4 @@ else() endif() hunter_cacheable(OpenSSL) -hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID 6) +hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID 7) diff --git a/cmake/projects/odb-boost/hunter.cmake b/cmake/projects/odb-boost/hunter.cmake index 64cf49bd1c..1f024ed984 100644 --- a/cmake/projects/odb-boost/hunter.cmake +++ b/cmake/projects/odb-boost/hunter.cmake @@ -27,5 +27,5 @@ hunter_download(PACKAGE_NAME odb-boost PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libodb-boost.la" "lib/pkgconfig/libodb-boost.pc" - PACKAGE_INTERNAL_DEPS_ID "1" + PACKAGE_INTERNAL_DEPS_ID "2" ) From e5a0d8a626904a1c8800299123889976c0269db8 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 17 Mar 2017 17:51:42 +0800 Subject: [PATCH 011/612] Add information about 'lzma' package --- docs/packages/all.rst | 1 + docs/packages/compression.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/packages/all.rst b/docs/packages/all.rst index 1b4287f82d..f025f53208 100644 --- a/docs/packages/all.rst +++ b/docs/packages/all.rst @@ -77,6 +77,7 @@ All packages * `irrXML `__ * `libyuv `__ * `log4cplus `__ +* `lzma `__ * `minizip `__ * `msgpack `__ * `nlohmann::json `__ diff --git a/docs/packages/compression.rst b/docs/packages/compression.rst index cdc9de4670..7f7a223d2d 100644 --- a/docs/packages/compression.rst +++ b/docs/packages/compression.rst @@ -5,3 +5,4 @@ Compression * `minizip `_ - enables to extract files from a .zip archive file. * `szip `_ * `ZLIB `_ - A massively spiffy yet delicately unobtrusive compression library. + * `lzma `_ - A compression library with an API similar to that of zlib. From cd10d3af3d333357da6694da5b3c5f5989909625 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 17 Mar 2017 23:02:30 +0800 Subject: [PATCH 012/612] MySQL-client: make uncacheable --- cmake/projects/MySQL-client/hunter.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/projects/MySQL-client/hunter.cmake b/cmake/projects/MySQL-client/hunter.cmake index 1ae26edf6e..61f8125549 100644 --- a/cmake/projects/MySQL-client/hunter.cmake +++ b/cmake/projects/MySQL-client/hunter.cmake @@ -22,7 +22,9 @@ hunter_add_version( # CONFIGURATION_TYPES is set to Release, because Debug is bugged at the moment # see https://github.com/ruslo/hunter/issues/303 hunter_configuration_types(MySQL-client CONFIGURATION_TYPES Release) -hunter_cacheable(MySQL-client) + +# https://github.com/ruslo/hunter/issues/705 +# hunter_cacheable(MySQL-client) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_download(PACKAGE_NAME MySQL-client) - From 099be78d65891cbdfeb55b06818de5b4037c0634 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sat, 18 Mar 2017 14:25:30 +0800 Subject: [PATCH 013/612] hunter_setup_msvc: vcvarsall.bat location for Visual Studio 2017 --- cmake/modules/hunter_setup_msvc.cmake | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/cmake/modules/hunter_setup_msvc.cmake b/cmake/modules/hunter_setup_msvc.cmake index 7987663b9a..49c7a2ee57 100644 --- a/cmake/modules/hunter_setup_msvc.cmake +++ b/cmake/modules/hunter_setup_msvc.cmake @@ -109,13 +109,23 @@ macro(hunter_setup_msvc) if(HUNTER_TESTING) # ignore error, see 'tests/hunter_setup_msvc/CMakeLists.txt' else() - hunter_internal_error( - "Environment variable ${_hunter_vcvarsall_env} is empty" + hunter_status_debug( + "Environment variable '${_hunter_vcvarsall_env}' is empty, analyzing CMAKE_VS_DEVENV_COMMAND" ) + string(COMPARE EQUAL "${CMAKE_VS_DEVENV_COMMAND}" "" is_empty) + if(is_empty) + hunter_internal_error("CMAKE_VS_DEVENV_COMMAND is empty") + endif() + if(NOT IS_ABSOLUTE "${CMAKE_VS_DEVENV_COMMAND}") + hunter_internal_error("CMAKE_VS_DEVENV_COMMAND is not absolute") + endif() + get_filename_component(_hunter_vcvarsall_path "${CMAKE_VS_DEVENV_COMMAND}" DIRECTORY) + set(_hunter_vcvarsall_path "${_hunter_vcvarsall_path}/../../VC/Auxiliary/Build") endif() + else() + set(_hunter_vcvarsall_path "${_hunter_vcvarsall_path}/../../VC") endif() - set(_hunter_vcvarsall_path "${_hunter_vcvarsall_path}/../../VC") get_filename_component( _hunter_vcvarsall_path "${_hunter_vcvarsall_path}" ABSOLUTE ) From bc2da26967b332fd2e75daee91171644c6a48efe Mon Sep 17 00:00:00 2001 From: Aaditya Kalsi Date: Fri, 17 Mar 2017 17:53:31 -0400 Subject: [PATCH 014/612] Enable shared build of OpenSSL on Linux --- cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in b/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in index 8853c47e3b..8824b68488 100644 --- a/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in +++ b/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in @@ -72,7 +72,13 @@ set( ) set(build_command . "@HUNTER_GLOBAL_SCRIPT_DIR@/clear-all.sh" && make) -set(configure_opts ${configure_opts} threads no-shared) +if (BUILD_SHARED_LIBS) + set(shared_flag shared) +else() + set(shared_flag no-shared) +endif() + +set(configure_opts ${configure_opts} threads ${shared_flag}) ExternalProject_Add( "@HUNTER_EP_NAME@" From a135119f3da2ed3e9ac834242755a33dcd59d7fa Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 19 Mar 2017 16:11:59 +0800 Subject: [PATCH 015/612] OpenSSL: ++PACKAGE_INTERNAL_DEPS_ID --- cmake/projects/OpenSSL/hunter.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/projects/OpenSSL/hunter.cmake b/cmake/projects/OpenSSL/hunter.cmake index 55c71759ab..6267c2519d 100755 --- a/cmake/projects/OpenSSL/hunter.cmake +++ b/cmake/projects/OpenSSL/hunter.cmake @@ -263,4 +263,4 @@ else() endif() hunter_cacheable(OpenSSL) -hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID 7) +hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID 8) From ec579d453b751b7d0bf539bbf6e926b33ed48802 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 20 Mar 2017 12:50:06 +0800 Subject: [PATCH 016/612] Add link to documentation migration issue --- docs/index.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index c770e5e1d3..aa9b21c3ae 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,7 +9,8 @@ Hunter: organize freedom Documentation is in process of migrating from `GitHub wiki `_. Some information may be missing: blank pages, broken links, etc. - Will be fixed soon... + See `issue #667 `__ + for details. Welcome to the Hunter package manager documentation! From 9f5a7f5ec2cf8c06c12646e5eed5d0318eb372d9 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 20 Mar 2017 13:19:14 +0800 Subject: [PATCH 017/612] Add 'HUNTER_KEEP_PACKAGE_SOURCES' variable --- cmake/modules/hunter_download.cmake | 21 +++++++++++++++------ docs/reference/user-variables.rst | 29 +++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/cmake/modules/hunter_download.cmake b/cmake/modules/hunter_download.cmake index e3fc552ae7..a2e497d065 100644 --- a/cmake/modules/hunter_download.cmake +++ b/cmake/modules/hunter_download.cmake @@ -390,6 +390,11 @@ function(hunter_download) "${HUNTER_DOWNLOAD_TOOLCHAIN}" "set(HUNTER_PASSWORDS_PATH \"${HUNTER_PASSWORDS_PATH}\" CACHE INTERNAL \"\")\n" ) + file( + APPEND + "${HUNTER_DOWNLOAD_TOOLCHAIN}" + "set(HUNTER_KEEP_PACKAGE_SOURCES \"${HUNTER_KEEP_PACKAGE_SOURCES}\" CACHE INTERNAL \"\")\n" + ) string(COMPARE NOTEQUAL "${CMAKE_MAKE_PROGRAM}" "" has_make) if(has_make) @@ -426,15 +431,15 @@ function(hunter_download) "Internal dependencies ID: ${HUNTER_PACKAGE_INTERNAL_DEPS_ID}" ) endif() - + set(_hunter_schemes_search_dirs "") - + set( download_scheme "${HUNTER_PACKAGE_SETUP_DIR}/schemes/${HUNTER_DOWNLOAD_SCHEME}.cmake.in" ) set(_hunter_schemes_search_dirs "${_hunter_schemes_search_dirs}, ${download_scheme}") - + if(NOT EXISTS "${download_scheme}") set( download_scheme @@ -445,7 +450,7 @@ function(hunter_download) hunter_internal_error("Download scheme `${download_scheme}` not found. Search locations: ${_hunter_schemes_search_dirs}") endif() endif() - + hunter_status_debug( "Scheme file used: ${download_scheme}" ) @@ -572,8 +577,12 @@ function(hunter_download) file(REMOVE_RECURSE "${HUNTER_PACKAGE_BUILD_DIR}") if(HUNTER_PACKAGE_SCHEME_INSTALL) - # Unpacked directory not needed (save some disk space) - file(REMOVE_RECURSE "${HUNTER_PACKAGE_SOURCE_DIR}") + if(HUNTER_KEEP_PACKAGE_SOURCES) + hunter_status_debug("Keep source directory '${HUNTER_PACKAGE_SOURCE_DIR}'") + else() + # Unpacked directory not needed (save some disk space) + file(REMOVE_RECURSE "${HUNTER_PACKAGE_SOURCE_DIR}") + endif() endif() file(REMOVE "${HUNTER_PACKAGE_HOME_DIR}/CMakeLists.txt") diff --git a/docs/reference/user-variables.rst b/docs/reference/user-variables.rst index 1520ddb3ab..e9a001a289 100644 --- a/docs/reference/user-variables.rst +++ b/docs/reference/user-variables.rst @@ -115,6 +115,8 @@ HUNTER_CACHE_SERVERS * Default: https://github.com/ingenue/hunter-cache +.. _hunter_use_cache_servers: + HUNTER_USE_CACHE_SERVERS ======================== @@ -144,6 +146,33 @@ HUNTER_PASSWORDS_PATH Path to file with passwords for packages with :doc:`protected sources `. +HUNTER_KEEP_PACKAGE_SOURCES +=========================== + +If this variable is set to ``YES`` then Hunter will keep package sources +after finishing installation. It may be useful for navigation in code while +using debug version of libraries. + +This is a workaround for +`issue #359 `__ +and have some usage peculiarities: + +* It doesn't work well with Hunter cache mechanism. If package binaries will + be found on server, then there will be no build stage triggered, hence there + will be no sources kept. Use + :ref:`HUNTER_USE_CACHE_SERVERS=NO ` + for always building packages on local machine from sources. +* Sources will be kept inside :doc:`Hunter-ID ` + directory. Hence even if all the packages will be using another + :doc:`Hunter-ID `, + the old :doc:`Hunter-ID ` directory + should not be removed. +* Some packages use in-source build (non-CMake packages) and keep all build + artifacts along with sources. Hunter will just keep directory and will not + track what files was the original sources/what is temporary files + for build. Combining with previous peculiarity it's expected that much + more disk space will be used than usually. + Environment ~~~~~~~~~~~ From af3ab054a8c985f36b8c98b0afc5155a17dfc3ee Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 20 Mar 2017 18:45:15 +0800 Subject: [PATCH 018/612] mtplz 0.1-p1 --- cmake/configs/default.cmake | 1 + cmake/projects/mtplz/hunter.cmake | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 cmake/projects/mtplz/hunter.cmake diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 07647f5c1d..9bfb1b879b 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -153,6 +153,7 @@ hunter_config(mini_chromium VERSION 0.0.1-p2) hunter_config(minizip VERSION 1.0.1-p1) hunter_config(mpark_variant VERSION 1.0.0) hunter_config(msgpack VERSION 1.4.1-p2) +hunter_config(mtplz VERSION 0.1-p1) hunter_config(nlohmann-json VERSION 1.0.0-rc1-hunter-3) hunter_config(odb VERSION 2.4.0) hunter_config(odb-boost VERSION 2.4.0) diff --git a/cmake/projects/mtplz/hunter.cmake b/cmake/projects/mtplz/hunter.cmake new file mode 100644 index 0000000000..06eb8b2730 --- /dev/null +++ b/cmake/projects/mtplz/hunter.cmake @@ -0,0 +1,27 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + mtplz + VERSION + 0.1-p1 + URL + "https://github.com/hunter-packages/mtplz/archive/v0.1-p1.tar.gz" + SHA1 + 3323b6a97afefa0cc008785caa37b43681c9589e +) + +hunter_cmake_args(mtplz CMAKE_ARGS BUILD_TESTING=OFF) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(mtplz) +hunter_download(PACKAGE_NAME mtplz) From b4f38debacac8abe73f30de4717af4e605b26a26 Mon Sep 17 00:00:00 2001 From: dviry Date: Mon, 20 Mar 2017 14:44:39 +0200 Subject: [PATCH 019/612] add FakeIt --- cmake/configs/default.cmake | 3 ++- cmake/projects/FakeIt/hunter.cmake | 21 +++++++++++++++++++++ examples/FakeIt/CMakeLists.txt | 23 +++++++++++++++++++++++ examples/FakeIt/fakeit_test.cpp | 30 ++++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 cmake/projects/FakeIt/hunter.cmake create mode 100644 examples/FakeIt/CMakeLists.txt create mode 100644 examples/FakeIt/fakeit_test.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 95726493a0..63ad231fd7 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -122,6 +122,7 @@ hunter_config(dri2proto VERSION 2.8) hunter_config(dri3proto VERSION 1.0) hunter_config(drm VERSION 2.4.67) hunter_config(eos VERSION 0.6.1-p1) +hunter_config(FakeIt VERSION 2.0.3) hunter_config(fixesproto VERSION 5.0) hunter_config(flatbuffers VERSION 1.3.0-p3) hunter_config(fmt VERSION 3.0.0) @@ -171,7 +172,7 @@ hunter_config(randrproto VERSION 1.3.2) hunter_config(renderproto VERSION 0.11.1) hunter_config(sm VERSION 1.2.1) hunter_config(sparsehash VERSION 2.0.2) -if(MSVC_VERSION LESS 1900) +if(MSVC_VERSION LESS 1800) # for VS12 - version without support C++11 hunter_config(spdlog VERSION 1.0.0-p0) else() diff --git a/cmake/projects/FakeIt/hunter.cmake b/cmake/projects/FakeIt/hunter.cmake new file mode 100644 index 0000000000..90a276f7ee --- /dev/null +++ b/cmake/projects/FakeIt/hunter.cmake @@ -0,0 +1,21 @@ +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_pick_scheme) +include(hunter_cacheable) +include(hunter_download) + +hunter_add_version( + PACKAGE_NAME + FakeIt + VERSION + "2.0.3" + URL + "https://github.com/hunter-packages/FakeIt/archive/2.0.3-hunter.tar.gz" + SHA1 + 9ac096c5d990bc8b8d8d8b0ac6b4902c21928a22 +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(FakeIt) +hunter_download(PACKAGE_NAME FakeIt) diff --git a/examples/FakeIt/CMakeLists.txt b/examples/FakeIt/CMakeLists.txt new file mode 100644 index 0000000000..9270a289c0 --- /dev/null +++ b/examples/FakeIt/CMakeLists.txt @@ -0,0 +1,23 @@ +# Copyright (c) 2016 Alexey Ulyanov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0.2) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-FakeIt) +set(CMAKE_CXX_STANDARD 11) + +hunter_add_package(FakeIt) + +find_package(FakeIt CONFIG REQUIRED) + +set(SOURCES fakeit_test.cpp) + +add_executable(fakeit_test ${SOURCES}) +target_link_libraries(fakeit_test PRIVATE FakeIt::FakeIt) + +enable_testing(true) +add_test(NAME fakeit_test COMMAND fakeit_test) diff --git a/examples/FakeIt/fakeit_test.cpp b/examples/FakeIt/fakeit_test.cpp new file mode 100644 index 0000000000..1030fd055b --- /dev/null +++ b/examples/FakeIt/fakeit_test.cpp @@ -0,0 +1,30 @@ +#include +#include + +struct SomeInterface { + virtual int foo(int) = 0; + virtual int bar(std::string) = 0; +}; + +int main() +{ + using namespace fakeit; + + // Instantiate a mock object. + Mock mock; + + // Setup mock behavior. + When(Method(mock,foo)).Return(1); // Method mock.foo will return 1 once. + + // Fetch the mock instance. + SomeInterface &i = mock.get(); + + // Production code + i.foo(1); + + // Verify method mock.foo was invoked. + Verify(Method(mock,foo)); + + // Verify method mock.foo was invoked with specific arguments. + Verify(Method(mock,foo).Using(1)); +} \ No newline at end of file From a92827d9f6bf5dfa71cfbddd885c63610eedec42 Mon Sep 17 00:00:00 2001 From: dvirtz Date: Mon, 20 Mar 2017 14:47:05 +0200 Subject: [PATCH 020/612] undo spdlog MSVC version change --- cmake/configs/default.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 63ad231fd7..34ce0ab102 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -172,7 +172,7 @@ hunter_config(randrproto VERSION 1.3.2) hunter_config(renderproto VERSION 0.11.1) hunter_config(sm VERSION 1.2.1) hunter_config(sparsehash VERSION 2.0.2) -if(MSVC_VERSION LESS 1800) +if(MSVC_VERSION LESS 1900) # for VS12 - version without support C++11 hunter_config(spdlog VERSION 1.0.0-p0) else() From dc665659202be8d551a9bd051b7ad13175555297 Mon Sep 17 00:00:00 2001 From: dviry Date: Mon, 20 Mar 2017 14:56:27 +0200 Subject: [PATCH 021/612] apply ruslo comments --- examples/FakeIt/CMakeLists.txt | 2 +- examples/FakeIt/fakeit_test.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/FakeIt/CMakeLists.txt b/examples/FakeIt/CMakeLists.txt index 9270a289c0..53a8a078c5 100644 --- a/examples/FakeIt/CMakeLists.txt +++ b/examples/FakeIt/CMakeLists.txt @@ -19,5 +19,5 @@ set(SOURCES fakeit_test.cpp) add_executable(fakeit_test ${SOURCES}) target_link_libraries(fakeit_test PRIVATE FakeIt::FakeIt) -enable_testing(true) +enable_testing() add_test(NAME fakeit_test COMMAND fakeit_test) diff --git a/examples/FakeIt/fakeit_test.cpp b/examples/FakeIt/fakeit_test.cpp index 1030fd055b..f65d87a674 100644 --- a/examples/FakeIt/fakeit_test.cpp +++ b/examples/FakeIt/fakeit_test.cpp @@ -27,4 +27,4 @@ int main() // Verify method mock.foo was invoked with specific arguments. Verify(Method(mock,foo).Using(1)); -} \ No newline at end of file +} From 095b3d31749f8ff1872e57fc08cebea9cc0fd383 Mon Sep 17 00:00:00 2001 From: dvirtz Date: Tue, 21 Mar 2017 15:43:49 +0200 Subject: [PATCH 022/612] added fakeit do docs --- docs/packages/all.rst | 2 ++ docs/packages/testing.rst | 1 + 2 files changed, 3 insertions(+) diff --git a/docs/packages/all.rst b/docs/packages/all.rst index 1b4287f82d..139d016126 100644 --- a/docs/packages/all.rst +++ b/docs/packages/all.rst @@ -21,6 +21,7 @@ All packages * `CsvParserCPlusPlus `__ * `Eigen `__ * `Expat `__ +* `FakeIt `__ * `GMock `__ * `GPUImage `__ * `GSL `__ @@ -77,6 +78,7 @@ All packages * `irrXML `__ * `libyuv `__ * `log4cplus `__ +* `lzma `__ * `minizip `__ * `msgpack `__ * `nlohmann::json `__ diff --git a/docs/packages/testing.rst b/docs/packages/testing.rst index fb94c1b21b..3e012ffb63 100644 --- a/docs/packages/testing.rst +++ b/docs/packages/testing.rst @@ -3,6 +3,7 @@ Testing * `Catch `_ - A modern, C++-native, header-only, framework for unit-tests, TDD and BDD C++ Automated Test Cases in Headers * `crashpad `_ - crash-reporting system. + * `FakeIt `_ - C++ mocking made easy. A simple yet very expressive, header-only library for C++ mocking. * `glog `_ - C++ implementation of the Google logging module * `GMock `_ - extension to Google Test for writing and using C++ mock classes. * `GTest `_ - Google's C++ test framework! From 036b0acf7390397771389c46a99a2873b15f061a Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 22 Mar 2017 18:51:41 +0800 Subject: [PATCH 023/612] Report broken package for 'sparsehash' --- cmake/projects/sparsehash/hunter.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/projects/sparsehash/hunter.cmake b/cmake/projects/sparsehash/hunter.cmake index bd7a4fce6b..729f55a483 100644 --- a/cmake/projects/sparsehash/hunter.cmake +++ b/cmake/projects/sparsehash/hunter.cmake @@ -10,6 +10,7 @@ include(hunter_add_version) include(hunter_download) include(hunter_pick_scheme) +include(hunter_report_broken_package) # Version list hunter_add_version( @@ -26,5 +27,9 @@ hunter_add_version( # Default CMake scheme hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_report_broken_package( + "'sparsehash' package is destructive (https://github.com/ruslo/hunter/issues/695)" +) + # This is header-only, so only headers are needed hunter_download(PACKAGE_NAME sparsehash) From 323c859c3cbad3580fb70e964e997360143e8526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 22 Mar 2017 18:26:59 +0100 Subject: [PATCH 024/612] Add hunter_get_lang_standard_flag function This function tries to find the compiler flag matching specified _STANDARD property. --- .../hunter_get_lang_standard_flag.cmake | 40 ++++ tests/hunter_standard_flag/CMakeLists.txt | 185 ++++++++++++++++++ 2 files changed, 225 insertions(+) create mode 100644 cmake/modules/hunter_get_lang_standard_flag.cmake create mode 100644 tests/hunter_standard_flag/CMakeLists.txt diff --git a/cmake/modules/hunter_get_lang_standard_flag.cmake b/cmake/modules/hunter_get_lang_standard_flag.cmake new file mode 100644 index 0000000000..b1ba498116 --- /dev/null +++ b/cmake/modules/hunter_get_lang_standard_flag.cmake @@ -0,0 +1,40 @@ +# Copyright (c) 2017 Pawel Bylica +# All rights reserved. + +include(hunter_status_debug) + +function(hunter_get_lang_standard_flag LANG OUTPUT) + set(CXX_standards 17 14 11 98) + set(C_standards 11 99 90) + # Find the standard flag. + # This maps the logic in the CMake code: + # https://github.com/Kitware/CMake/blob/3bccdd89c88864839a0c8d4ea56bd069c90fa02b/Source/cmLocalGenerator.cxx#L1433-L1467 + set(flag "") + set(std "${CMAKE_${LANG}_STANDARD}") + if(std) + set(ext "EXTENSION") # By default extensions are assumed On. + if(DEFINED CMAKE_${LANG}_EXTENSIONS AND NOT CMAKE_${LANG}_EXTENSIONS) + set(ext "STANDARD") + endif() + + set(standards "${${LANG}_standards}") + list(FIND standards "${std}" begin) + if(NOT "${begin}" EQUAL -1) + list(LENGTH standards end) + math(EXPR end "${end} - 1") + foreach(idx RANGE ${begin} ${end}) + list(GET standards ${idx} std) + set(option_name "CMAKE_${LANG}${std}_${ext}_COMPILE_OPTION") + set(flag "${${option_name}}") + string(COMPARE NOTEQUAL "${flag}" "" has_flag) + if(has_flag OR CMAKE_${LANG}_STANDARD_REQUIRED) + # Break if flag found or standard is required and we don't want to + # continue checking older standards. + break() + endif() + endforeach() + endif() + endif() + hunter_status_debug("${LANG} std flag: '${flag}'") + set(${OUTPUT} "${flag}" PARENT_SCOPE) +endfunction() diff --git a/tests/hunter_standard_flag/CMakeLists.txt b/tests/hunter_standard_flag/CMakeLists.txt new file mode 100644 index 0000000000..ded55204f8 --- /dev/null +++ b/tests/hunter_standard_flag/CMakeLists.txt @@ -0,0 +1,185 @@ +# Copyright (c) 2017, Pawel Bylica +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +include("../../examples/common.cmake") + +project(TestStandardFlag) + +include(hunter_get_lang_standard_flag) + +macro(check LANG EXPECTED) + set(flag "invalid") + hunter_get_lang_standard_flag(${LANG} flag) + string(COMPARE EQUAL "${flag}" "${EXPECTED}" is_correct) + if(NOT is_correct) + message(FATAL_ERROR "Expected '${EXPECTED}' standard ${LANG} flag, got '${flag}'") + endif() +endmacro() + +unset(CMAKE_CXX_STANDARD CACHE) +unset(CMAKE_CXX_STANDARD_REQUIRED CACHE) +unset(CMAKE_CXX_EXTENSIONS CACHE) +unset(CMAKE_C_STANDARD CACHE) +unset(CMAKE_C_STANDARD_REQUIRED CACHE) +unset(CMAKE_C_EXTENSIONS CACHE) + +check(CXX "") +check(C "") + +if(CMAKE_CXX98_EXTENSION_COMPILE_OPTION) + set(CMAKE_CXX_STANDARD 98) + unset(CMAKE_CXX_EXTENSIONS) + check(CXX "${CMAKE_CXX98_EXTENSION_COMPILE_OPTION}") + set(CMAKE_CXX_EXTENSIONS On) + check(CXX "${CMAKE_CXX98_EXTENSION_COMPILE_OPTION}") +endif() + +if(CMAKE_CXX98_STANDARD_COMPILE_OPTION) + set(CMAKE_CXX_STANDARD 98) + set(CMAKE_CXX_EXTENSIONS Off) + check(CXX "${CMAKE_CXX98_STANDARD_COMPILE_OPTION}") +endif() + +if(CMAKE_CXX11_EXTENSION_COMPILE_OPTION) + set(CMAKE_CXX_STANDARD 11) + unset(CMAKE_CXX_EXTENSIONS) + check(CXX "${CMAKE_CXX11_EXTENSION_COMPILE_OPTION}") + set(CMAKE_CXX_EXTENSIONS On) + check(CXX "${CMAKE_CXX11_EXTENSION_COMPILE_OPTION}") +endif() + +if(CMAKE_CXX11_STANDARD_COMPILE_OPTION) + set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_EXTENSIONS Off) + check(CXX "${CMAKE_CXX11_STANDARD_COMPILE_OPTION}") +endif() + +if(CMAKE_CXX14_EXTENSION_COMPILE_OPTION) + set(CMAKE_CXX_STANDARD 14) + unset(CMAKE_CXX_EXTENSIONS) + check(CXX "${CMAKE_CXX14_EXTENSION_COMPILE_OPTION}") + set(CMAKE_CXX_EXTENSIONS On) + check(CXX "${CMAKE_CXX14_EXTENSION_COMPILE_OPTION}") +endif() + +if(CMAKE_CXX14_STANDARD_COMPILE_OPTION) + set(CMAKE_CXX_STANDARD 14) + set(CMAKE_CXX_EXTENSIONS Off) + check(CXX "${CMAKE_CXX14_STANDARD_COMPILE_OPTION}") +endif() + +if(CMAKE_CXX17_EXTENSION_COMPILE_OPTION) + set(CMAKE_CXX_STANDARD 17) + unset(CMAKE_CXX_EXTENSIONS) + check(CXX "${CMAKE_CXX17_EXTENSION_COMPILE_OPTION}") + set(CMAKE_CXX_EXTENSIONS On) + check(CXX "${CMAKE_CXX17_EXTENSION_COMPILE_OPTION}") +endif() + +if(CMAKE_CXX17_STANDARD_COMPILE_OPTION) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_EXTENSIONS Off) + check(CXX "${CMAKE_CXX17_STANDARD_COMPILE_OPTION}") +endif() + +if(CMAKE_C90_EXTENSION_COMPILE_OPTION) + set(CMAKE_C_STANDARD 90) + unset(CMAKE_C_EXTENSIONS) + check(C "${CMAKE_C90_EXTENSION_COMPILE_OPTION}") + set(CMAKE_C_EXTENSIONS On) + check(C "${CMAKE_C90_EXTENSION_COMPILE_OPTION}") +endif() + +if(CMAKE_C90_STANDARD_COMPILE_OPTION) + set(CMAKE_C_STANDARD 90) + set(CMAKE_C_EXTENSIONS Off) + check(C "${CMAKE_C90_STANDARD_COMPILE_OPTION}") +endif() + +if(CMAKE_C99_EXTENSION_COMPILE_OPTION) + set(CMAKE_C_STANDARD 99) + unset(CMAKE_C_EXTENSIONS) + check(C "${CMAKE_C99_EXTENSION_COMPILE_OPTION}") + set(CMAKE_C_EXTENSIONS On) + check(C "${CMAKE_C99_EXTENSION_COMPILE_OPTION}") +endif() + +if(CMAKE_C99_STANDARD_COMPILE_OPTION) + set(CMAKE_C_STANDARD 99) + set(CMAKE_C_EXTENSIONS Off) + check(C "${CMAKE_C99_STANDARD_COMPILE_OPTION}") +endif() + +if(CMAKE_C11_EXTENSION_COMPILE_OPTION) + set(CMAKE_C_STANDARD 11) + unset(CMAKE_C_EXTENSIONS) + check(C "${CMAKE_C11_EXTENSION_COMPILE_OPTION}") + set(CMAKE_C_EXTENSIONS On) + check(C "${CMAKE_C11_EXTENSION_COMPILE_OPTION}") +endif() + +if(CMAKE_C11_STANDARD_COMPILE_OPTION) + set(CMAKE_C_STANDARD 11) + set(CMAKE_C_EXTENSIONS Off) + check(C "${CMAKE_C11_STANDARD_COMPILE_OPTION}") +endif() + + +# Expect decay to lower standard + +if(CMAKE_CXX14_STANDARD_COMPILE_OPTION AND NOT CMAKE_CXX17_STANDARD_COMPILE_OPTION) + # Decay to c++14 + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_EXTENSIONS Off) + check(CXX "${CMAKE_CXX14_STANDARD_COMPILE_OPTION}") +endif() + +if(CMAKE_CXX11_STANDARD_COMPILE_OPTION AND NOT CMAKE_CXX14_STANDARD_COMPILE_OPTION) + # Decay to c++11 + set(CMAKE_CXX_EXTENSIONS Off) + set(CMAKE_CXX_STANDARD 17) + check(CXX "${CMAKE_CXX11_STANDARD_COMPILE_OPTION}") + set(CMAKE_CXX_STANDARD 14) + check(CXX "${CMAKE_CXX11_STANDARD_COMPILE_OPTION}") +endif() + +if(CMAKE_C99_STANDARD_COMPILE_OPTION AND NOT CMAKE_C11_STANDARD_COMPILE_OPTION) + # Decay to c99 + set(CMAKE_C_STANDARD 11) + set(CMAKE_C_EXTENSIONS Off) + check(CXX "${CMAKE_C99_STANDARD_COMPILE_OPTION}") +endif() + + +# Expect empty output if unknown standard +set(CMAKE_CXX_STANDARD 1234) +set(CMAKE_C_STANDARD 1234) +set(CMAKE_FORTRAN_STANDARD 1234) +check(CXX "") +check(C "") +check(FORTRAN "") + + +# Restricted standard +set(CMAKE_CXX_STANDARD_REQUIRED True) +set(CMAKE_C_STANDARD_REQUIRED True) + +if(CMAKE_CXX14_STANDARD_COMPILE_OPTION AND NOT CMAKE_CXX17_STANDARD_COMPILE_OPTION) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_EXTENSIONS Off) + check(CXX "") +endif() + +if(CMAKE_CXX11_STANDARD_COMPILE_OPTION AND NOT CMAKE_CXX14_STANDARD_COMPILE_OPTION) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_EXTENSIONS Off) + check(CXX "") +endif() + +if(CMAKE_C99_STANDARD_COMPILE_OPTION AND NOT CMAKE_C11_STANDARD_COMPILE_OPTION) + set(CMAKE_C_STANDARD 11) + set(CMAKE_C_EXTENSIONS Off) + check(C "") +endif() From 0170d662cb67433ef540122f72c01d0358b9df0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 22 Mar 2017 21:17:48 +0100 Subject: [PATCH 025/612] hunter_dump_cmake_flags: include C/CXX standard flags --- cmake/modules/hunter_dump_cmake_flags.cmake | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cmake/modules/hunter_dump_cmake_flags.cmake b/cmake/modules/hunter_dump_cmake_flags.cmake index 734635e2ca..a42c1596d0 100644 --- a/cmake/modules/hunter_dump_cmake_flags.cmake +++ b/cmake/modules/hunter_dump_cmake_flags.cmake @@ -4,6 +4,7 @@ include(CMakeParseArguments) # cmake_parse_arguments include(hunter_internal_error) +include(hunter_get_lang_standard_flag) # Packages to test this function: # * Boost @@ -53,6 +54,18 @@ function(hunter_dump_cmake_flags) endforeach() endif() + hunter_get_lang_standard_flag(CXX flag) + string(COMPARE NOTEQUAL "${flag}" "" has_flag) + if(has_flag) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}") + endif() + + hunter_get_lang_standard_flag(C flag) + string(COMPARE NOTEQUAL "${flag}" "" has_flag) + if(has_flag) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}") + endif() + string(COMPARE NOTEQUAL "${CMAKE_CXX_COMPILER_TARGET}" "" has_value) string(COMPARE NOTEQUAL "${CMAKE_CXX_COMPILE_OPTIONS_TARGET}" "" has_option) if(has_value AND has_option) From 8937ff7e61d2966b36e79545099a2d15ddb6c40a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 22 Mar 2017 23:22:58 +0100 Subject: [PATCH 026/612] CI: enable hunter_standard_flag test --- .travis.yml | 1 + appveyor.yml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index dcb214230a..ec2c11c8d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,6 +55,7 @@ env: - PROJECT_DIR=tests/hunter_unpack_directory TOOLCHAIN=default - PROJECT_DIR=tests/hunter_init_not_found_counter TOOLCHAIN=default - PROJECT_DIR=tests/hunter_check_toolchain_definition TOOLCHAIN=default + - PROJECT_DIR=tests/hunter_standard_flag TOOLCHAIN=default - TOOLCHAIN=generate-documentation-test diff --git a/appveyor.yml b/appveyor.yml index cbcca3c8c7..8149521daf 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -68,6 +68,9 @@ environment: - PROJECT_DIR: tests\hunter_check_toolchain_definition TOOLCHAIN: default + - PROJECT_DIR: tests\hunter_standard_flag + TOOLCHAIN: default + install: # Python 3 - cmd: set PATH=C:\Python34-x64;C:\Python34-x64\Scripts;%PATH% From 45e4b5544190c606ef0efdab13ceca92d938e886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Thu, 23 Mar 2017 09:30:01 +0100 Subject: [PATCH 027/612] Bump PACKAGE_INTERNAL_DEPS_IDs --- cmake/projects/Boost/atomic/hunter.cmake | 2 +- cmake/projects/Boost/chrono/hunter.cmake | 2 +- cmake/projects/Boost/context/hunter.cmake | 2 +- cmake/projects/Boost/coroutine/hunter.cmake | 2 +- cmake/projects/Boost/date_time/hunter.cmake | 2 +- cmake/projects/Boost/exception/hunter.cmake | 2 +- cmake/projects/Boost/filesystem/hunter.cmake | 2 +- cmake/projects/Boost/graph/hunter.cmake | 2 +- cmake/projects/Boost/graph_parallel/hunter.cmake | 2 +- cmake/projects/Boost/hunter.cmake | 2 +- cmake/projects/Boost/iostreams/hunter.cmake | 2 +- cmake/projects/Boost/locale/hunter.cmake | 2 +- cmake/projects/Boost/log/hunter.cmake | 2 +- cmake/projects/Boost/math/hunter.cmake | 2 +- cmake/projects/Boost/mpi/hunter.cmake | 2 +- cmake/projects/Boost/program_options/hunter.cmake | 2 +- cmake/projects/Boost/python/hunter.cmake | 2 +- cmake/projects/Boost/random/hunter.cmake | 2 +- cmake/projects/Boost/regex/hunter.cmake | 2 +- cmake/projects/Boost/serialization/hunter.cmake | 2 +- cmake/projects/Boost/signals/hunter.cmake | 2 +- cmake/projects/Boost/system/hunter.cmake | 2 +- cmake/projects/Boost/test/hunter.cmake | 2 +- cmake/projects/Boost/thread/hunter.cmake | 2 +- cmake/projects/Boost/timer/hunter.cmake | 2 +- cmake/projects/Boost/wave/hunter.cmake | 2 +- cmake/projects/OpenSSL/hunter.cmake | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/cmake/projects/Boost/atomic/hunter.cmake b/cmake/projects/Boost/atomic/hunter.cmake index 972fc75045..6f6cc3828f 100644 --- a/cmake/projects/Boost/atomic/hunter.cmake +++ b/cmake/projects/Boost/atomic/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT atomic - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/chrono/hunter.cmake b/cmake/projects/Boost/chrono/hunter.cmake index 91cd36831e..e280575b7b 100644 --- a/cmake/projects/Boost/chrono/hunter.cmake +++ b/cmake/projects/Boost/chrono/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT chrono - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/context/hunter.cmake b/cmake/projects/Boost/context/hunter.cmake index 286e36feee..d9ffe8edad 100644 --- a/cmake/projects/Boost/context/hunter.cmake +++ b/cmake/projects/Boost/context/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT context - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/coroutine/hunter.cmake b/cmake/projects/Boost/coroutine/hunter.cmake index bb3392b1b2..5878e8efe8 100644 --- a/cmake/projects/Boost/coroutine/hunter.cmake +++ b/cmake/projects/Boost/coroutine/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT coroutine - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/date_time/hunter.cmake b/cmake/projects/Boost/date_time/hunter.cmake index 61f05a87ad..1416b03342 100644 --- a/cmake/projects/Boost/date_time/hunter.cmake +++ b/cmake/projects/Boost/date_time/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT date_time - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/exception/hunter.cmake b/cmake/projects/Boost/exception/hunter.cmake index 6b058fdf53..f36c9ba28b 100644 --- a/cmake/projects/Boost/exception/hunter.cmake +++ b/cmake/projects/Boost/exception/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT exception - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/filesystem/hunter.cmake b/cmake/projects/Boost/filesystem/hunter.cmake index 55c14ca60b..39b100e2e8 100644 --- a/cmake/projects/Boost/filesystem/hunter.cmake +++ b/cmake/projects/Boost/filesystem/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT filesystem - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/graph/hunter.cmake b/cmake/projects/Boost/graph/hunter.cmake index 67cb06bc72..4a03f03a2e 100644 --- a/cmake/projects/Boost/graph/hunter.cmake +++ b/cmake/projects/Boost/graph/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT graph - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/graph_parallel/hunter.cmake b/cmake/projects/Boost/graph_parallel/hunter.cmake index 54d3bba3bb..4e8a1e5ca3 100644 --- a/cmake/projects/Boost/graph_parallel/hunter.cmake +++ b/cmake/projects/Boost/graph_parallel/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT graph_parallel - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/hunter.cmake b/cmake/projects/Boost/hunter.cmake index afa4bf5301..4d949d5287 100644 --- a/cmake/projects/Boost/hunter.cmake +++ b/cmake/projects/Boost/hunter.cmake @@ -245,4 +245,4 @@ hunter_add_version( hunter_pick_scheme(DEFAULT url_sha1_boost) hunter_cacheable(Boost) -hunter_download(PACKAGE_NAME Boost PACKAGE_INTERNAL_DEPS_ID "10") +hunter_download(PACKAGE_NAME Boost PACKAGE_INTERNAL_DEPS_ID "11") diff --git a/cmake/projects/Boost/iostreams/hunter.cmake b/cmake/projects/Boost/iostreams/hunter.cmake index b91e2a626d..22e850eacd 100644 --- a/cmake/projects/Boost/iostreams/hunter.cmake +++ b/cmake/projects/Boost/iostreams/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT iostreams - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/locale/hunter.cmake b/cmake/projects/Boost/locale/hunter.cmake index f67e6ec137..3869376b16 100644 --- a/cmake/projects/Boost/locale/hunter.cmake +++ b/cmake/projects/Boost/locale/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT locale - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/log/hunter.cmake b/cmake/projects/Boost/log/hunter.cmake index 2a39d35517..f10a9f9e3c 100644 --- a/cmake/projects/Boost/log/hunter.cmake +++ b/cmake/projects/Boost/log/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT log - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/math/hunter.cmake b/cmake/projects/Boost/math/hunter.cmake index 4253f66fed..287d2c4b4f 100644 --- a/cmake/projects/Boost/math/hunter.cmake +++ b/cmake/projects/Boost/math/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT math - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/mpi/hunter.cmake b/cmake/projects/Boost/mpi/hunter.cmake index 1422ad0f37..beee3d2d12 100644 --- a/cmake/projects/Boost/mpi/hunter.cmake +++ b/cmake/projects/Boost/mpi/hunter.cmake @@ -26,5 +26,5 @@ hunter_download( Boost PACKAGE_COMPONENT mpi - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/program_options/hunter.cmake b/cmake/projects/Boost/program_options/hunter.cmake index 377610a858..5f6d8aaad0 100644 --- a/cmake/projects/Boost/program_options/hunter.cmake +++ b/cmake/projects/Boost/program_options/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT program_options - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/python/hunter.cmake b/cmake/projects/Boost/python/hunter.cmake index 02ef8145ff..38778ceadb 100644 --- a/cmake/projects/Boost/python/hunter.cmake +++ b/cmake/projects/Boost/python/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT python - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/random/hunter.cmake b/cmake/projects/Boost/random/hunter.cmake index ad66cba0c3..252b9de5f1 100644 --- a/cmake/projects/Boost/random/hunter.cmake +++ b/cmake/projects/Boost/random/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT random - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/regex/hunter.cmake b/cmake/projects/Boost/regex/hunter.cmake index f3af40bb57..ec9898211b 100644 --- a/cmake/projects/Boost/regex/hunter.cmake +++ b/cmake/projects/Boost/regex/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT regex - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/serialization/hunter.cmake b/cmake/projects/Boost/serialization/hunter.cmake index a24f328928..97e3dcbd07 100644 --- a/cmake/projects/Boost/serialization/hunter.cmake +++ b/cmake/projects/Boost/serialization/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT serialization - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/signals/hunter.cmake b/cmake/projects/Boost/signals/hunter.cmake index aaae3b6a57..d8b1626318 100644 --- a/cmake/projects/Boost/signals/hunter.cmake +++ b/cmake/projects/Boost/signals/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT signals - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/system/hunter.cmake b/cmake/projects/Boost/system/hunter.cmake index d16eb9e30e..e12818c630 100644 --- a/cmake/projects/Boost/system/hunter.cmake +++ b/cmake/projects/Boost/system/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT system - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/test/hunter.cmake b/cmake/projects/Boost/test/hunter.cmake index 2db1153979..544f4b4011 100644 --- a/cmake/projects/Boost/test/hunter.cmake +++ b/cmake/projects/Boost/test/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT test - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/thread/hunter.cmake b/cmake/projects/Boost/thread/hunter.cmake index c3999730bf..789ef1c6f5 100644 --- a/cmake/projects/Boost/thread/hunter.cmake +++ b/cmake/projects/Boost/thread/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT thread - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/timer/hunter.cmake b/cmake/projects/Boost/timer/hunter.cmake index f0136adbb5..09f6693ea3 100644 --- a/cmake/projects/Boost/timer/hunter.cmake +++ b/cmake/projects/Boost/timer/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT timer - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/Boost/wave/hunter.cmake b/cmake/projects/Boost/wave/hunter.cmake index 05f5174bd7..7b894e3c06 100644 --- a/cmake/projects/Boost/wave/hunter.cmake +++ b/cmake/projects/Boost/wave/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT wave - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "11" ) diff --git a/cmake/projects/OpenSSL/hunter.cmake b/cmake/projects/OpenSSL/hunter.cmake index 6267c2519d..b9ce881255 100755 --- a/cmake/projects/OpenSSL/hunter.cmake +++ b/cmake/projects/OpenSSL/hunter.cmake @@ -263,4 +263,4 @@ else() endif() hunter_cacheable(OpenSSL) -hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID 8) +hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID "9") From 156945fd4a63ed1e9cfc2b14246a1f5b360a0c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Thu, 23 Mar 2017 09:41:11 +0100 Subject: [PATCH 028/612] Bump PACKAGE_INTERNAL_DEPS_IDs (autotools) --- cmake/projects/PostgreSQL/hunter.cmake | 5 +++-- cmake/projects/damageproto/hunter.cmake | 2 +- cmake/projects/dri2proto/hunter.cmake | 2 +- cmake/projects/dri3proto/hunter.cmake | 2 +- cmake/projects/drm/hunter.cmake | 2 +- cmake/projects/fixesproto/hunter.cmake | 2 +- cmake/projects/geos/hunter.cmake | 5 ++++- cmake/projects/glproto/hunter.cmake | 2 +- cmake/projects/ice/hunter.cmake | 2 +- cmake/projects/inputproto/hunter.cmake | 2 +- cmake/projects/intltool/hunter.cmake | 7 +++++-- cmake/projects/kbproto/hunter.cmake | 2 +- cmake/projects/libdaemon/hunter.cmake | 7 +++++-- cmake/projects/libxml2/hunter.cmake | 9 +++++---- cmake/projects/odb/hunter.cmake | 4 +++- cmake/projects/pciaccess/hunter.cmake | 2 +- cmake/projects/presentproto/hunter.cmake | 2 +- cmake/projects/pthread-stubs/hunter.cmake | 2 +- cmake/projects/randrproto/hunter.cmake | 1 + cmake/projects/renderproto/hunter.cmake | 2 +- cmake/projects/sm/hunter.cmake | 2 +- cmake/projects/x11/hunter.cmake | 2 +- cmake/projects/xau/hunter.cmake | 2 +- cmake/projects/xcb-proto/hunter.cmake | 2 +- cmake/projects/xcursor/hunter.cmake | 1 + cmake/projects/xdamage/hunter.cmake | 2 +- cmake/projects/xext/hunter.cmake | 2 +- cmake/projects/xextproto/hunter.cmake | 2 +- cmake/projects/xf86vidmodeproto/hunter.cmake | 1 + cmake/projects/xfixes/hunter.cmake | 2 +- cmake/projects/xinerama/hunter.cmake | 1 + cmake/projects/xineramaproto/hunter.cmake | 1 + cmake/projects/xorg-macros/hunter.cmake | 2 +- cmake/projects/xproto/hunter.cmake | 2 +- cmake/projects/xrandr/hunter.cmake | 2 +- cmake/projects/xrender/hunter.cmake | 2 +- cmake/projects/xshmfence/hunter.cmake | 2 +- cmake/projects/xtrans/hunter.cmake | 2 +- cmake/projects/xxf86vm/hunter.cmake | 1 + 39 files changed, 58 insertions(+), 39 deletions(-) diff --git a/cmake/projects/PostgreSQL/hunter.cmake b/cmake/projects/PostgreSQL/hunter.cmake index 0d0634d192..5481c83533 100644 --- a/cmake/projects/PostgreSQL/hunter.cmake +++ b/cmake/projects/PostgreSQL/hunter.cmake @@ -31,7 +31,9 @@ endif() hunter_configuration_types(PostgreSQL CONFIGURATION_TYPES Release) hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(PostgreSQL) -hunter_download(PACKAGE_NAME PostgreSQL +hunter_download( + PACKAGE_NAME PostgreSQL + PACKAGE_INTERNAL_DEPS_ID "1" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/libecpg.pc" "lib/pkgconfig/libecpg_compat.pc" @@ -39,4 +41,3 @@ hunter_download(PACKAGE_NAME PostgreSQL "lib/pkgconfig/libpq.pc" "lib/postgresql/pgxs/src/Makefile.global" ) - diff --git a/cmake/projects/damageproto/hunter.cmake b/cmake/projects/damageproto/hunter.cmake index 9d37cb17d5..cc8a01d0c2 100644 --- a/cmake/projects/damageproto/hunter.cmake +++ b/cmake/projects/damageproto/hunter.cmake @@ -26,6 +26,6 @@ hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(damageproto) hunter_download( PACKAGE_NAME damageproto - PACKAGE_INTERNAL_DEPS_ID "1" + PACKAGE_INTERNAL_DEPS_ID "2" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/damageproto.pc" ) diff --git a/cmake/projects/dri2proto/hunter.cmake b/cmake/projects/dri2proto/hunter.cmake index b28f7dec10..1db083706c 100644 --- a/cmake/projects/dri2proto/hunter.cmake +++ b/cmake/projects/dri2proto/hunter.cmake @@ -26,6 +26,6 @@ hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(dri2proto) hunter_download( PACKAGE_NAME dri2proto - PACKAGE_INTERNAL_DEPS_ID "1" + PACKAGE_INTERNAL_DEPS_ID "2" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/dri2proto.pc" ) diff --git a/cmake/projects/dri3proto/hunter.cmake b/cmake/projects/dri3proto/hunter.cmake index ce9cc81588..fa58c75cf5 100644 --- a/cmake/projects/dri3proto/hunter.cmake +++ b/cmake/projects/dri3proto/hunter.cmake @@ -26,6 +26,6 @@ hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(dri3proto) hunter_download( PACKAGE_NAME dri3proto - PACKAGE_INTERNAL_DEPS_ID "1" + PACKAGE_INTERNAL_DEPS_ID "2" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/dri3proto.pc" ) diff --git a/cmake/projects/drm/hunter.cmake b/cmake/projects/drm/hunter.cmake index f5b00ac0ca..6458a430dd 100644 --- a/cmake/projects/drm/hunter.cmake +++ b/cmake/projects/drm/hunter.cmake @@ -37,7 +37,7 @@ hunter_cmake_args( hunter_cacheable(drm) hunter_download( PACKAGE_NAME drm - PACKAGE_INTERNAL_DEPS_ID "2" + PACKAGE_INTERNAL_DEPS_ID "3" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libdrm.la" "lib/libdrm_amdgpu.la" diff --git a/cmake/projects/fixesproto/hunter.cmake b/cmake/projects/fixesproto/hunter.cmake index 48481d8a13..a7fb76920c 100644 --- a/cmake/projects/fixesproto/hunter.cmake +++ b/cmake/projects/fixesproto/hunter.cmake @@ -26,6 +26,6 @@ hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(fixesproto) hunter_download( PACKAGE_NAME fixesproto - PACKAGE_INTERNAL_DEPS_ID "1" + PACKAGE_INTERNAL_DEPS_ID "2" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/fixesproto.pc" ) diff --git a/cmake/projects/geos/hunter.cmake b/cmake/projects/geos/hunter.cmake index 5401a5b8e4..1a6d1387df 100644 --- a/cmake/projects/geos/hunter.cmake +++ b/cmake/projects/geos/hunter.cmake @@ -21,4 +21,7 @@ hunter_add_version( hunter_configuration_types(geos CONFIGURATION_TYPES Release) hunter_pick_scheme(DEFAULT url_sha1_autotools) -hunter_download(PACKAGE_NAME geos) +hunter_download( + PACKAGE_NAME geos + PACKAGE_INTERNAL_DEPS_ID "1" +) diff --git a/cmake/projects/glproto/hunter.cmake b/cmake/projects/glproto/hunter.cmake index 219de93b07..860dacbc55 100644 --- a/cmake/projects/glproto/hunter.cmake +++ b/cmake/projects/glproto/hunter.cmake @@ -26,6 +26,6 @@ hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(glproto) hunter_download( PACKAGE_NAME glproto - PACKAGE_INTERNAL_DEPS_ID "1" + PACKAGE_INTERNAL_DEPS_ID "2" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/glproto.pc" ) diff --git a/cmake/projects/ice/hunter.cmake b/cmake/projects/ice/hunter.cmake index 455b59a1fd..d5bce7c8eb 100644 --- a/cmake/projects/ice/hunter.cmake +++ b/cmake/projects/ice/hunter.cmake @@ -36,7 +36,7 @@ hunter_cmake_args( hunter_cacheable(ice) hunter_download( PACKAGE_NAME ice - PACKAGE_INTERNAL_DEPS_ID "2" + PACKAGE_INTERNAL_DEPS_ID "3" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libICE.la" "lib/pkgconfig/ice.pc" diff --git a/cmake/projects/inputproto/hunter.cmake b/cmake/projects/inputproto/hunter.cmake index e650fde24d..4bc91b2db8 100644 --- a/cmake/projects/inputproto/hunter.cmake +++ b/cmake/projects/inputproto/hunter.cmake @@ -26,6 +26,6 @@ hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(inputproto) hunter_download( PACKAGE_NAME inputproto - PACKAGE_INTERNAL_DEPS_ID "1" + PACKAGE_INTERNAL_DEPS_ID "2" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/inputproto.pc" ) diff --git a/cmake/projects/intltool/hunter.cmake b/cmake/projects/intltool/hunter.cmake index ddc47b4649..653f0c06a7 100644 --- a/cmake/projects/intltool/hunter.cmake +++ b/cmake/projects/intltool/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Damien Buhl +# Copyright (c) 2015, Damien Buhl # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,4 +21,7 @@ hunter_add_version( hunter_configuration_types(intltool CONFIGURATION_TYPES Release) hunter_pick_scheme(DEFAULT url_sha1_autotools) -hunter_download(PACKAGE_NAME intltool) +hunter_download( + PACKAGE_NAME intltool + PACKAGE_INTERNAL_DEPS_ID "1" +) diff --git a/cmake/projects/kbproto/hunter.cmake b/cmake/projects/kbproto/hunter.cmake index 1fbc9b15dc..311edb6c1e 100644 --- a/cmake/projects/kbproto/hunter.cmake +++ b/cmake/projects/kbproto/hunter.cmake @@ -26,6 +26,6 @@ hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(kbproto) hunter_download( PACKAGE_NAME kbproto - PACKAGE_INTERNAL_DEPS_ID "1" + PACKAGE_INTERNAL_DEPS_ID "2" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/kbproto.pc" ) diff --git a/cmake/projects/libdaemon/hunter.cmake b/cmake/projects/libdaemon/hunter.cmake index 699b81a7db..db15caf2bf 100644 --- a/cmake/projects/libdaemon/hunter.cmake +++ b/cmake/projects/libdaemon/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Damien Buhl +# Copyright (c) 2015, Damien Buhl # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,4 +21,7 @@ hunter_add_version( hunter_configuration_types(libdaemon CONFIGURATION_TYPES Release) hunter_pick_scheme(DEFAULT url_sha1_autotools) -hunter_download(PACKAGE_NAME libdaemon) +hunter_download( + PACKAGE_NAME libdaemon + PACKAGE_INTERNAL_DEPS_ID "1" +) diff --git a/cmake/projects/libxml2/hunter.cmake b/cmake/projects/libxml2/hunter.cmake index 0b9fb1c3c2..c6594f850a 100644 --- a/cmake/projects/libxml2/hunter.cmake +++ b/cmake/projects/libxml2/hunter.cmake @@ -31,8 +31,9 @@ hunter_cmake_args( hunter_configuration_types(libxml2 CONFIGURATION_TYPES Release) hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(libxml2) -hunter_download(PACKAGE_NAME libxml2 - PACKAGE_UNRELOCATABLE_TEXT_FILES - lib/pkgconfig/libxml-2.0.pc +hunter_download( + PACKAGE_NAME libxml2 + PACKAGE_INTERNAL_DEPS_ID "1" + PACKAGE_UNRELOCATABLE_TEXT_FILES + "lib/pkgconfig/libxml-2.0.pc" ) - diff --git a/cmake/projects/odb/hunter.cmake b/cmake/projects/odb/hunter.cmake index e9985490c6..e6ab737648 100644 --- a/cmake/projects/odb/hunter.cmake +++ b/cmake/projects/odb/hunter.cmake @@ -23,7 +23,9 @@ hunter_add_version( hunter_configuration_types(odb CONFIGURATION_TYPES Release) hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(odb) -hunter_download(PACKAGE_NAME odb +hunter_download( + PACKAGE_NAME odb + PACKAGE_INTERNAL_DEPS_ID "1" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libodb.la" "lib/pkgconfig/libodb.pc" diff --git a/cmake/projects/pciaccess/hunter.cmake b/cmake/projects/pciaccess/hunter.cmake index e821a62f7d..1a5cf4181c 100644 --- a/cmake/projects/pciaccess/hunter.cmake +++ b/cmake/projects/pciaccess/hunter.cmake @@ -26,7 +26,7 @@ hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(pciaccess) hunter_download( PACKAGE_NAME pciaccess - PACKAGE_INTERNAL_DEPS_ID "2" + PACKAGE_INTERNAL_DEPS_ID "3" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libpciaccess.la" "lib/pkgconfig/pciaccess.pc" diff --git a/cmake/projects/presentproto/hunter.cmake b/cmake/projects/presentproto/hunter.cmake index 133f76aa1d..a2db52561e 100644 --- a/cmake/projects/presentproto/hunter.cmake +++ b/cmake/projects/presentproto/hunter.cmake @@ -26,6 +26,6 @@ hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(presentproto) hunter_download( PACKAGE_NAME presentproto - PACKAGE_INTERNAL_DEPS_ID "1" + PACKAGE_INTERNAL_DEPS_ID "2" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/presentproto.pc" ) diff --git a/cmake/projects/pthread-stubs/hunter.cmake b/cmake/projects/pthread-stubs/hunter.cmake index a7a714f134..456bdbcd99 100644 --- a/cmake/projects/pthread-stubs/hunter.cmake +++ b/cmake/projects/pthread-stubs/hunter.cmake @@ -26,6 +26,6 @@ hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(pthread-stubs) hunter_download( PACKAGE_NAME pthread-stubs - PACKAGE_INTERNAL_DEPS_ID "1" + PACKAGE_INTERNAL_DEPS_ID "2" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/pthread-stubs.pc" ) diff --git a/cmake/projects/randrproto/hunter.cmake b/cmake/projects/randrproto/hunter.cmake index 2bde8c87e0..39ce137380 100644 --- a/cmake/projects/randrproto/hunter.cmake +++ b/cmake/projects/randrproto/hunter.cmake @@ -35,6 +35,7 @@ hunter_cmake_args( hunter_cacheable(randrproto) hunter_download( PACKAGE_NAME randrproto + PACKAGE_INTERNAL_DEPS_ID "1" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/randrproto.pc" ) diff --git a/cmake/projects/renderproto/hunter.cmake b/cmake/projects/renderproto/hunter.cmake index 72391c0293..f3e557e44f 100644 --- a/cmake/projects/renderproto/hunter.cmake +++ b/cmake/projects/renderproto/hunter.cmake @@ -26,6 +26,6 @@ hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(renderproto) hunter_download( PACKAGE_NAME renderproto - PACKAGE_INTERNAL_DEPS_ID "1" + PACKAGE_INTERNAL_DEPS_ID "2" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/renderproto.pc" ) diff --git a/cmake/projects/sm/hunter.cmake b/cmake/projects/sm/hunter.cmake index 3f051b0637..6aa95cf4c7 100644 --- a/cmake/projects/sm/hunter.cmake +++ b/cmake/projects/sm/hunter.cmake @@ -37,7 +37,7 @@ hunter_cmake_args( hunter_cacheable(sm) hunter_download( PACKAGE_NAME sm - PACKAGE_INTERNAL_DEPS_ID "2" + PACKAGE_INTERNAL_DEPS_ID "3" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libSM.la" "lib/pkgconfig/sm.pc" diff --git a/cmake/projects/x11/hunter.cmake b/cmake/projects/x11/hunter.cmake index 446c2c6057..dbe5e9a778 100644 --- a/cmake/projects/x11/hunter.cmake +++ b/cmake/projects/x11/hunter.cmake @@ -40,7 +40,7 @@ hunter_cmake_args( hunter_cacheable(x11) hunter_download( PACKAGE_NAME x11 - PACKAGE_INTERNAL_DEPS_ID "2" + PACKAGE_INTERNAL_DEPS_ID "3" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libX11-xcb.la" "lib/libX11.la" diff --git a/cmake/projects/xau/hunter.cmake b/cmake/projects/xau/hunter.cmake index 98e18f570b..fdde98992c 100644 --- a/cmake/projects/xau/hunter.cmake +++ b/cmake/projects/xau/hunter.cmake @@ -36,6 +36,6 @@ hunter_cmake_args( hunter_cacheable(xau) hunter_download( PACKAGE_NAME xau - PACKAGE_INTERNAL_DEPS_ID "2" + PACKAGE_INTERNAL_DEPS_ID "3" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libXau.la;lib/pkgconfig/xau.pc" ) diff --git a/cmake/projects/xcb-proto/hunter.cmake b/cmake/projects/xcb-proto/hunter.cmake index 0c0ee8cabe..b33b3d1156 100644 --- a/cmake/projects/xcb-proto/hunter.cmake +++ b/cmake/projects/xcb-proto/hunter.cmake @@ -38,6 +38,6 @@ hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(xcb-proto) hunter_download( PACKAGE_NAME xcb-proto - PACKAGE_INTERNAL_DEPS_ID "1" + PACKAGE_INTERNAL_DEPS_ID "2" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/xcb-proto.pc" ) diff --git a/cmake/projects/xcursor/hunter.cmake b/cmake/projects/xcursor/hunter.cmake index fa732e76b5..808cd16c7a 100644 --- a/cmake/projects/xcursor/hunter.cmake +++ b/cmake/projects/xcursor/hunter.cmake @@ -39,6 +39,7 @@ hunter_cmake_args( hunter_cacheable(xcursor) hunter_download( PACKAGE_NAME xcursor + PACKAGE_INTERNAL_DEPS_ID "1" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libXcursor.la" "lib/pkgconfig/xcursor.pc" diff --git a/cmake/projects/xdamage/hunter.cmake b/cmake/projects/xdamage/hunter.cmake index 1d9c5c3817..1b1f931ddf 100644 --- a/cmake/projects/xdamage/hunter.cmake +++ b/cmake/projects/xdamage/hunter.cmake @@ -39,7 +39,7 @@ hunter_cmake_args( ) hunter_download( PACKAGE_NAME xdamage - PACKAGE_INTERNAL_DEPS_ID "2" + PACKAGE_INTERNAL_DEPS_ID "3" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/xdamage.pc" "lib/libXdamage.la" diff --git a/cmake/projects/xext/hunter.cmake b/cmake/projects/xext/hunter.cmake index be14f8bd2d..4fa8c3d56b 100644 --- a/cmake/projects/xext/hunter.cmake +++ b/cmake/projects/xext/hunter.cmake @@ -37,7 +37,7 @@ hunter_cmake_args( hunter_cacheable(xext) hunter_download( PACKAGE_NAME xext - PACKAGE_INTERNAL_DEPS_ID "2" + PACKAGE_INTERNAL_DEPS_ID "3" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libXext.la" "lib/pkgconfig/xext.pc" diff --git a/cmake/projects/xextproto/hunter.cmake b/cmake/projects/xextproto/hunter.cmake index a08e50e059..8c0f406022 100644 --- a/cmake/projects/xextproto/hunter.cmake +++ b/cmake/projects/xextproto/hunter.cmake @@ -26,6 +26,6 @@ hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(xextproto) hunter_download( PACKAGE_NAME xextproto - PACKAGE_INTERNAL_DEPS_ID "1" + PACKAGE_INTERNAL_DEPS_ID "2" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/xextproto.pc" ) diff --git a/cmake/projects/xf86vidmodeproto/hunter.cmake b/cmake/projects/xf86vidmodeproto/hunter.cmake index a854a1f5ad..9986447fa1 100644 --- a/cmake/projects/xf86vidmodeproto/hunter.cmake +++ b/cmake/projects/xf86vidmodeproto/hunter.cmake @@ -35,6 +35,7 @@ hunter_cmake_args( hunter_cacheable(xf86vidmodeproto) hunter_download( PACKAGE_NAME xf86vidmodeproto + PACKAGE_INTERNAL_DEPS_ID "1" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/xf86vidmodeproto.pc" ) diff --git a/cmake/projects/xfixes/hunter.cmake b/cmake/projects/xfixes/hunter.cmake index c3aafb1628..048ef42dda 100644 --- a/cmake/projects/xfixes/hunter.cmake +++ b/cmake/projects/xfixes/hunter.cmake @@ -39,7 +39,7 @@ hunter_cmake_args( hunter_cacheable(xfixes) hunter_download( PACKAGE_NAME xfixes - PACKAGE_INTERNAL_DEPS_ID "2" + PACKAGE_INTERNAL_DEPS_ID "3" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libXfixes.la" "lib/pkgconfig/xfixes.pc" diff --git a/cmake/projects/xinerama/hunter.cmake b/cmake/projects/xinerama/hunter.cmake index 5b37a675ca..afd792154b 100644 --- a/cmake/projects/xinerama/hunter.cmake +++ b/cmake/projects/xinerama/hunter.cmake @@ -38,6 +38,7 @@ hunter_cmake_args( hunter_cacheable(xinerama) hunter_download( PACKAGE_NAME xinerama + PACKAGE_INTERNAL_DEPS_ID "1" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libXinerama.la" "lib/pkgconfig/xinerama.pc" diff --git a/cmake/projects/xineramaproto/hunter.cmake b/cmake/projects/xineramaproto/hunter.cmake index 8e7e5a7b08..7af90f4d1b 100644 --- a/cmake/projects/xineramaproto/hunter.cmake +++ b/cmake/projects/xineramaproto/hunter.cmake @@ -35,6 +35,7 @@ hunter_cmake_args( hunter_cacheable(xineramaproto) hunter_download( PACKAGE_NAME xineramaproto + PACKAGE_INTERNAL_DEPS_ID "1" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/xineramaproto.pc" ) diff --git a/cmake/projects/xorg-macros/hunter.cmake b/cmake/projects/xorg-macros/hunter.cmake index 03aa2732d1..14dc80d688 100644 --- a/cmake/projects/xorg-macros/hunter.cmake +++ b/cmake/projects/xorg-macros/hunter.cmake @@ -26,6 +26,6 @@ hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(xorg-macros) hunter_download( PACKAGE_NAME xorg-macros - PACKAGE_INTERNAL_DEPS_ID "1" + PACKAGE_INTERNAL_DEPS_ID "2" PACKAGE_UNRELOCATABLE_TEXT_FILES "share/pkgconfig/xorg-macros.pc" ) diff --git a/cmake/projects/xproto/hunter.cmake b/cmake/projects/xproto/hunter.cmake index 4410f19a50..a0c29211e7 100644 --- a/cmake/projects/xproto/hunter.cmake +++ b/cmake/projects/xproto/hunter.cmake @@ -32,6 +32,6 @@ hunter_cmake_args( hunter_cacheable(xproto) hunter_download( PACKAGE_NAME xproto - PACKAGE_INTERNAL_DEPS_ID "2" + PACKAGE_INTERNAL_DEPS_ID "3" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/xproto.pc" ) diff --git a/cmake/projects/xrandr/hunter.cmake b/cmake/projects/xrandr/hunter.cmake index 0721bc5670..f57e5493e0 100644 --- a/cmake/projects/xrandr/hunter.cmake +++ b/cmake/projects/xrandr/hunter.cmake @@ -40,7 +40,7 @@ hunter_cmake_args( hunter_cacheable(xrandr) hunter_download( PACKAGE_NAME xrandr - PACKAGE_INTERNAL_DEPS_ID "1" + PACKAGE_INTERNAL_DEPS_ID "2" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/xrandr.pc" "lib/libXrandr.la" diff --git a/cmake/projects/xrender/hunter.cmake b/cmake/projects/xrender/hunter.cmake index e483f14ad0..2562afa804 100644 --- a/cmake/projects/xrender/hunter.cmake +++ b/cmake/projects/xrender/hunter.cmake @@ -36,7 +36,7 @@ hunter_cmake_args( hunter_cacheable(xrender) hunter_download( PACKAGE_NAME xrender - PACKAGE_INTERNAL_DEPS_ID "2" + PACKAGE_INTERNAL_DEPS_ID "3" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libXrender.la" "lib/pkgconfig/xrender.pc" diff --git a/cmake/projects/xshmfence/hunter.cmake b/cmake/projects/xshmfence/hunter.cmake index b2e2704493..b887e942b0 100644 --- a/cmake/projects/xshmfence/hunter.cmake +++ b/cmake/projects/xshmfence/hunter.cmake @@ -35,7 +35,7 @@ hunter_cmake_args( hunter_cacheable(xshmfence) hunter_download( PACKAGE_NAME xshmfence - PACKAGE_INTERNAL_DEPS_ID "2" + PACKAGE_INTERNAL_DEPS_ID "3" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libxshmfence.la" "lib/pkgconfig/xshmfence.pc" diff --git a/cmake/projects/xtrans/hunter.cmake b/cmake/projects/xtrans/hunter.cmake index 5020103ace..70a483731d 100644 --- a/cmake/projects/xtrans/hunter.cmake +++ b/cmake/projects/xtrans/hunter.cmake @@ -26,6 +26,6 @@ hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(xtrans) hunter_download( PACKAGE_NAME xtrans - PACKAGE_INTERNAL_DEPS_ID "1" + PACKAGE_INTERNAL_DEPS_ID "2" PACKAGE_UNRELOCATABLE_TEXT_FILES "share/pkgconfig/xtrans.pc" ) diff --git a/cmake/projects/xxf86vm/hunter.cmake b/cmake/projects/xxf86vm/hunter.cmake index 2e8b8b06d5..54df9fb1ad 100644 --- a/cmake/projects/xxf86vm/hunter.cmake +++ b/cmake/projects/xxf86vm/hunter.cmake @@ -40,6 +40,7 @@ hunter_cmake_args( hunter_cacheable(xxf86vm) hunter_download( PACKAGE_NAME xxf86vm + PACKAGE_INTERNAL_DEPS_ID "1" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libXxf86vm.la" "lib/pkgconfig/xxf86vm.pc" From 2033edb9674be1908a24d1dae478a9006f71d914 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Sun, 26 Mar 2017 16:19:43 -0400 Subject: [PATCH 029/612] initial imshow hunter packages (glfw window library) --- cmake/configs/default.cmake | 1 + cmake/projects/imshow/hunter.cmake | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 cmake/projects/imshow/hunter.cmake diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index dbb1845a8c..359215574a 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -137,6 +137,7 @@ hunter_config(glproto VERSION 1.4.17) hunter_config(half VERSION 1.1.0-p1) hunter_config(hdf5 VERSION 1.8.15-p1) hunter_config(ice VERSION 1.0.8) +hunter_config(imshow VERSION 1.0.0) hunter_config(inputproto VERSION 2.2) hunter_config(intltool VERSION 0.51.0) hunter_config(ios_sim VERSION 3.1.1) diff --git a/cmake/projects/imshow/hunter.cmake b/cmake/projects/imshow/hunter.cmake new file mode 100644 index 0000000000..26711abe6f --- /dev/null +++ b/cmake/projects/imshow/hunter.cmake @@ -0,0 +1,26 @@ +# Copyright (c) 2017, David Hirvonen +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +# Load used modules +include(hunter_add_package) +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + imshow + VERSION + "1.0.0" + URL + "https://github.com/hunter-packages/imshow/archive/v1.0.0.tar.gz" + SHA1 + eb2b0a425c6769ff35bc680cc07c1da0ed104df1 +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(imshow) +hunter_download(PACKAGE_NAME imshow) From 13e20de4cf64561d945b1b5983d7468627cf21f2 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Sun, 26 Mar 2017 17:09:55 -0400 Subject: [PATCH 030/612] update imshow release --- cmake/projects/imshow/hunter.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/projects/imshow/hunter.cmake b/cmake/projects/imshow/hunter.cmake index 26711abe6f..4b18ab458e 100644 --- a/cmake/projects/imshow/hunter.cmake +++ b/cmake/projects/imshow/hunter.cmake @@ -16,9 +16,9 @@ hunter_add_version( VERSION "1.0.0" URL - "https://github.com/hunter-packages/imshow/archive/v1.0.0.tar.gz" + "https://github.com/hunter-packages/imshow/archive/v1.0.0.tar.gz" SHA1 - eb2b0a425c6769ff35bc680cc07c1da0ed104df1 + 3b01b2cdd59d8a90da0df45888e96175da009ef5 ) hunter_pick_scheme(DEFAULT url_sha1_cmake) From c39fa76b0c3e78c03e7e239162e5013a35885c8f Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 27 Mar 2017 12:23:50 +0800 Subject: [PATCH 031/612] imshow 1.0.0-p0 --- cmake/configs/default.cmake | 2 +- cmake/projects/imshow/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 359215574a..19d2df6c6c 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -137,7 +137,7 @@ hunter_config(glproto VERSION 1.4.17) hunter_config(half VERSION 1.1.0-p1) hunter_config(hdf5 VERSION 1.8.15-p1) hunter_config(ice VERSION 1.0.8) -hunter_config(imshow VERSION 1.0.0) +hunter_config(imshow VERSION 1.0.0-p0) hunter_config(inputproto VERSION 2.2) hunter_config(intltool VERSION 0.51.0) hunter_config(ios_sim VERSION 3.1.1) diff --git a/cmake/projects/imshow/hunter.cmake b/cmake/projects/imshow/hunter.cmake index 4b18ab458e..3997f1b966 100644 --- a/cmake/projects/imshow/hunter.cmake +++ b/cmake/projects/imshow/hunter.cmake @@ -21,6 +21,17 @@ hunter_add_version( 3b01b2cdd59d8a90da0df45888e96175da009ef5 ) +hunter_add_version( + PACKAGE_NAME + imshow + VERSION + "1.0.0-p0" + URL + "https://github.com/hunter-packages/imshow/archive/v1.0.0-p0.tar.gz" + SHA1 + 196be66bb2bf62747e638b87444b88824ca51a18 +) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(imshow) hunter_download(PACKAGE_NAME imshow) From 21c2fa94656cbd5834af5b0d8cdd1beb746429c4 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 27 Mar 2017 12:24:08 +0800 Subject: [PATCH 032/612] Add 'imshow' example --- examples/imshow/CMakeLists.txt | 16 ++++++++++++ examples/imshow/foo.cpp | 45 ++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 examples/imshow/CMakeLists.txt create mode 100644 examples/imshow/foo.cpp diff --git a/examples/imshow/CMakeLists.txt b/examples/imshow/CMakeLists.txt new file mode 100644 index 0000000000..004f80b3c7 --- /dev/null +++ b/examples/imshow/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-imshow) + +hunter_add_package(imshow) +find_package(imshow CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo imshow::imshow) diff --git a/examples/imshow/foo.cpp b/examples/imshow/foo.cpp new file mode 100644 index 0000000000..45c65bc9b4 --- /dev/null +++ b/examples/imshow/foo.cpp @@ -0,0 +1,45 @@ +#include +#include + +int main(int argc, char * argv[]) +{ + int test[320 * 240]; + unsigned char test8[320 * 240]; + unsigned char test_blur[320 * 240]; + + std::default_random_engine eng; + std::uniform_int_distribution<> dist; + + do + { + for (int i = 0; i < 320 * 240; i++) + { + test[i] = dist(eng); + } + glfw::imshow("test", { test, glfw::IM_8U, 320, 240, 4 }); + for (int i = 0; i < 320 * 240; i++) + { + test8[i] = ((test[i] & 0xFF00 >> 8) + (test[i] & 0xFF0000 >> 16) + (test[i] & 0xFF000000 >> 24))/3; + } + glfw::imshow("test8", { test8, glfw::IM_8U, 320, 240, 1 }); + + for (int y = 1; y < 239; y++) + { + for (int x = 1; x < 319; x++) + { + test_blur[y * 320 + x] = (test8[y * 320 + x-1] + test8[y * 320 + x] + test8[y * 320 + x+1]) / 3; + } + } + for (int y = 1; y < 239; y++) + { + for (int x = 1; x < 319; x++) + { + test_blur[y * 320 + x] = (test_blur[(y - 1) * 320 + x] + test_blur[y * 320 + x] + test_blur[(y + 1) * 320 + x]) / 3; + } + } + glfw::imshow("test_blured", { test_blur, glfw::IM_8U, 320, 240, 1 }); + } + while (glfw::getKey(false) != 'q'); + + return 0; +} From 2bde3da15383fb6e33c1184556affa083675b679 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 27 Mar 2017 14:22:12 +0800 Subject: [PATCH 033/612] OpenSSL 1.0.2k --- cmake/configs/default.cmake | 2 +- cmake/projects/OpenSSL/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 19d2df6c6c..049fb1387b 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -80,7 +80,7 @@ hunter_config(OpenCL VERSION 2.1-p0) hunter_config(OpenCL-cpp VERSION 2.0.10-p0) hunter_config(OpenCV VERSION 3.2.0-p0) hunter_config(OpenCV-Extra VERSION 3.0.0) -hunter_config(OpenSSL VERSION 1.0.2j) +hunter_config(OpenSSL VERSION 1.0.2k) hunter_config(PNG VERSION 1.6.26-p1) hunter_config(PocoCpp VERSION 1.7.6-p0) hunter_config(PostgreSQL VERSION 9.5.0) diff --git a/cmake/projects/OpenSSL/hunter.cmake b/cmake/projects/OpenSSL/hunter.cmake index 6267c2519d..a0e95ee5cf 100755 --- a/cmake/projects/OpenSSL/hunter.cmake +++ b/cmake/projects/OpenSSL/hunter.cmake @@ -41,6 +41,17 @@ hunter_add_version( 783666315e96b8f55b28b5e1edcb7ed83e8bc79b ) +hunter_add_version( + PACKAGE_NAME + OpenSSL + VERSION + "1.0.2k" + URL + "https://github.com/openssl/openssl/archive/OpenSSL_1_0_2k.tar.gz" + SHA1 + 462944eff7b045d950deaaa86798190cbdc5278a +) + hunter_add_version( PACKAGE_NAME OpenSSL From 0257558453b4a0ce140a00be6f491e1b3c9950af Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 27 Mar 2017 17:25:15 +0800 Subject: [PATCH 034/612] OpenSSL 1.1.0e --- cmake/configs/default.cmake | 2 +- cmake/projects/OpenSSL/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 049fb1387b..bd1fdc2fa1 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -80,7 +80,7 @@ hunter_config(OpenCL VERSION 2.1-p0) hunter_config(OpenCL-cpp VERSION 2.0.10-p0) hunter_config(OpenCV VERSION 3.2.0-p0) hunter_config(OpenCV-Extra VERSION 3.0.0) -hunter_config(OpenSSL VERSION 1.0.2k) +hunter_config(OpenSSL VERSION 1.1.0e) hunter_config(PNG VERSION 1.6.26-p1) hunter_config(PocoCpp VERSION 1.7.6-p0) hunter_config(PostgreSQL VERSION 9.5.0) diff --git a/cmake/projects/OpenSSL/hunter.cmake b/cmake/projects/OpenSSL/hunter.cmake index a0e95ee5cf..658d85cf09 100755 --- a/cmake/projects/OpenSSL/hunter.cmake +++ b/cmake/projects/OpenSSL/hunter.cmake @@ -41,6 +41,17 @@ hunter_add_version( 783666315e96b8f55b28b5e1edcb7ed83e8bc79b ) +hunter_add_version( + PACKAGE_NAME + OpenSSL + VERSION + "1.1.0e" + URL + "https://github.com/openssl/openssl/archive/OpenSSL_1_1_0e.tar.gz" + SHA1 + 14eaed8edc7e48fe1f01924fa4561c1865c9c8ac +) + hunter_add_version( PACKAGE_NAME OpenSSL From 3782df0aa921dc25d990026a9f849d4fcdf8e9fd Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 27 Mar 2017 18:26:05 +0800 Subject: [PATCH 035/612] OpenSSL: use 1.0.2* for Visual Studio and Android --- cmake/configs/default.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index bd1fdc2fa1..0824b89e41 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -80,7 +80,13 @@ hunter_config(OpenCL VERSION 2.1-p0) hunter_config(OpenCL-cpp VERSION 2.0.10-p0) hunter_config(OpenCV VERSION 3.2.0-p0) hunter_config(OpenCV-Extra VERSION 3.0.0) -hunter_config(OpenSSL VERSION 1.1.0e) +if(MSVC OR ANDROID) + # FIXME: https://travis-ci.org/ingenue/hunter/jobs/215460184 + # FIXME: https://ci.appveyor.com/project/ingenue/hunter/build/1.0.1470 + hunter_config(OpenSSL VERSION 1.0.2k) +else() + hunter_config(OpenSSL VERSION 1.1.0e) +endif() hunter_config(PNG VERSION 1.6.26-p1) hunter_config(PocoCpp VERSION 1.7.6-p0) hunter_config(PostgreSQL VERSION 9.5.0) From a34f7190ad6322d0fb42d1ea92b7f72ce0c16949 Mon Sep 17 00:00:00 2001 From: Giuseppe Roberti Date: Tue, 28 Mar 2017 01:19:56 +0200 Subject: [PATCH 036/612] doctest 1.1.4 --- cmake/configs/default.cmake | 1 + cmake/projects/doctest/hunter.cmake | 33 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 cmake/projects/doctest/hunter.cmake diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 0824b89e41..667fe11c60 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -124,6 +124,7 @@ hunter_config(damageproto VERSION 1.2.1) hunter_config(dbus VERSION 1.10.0-hunter-4) hunter_config(dest VERSION 0.8.0-p4) hunter_config(dlib VERSION 19.2-p1) +hunter_config(doctest VERSION 1.1.4) hunter_config(dri2proto VERSION 2.8) hunter_config(dri3proto VERSION 1.0) hunter_config(drm VERSION 2.4.67) diff --git a/cmake/projects/doctest/hunter.cmake b/cmake/projects/doctest/hunter.cmake new file mode 100644 index 0000000000..79af49a161 --- /dev/null +++ b/cmake/projects/doctest/hunter.cmake @@ -0,0 +1,33 @@ +# cmake/projects/Example/hunter.cmake + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +# Load used modules +include(hunter_add_version) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) +include(hunter_cacheable) + +# List of versions here... +hunter_add_version( + PACKAGE_NAME + doctest + VERSION + "1.1.4" + URL + "https://github.com/piribes/doctest/archive/master.tar.gz" + SHA1 + e1184689bed941752f905f6dae9e5b42631ed9a6 +) + +hunter_cmake_args(doctest CMAKE_ARGS + DOCTEST_SKIP_EXAMPLES=ON + DOCTEST_SKIP_COVERAGE=ON +) + +# Pick a download scheme +hunter_pick_scheme(DEFAULT url_sha1_cmake) # use scheme for cmake projects + +hunter_cacheable(doctest) +hunter_download(PACKAGE_NAME doctest) From 5b4e5552b9972bc552755c6c1694be4cc0584126 Mon Sep 17 00:00:00 2001 From: Giuseppe Roberti Date: Tue, 28 Mar 2017 02:39:38 +0200 Subject: [PATCH 037/612] correct url and sha1 --- cmake/projects/doctest/hunter.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/projects/doctest/hunter.cmake b/cmake/projects/doctest/hunter.cmake index 79af49a161..2a2106dd0e 100644 --- a/cmake/projects/doctest/hunter.cmake +++ b/cmake/projects/doctest/hunter.cmake @@ -16,9 +16,9 @@ hunter_add_version( VERSION "1.1.4" URL - "https://github.com/piribes/doctest/archive/master.tar.gz" + "https://github.com/piribes/doctest/archive/hunter.tar.gz" SHA1 - e1184689bed941752f905f6dae9e5b42631ed9a6 + 1b678730f0f36d31e33626d1c7f3130bd709be06 ) hunter_cmake_args(doctest CMAKE_ARGS From b300a074c1d6e4d8cf50e8d0e79df10f70b30e72 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Mon, 27 Mar 2017 09:36:06 -0400 Subject: [PATCH 038/612] add boost-pba --- cmake/configs/default.cmake | 1 + cmake/projects/boost-pba/hunter.cmake | 26 ++++++++++++++++++++++++++ examples/boost-pba/CMakeLists.txt | 16 ++++++++++++++++ examples/boost-pba/main.cpp | 0 4 files changed, 43 insertions(+) create mode 100644 cmake/projects/boost-pba/hunter.cmake create mode 100644 examples/boost-pba/CMakeLists.txt create mode 100644 examples/boost-pba/main.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 0824b89e41..58d8e7b531 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -112,6 +112,7 @@ hunter_config(ZeroMQ VERSION 4.1.4-p2) hunter_config(caffe VERSION rc3-p2) hunter_config(Catch VERSION 1.5.9) hunter_config(autobahn-cpp VERSION 0.2.0) +hunter_config(boost-pba VERSION 1.0.0) hunter_config(ccv VERSION 0.7-p6) hunter_config(cereal VERSION 1.2.1-p1) hunter_config(clBLAS VERSION 2.10.0-p0) diff --git a/cmake/projects/boost-pba/hunter.cmake b/cmake/projects/boost-pba/hunter.cmake new file mode 100644 index 0000000000..30a9ac76f4 --- /dev/null +++ b/cmake/projects/boost-pba/hunter.cmake @@ -0,0 +1,26 @@ +# Copyright (c) 2017, David Hirvonen +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +# Load used modules +include(hunter_add_package) +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + boost-pba + VERSION + "1.0.0" + URL + "https://github.com/hunter-packages/boost-pba/archive/v1.0.0.tar.gz" + SHA1 + 65b28b923cf0330860b36d568bf4a98503fb0455 +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(boost-pba) +hunter_download(PACKAGE_NAME boost-pba) diff --git a/examples/boost-pba/CMakeLists.txt b/examples/boost-pba/CMakeLists.txt new file mode 100644 index 0000000000..d91beaf2b5 --- /dev/null +++ b/examples/boost-pba/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright (c) 2017, David Hirvonen +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-boost-pba) + +hunter_add_package(boost-pba) +find_package(boost-pba CONFIG REQUIRED) + +add_executable(boost-pba-test main.cpp) +target_link_libraries(boost-pba-test boost-pba::boost-pba) diff --git a/examples/boost-pba/main.cpp b/examples/boost-pba/main.cpp new file mode 100644 index 0000000000..e69de29bb2 From 0b0ba29feb0fe9005329e91fb7ce86f401020835 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 28 Mar 2017 13:27:49 +0800 Subject: [PATCH 039/612] boost-pba 1.0.0-p0 --- cmake/configs/default.cmake | 2 +- cmake/projects/boost-pba/hunter.cmake | 13 ++++++++++++- examples/boost-pba/main.cpp | 4 ++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 58d8e7b531..02b1964ae8 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -112,7 +112,7 @@ hunter_config(ZeroMQ VERSION 4.1.4-p2) hunter_config(caffe VERSION rc3-p2) hunter_config(Catch VERSION 1.5.9) hunter_config(autobahn-cpp VERSION 0.2.0) -hunter_config(boost-pba VERSION 1.0.0) +hunter_config(boost-pba VERSION 1.0.0-p0) hunter_config(ccv VERSION 0.7-p6) hunter_config(cereal VERSION 1.2.1-p1) hunter_config(clBLAS VERSION 2.10.0-p0) diff --git a/cmake/projects/boost-pba/hunter.cmake b/cmake/projects/boost-pba/hunter.cmake index 30a9ac76f4..e41e9dbccb 100644 --- a/cmake/projects/boost-pba/hunter.cmake +++ b/cmake/projects/boost-pba/hunter.cmake @@ -16,11 +16,22 @@ hunter_add_version( VERSION "1.0.0" URL - "https://github.com/hunter-packages/boost-pba/archive/v1.0.0.tar.gz" + "https://github.com/hunter-packages/boost-pba/archive/v1.0.0.tar.gz" SHA1 65b28b923cf0330860b36d568bf4a98503fb0455 ) +hunter_add_version( + PACKAGE_NAME + boost-pba + VERSION + "1.0.0-p0" + URL + "https://github.com/hunter-packages/boost-pba/archive/v1.0.0-p0.tar.gz" + SHA1 + c4dd316edbb6839c5be2a5e1a9decd3bdfd848d0 +) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(boost-pba) hunter_download(PACKAGE_NAME boost-pba) diff --git a/examples/boost-pba/main.cpp b/examples/boost-pba/main.cpp index e69de29bb2..0d89fd574c 100644 --- a/examples/boost-pba/main.cpp +++ b/examples/boost-pba/main.cpp @@ -0,0 +1,4 @@ +#include + +int main() { +} From 9374ef789b9863019d7bd4b8b25ae95f36122ac4 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 28 Mar 2017 14:11:51 +0800 Subject: [PATCH 040/612] boost-pba: Use Boost 1.58.0* --- examples/boost-pba/CMakeLists.txt | 1 + examples/boost-pba/config.cmake | 1 + 2 files changed, 2 insertions(+) create mode 100644 examples/boost-pba/config.cmake diff --git a/examples/boost-pba/CMakeLists.txt b/examples/boost-pba/CMakeLists.txt index d91beaf2b5..152cbb426e 100644 --- a/examples/boost-pba/CMakeLists.txt +++ b/examples/boost-pba/CMakeLists.txt @@ -5,6 +5,7 @@ cmake_minimum_required(VERSION 3.0) # Emulate HunterGate: # * https://github.com/hunter-packages/gate +set(TESTING_CONFIG_OPT FILEPATH "${CMAKE_CURRENT_LIST_DIR}/config.cmake") include("../common.cmake") project(download-boost-pba) diff --git a/examples/boost-pba/config.cmake b/examples/boost-pba/config.cmake new file mode 100644 index 0000000000..2708af5dbc --- /dev/null +++ b/examples/boost-pba/config.cmake @@ -0,0 +1 @@ +hunter_config(Boost VERSION 1.58.0-p1) From 5d66c53a58e0b73d4c7ba7509fd781f792c1645d Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 28 Mar 2017 14:21:30 +0800 Subject: [PATCH 041/612] Docs: add link to 'imshow' package --- docs/packages/all.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/all.rst b/docs/packages/all.rst index 139d016126..29a31b349b 100644 --- a/docs/packages/all.rst +++ b/docs/packages/all.rst @@ -74,6 +74,7 @@ All packages * `glog `__ * `half `__ * `hdf5 `__ +* `imshow `__ * `ios_sim `__ * `irrXML `__ * `libyuv `__ From b47d29059a7beaed95ef291a16dccdd5da6648d3 Mon Sep 17 00:00:00 2001 From: Giuseppe Roberti Date: Wed, 29 Mar 2017 03:09:05 +0200 Subject: [PATCH 042/612] doctest: provide example, use stable link --- cmake/configs/default.cmake | 2 +- cmake/projects/doctest/hunter.cmake | 6 +++--- examples/doctest/CMakeLists.txt | 22 ++++++++++++++++++++++ examples/doctest/foo.cpp | 5 +++++ examples/doctest/foo.hpp | 9 +++++++++ examples/doctest/foo_test.cpp | 9 +++++++++ examples/doctest/foo_test_main.cpp | 2 ++ 7 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 examples/doctest/CMakeLists.txt create mode 100644 examples/doctest/foo.cpp create mode 100644 examples/doctest/foo.hpp create mode 100644 examples/doctest/foo_test.cpp create mode 100644 examples/doctest/foo_test_main.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 667fe11c60..46e6f71472 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -124,7 +124,7 @@ hunter_config(damageproto VERSION 1.2.1) hunter_config(dbus VERSION 1.10.0-hunter-4) hunter_config(dest VERSION 0.8.0-p4) hunter_config(dlib VERSION 19.2-p1) -hunter_config(doctest VERSION 1.1.4) +hunter_config(doctest VERSION 1.1.4-hunter-1) hunter_config(dri2proto VERSION 2.8) hunter_config(dri3proto VERSION 1.0) hunter_config(drm VERSION 2.4.67) diff --git a/cmake/projects/doctest/hunter.cmake b/cmake/projects/doctest/hunter.cmake index 2a2106dd0e..5589761347 100644 --- a/cmake/projects/doctest/hunter.cmake +++ b/cmake/projects/doctest/hunter.cmake @@ -14,11 +14,11 @@ hunter_add_version( PACKAGE_NAME doctest VERSION - "1.1.4" + "1.1.4-hunter-1" URL - "https://github.com/piribes/doctest/archive/hunter.tar.gz" + "https://github.com/piribes/doctest/archive/1.1.4-hunter-1.tar.gz" SHA1 - 1b678730f0f36d31e33626d1c7f3130bd709be06 + 684580f4cf1f40ca7750bea90facc4564a807c2a ) hunter_cmake_args(doctest CMAKE_ARGS diff --git a/examples/doctest/CMakeLists.txt b/examples/doctest/CMakeLists.txt new file mode 100644 index 0000000000..15c961a4ab --- /dev/null +++ b/examples/doctest/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.0) + +include("../common.cmake") + +project(download-doctest) + +set(CMAKE_CXX_STANDARD 98) + +hunter_add_package(doctest) + +find_package(doctest CONFIG REQUIRED) + +set(SOURCES foo_test_main.cpp + foo_test.cpp + foo.cpp) +set(HEADERS foo.hpp) + +add_executable(doctest_test ${SOURCES} ${HEADERS}) +target_link_libraries(doctest_test PUBLIC doctest::doctest) + +enable_testing(true) +add_test(NAME doctest_test COMMAND doctest_test) diff --git a/examples/doctest/foo.cpp b/examples/doctest/foo.cpp new file mode 100644 index 0000000000..ba1ac11164 --- /dev/null +++ b/examples/doctest/foo.cpp @@ -0,0 +1,5 @@ +#include "foo.hpp" + +namespace foo { + bool return_true() { return true; } +} diff --git a/examples/doctest/foo.hpp b/examples/doctest/foo.hpp new file mode 100644 index 0000000000..51464d67a4 --- /dev/null +++ b/examples/doctest/foo.hpp @@ -0,0 +1,9 @@ +#ifndef FOO_H +#define DOCTEST_H +#pragma once + +namespace foo { + bool return_true(); +} + +#endif diff --git a/examples/doctest/foo_test.cpp b/examples/doctest/foo_test.cpp new file mode 100644 index 0000000000..4e7dd71149 --- /dev/null +++ b/examples/doctest/foo_test.cpp @@ -0,0 +1,9 @@ +#include +#include "foo.hpp" + +namespace foo { + TEST_CASE("foo_test") { + REQUIRE_NOTHROW(return_true()); + REQUIRE(true == return_true()); + } +} diff --git a/examples/doctest/foo_test_main.cpp b/examples/doctest/foo_test_main.cpp new file mode 100644 index 0000000000..b8e3a4bf1a --- /dev/null +++ b/examples/doctest/foo_test_main.cpp @@ -0,0 +1,2 @@ +#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN +#include From fa1e076221f72fbfaa51155faa6280bf95d034e9 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 29 Mar 2017 09:39:18 +0800 Subject: [PATCH 043/612] Docs: link to 'boost-pba' --- docs/packages/all.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/all.rst b/docs/packages/all.rst index 29a31b349b..f2333481a6 100644 --- a/docs/packages/all.rst +++ b/docs/packages/all.rst @@ -56,6 +56,7 @@ All packages * `ZLIB `__ * `ZMQPP `__ * `ZeroMQ `__ +* `boost-pba `__ * `caffe `__ * `ccv `__ * `cereal `__ From 70f3f6318aa8f00dc6145178dcaccaad70cddf35 Mon Sep 17 00:00:00 2001 From: Giuseppe Roberti Date: Wed, 29 Mar 2017 12:27:01 +0200 Subject: [PATCH 044/612] Add pkg.doctest --- docs/packages/all.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/all.rst b/docs/packages/all.rst index f2333481a6..f73f2c448f 100644 --- a/docs/packages/all.rst +++ b/docs/packages/all.rst @@ -66,6 +66,7 @@ All packages * `cxxopts `__ * `dest `__ * `dlib `__ +* `doctest `__ * `eos `__ * `flatbuffers `__ * `fmt `__ From e073aed3a54abdac748469b00a964e851c5ce997 Mon Sep 17 00:00:00 2001 From: caseymcc Date: Fri, 31 Mar 2017 10:32:49 -0500 Subject: [PATCH 045/612] remove cuda from default compile --- cmake/projects/OpenCV/hunter.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/projects/OpenCV/hunter.cmake b/cmake/projects/OpenCV/hunter.cmake index 5ee88fd71d..9b41dfba0c 100644 --- a/cmake/projects/OpenCV/hunter.cmake +++ b/cmake/projects/OpenCV/hunter.cmake @@ -303,6 +303,10 @@ hunter_cmake_args( BUILD_opencv_java=OFF BUILD_opencv_python2=OFF BUILD_opencv_python3=OFF + # There is not a CUDA package so need to stop OpenCV from searching for it, otherwise + # it might pick up the host version + WITH_CUDA=OFF + WITH_CUFFT=OFF ) # Pick a download scheme From 12e851d132f84670ddaeeed15a48cc12b4419153 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sat, 1 Apr 2017 14:09:39 +0800 Subject: [PATCH 046/612] Use 'trusty' image --- .travis.yml | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index dcb214230a..34092cd650 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,26 +12,8 @@ os: sudo: - false -# Install packages differs for container-based infrastructure -# * https://docs.travis-ci.com/user/migrating-from-legacy/#How-do-I-install-APT-sources-and-packages%3F -# * http://stackoverflow.com/a/30925448/2288008 -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - python3 - - python-enchant # for documentation - - # python3-pip package is not available, use 'easy_install3': - # * https://github.com/travis-ci/apt-package-whitelist/issues/768 - - python3-setuptools # easy_install3 - - # https://github.com/travis-ci-tester/travis-test-clang-cxx-11 - - libstdc++-4.8-dev - - # https://github.com/travis-ci-tester/travis-test-gcc-cxx-11 - - g++-4.8 +dist: + - trusty env: - PROJECT_DIR=tests/simple TOOLCHAIN=default @@ -68,7 +50,7 @@ install: # Install Python package 'requests' # 'easy_install3' is not installed by 'brew install python3' on OS X 10.9 Maverick - if [[ "`uname`" == "Darwin" ]]; then pip3 install requests; fi - - if [[ "`uname`" == "Linux" ]]; then travis_retry easy_install3 --user requests==2.10.0; fi + - if [[ "`uname`" == "Linux" ]]; then travis_retry pip3 install --user requests; fi # Install latest Polly toolchains and scripts - wget https://github.com/ruslo/polly/archive/master.zip From 7745bc51150ee404dcf73454036522f29c27d583 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sat, 1 Apr 2017 17:10:15 +0800 Subject: [PATCH 047/612] Docs: Update spelling.txt --- docs/spelling.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/spelling.txt b/docs/spelling.txt index 5e47f1c051..a578d420d9 100644 --- a/docs/spelling.txt +++ b/docs/spelling.txt @@ -11,8 +11,11 @@ Google Hunterize IDE IDEs +Installable Makefile NMake +Scalable +Shareable Stackoverflow Toolchain Uninstall @@ -22,6 +25,8 @@ cacheable companioning config configs +customizable +embeddable hunterization hunterized iOS @@ -29,5 +34,8 @@ internet login prebuilt reconstructible +reproducibility +sanitizers +shareable toolchain toolchains From ee970f45fbff09966a3a4733f74eca80a78c518c Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sat, 1 Apr 2017 17:58:33 +0800 Subject: [PATCH 048/612] Add missing package --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 34092cd650..fd6fdd73a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,11 @@ sudo: dist: - trusty +addons: + apt: + packages: + - enchant # for documentation + env: - PROJECT_DIR=tests/simple TOOLCHAIN=default - PROJECT_DIR=tests/issue/22 TOOLCHAIN=default From e5e7f3c2e00c18c731be10785422e31f6a3378dd Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sat, 1 Apr 2017 18:00:22 +0800 Subject: [PATCH 049/612] Add comment --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index fd6fdd73a5..f5eda61a2c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,8 @@ sudo: dist: - trusty +# Install packages differs for container-based infrastructure +# * https://docs.travis-ci.com/user/migrating-from-legacy/#How-do-I-install-APT-sources-and-packages%3F addons: apt: packages: From a814c4cd9ed48a7dd243c83b5403599545d30208 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sat, 1 Apr 2017 21:36:10 +0800 Subject: [PATCH 050/612] Update maintenance scripts [skip ci] --- maintenance/local-upload/qt/linux/android.sh | 22 ++++++++++ .../local-upload/qt/linux/clang-libstdcxx.sh | 22 ++++++++++ maintenance/local-upload/qt/linux/gcc.sh | 22 ++++++++++ maintenance/local-upload/qt/run-linux.sh | 41 ------------------- 4 files changed, 66 insertions(+), 41 deletions(-) create mode 100755 maintenance/local-upload/qt/linux/android.sh create mode 100755 maintenance/local-upload/qt/linux/clang-libstdcxx.sh create mode 100755 maintenance/local-upload/qt/linux/gcc.sh delete mode 100755 maintenance/local-upload/qt/run-linux.sh diff --git a/maintenance/local-upload/qt/linux/android.sh b/maintenance/local-upload/qt/linux/android.sh new file mode 100755 index 0000000000..3e7b2803ab --- /dev/null +++ b/maintenance/local-upload/qt/linux/android.sh @@ -0,0 +1,22 @@ +#!/bin/bash -e + +set -x + +[ "${GITHUB_USER_PASSWORD}" = "" ] && { echo "GITHUB_USER_PASSWORD is not set"; exit 1; } +[ "${ANDROID_NDK_r10e}" = "" ] && { echo "ANDROID_NDK_r10e is not set"; exit 1; } + +export GITHUB_USER_PASSWORD + +THIS_SCRIPT_DIR=`dirname "${BASH_SOURCE[0]}"` + +cd "${THIS_SCRIPT_DIR}/../../.." + +# { +export TOOLCHAIN=android-ndk-r10e-api-19-armeabi-v7a-neon +PROJECT_DIR=examples/qt-widgets ./jenkins.py --verbose --clear-except-download +PROJECT_DIR=examples/qt-camera ./jenkins.py --verbose --nocreate +PROJECT_DIR=examples/qt-location ./jenkins.py --verbose --nocreate +PROJECT_DIR=examples/qt-qml ./jenkins.py --verbose --upload --nocreate +# } + +echo "Done" diff --git a/maintenance/local-upload/qt/linux/clang-libstdcxx.sh b/maintenance/local-upload/qt/linux/clang-libstdcxx.sh new file mode 100755 index 0000000000..db7d5fc04f --- /dev/null +++ b/maintenance/local-upload/qt/linux/clang-libstdcxx.sh @@ -0,0 +1,22 @@ +#!/bin/bash -e + +set -x + +[ "${GITHUB_USER_PASSWORD}" = "" ] && { echo "GITHUB_USER_PASSWORD is not set"; exit 1; } +[ "${ANDROID_NDK_r10e}" = "" ] && { echo "ANDROID_NDK_r10e is not set"; exit 1; } + +export GITHUB_USER_PASSWORD + +THIS_SCRIPT_DIR=`dirname "${BASH_SOURCE[0]}"` + +cd "${THIS_SCRIPT_DIR}/../../.." + +# { +export TOOLCHAIN=clang-libstdcxx +PROJECT_DIR=examples/qt-widgets ./jenkins.py --verbose --clear-except-download +PROJECT_DIR=examples/qt-camera ./jenkins.py --verbose --nocreate +# PROJECT_DIR=examples/qt-location ./jenkins.py --verbose --nocreate # Broken (see .travis.yml) +PROJECT_DIR=examples/qt-qml ./jenkins.py --verbose --upload --nocreate +# } + +echo "Done" diff --git a/maintenance/local-upload/qt/linux/gcc.sh b/maintenance/local-upload/qt/linux/gcc.sh new file mode 100755 index 0000000000..e716214985 --- /dev/null +++ b/maintenance/local-upload/qt/linux/gcc.sh @@ -0,0 +1,22 @@ +#!/bin/bash -e + +set -x + +[ "${GITHUB_USER_PASSWORD}" = "" ] && { echo "GITHUB_USER_PASSWORD is not set"; exit 1; } +[ "${ANDROID_NDK_r10e}" = "" ] && { echo "ANDROID_NDK_r10e is not set"; exit 1; } + +export GITHUB_USER_PASSWORD + +THIS_SCRIPT_DIR=`dirname "${BASH_SOURCE[0]}"` + +cd "${THIS_SCRIPT_DIR}/../../.." + +# { +export TOOLCHAIN=gcc +PROJECT_DIR=examples/qt-widgets ./jenkins.py --verbose --clear-except-download +PROJECT_DIR=examples/qt-camera ./jenkins.py --verbose --nocreate +PROJECT_DIR=examples/qt-location ./jenkins.py --verbose --nocreate +PROJECT_DIR=examples/qt-qml ./jenkins.py --verbose --upload --nocreate +# } + +echo "Done" diff --git a/maintenance/local-upload/qt/run-linux.sh b/maintenance/local-upload/qt/run-linux.sh deleted file mode 100755 index d261aec934..0000000000 --- a/maintenance/local-upload/qt/run-linux.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -e - -set -x - -[ "${GITHUB_USER_PASSWORD}" = "" ] && { echo "GITHUB_USER_PASSWORD is not set"; exit 1; } -[ "${ANDROID_NDK_r10e}" = "" ] && { echo "ANDROID_NDK_r10e is not set"; exit 1; } - -export GITHUB_USER_PASSWORD - -THIS_SCRIPT_DIR=`dirname "${BASH_SOURCE[0]}"` - -cd "${THIS_SCRIPT_DIR}/../../.." - -# First toolchain will run clean -PROJECT_DIR=examples/GTest TOOLCHAIN=default ./jenkins.py --verbose --clear-except-download - -# { -export TOOLCHAIN=android-ndk-r10e-api-19-armeabi-v7a-neon -PROJECT_DIR=examples/qt-widgets ./jenkins.py --verbose --clear-except-download -PROJECT_DIR=examples/qt-camera ./jenkins.py --verbose --nocreate -PROJECT_DIR=examples/qt-location ./jenkins.py --verbose --nocreate -PROJECT_DIR=examples/qt-qml ./jenkins.py --verbose --upload --nocreate -# } - -# { -export TOOLCHAIN=gcc-4-8 -PROJECT_DIR=examples/qt-widgets ./jenkins.py --verbose --clear-except-download -PROJECT_DIR=examples/qt-camera ./jenkins.py --verbose --nocreate -PROJECT_DIR=examples/qt-location ./jenkins.py --verbose --nocreate -PROJECT_DIR=examples/qt-qml ./jenkins.py --verbose --upload --nocreate -# } - -# { -export TOOLCHAIN=clang-libstdcxx -PROJECT_DIR=examples/qt-widgets ./jenkins.py --verbose --clear-except-download -PROJECT_DIR=examples/qt-camera ./jenkins.py --verbose --nocreate -# PROJECT_DIR=examples/qt-location ./jenkins.py --verbose --nocreate # Broken (see .travis.yml) -PROJECT_DIR=examples/qt-qml ./jenkins.py --verbose --upload --nocreate -# } - -echo "Done" From 4403dca7ddb864a3d1dce6f3d8fafda79d7021b7 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Sat, 1 Apr 2017 13:23:50 -0400 Subject: [PATCH 051/612] Add sse2neon header file --- cmake/configs/default.cmake | 1 + cmake/projects/sse2neon/hunter.cmake | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 cmake/projects/sse2neon/hunter.cmake diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index c40b4d770e..726cb2cdb0 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -183,6 +183,7 @@ hunter_config(rabbitmq-c VERSION 0.7.0-p1) hunter_config(randrproto VERSION 1.3.2) hunter_config(renderproto VERSION 0.11.1) hunter_config(sm VERSION 1.2.1) +hunter_config(sse2neon VERSION 1.0.0) hunter_config(sparsehash VERSION 2.0.2) if(MSVC_VERSION LESS 1900) # for VS12 - version without support C++11 diff --git a/cmake/projects/sse2neon/hunter.cmake b/cmake/projects/sse2neon/hunter.cmake new file mode 100644 index 0000000000..68dc51eb69 --- /dev/null +++ b/cmake/projects/sse2neon/hunter.cmake @@ -0,0 +1,25 @@ +# Copyright (c) 2016-2017, Ruslan Baratov +# Copyright (c) 2017, David Hirvonen +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + sse2neon + VERSION + 1.0.0 + URL + "https://github.com/hunter-packages/sse2neon/archive/v1.0.0.tar.gz" + SHA1 + a545774b20b7a2c9f2dea1187a45b81f88280b69 +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(sse2neon) +hunter_download(PACKAGE_NAME sse2neon) From d368031371a5d06881da6a04e5b8e51cd9a00eac Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Sat, 1 Apr 2017 13:28:42 -0400 Subject: [PATCH 052/612] add ARM_NEON_2_x86_SSE --- cmake/configs/default.cmake | 1 + .../projects/ARM_NEON_2_x86_SSE/hunter.cmake | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 cmake/projects/ARM_NEON_2_x86_SSE/hunter.cmake diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index c40b4d770e..8fa208ee6e 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -33,6 +33,7 @@ hunter_config(Android-SDK VERSION 0.0.4) hunter_config(Android-SDK-Platform-tools VERSION r23.1.0) hunter_config(Android-SDK-Tools VERSION 24.4.1) hunter_config(Android-Support-Repository VERSION 28) +hunter_config(ARM_NEON_2_x86_SSE VERSION 1.0.0) hunter_config(ArrayFire VERSION 3.3.1-p0) hunter_config(Assimp VERSION 3.2-p1) hunter_config(Async++ VERSION 0.0.3-hunter) diff --git a/cmake/projects/ARM_NEON_2_x86_SSE/hunter.cmake b/cmake/projects/ARM_NEON_2_x86_SSE/hunter.cmake new file mode 100644 index 0000000000..e5d741cb44 --- /dev/null +++ b/cmake/projects/ARM_NEON_2_x86_SSE/hunter.cmake @@ -0,0 +1,25 @@ +# Copyright (c) 2016-2017, Ruslan Baratov +# Copyright (c) 2017, David Hirvonen +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + ARM_NEON_2_x86_SSE + VERSION + 1.2-p0 + URL + "https://github.com/hunter-packages/ARM_NEON_2_x86_SSE/archive/v1.0.0.tar.gz" + SHA1 + 8067ea1b7aa9ec991db5989d7eda6ed7293d0fda +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(ARM_NEON_2_x86_SSE) +hunter_download(PACKAGE_NAME ARM_NEON_2_x86_SSE) From b40c5774d683809cdb34ba918aed125c57b3f1d5 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 2 Apr 2017 10:27:42 +0800 Subject: [PATCH 053/612] Fix script location [skip ci] --- maintenance/local-upload/qt/linux/android.sh | 2 +- maintenance/local-upload/qt/linux/clang-libstdcxx.sh | 2 +- maintenance/local-upload/qt/linux/gcc.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/maintenance/local-upload/qt/linux/android.sh b/maintenance/local-upload/qt/linux/android.sh index 3e7b2803ab..ef100d53c2 100755 --- a/maintenance/local-upload/qt/linux/android.sh +++ b/maintenance/local-upload/qt/linux/android.sh @@ -9,7 +9,7 @@ export GITHUB_USER_PASSWORD THIS_SCRIPT_DIR=`dirname "${BASH_SOURCE[0]}"` -cd "${THIS_SCRIPT_DIR}/../../.." +cd "${THIS_SCRIPT_DIR}/../../../.." # { export TOOLCHAIN=android-ndk-r10e-api-19-armeabi-v7a-neon diff --git a/maintenance/local-upload/qt/linux/clang-libstdcxx.sh b/maintenance/local-upload/qt/linux/clang-libstdcxx.sh index db7d5fc04f..08bbfd1bf1 100755 --- a/maintenance/local-upload/qt/linux/clang-libstdcxx.sh +++ b/maintenance/local-upload/qt/linux/clang-libstdcxx.sh @@ -9,7 +9,7 @@ export GITHUB_USER_PASSWORD THIS_SCRIPT_DIR=`dirname "${BASH_SOURCE[0]}"` -cd "${THIS_SCRIPT_DIR}/../../.." +cd "${THIS_SCRIPT_DIR}/../../../.." # { export TOOLCHAIN=clang-libstdcxx diff --git a/maintenance/local-upload/qt/linux/gcc.sh b/maintenance/local-upload/qt/linux/gcc.sh index e716214985..f32030b263 100755 --- a/maintenance/local-upload/qt/linux/gcc.sh +++ b/maintenance/local-upload/qt/linux/gcc.sh @@ -9,7 +9,7 @@ export GITHUB_USER_PASSWORD THIS_SCRIPT_DIR=`dirname "${BASH_SOURCE[0]}"` -cd "${THIS_SCRIPT_DIR}/../../.." +cd "${THIS_SCRIPT_DIR}/../../../.." # { export TOOLCHAIN=gcc From 5b9bf10b94574c993827003e3289662f5cf50c37 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Sat, 1 Apr 2017 22:57:38 -0400 Subject: [PATCH 054/612] fix case: sse2neon.h -> SSE2NEON.h --- cmake/configs/default.cmake | 2 +- cmake/projects/sse2neon/hunter.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 726cb2cdb0..d1c6f29c3e 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -183,7 +183,7 @@ hunter_config(rabbitmq-c VERSION 0.7.0-p1) hunter_config(randrproto VERSION 1.3.2) hunter_config(renderproto VERSION 0.11.1) hunter_config(sm VERSION 1.2.1) -hunter_config(sse2neon VERSION 1.0.0) +hunter_config(sse2neon VERSION 1.0.0-p0) hunter_config(sparsehash VERSION 2.0.2) if(MSVC_VERSION LESS 1900) # for VS12 - version without support C++11 diff --git a/cmake/projects/sse2neon/hunter.cmake b/cmake/projects/sse2neon/hunter.cmake index 68dc51eb69..1c872fab32 100644 --- a/cmake/projects/sse2neon/hunter.cmake +++ b/cmake/projects/sse2neon/hunter.cmake @@ -13,11 +13,11 @@ hunter_add_version( PACKAGE_NAME sse2neon VERSION - 1.0.0 + 1.0.0-p0 URL - "https://github.com/hunter-packages/sse2neon/archive/v1.0.0.tar.gz" + "https://github.com/hunter-packages/sse2neon/archive/v1.0.0-p0.tar.gz" SHA1 - a545774b20b7a2c9f2dea1187a45b81f88280b69 + 1a3104782526ea6aba9e5429dc64414e91b4cf1c ) hunter_pick_scheme(DEFAULT url_sha1_cmake) From 1c32f47535cf47a2583d79324a1109b5d4bb0cc9 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 2 Apr 2017 13:56:52 +0800 Subject: [PATCH 055/612] Fix ARM_NEON_2_x86_SSE version --- cmake/projects/ARM_NEON_2_x86_SSE/hunter.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/projects/ARM_NEON_2_x86_SSE/hunter.cmake b/cmake/projects/ARM_NEON_2_x86_SSE/hunter.cmake index e5d741cb44..920b1248da 100644 --- a/cmake/projects/ARM_NEON_2_x86_SSE/hunter.cmake +++ b/cmake/projects/ARM_NEON_2_x86_SSE/hunter.cmake @@ -13,7 +13,7 @@ hunter_add_version( PACKAGE_NAME ARM_NEON_2_x86_SSE VERSION - 1.2-p0 + 1.0.0 URL "https://github.com/hunter-packages/ARM_NEON_2_x86_SSE/archive/v1.0.0.tar.gz" SHA1 From dd13f98c1da1f061264332cd8a9b20ed9196704f Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 2 Apr 2017 13:57:15 +0800 Subject: [PATCH 056/612] ARM_NEON_2_x86_SSE 1.0.0-p0 --- cmake/configs/default.cmake | 2 +- cmake/projects/ARM_NEON_2_x86_SSE/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 8fa208ee6e..16e482f597 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -33,7 +33,7 @@ hunter_config(Android-SDK VERSION 0.0.4) hunter_config(Android-SDK-Platform-tools VERSION r23.1.0) hunter_config(Android-SDK-Tools VERSION 24.4.1) hunter_config(Android-Support-Repository VERSION 28) -hunter_config(ARM_NEON_2_x86_SSE VERSION 1.0.0) +hunter_config(ARM_NEON_2_x86_SSE VERSION 1.0.0-p0) hunter_config(ArrayFire VERSION 3.3.1-p0) hunter_config(Assimp VERSION 3.2-p1) hunter_config(Async++ VERSION 0.0.3-hunter) diff --git a/cmake/projects/ARM_NEON_2_x86_SSE/hunter.cmake b/cmake/projects/ARM_NEON_2_x86_SSE/hunter.cmake index 920b1248da..caad82dc0c 100644 --- a/cmake/projects/ARM_NEON_2_x86_SSE/hunter.cmake +++ b/cmake/projects/ARM_NEON_2_x86_SSE/hunter.cmake @@ -20,6 +20,17 @@ hunter_add_version( 8067ea1b7aa9ec991db5989d7eda6ed7293d0fda ) +hunter_add_version( + PACKAGE_NAME + ARM_NEON_2_x86_SSE + VERSION + 1.0.0-p0 + URL + "https://github.com/hunter-packages/ARM_NEON_2_x86_SSE/archive/v1.0.0-p0.tar.gz" + SHA1 + bf97b9ae78060b4dc9aa2afd3a2a1d577b405b2c +) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(ARM_NEON_2_x86_SSE) hunter_download(PACKAGE_NAME ARM_NEON_2_x86_SSE) From 9d0cabf8063dd071d8d69ada97d7e82adc65406e Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 2 Apr 2017 13:57:32 +0800 Subject: [PATCH 057/612] Add ARM_NEON_2_x86_SSE example --- examples/ARM_NEON_2_x86_SSE/CMakeLists.txt | 19 +++++++++++++++++++ examples/ARM_NEON_2_x86_SSE/foo.cpp | 4 ++++ 2 files changed, 23 insertions(+) create mode 100644 examples/ARM_NEON_2_x86_SSE/CMakeLists.txt create mode 100644 examples/ARM_NEON_2_x86_SSE/foo.cpp diff --git a/examples/ARM_NEON_2_x86_SSE/CMakeLists.txt b/examples/ARM_NEON_2_x86_SSE/CMakeLists.txt new file mode 100644 index 0000000000..06a76cf03e --- /dev/null +++ b/examples/ARM_NEON_2_x86_SSE/CMakeLists.txt @@ -0,0 +1,19 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-ARM_NEON_2_x86_SSE) + +# download boost.compute +hunter_add_package(ARM_NEON_2_x86_SSE) + +# now boost.compute can be used +find_package(ARM_NEON_2_x86_SSE CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo ARM_NEON_2_x86_SSE::ARM_NEON_2_x86_SSE) diff --git a/examples/ARM_NEON_2_x86_SSE/foo.cpp b/examples/ARM_NEON_2_x86_SSE/foo.cpp new file mode 100644 index 0000000000..484da786a5 --- /dev/null +++ b/examples/ARM_NEON_2_x86_SSE/foo.cpp @@ -0,0 +1,4 @@ +#include + +int main() { +} From 66c2bb2fb3c0ebe6c721202097831eb0c7210b8e Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 2 Apr 2017 18:12:11 +0800 Subject: [PATCH 058/612] Add 'xi' package --- cmake/configs/default.cmake | 1 + cmake/projects/xi/hunter.cmake | 50 ++++++++++++++++++++++++++++++++++ examples/xi/CMakeLists.txt | 11 ++++++++ 3 files changed, 62 insertions(+) create mode 100644 cmake/projects/xi/hunter.cmake create mode 100644 examples/xi/CMakeLists.txt diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 16e482f597..162b19e72d 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -207,6 +207,7 @@ hunter_config(xextproto VERSION 7.2.1) hunter_config(xf86vidmodeproto VERSION 2.3.1) hunter_config(xfixes VERSION 5.0.1) hunter_config(xgboost VERSION 0.40-p5) +hunter_config(xi VERSION 1.6.1) hunter_config(xinerama VERSION 1.1.2) hunter_config(xineramaproto VERSION 1.1.2) hunter_config(xorg-macros VERSION 1.17) diff --git a/cmake/projects/xi/hunter.cmake b/cmake/projects/xi/hunter.cmake new file mode 100644 index 0000000000..7c21e02bab --- /dev/null +++ b/cmake/projects/xi/hunter.cmake @@ -0,0 +1,50 @@ +# Copyright (c) 2016, Alexandre Pretyman +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_cmake_args) +include(hunter_configuration_types) +include(hunter_download) +include(hunter_pick_scheme) + +# http://www.x.org/releases/X11R7.7/src/lib +hunter_add_version( + PACKAGE_NAME + xi + VERSION + "1.6.1" + URL + "https://www.x.org/releases/X11R7.7/src/lib/libXi-1.6.1.tar.bz2" + SHA1 + 4b53b41fdaa3acc86606c696c68d5eed11454612 +) + +hunter_configuration_types(xi CONFIGURATION_TYPES Release) +hunter_pick_scheme(DEFAULT url_sha1_autotools) + +set( + _dependencies + xproto + x11 + xextproto + xext + inputproto +) + +hunter_cmake_args( + xi + CMAKE_ARGS + DEPENDS_ON_PACKAGES=${_dependencies} +) + +hunter_cacheable(xi) +hunter_download( + PACKAGE_NAME xi + PACKAGE_UNRELOCATABLE_TEXT_FILES + "lib/libXi.la" + "lib/pkgconfig/xi.pc" +) diff --git a/examples/xi/CMakeLists.txt b/examples/xi/CMakeLists.txt new file mode 100644 index 0000000000..b87674eeeb --- /dev/null +++ b/examples/xi/CMakeLists.txt @@ -0,0 +1,11 @@ +# Copyright (c) 2016-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-xi) +hunter_add_package(xi) From ca9cf2d700ccf6d7ae8418b356339b6c92d21acc Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 2 Apr 2017 18:29:45 +0800 Subject: [PATCH 059/612] Docs: Update packages/all --- docs/packages/all.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/all.rst b/docs/packages/all.rst index f73f2c448f..1482cf6275 100644 --- a/docs/packages/all.rst +++ b/docs/packages/all.rst @@ -1,6 +1,7 @@ All packages ------------ +* `ARM_NEON_2_x86_SSE `__ * `Android-Apk `__ * `Android-Modules `__ * `Android-SDK `__ From 5a05ddc94621856c2d19e3448a614882cd22d33b Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Sat, 1 Apr 2017 23:09:30 -0400 Subject: [PATCH 060/612] update glfw to 3.3.0 --- cmake/configs/default.cmake | 2 +- cmake/projects/glfw/hunter.cmake | 25 +++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 162b19e72d..59a4544b3c 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -140,7 +140,7 @@ hunter_config(freetype VERSION 2.6.2) hunter_config(geos VERSION 3.4.2) hunter_config(gflags VERSION 2.1.2-p1) hunter_config(glew VERSION 2.0.0) -hunter_config(glfw VERSION 3.2-p0) +hunter_config(glfw VERSION 3.3.0-p0) hunter_config(glm VERSION 0.9.7.6) hunter_config(glog VERSION 0.3.4-p2) hunter_config(glproto VERSION 1.4.17) diff --git a/cmake/projects/glfw/hunter.cmake b/cmake/projects/glfw/hunter.cmake index 992a5455c7..3977875d3b 100644 --- a/cmake/projects/glfw/hunter.cmake +++ b/cmake/projects/glfw/hunter.cmake @@ -1,4 +1,5 @@ -# Copyright (c) 2016, Alexandre Pretyman +# Copyright (c) 2016-2017, Alexandre Pretyman +# Copyright (c) 2017, David Hirvonen # All rights reserved. if(EMSCRIPTEN) @@ -19,8 +20,28 @@ hunter_add_version( "https://github.com/hunter-packages/glfw/archive/3.2-p0.tar.gz" SHA1 90f91bab3020db15a0fc07c27c53095fa2dbf1b3 -) + ) +hunter_add_version( + PACKAGE_NAME + glfw + VERSION + "3.3.0-p0" + URL + "https://github.com/hunter-packages/glfw/archive/3.3.0-p0.tar.gz" + SHA1 + 3621fc665397f07c57d1c77ac4d85d4634f18d3a + ) + +hunter_cmake_args( + glfw + CMAKE_ARGS + GLFW_BUILD_EXAMPLES=OFF + GLFW_BUILD_TESTS=OFF + GLFW_BUILD_DOCS=OFF + GLFW_INSTALL=ON + ) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(glfw) hunter_download( From cf3027ce824c4750191d6152ed347abe3343fc7e Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 2 Apr 2017 15:01:24 +0800 Subject: [PATCH 061/612] Add missing include --- cmake/projects/glfw/hunter.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/projects/glfw/hunter.cmake b/cmake/projects/glfw/hunter.cmake index 3977875d3b..d8378a5908 100644 --- a/cmake/projects/glfw/hunter.cmake +++ b/cmake/projects/glfw/hunter.cmake @@ -7,9 +7,10 @@ if(EMSCRIPTEN) endif() include(hunter_add_version) -include(hunter_pick_scheme) include(hunter_cacheable) +include(hunter_cmake_args) include(hunter_download) +include(hunter_pick_scheme) hunter_add_version( PACKAGE_NAME @@ -30,8 +31,8 @@ hunter_add_version( URL "https://github.com/hunter-packages/glfw/archive/3.3.0-p0.tar.gz" SHA1 - 3621fc665397f07c57d1c77ac4d85d4634f18d3a - ) + 3621fc665397f07c57d1c77ac4d85d4634f18d3a + ) hunter_cmake_args( glfw @@ -41,7 +42,7 @@ hunter_cmake_args( GLFW_BUILD_DOCS=OFF GLFW_INSTALL=ON ) - + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(glfw) hunter_download( @@ -55,4 +56,3 @@ hunter_download( "lib/pkgconfig/glfw3.pc" ) - From e918fcf048160c3b067daaa8a199827e8a560a8e Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 2 Apr 2017 19:30:27 +0800 Subject: [PATCH 062/612] glfw 3.3.0-p1 --- cmake/configs/default.cmake | 2 +- cmake/projects/glfw/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 59a4544b3c..892c784d12 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -140,7 +140,7 @@ hunter_config(freetype VERSION 2.6.2) hunter_config(geos VERSION 3.4.2) hunter_config(gflags VERSION 2.1.2-p1) hunter_config(glew VERSION 2.0.0) -hunter_config(glfw VERSION 3.3.0-p0) +hunter_config(glfw VERSION 3.3.0-p1) hunter_config(glm VERSION 0.9.7.6) hunter_config(glog VERSION 0.3.4-p2) hunter_config(glproto VERSION 1.4.17) diff --git a/cmake/projects/glfw/hunter.cmake b/cmake/projects/glfw/hunter.cmake index d8378a5908..a437fa7cb1 100644 --- a/cmake/projects/glfw/hunter.cmake +++ b/cmake/projects/glfw/hunter.cmake @@ -34,6 +34,17 @@ hunter_add_version( 3621fc665397f07c57d1c77ac4d85d4634f18d3a ) +hunter_add_version( + PACKAGE_NAME + glfw + VERSION + "3.3.0-p1" + URL + "https://github.com/hunter-packages/glfw/archive/3.3.0-p1.tar.gz" + SHA1 + 3b42c415f6f6f197768857d12ba44f77e9f1fc50 +) + hunter_cmake_args( glfw CMAKE_ARGS From b2b28b70aebf082deb001415e46487bc9078bd50 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 2 Apr 2017 20:18:03 +0800 Subject: [PATCH 063/612] Add 'sse2neon' example --- examples/sse2neon/CMakeLists.txt | 15 +++++++++++++++ examples/sse2neon/foo.cpp | 4 ++++ 2 files changed, 19 insertions(+) create mode 100644 examples/sse2neon/CMakeLists.txt create mode 100644 examples/sse2neon/foo.cpp diff --git a/examples/sse2neon/CMakeLists.txt b/examples/sse2neon/CMakeLists.txt new file mode 100644 index 0000000000..f23572cc8a --- /dev/null +++ b/examples/sse2neon/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright (c) 2016-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-sse2neon) +hunter_add_package(sse2neon) +find_package(sse2neon CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo sse2neon::sse2neon) diff --git a/examples/sse2neon/foo.cpp b/examples/sse2neon/foo.cpp new file mode 100644 index 0000000000..bc63f42404 --- /dev/null +++ b/examples/sse2neon/foo.cpp @@ -0,0 +1,4 @@ +#include + +int main() { +} From fbbd65b78fea4befcb7762df693e28091cc1ea07 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 2 Apr 2017 22:09:23 +0800 Subject: [PATCH 064/612] Docs: add 'sse2neon' link --- docs/packages/all.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/all.rst b/docs/packages/all.rst index 1482cf6275..54da1f3d12 100644 --- a/docs/packages/all.rst +++ b/docs/packages/all.rst @@ -95,6 +95,7 @@ All packages * `rabbitmq-c `__ * `sparsehash `__ * `spdlog `__ +* `sse2neon `__ * `szip `__ * `thread-pool-cpp `__ * `tinydir `__ From 4b2bc67fde697a8c58bca993112b6ea58ea673f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Sun, 2 Apr 2017 20:58:11 +0200 Subject: [PATCH 065/612] Refactor hunter_get_lang_standard_flag() Apply suggestions from the review https://github.com/ruslo/hunter/pull/715. --- .../hunter_get_lang_standard_flag.cmake | 71 ++++++++++++------- tests/hunter_standard_flag/CMakeLists.txt | 9 --- 2 files changed, 46 insertions(+), 34 deletions(-) diff --git a/cmake/modules/hunter_get_lang_standard_flag.cmake b/cmake/modules/hunter_get_lang_standard_flag.cmake index b1ba498116..89e1342626 100644 --- a/cmake/modules/hunter_get_lang_standard_flag.cmake +++ b/cmake/modules/hunter_get_lang_standard_flag.cmake @@ -9,32 +9,53 @@ function(hunter_get_lang_standard_flag LANG OUTPUT) # Find the standard flag. # This maps the logic in the CMake code: # https://github.com/Kitware/CMake/blob/3bccdd89c88864839a0c8d4ea56bd069c90fa02b/Source/cmLocalGenerator.cxx#L1433-L1467 + + hunter_status_debug("CMAKE_${LANG}_STANDARD_DEFAULT: ${CMAKE_${LANG}_STANDARD_DEFAULT}") + hunter_status_debug("CMAKE_${LANG}_STANDARD: ${CMAKE_${LANG}_STANDARD}") + hunter_status_debug("CMAKE_${LANG}_EXTENSIONS: ${CMAKE_${LANG}_EXTENSIONS}") + hunter_status_debug("CMAKE_${LANG}_STANDARD_REQUIRED: ${CMAKE_${LANG}_STANDARD_REQUIRED}") + + set("${OUTPUT}" "" PARENT_SCOPE) # Reset output in case of quick return. + + string(COMPARE EQUAL "${CMAKE_${LANG}_STANDARD_DEFAULT}" "" no_default) + if(no_default) + # This compiler has no notion of language standard levels. + return() + endif() + + set(standard "${CMAKE_${LANG}_STANDARD}") + string(COMPARE EQUAL "${standard}" "" no_standard) + if(no_standard) + # The standard not defined by user. + return() + endif() + set(flag "") - set(std "${CMAKE_${LANG}_STANDARD}") - if(std) - set(ext "EXTENSION") # By default extensions are assumed On. - if(DEFINED CMAKE_${LANG}_EXTENSIONS AND NOT CMAKE_${LANG}_EXTENSIONS) - set(ext "STANDARD") - endif() + set(ext "EXTENSION") # By default extensions are assumed On. + if(DEFINED CMAKE_${LANG}_EXTENSIONS AND NOT CMAKE_${LANG}_EXTENSIONS) + set(ext "STANDARD") + endif() - set(standards "${${LANG}_standards}") - list(FIND standards "${std}" begin) - if(NOT "${begin}" EQUAL -1) - list(LENGTH standards end) - math(EXPR end "${end} - 1") - foreach(idx RANGE ${begin} ${end}) - list(GET standards ${idx} std) - set(option_name "CMAKE_${LANG}${std}_${ext}_COMPILE_OPTION") - set(flag "${${option_name}}") - string(COMPARE NOTEQUAL "${flag}" "" has_flag) - if(has_flag OR CMAKE_${LANG}_STANDARD_REQUIRED) - # Break if flag found or standard is required and we don't want to - # continue checking older standards. - break() - endif() - endforeach() - endif() + set(standards "${${LANG}_standards}") + list(FIND standards "${standard}" begin) + if("${begin}" EQUAL "-1") + hunter_internal_error("${LANG} standard ${standard} not known") + return() endif() - hunter_status_debug("${LANG} std flag: '${flag}'") - set(${OUTPUT} "${flag}" PARENT_SCOPE) + list(LENGTH standards end) + math(EXPR end "${end} - 1") + foreach(idx RANGE ${begin} ${end}) + list(GET standards ${idx} standard) + set(option_name "CMAKE_${LANG}${standard}_${ext}_COMPILE_OPTION") + set(flag "${${option_name}}") + hunter_status_debug("${option_name}: '${flag}'") + string(COMPARE NOTEQUAL "${flag}" "" has_flag) + if(has_flag OR CMAKE_${LANG}_STANDARD_REQUIRED) + # Break if flag found or standard is required and we don't want to + # continue checking older standards. + break() + endif() + endforeach() + hunter_status_debug("hunter_get_lang_standard_flag(${LANG}): '${flag}'") + set("${OUTPUT}" "${flag}" PARENT_SCOPE) endfunction() diff --git a/tests/hunter_standard_flag/CMakeLists.txt b/tests/hunter_standard_flag/CMakeLists.txt index ded55204f8..01d68dfc0e 100644 --- a/tests/hunter_standard_flag/CMakeLists.txt +++ b/tests/hunter_standard_flag/CMakeLists.txt @@ -153,15 +153,6 @@ if(CMAKE_C99_STANDARD_COMPILE_OPTION AND NOT CMAKE_C11_STANDARD_COMPILE_OPTION) endif() -# Expect empty output if unknown standard -set(CMAKE_CXX_STANDARD 1234) -set(CMAKE_C_STANDARD 1234) -set(CMAKE_FORTRAN_STANDARD 1234) -check(CXX "") -check(C "") -check(FORTRAN "") - - # Restricted standard set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_C_STANDARD_REQUIRED True) From fce0ea2dfc2448d1d788486f3c045a72f8559a28 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 3 Apr 2017 17:11:15 +0800 Subject: [PATCH 066/612] Can't use 'add_qt_android_apk' on Travis CI [skip ci] --- examples/qt-camera/CMakeLists.txt | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/examples/qt-camera/CMakeLists.txt b/examples/qt-camera/CMakeLists.txt index d05ef8c17d..a01df77d54 100644 --- a/examples/qt-camera/CMakeLists.txt +++ b/examples/qt-camera/CMakeLists.txt @@ -44,13 +44,18 @@ if(ANDROID) list(APPEND CMAKE_MODULE_PATH "${QTANDROIDCMAKE_ROOT}") include(AddQtAndroidApk) - add_qt_android_apk( - TARGET qt-camera-apk - BASE_TARGET qt-camera - LAUNCH_TARGET qt-camera-launch - PACKAGE_NAME camera.qt # must be no '-' (API 16 error) - MANIFEST "${CMAKE_CURRENT_LIST_DIR}/AndroidManifest.xml.in" - ) + if(NOT "$ENV{TRAVIS}") + # Can't install dependencies to work with Android stuff: + # * https://github.com/travis-ci/travis-ci/issues/7558 + # * https://github.com/ruslo/hunter/issues/718 + add_qt_android_apk( + TARGET qt-camera-apk + BASE_TARGET qt-camera + LAUNCH_TARGET qt-camera-launch + PACKAGE_NAME camera.qt # must be no '-' (API 16 error) + MANIFEST "${CMAKE_CURRENT_LIST_DIR}/AndroidManifest.xml.in" + ) + endif() hunter_add_package(Android-SDK) message("Path to `android`: ${ANDROID-SDK_ROOT}/android-sdk/tools/android") From 23762b7eae97ab343192cbafd63584df55ad647b Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 4 Apr 2017 11:02:40 +0800 Subject: [PATCH 067/612] Docs: update Docker instructions --- docs/faq/why-binaries-from-server-not-used.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/faq/why-binaries-from-server-not-used.rst b/docs/faq/why-binaries-from-server-not-used.rst index 2681700a2a..49184f7c66 100644 --- a/docs/faq/why-binaries-from-server-not-used.rst +++ b/docs/faq/why-binaries-from-server-not-used.rst @@ -45,18 +45,18 @@ Next information will help you to set your environment. .. code-block:: shell - > docker pull quay.io/ruslo/hunter-travis # pull/update image - > docker run -it quay.io/ruslo/hunter-travis bash - travis@...:~$ (cd polly && git pull) # fetch last changes, note that branch "develop" is used! + > docker pull quay.io/ruslo/hunter-travis-trusty # pull/update image + > docker run -it quay.io/ruslo/hunter-travis-trusty bash + travis@...:~$ (cd polly && git pull) # fetch last changes travis@...:~$ (cd hunter && git pull) # - // - - travis@...:~$ cd hunter && TOOLCHAIN=gcc-4-8 PROJECT_DIR=examples/GTest ./jenkins.py --verbose --clear-except + travis@...:~$ cd hunter && TOOLCHAIN=gcc PROJECT_DIR=examples/GTest ./jenkins.py --verbose --clear-except Starting GUI: .. code-block:: shell > xhost + - > docker run -it -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix quay.io/ruslo/hunter-travis bash + > docker run -it -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix quay.io/ruslo/hunter-travis-trusty bash travis@...:~$ firefox Information from logs From 05d0787ea57fc86f30fbbe748478244ed2f93dd7 Mon Sep 17 00:00:00 2001 From: Sacha Date: Tue, 4 Apr 2017 15:04:52 +1000 Subject: [PATCH 068/612] Add OpenCV 3.2.0-p1 package --- cmake/configs/default.cmake | 2 +- cmake/projects/OpenCV/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 99138a8e37..fd292e6fd0 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -79,7 +79,7 @@ hunter_config(MySQL-client VERSION 6.1.6) hunter_config(OpenBLAS VERSION 0.2.19-p0) hunter_config(OpenCL VERSION 2.1-p0) hunter_config(OpenCL-cpp VERSION 2.0.10-p0) -hunter_config(OpenCV VERSION 3.2.0-p0) +hunter_config(OpenCV VERSION 3.2.0-p1) hunter_config(OpenCV-Extra VERSION 3.0.0) if(MSVC OR ANDROID) # FIXME: https://travis-ci.org/ingenue/hunter/jobs/215460184 diff --git a/cmake/projects/OpenCV/hunter.cmake b/cmake/projects/OpenCV/hunter.cmake index 9b41dfba0c..d52596cdcd 100644 --- a/cmake/projects/OpenCV/hunter.cmake +++ b/cmake/projects/OpenCV/hunter.cmake @@ -13,6 +13,17 @@ include(hunter_pick_scheme) # List of versions here... +hunter_add_version( + PACKAGE_NAME + OpenCV + VERSION + "3.2.0-p1" + URL + "https://github.com/hunter-packages/opencv/archive/v3.2.0-p1.tar.gz" + SHA1 + be088ced81f1b725e1bb76a45806ab044107fba3 +) + hunter_add_version( PACKAGE_NAME OpenCV From ad791914bf5040ab35cdf4a9668dbd4a38bbaf1f Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 4 Apr 2017 20:45:41 +0800 Subject: [PATCH 069/612] Add Boost-{test,program-options} examples [skip ci] --- examples/Boost-program-options/CMakeLists.txt | 13 +++++++++++++ examples/Boost-test/CMakeLists.txt | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 examples/Boost-program-options/CMakeLists.txt create mode 100644 examples/Boost-test/CMakeLists.txt diff --git a/examples/Boost-program-options/CMakeLists.txt b/examples/Boost-program-options/CMakeLists.txt new file mode 100644 index 0000000000..f9a68b8db7 --- /dev/null +++ b/examples/Boost-program-options/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2013-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-boost) + +hunter_add_package(Boost COMPONENTS program_options) +find_package(Boost CONFIG REQUIRED COMPONENTS program_options) diff --git a/examples/Boost-test/CMakeLists.txt b/examples/Boost-test/CMakeLists.txt new file mode 100644 index 0000000000..eea8628343 --- /dev/null +++ b/examples/Boost-test/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2013-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-boost) + +hunter_add_package(Boost COMPONENTS test) +find_package(Boost CONFIG REQUIRED COMPONENTS unit_test_framework) From 759eea0da0a96ded52b0435dffc6a4bac3c89966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 4 Apr 2017 15:34:05 +0200 Subject: [PATCH 070/612] hunter_get_lang_standard_flag(): extend comments --- cmake/modules/hunter_get_lang_standard_flag.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmake/modules/hunter_get_lang_standard_flag.cmake b/cmake/modules/hunter_get_lang_standard_flag.cmake index 89e1342626..3afad3970a 100644 --- a/cmake/modules/hunter_get_lang_standard_flag.cmake +++ b/cmake/modules/hunter_get_lang_standard_flag.cmake @@ -20,6 +20,7 @@ function(hunter_get_lang_standard_flag LANG OUTPUT) string(COMPARE EQUAL "${CMAKE_${LANG}_STANDARD_DEFAULT}" "" no_default) if(no_default) # This compiler has no notion of language standard levels. + # https://github.com/Kitware/CMake/blob/3bccdd89c88864839a0c8d4ea56bd069c90fa02b/Source/cmLocalGenerator.cxx#L1427-L1432 return() endif() @@ -27,11 +28,14 @@ function(hunter_get_lang_standard_flag LANG OUTPUT) string(COMPARE EQUAL "${standard}" "" no_standard) if(no_standard) # The standard not defined by user. + # https://github.com/Kitware/CMake/blob/3bccdd89c88864839a0c8d4ea56bd069c90fa02b/Source/cmLocalGenerator.cxx#L1433-L1437 return() endif() - set(flag "") - set(ext "EXTENSION") # By default extensions are assumed On. + # Decide on version with extensions or a clean one. + # By default extensions are assumed On. + # https://github.com/Kitware/CMake/blob/3bccdd89c88864839a0c8d4ea56bd069c90fa02b/Source/cmLocalGenerator.cxx#L1438-L1446 + set(ext "EXTENSION") if(DEFINED CMAKE_${LANG}_EXTENSIONS AND NOT CMAKE_${LANG}_EXTENSIONS) set(ext "STANDARD") endif() @@ -42,6 +46,8 @@ function(hunter_get_lang_standard_flag LANG OUTPUT) hunter_internal_error("${LANG} standard ${standard} not known") return() endif() + + set(flag "") list(LENGTH standards end) math(EXPR end "${end} - 1") foreach(idx RANGE ${begin} ${end}) From 3e897e60548cb3b18c0a7693a4f49ec852840e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 4 Apr 2017 15:35:10 +0200 Subject: [PATCH 071/612] odb-boost: bump internal deps id --- cmake/projects/odb-boost/hunter.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/projects/odb-boost/hunter.cmake b/cmake/projects/odb-boost/hunter.cmake index 1f024ed984..d9a16a3aed 100644 --- a/cmake/projects/odb-boost/hunter.cmake +++ b/cmake/projects/odb-boost/hunter.cmake @@ -27,5 +27,5 @@ hunter_download(PACKAGE_NAME odb-boost PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libodb-boost.la" "lib/pkgconfig/libodb-boost.pc" - PACKAGE_INTERNAL_DEPS_ID "2" + PACKAGE_INTERNAL_DEPS_ID "3" ) From 887553ab746b221fea5c98fb6fdeb631aed4b8ea Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 5 Apr 2017 23:30:22 +0800 Subject: [PATCH 072/612] hunter_setup_msvc: Add debugging messages [skip ci] --- cmake/modules/hunter_setup_msvc.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/modules/hunter_setup_msvc.cmake b/cmake/modules/hunter_setup_msvc.cmake index 49c7a2ee57..e8373a311a 100644 --- a/cmake/modules/hunter_setup_msvc.cmake +++ b/cmake/modules/hunter_setup_msvc.cmake @@ -104,6 +104,13 @@ macro(hunter_setup_msvc) set(_hunter_vcvarsall_env "VS${_hunter_vcvarsall_env}COMNTOOLS") set(_hunter_vcvarsall_path "$ENV{${_hunter_vcvarsall_env}}") + hunter_status_debug( + "Environment '${_hunter_vcvarsall_env}': '${_hunter_vcvarsall_path}'" + ) + hunter_status_debug( + "CMAKE_VS_DEVENV_COMMAND: '${CMAKE_VS_DEVENV_COMMAND}'" + ) + string(COMPARE EQUAL "${_hunter_vcvarsall_path}" "" _is_empty) if(_is_empty) if(HUNTER_TESTING) From 5f89eb5c18009b5a8010c34fa146184c367b3051 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 6 Apr 2017 15:19:10 +0800 Subject: [PATCH 073/612] lzma 5.2.3-p4 --- cmake/configs/default.cmake | 2 +- cmake/projects/lzma/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index fd292e6fd0..a5e7f45ccd 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -160,7 +160,7 @@ hunter_config(libsodium VERSION 1.0.10) hunter_config(libxml2 VERSION 2.9.4) hunter_config(libyuv VERSION 1514-p3) hunter_config(log4cplus VERSION 1.2.0-p0) -hunter_config(lzma VERSION 5.2.3-p2) +hunter_config(lzma VERSION 5.2.3-p4) hunter_config(mini_chromium VERSION 0.0.1-p2) hunter_config(minizip VERSION 1.0.1-p1) hunter_config(mpark_variant VERSION 1.0.0) diff --git a/cmake/projects/lzma/hunter.cmake b/cmake/projects/lzma/hunter.cmake index f34635903a..4e94d5ede0 100644 --- a/cmake/projects/lzma/hunter.cmake +++ b/cmake/projects/lzma/hunter.cmake @@ -41,6 +41,17 @@ hunter_add_version( 758b108c2acb060ff4ddd9118d71809b3dd60427 ) +hunter_add_version( + PACKAGE_NAME + lzma + VERSION + 5.2.3-p4 + URL + "https://github.com/hunter-packages/lzma/archive/v5.2.3-p4.tar.gz" + SHA1 + 09d7d8c8c8f1f488b3ccb739760c2092aae62441 +) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(lzma) hunter_download(PACKAGE_NAME lzma) From c7721ca8a3337905d659586313a724807b5096ae Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 6 Apr 2017 13:45:06 +0800 Subject: [PATCH 074/612] Boost: ++PACKAGE_INTERNAL_DEPS_ID --- cmake/projects/Boost/atomic/hunter.cmake | 2 +- cmake/projects/Boost/chrono/hunter.cmake | 2 +- cmake/projects/Boost/context/hunter.cmake | 2 +- cmake/projects/Boost/coroutine/hunter.cmake | 2 +- cmake/projects/Boost/date_time/hunter.cmake | 2 +- cmake/projects/Boost/exception/hunter.cmake | 2 +- cmake/projects/Boost/filesystem/hunter.cmake | 2 +- cmake/projects/Boost/graph/hunter.cmake | 2 +- cmake/projects/Boost/graph_parallel/hunter.cmake | 2 +- cmake/projects/Boost/hunter.cmake | 2 +- cmake/projects/Boost/hunter.cmake.in | 2 +- cmake/projects/Boost/iostreams/hunter.cmake | 2 +- cmake/projects/Boost/locale/hunter.cmake | 2 +- cmake/projects/Boost/log/hunter.cmake | 2 +- cmake/projects/Boost/math/hunter.cmake | 2 +- cmake/projects/Boost/mpi/hunter.cmake | 2 +- cmake/projects/Boost/program_options/hunter.cmake | 2 +- cmake/projects/Boost/python/hunter.cmake | 2 +- cmake/projects/Boost/random/hunter.cmake | 2 +- cmake/projects/Boost/regex/hunter.cmake | 2 +- cmake/projects/Boost/serialization/hunter.cmake | 2 +- cmake/projects/Boost/signals/hunter.cmake | 2 +- cmake/projects/Boost/system/hunter.cmake | 2 +- cmake/projects/Boost/test/hunter.cmake | 2 +- cmake/projects/Boost/thread/hunter.cmake | 2 +- cmake/projects/Boost/timer/hunter.cmake | 2 +- cmake/projects/Boost/wave/hunter.cmake | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/cmake/projects/Boost/atomic/hunter.cmake b/cmake/projects/Boost/atomic/hunter.cmake index 6f6cc3828f..9007496c03 100644 --- a/cmake/projects/Boost/atomic/hunter.cmake +++ b/cmake/projects/Boost/atomic/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT atomic - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/chrono/hunter.cmake b/cmake/projects/Boost/chrono/hunter.cmake index e280575b7b..439965f9a6 100644 --- a/cmake/projects/Boost/chrono/hunter.cmake +++ b/cmake/projects/Boost/chrono/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT chrono - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/context/hunter.cmake b/cmake/projects/Boost/context/hunter.cmake index d9ffe8edad..2eb3ccd8bf 100644 --- a/cmake/projects/Boost/context/hunter.cmake +++ b/cmake/projects/Boost/context/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT context - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/coroutine/hunter.cmake b/cmake/projects/Boost/coroutine/hunter.cmake index 5878e8efe8..4eec6665a8 100644 --- a/cmake/projects/Boost/coroutine/hunter.cmake +++ b/cmake/projects/Boost/coroutine/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT coroutine - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/date_time/hunter.cmake b/cmake/projects/Boost/date_time/hunter.cmake index 1416b03342..b1297021a5 100644 --- a/cmake/projects/Boost/date_time/hunter.cmake +++ b/cmake/projects/Boost/date_time/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT date_time - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/exception/hunter.cmake b/cmake/projects/Boost/exception/hunter.cmake index f36c9ba28b..410d8efb5b 100644 --- a/cmake/projects/Boost/exception/hunter.cmake +++ b/cmake/projects/Boost/exception/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT exception - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/filesystem/hunter.cmake b/cmake/projects/Boost/filesystem/hunter.cmake index 39b100e2e8..d451c4f23d 100644 --- a/cmake/projects/Boost/filesystem/hunter.cmake +++ b/cmake/projects/Boost/filesystem/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT filesystem - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/graph/hunter.cmake b/cmake/projects/Boost/graph/hunter.cmake index 4a03f03a2e..ac9ed56ecc 100644 --- a/cmake/projects/Boost/graph/hunter.cmake +++ b/cmake/projects/Boost/graph/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT graph - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/graph_parallel/hunter.cmake b/cmake/projects/Boost/graph_parallel/hunter.cmake index 4e8a1e5ca3..9b63b982f0 100644 --- a/cmake/projects/Boost/graph_parallel/hunter.cmake +++ b/cmake/projects/Boost/graph_parallel/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT graph_parallel - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/hunter.cmake b/cmake/projects/Boost/hunter.cmake index 4d949d5287..df9a5cec32 100644 --- a/cmake/projects/Boost/hunter.cmake +++ b/cmake/projects/Boost/hunter.cmake @@ -245,4 +245,4 @@ hunter_add_version( hunter_pick_scheme(DEFAULT url_sha1_boost) hunter_cacheable(Boost) -hunter_download(PACKAGE_NAME Boost PACKAGE_INTERNAL_DEPS_ID "11") +hunter_download(PACKAGE_NAME Boost PACKAGE_INTERNAL_DEPS_ID "12") diff --git a/cmake/projects/Boost/hunter.cmake.in b/cmake/projects/Boost/hunter.cmake.in index f42fac00e4..b24e68fd6e 100644 --- a/cmake/projects/Boost/hunter.cmake.in +++ b/cmake/projects/Boost/hunter.cmake.in @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT boost_component - PACKAGE_INTERNAL_DEPS_ID "10" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/iostreams/hunter.cmake b/cmake/projects/Boost/iostreams/hunter.cmake index 22e850eacd..991214ebc5 100644 --- a/cmake/projects/Boost/iostreams/hunter.cmake +++ b/cmake/projects/Boost/iostreams/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT iostreams - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/locale/hunter.cmake b/cmake/projects/Boost/locale/hunter.cmake index 3869376b16..d61637c142 100644 --- a/cmake/projects/Boost/locale/hunter.cmake +++ b/cmake/projects/Boost/locale/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT locale - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/log/hunter.cmake b/cmake/projects/Boost/log/hunter.cmake index f10a9f9e3c..d100c8cb3f 100644 --- a/cmake/projects/Boost/log/hunter.cmake +++ b/cmake/projects/Boost/log/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT log - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/math/hunter.cmake b/cmake/projects/Boost/math/hunter.cmake index 287d2c4b4f..ffecf8e75a 100644 --- a/cmake/projects/Boost/math/hunter.cmake +++ b/cmake/projects/Boost/math/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT math - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/mpi/hunter.cmake b/cmake/projects/Boost/mpi/hunter.cmake index beee3d2d12..cefa144bbf 100644 --- a/cmake/projects/Boost/mpi/hunter.cmake +++ b/cmake/projects/Boost/mpi/hunter.cmake @@ -26,5 +26,5 @@ hunter_download( Boost PACKAGE_COMPONENT mpi - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/program_options/hunter.cmake b/cmake/projects/Boost/program_options/hunter.cmake index 5f6d8aaad0..a60110bd64 100644 --- a/cmake/projects/Boost/program_options/hunter.cmake +++ b/cmake/projects/Boost/program_options/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT program_options - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/python/hunter.cmake b/cmake/projects/Boost/python/hunter.cmake index 38778ceadb..efc3f7bc91 100644 --- a/cmake/projects/Boost/python/hunter.cmake +++ b/cmake/projects/Boost/python/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT python - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/random/hunter.cmake b/cmake/projects/Boost/random/hunter.cmake index 252b9de5f1..780a3e1fd1 100644 --- a/cmake/projects/Boost/random/hunter.cmake +++ b/cmake/projects/Boost/random/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT random - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/regex/hunter.cmake b/cmake/projects/Boost/regex/hunter.cmake index ec9898211b..1a389bb25c 100644 --- a/cmake/projects/Boost/regex/hunter.cmake +++ b/cmake/projects/Boost/regex/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT regex - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/serialization/hunter.cmake b/cmake/projects/Boost/serialization/hunter.cmake index 97e3dcbd07..cb026c135a 100644 --- a/cmake/projects/Boost/serialization/hunter.cmake +++ b/cmake/projects/Boost/serialization/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT serialization - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/signals/hunter.cmake b/cmake/projects/Boost/signals/hunter.cmake index d8b1626318..7a47fb0bb1 100644 --- a/cmake/projects/Boost/signals/hunter.cmake +++ b/cmake/projects/Boost/signals/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT signals - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/system/hunter.cmake b/cmake/projects/Boost/system/hunter.cmake index e12818c630..59a33364ac 100644 --- a/cmake/projects/Boost/system/hunter.cmake +++ b/cmake/projects/Boost/system/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT system - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/test/hunter.cmake b/cmake/projects/Boost/test/hunter.cmake index 544f4b4011..bcc82556cd 100644 --- a/cmake/projects/Boost/test/hunter.cmake +++ b/cmake/projects/Boost/test/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT test - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/thread/hunter.cmake b/cmake/projects/Boost/thread/hunter.cmake index 789ef1c6f5..cdc021d578 100644 --- a/cmake/projects/Boost/thread/hunter.cmake +++ b/cmake/projects/Boost/thread/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT thread - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/timer/hunter.cmake b/cmake/projects/Boost/timer/hunter.cmake index 09f6693ea3..eebe957573 100644 --- a/cmake/projects/Boost/timer/hunter.cmake +++ b/cmake/projects/Boost/timer/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT timer - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) diff --git a/cmake/projects/Boost/wave/hunter.cmake b/cmake/projects/Boost/wave/hunter.cmake index 7b894e3c06..b4e8aec671 100644 --- a/cmake/projects/Boost/wave/hunter.cmake +++ b/cmake/projects/Boost/wave/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT wave - PACKAGE_INTERNAL_DEPS_ID "11" + PACKAGE_INTERNAL_DEPS_ID "12" ) From 44117e095a9c24959b6e715ad27e284067224f45 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 6 Apr 2017 16:44:47 +0800 Subject: [PATCH 075/612] Fix Boost MinGW bootstrap --- cmake/projects/Boost/schemes/url_sha1_boost.cmake.in | 6 +++++- .../projects/Boost/schemes/url_sha1_boost_library.cmake.in | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cmake/projects/Boost/schemes/url_sha1_boost.cmake.in b/cmake/projects/Boost/schemes/url_sha1_boost.cmake.in index 79dacbe1f9..37a811e591 100644 --- a/cmake/projects/Boost/schemes/url_sha1_boost.cmake.in +++ b/cmake/projects/Boost/schemes/url_sha1_boost.cmake.in @@ -94,9 +94,13 @@ else() set(env_cmd "") endif() -if("@MSVC@" OR "@MINGW@") +if("@MSVC@") set(install_cmd "b2") set(bootstrap_cmd "bootstrap.bat") +elseif("@MINGW@") + # Test scenario: MinGW installed in system, Visual Studio - not + set(install_cmd "b2") + set(bootstrap_cmd "bootstrap.bat" "gcc") else() set(install_cmd "./b2") if(APPLE) diff --git a/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in b/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in index 78e0867b45..54e57da4db 100644 --- a/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in +++ b/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in @@ -331,9 +331,12 @@ if(@HUNTER_STATUS_DEBUG@) set(verbose_output "-d+2 --debug-configuration") endif() -if("@MSVC@" OR "@MINGW@") +if("@MSVC@") set(bootstrap_cmd "bootstrap.bat") set(b2_cmd "b2") +elseif("@MINGW@") + set(bootstrap_cmd "bootstrap.bat" "gcc") + set(b2_cmd "b2") else() set(bootstrap_cmd "./bootstrap.sh") set(b2_cmd "./b2") From ee2d050b1b00b165717be44188ee6a987d90c966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Thu, 6 Apr 2017 15:23:45 +0200 Subject: [PATCH 076/612] Add Boost-random example --- examples/Boost-random/CMakeLists.txt | 18 ++++++++++++++++++ examples/Boost-random/foo.cpp | 10 ++++++++++ 2 files changed, 28 insertions(+) create mode 100644 examples/Boost-random/CMakeLists.txt create mode 100644 examples/Boost-random/foo.cpp diff --git a/examples/Boost-random/CMakeLists.txt b/examples/Boost-random/CMakeLists.txt new file mode 100644 index 0000000000..be1290173c --- /dev/null +++ b/examples/Boost-random/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright (c) 2017, Pawel Bylica +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-boost-random) + +# download boost-random +hunter_add_package(Boost COMPONENTS random) + +# now boost can be used +find_package(Boost CONFIG REQUIRED random) +add_executable(foo foo.cpp) +target_link_libraries(foo Boost::random) diff --git a/examples/Boost-random/foo.cpp b/examples/Boost-random/foo.cpp new file mode 100644 index 0000000000..4e1eafc128 --- /dev/null +++ b/examples/Boost-random/foo.cpp @@ -0,0 +1,10 @@ +// Copyright (c) 2017, Pawel Bylica +// All rights reserved. + +#include + +int main() { + boost::random::mt19937 rng; + boost::random::uniform_int_distribution<> six(1,6); + return six(rng); +} From af06035202c8093b0a994462c6c56eab09637971 Mon Sep 17 00:00:00 2001 From: caseymcc Date: Mon, 10 Apr 2017 10:53:11 -0500 Subject: [PATCH 077/612] Update MySQL to 6.1.9, also fixes debug/Windows compile issues --- cmake/configs/default.cmake | 2 +- cmake/projects/MySQL-client/hunter.cmake | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index fd292e6fd0..d2a4b942e4 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -75,7 +75,7 @@ hunter_config(Libcxxabi VERSION ${HUNTER_Clang_VERSION}) hunter_config(librtmp VERSION 2.4.0-p0) hunter_config(Libssh2 VERSION 1.7.0) hunter_config(Lua VERSION 5.3.2) -hunter_config(MySQL-client VERSION 6.1.6) +hunter_config(MySQL-client VERSION 6.1.9) hunter_config(OpenBLAS VERSION 0.2.19-p0) hunter_config(OpenCL VERSION 2.1-p0) hunter_config(OpenCL-cpp VERSION 2.0.10-p0) diff --git a/cmake/projects/MySQL-client/hunter.cmake b/cmake/projects/MySQL-client/hunter.cmake index 61f8125549..801d802cc6 100644 --- a/cmake/projects/MySQL-client/hunter.cmake +++ b/cmake/projects/MySQL-client/hunter.cmake @@ -19,9 +19,17 @@ hunter_add_version( SHA1 2444586365c2c58e7ca2397d4617e5fe19f9f246 ) -# CONFIGURATION_TYPES is set to Release, because Debug is bugged at the moment -# see https://github.com/ruslo/hunter/issues/303 -hunter_configuration_types(MySQL-client CONFIGURATION_TYPES Release) + +hunter_add_version( + PACKAGE_NAME + MySQL-client + VERSION + "6.1.9" + URL + "https://github.com/hunter-packages/mysql-client/archive/v1.6.9.tar.gz" + SHA1 + 3268345d8e324d11380cd26475e1669bc5ff2fa0 +) # https://github.com/ruslo/hunter/issues/705 # hunter_cacheable(MySQL-client) From 156aa14b2506ba7a80805cca9758ee86e6a2c2b3 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 13 Apr 2017 21:06:38 +0800 Subject: [PATCH 078/612] mtplz 0.1-p3 --- cmake/configs/default.cmake | 2 +- cmake/projects/mtplz/hunter.cmake | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 552dc5f382..fd69fd5d7d 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -165,7 +165,7 @@ hunter_config(mini_chromium VERSION 0.0.1-p2) hunter_config(minizip VERSION 1.0.1-p1) hunter_config(mpark_variant VERSION 1.0.0) hunter_config(msgpack VERSION 1.4.1-p2) -hunter_config(mtplz VERSION 0.1-p1) +hunter_config(mtplz VERSION 0.1-p3) hunter_config(nlohmann-json VERSION 1.0.0-rc1-hunter-3) hunter_config(odb VERSION 2.4.0) hunter_config(odb-boost VERSION 2.4.0) diff --git a/cmake/projects/mtplz/hunter.cmake b/cmake/projects/mtplz/hunter.cmake index 06eb8b2730..b12f077845 100644 --- a/cmake/projects/mtplz/hunter.cmake +++ b/cmake/projects/mtplz/hunter.cmake @@ -20,7 +20,24 @@ hunter_add_version( 3323b6a97afefa0cc008785caa37b43681c9589e ) -hunter_cmake_args(mtplz CMAKE_ARGS BUILD_TESTING=OFF) +hunter_add_version( + PACKAGE_NAME + mtplz + VERSION + 0.1-p3 + URL + "https://github.com/hunter-packages/mtplz/archive/v0.1-p3.tar.gz" + SHA1 + 22a29dbe58a86e4e91e1abeb1ab4c67cf3ceca79 +) + +hunter_cmake_args( + mtplz + CMAKE_ARGS + BUILD_TESTING=OFF + MTPLZ_BUILD_EXE=OFF + MTPLZ_BUILD_KENLM_INTERPOLATE=OFF +) hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(mtplz) From 4f58621374814ca19f8659366742947f9c688de1 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 13 Apr 2017 22:24:34 +0800 Subject: [PATCH 079/612] Add 'mtplz' example --- examples/mtplz/CMakeLists.txt | 19 +++++++++++++++++++ examples/mtplz/foo.cpp | 4 ++++ 2 files changed, 23 insertions(+) create mode 100644 examples/mtplz/CMakeLists.txt create mode 100644 examples/mtplz/foo.cpp diff --git a/examples/mtplz/CMakeLists.txt b/examples/mtplz/CMakeLists.txt new file mode 100644 index 0000000000..2a40f5bbba --- /dev/null +++ b/examples/mtplz/CMakeLists.txt @@ -0,0 +1,19 @@ +# Copyright (c) 2016-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-mtplz) + +# download boost.compute +hunter_add_package(mtplz) + +# now boost.compute can be used +find_package(mtplz CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo mtplz::mtplz_decode) diff --git a/examples/mtplz/foo.cpp b/examples/mtplz/foo.cpp new file mode 100644 index 0000000000..3bda4156b2 --- /dev/null +++ b/examples/mtplz/foo.cpp @@ -0,0 +1,4 @@ +#include + +int main() { +} From ee6e473077047ee510a76662d98272c3699657bd Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Wed, 12 Apr 2017 16:14:01 +0200 Subject: [PATCH 080/612] update eigen to 3.3.3-p0 - add version 3.3.2-p0 - add version 3.3.3-p0 --- cmake/configs/default.cmake | 2 +- cmake/projects/Eigen/hunter.cmake | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 552dc5f382..ee44edbc6f 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -50,7 +50,7 @@ hunter_config(Comet VERSION 4.0.2) hunter_config(CppNetlib VERSION 0.10.1-hunter-3) hunter_config(CppNetlibUri VERSION 1.0.4-hunter) hunter_config(CsvParserCPlusPlus VERSION 1.0.1) -hunter_config(Eigen VERSION 3.3.1-p4) +hunter_config(Eigen VERSION 3.3.3-p0) hunter_config(Expat VERSION 2.1.1) if(MSVC) hunter_config(getopt VERSION 1.0.0-p0) diff --git a/cmake/projects/Eigen/hunter.cmake b/cmake/projects/Eigen/hunter.cmake index 13bb7f3c44..08c7abfad9 100644 --- a/cmake/projects/Eigen/hunter.cmake +++ b/cmake/projects/Eigen/hunter.cmake @@ -13,6 +13,28 @@ include(hunter_cacheable) hunter_cacheable(Eigen) # List of versions here... +hunter_add_version( + PACKAGE_NAME + Eigen + VERSION + "3.3.3-p0" + URL + "https://github.com/hunter-packages/eigen/archive/v3.3.3-p0.tar.gz" + SHA1 + ed46aa311d2f6bc9dae06c3ac39cc53677e61400 +) + +hunter_add_version( + PACKAGE_NAME + Eigen + VERSION + "3.3.2-p0" + URL + "https://github.com/hunter-packages/eigen/archive/v3.3.2-p0.tar.gz" + SHA1 + b6bc33bb1acb0f853cc2b4e0c26d947bca510e1a +) + hunter_add_version( PACKAGE_NAME Eigen From d256aeb03f5b96115f8470a62c0e27d8a8b79eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Cywi=C5=84ski?= Date: Sat, 15 Apr 2017 16:43:36 +0200 Subject: [PATCH 081/612] Added Taco Pie C++ TCP Library. --- cmake/configs/default.cmake | 1 + cmake/projects/tacopie/hunter.cmake | 107 ++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 cmake/projects/tacopie/hunter.cmake diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 7bd5daaabc..4618fce102 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -262,3 +262,4 @@ if(ANDROID) endif() hunter_config(zookeeper VERSION 3.4.9-p2) +hunter_config(tacopie VERSION 2.4.0) diff --git a/cmake/projects/tacopie/hunter.cmake b/cmake/projects/tacopie/hunter.cmake new file mode 100644 index 0000000000..811a49dc86 --- /dev/null +++ b/cmake/projects/tacopie/hunter.cmake @@ -0,0 +1,107 @@ +# cmake/projects/tacopie/hunter.cmake + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +# Load used modules +include(hunter_add_version) +include(hunter_download) +include(hunter_pick_scheme) + +# List of versions here... +hunter_add_version( + PACKAGE_NAME + tacopie + VERSION + "2.4.0" + URL + "https://github.com/Cylix/tacopie/archive/2.4.0.tar.gz" + SHA1 + 881ccc2d227275185bca80c288319054103bf33a +) + +hunter_add_version( + PACKAGE_NAME + tacopie + VERSION + "2.3.0" + URL + "https://github.com/Cylix/tacopie/archive/2.3.0.tar.gz" + SHA1 + f5d93c96d8c215c4ebecdbfff3bbfe1a62cd222e +) + +hunter_add_version( + PACKAGE_NAME + tacopie + VERSION + "2.2.0" + URL + "https://github.com/Cylix/tacopie/archive/2.2.0.tar.gz" + SHA1 + 1d08256f03fcaa2f37ac0a37d591fe9360e3268c +) + +hunter_add_version( + PACKAGE_NAME + tacopie + VERSION + "2.1.0" + URL + "https://github.com/Cylix/tacopie/archive/2.1.0.tar.gz" + SHA1 + d32484fe5c06f8696b032be4aefc4698e69a7077 +) + +hunter_add_version( + PACKAGE_NAME + tacopie + VERSION + "2.0.1" + URL + "https://github.com/Cylix/tacopie/archive/2.0.1.tar.gz" + SHA1 + 88315c02735d2eaf7558afd2fb2dace09eed05f8 +) + +hunter_add_version( + PACKAGE_NAME + tacopie + VERSION + "2.0.0" + URL + "https://github.com/Cylix/tacopie/archive/2.0.0.tar.gz" + SHA1 + 7522bb269252719bff9aa4a9e82d17c59c87b336 +) + +hunter_add_version( + PACKAGE_NAME + tacopie + VERSION + "1.1.0" + URL + "https://github.com/Cylix/tacopie/archive/1.1.0.tar.gz" + SHA1 + a89e0c08fbf84cda6f7421b8fe2c315bc7c51d9b +) + +hunter_add_version( + PACKAGE_NAME + tacopie + VERSION + "1.0.0" + URL + "https://github.com/Cylix/tacopie/archive/1.0.0.tar.gz" + SHA1 + 7d473dbc3a6a170fdbee028e3e540cf331296fc7 +) + +# Pick a download scheme +hunter_pick_scheme(DEFAULT url_sha1_cmake) # use scheme for cmake projects + +# Download package. +# Two versions of library will be build by default: +# * libexample_A.a +# * libexample_Ad.a +hunter_download(PACKAGE_NAME tacopie) + From a2d93d18d7daf5822f87d3e8ac68e9321114ad37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Cywi=C5=84ski?= Date: Sat, 15 Apr 2017 17:29:28 +0200 Subject: [PATCH 082/612] Added tacopie example --- examples/tacopie/CMakeLists.txt | 19 +++++++++++++++++++ examples/tacopie/foo.cpp | 4 ++++ 2 files changed, 23 insertions(+) create mode 100644 examples/tacopie/CMakeLists.txt create mode 100644 examples/tacopie/foo.cpp diff --git a/examples/tacopie/CMakeLists.txt b/examples/tacopie/CMakeLists.txt new file mode 100644 index 0000000000..c55ff35b3b --- /dev/null +++ b/examples/tacopie/CMakeLists.txt @@ -0,0 +1,19 @@ +# Copyright (c) 2016, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-tacopie) + +# download tacopie +hunter_add_package(tacopie) + +# now tacopie can be used +find_package(tacopie CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo tacopie::tacopie) diff --git a/examples/tacopie/foo.cpp b/examples/tacopie/foo.cpp new file mode 100644 index 0000000000..acb881cac9 --- /dev/null +++ b/examples/tacopie/foo.cpp @@ -0,0 +1,4 @@ +#include + +int main() { +} From f6f096561f0e09b4c85e4049a4eb7948ad24d7eb Mon Sep 17 00:00:00 2001 From: Alexandre Pretyman Date: Mon, 17 Apr 2017 18:21:33 -0300 Subject: [PATCH 083/612] pkg-config search path overridden to /{lib,share}/pkconfig --- cmake/modules/hunter_autotools_project.cmake | 7 ++++--- cmake/modules/hunter_finalize.cmake | 10 ++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/cmake/modules/hunter_autotools_project.cmake b/cmake/modules/hunter_autotools_project.cmake index bc328498d8..eb9118d504 100644 --- a/cmake/modules/hunter_autotools_project.cmake +++ b/cmake/modules/hunter_autotools_project.cmake @@ -8,7 +8,7 @@ # # Adds to the environment variables: # PATH=/bin -# PKG_CONFIG_PATH=/{lib,share}/pkgconfig +# PKG_CONFIG_LIBDIR=/{lib,share}/pkgconfig # # Adds to autotools flags: # CPPFLAGS=-I/include @@ -315,10 +315,11 @@ function(hunter_autotools_project target_name) "PATH=${PARAM_GLOBAL_INSTALL_DIR}/bin:${default_path}" ) - # PKG_CONFIG_PATH environment variable + # PKG_CONFIG_LIBDIR environment variable + # This info is also in hunter_finalize.cmake set(d1 "${PARAM_GLOBAL_INSTALL_DIR}/lib/pkgconfig") set(d2 "${PARAM_GLOBAL_INSTALL_DIR}/share/pkgconfig") - list(APPEND configure_command "PKG_CONFIG_PATH=${d1}:${d2}") + list(APPEND configure_command "PKG_CONFIG_LIBDIR=${d1}:${d2}") string(COMPARE NOTEQUAL "${PARAM_BOOTSTRAP}" "" have_bootstrap) if(have_bootstrap) diff --git a/cmake/modules/hunter_finalize.cmake b/cmake/modules/hunter_finalize.cmake index 4409e29cf9..ebca5f87bc 100644 --- a/cmake/modules/hunter_finalize.cmake +++ b/cmake/modules/hunter_finalize.cmake @@ -78,6 +78,16 @@ macro(hunter_finalize) set(HUNTER_INSTALL_PREFIX "${HUNTER_TOOLCHAIN_ID_PATH}/Install") list(APPEND CMAKE_PREFIX_PATH "${HUNTER_INSTALL_PREFIX}") + + # Override pkg-config default search path + # https://github.com/ruslo/hunter/issues/762 + if(NOT MSVC) + set(_pkg_config_dir1 "${HUNTER_INSTALL_PREFIX}/lib/pkgconfig") + set(_pkg_config_dir2 "${HUNTER_INSTALL_PREFIX}/share/pkgconfig") + # This info is also in hunter_autotools_project.cmake + set(ENV{PKG_CONFIG_LIBDIR} "${_pkg_config_dir1}:${_pkg_config_dir2}") + endif() + if(ANDROID) # OpenCV support: https://github.com/ruslo/hunter/issues/153 list(APPEND CMAKE_PREFIX_PATH "${HUNTER_INSTALL_PREFIX}/sdk/native/jni") From 1e4523f79c7c7d5dd03735854f7488715cd6c181 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 18 Apr 2017 23:32:51 +0800 Subject: [PATCH 084/612] Message for error 52 from CURL [skip ci] --- cmake/modules/hunter_check_download_error_message.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/modules/hunter_check_download_error_message.cmake b/cmake/modules/hunter_check_download_error_message.cmake index 126673c39e..654215486c 100644 --- a/cmake/modules/hunter_check_download_error_message.cmake +++ b/cmake/modules/hunter_check_download_error_message.cmake @@ -52,6 +52,8 @@ function(hunter_check_download_error_message) set(expected_message "\"Timeout was reached\"") elseif(x_ERROR_CODE EQUAL 1) set(expected_message "\"Unsupported protocol\"") + elseif(x_ERROR_CODE EQUAL 52) + set(expected_message "\"Server returned nothing (no headers, no data)\"") else() file(REMOVE "${x_REMOVE_ON_ERROR}") hunter_internal_error( From ac3e9ba794e3e43e8fedd1f6e1eaae85132f0a77 Mon Sep 17 00:00:00 2001 From: Aaditya Kalsi Date: Thu, 20 Apr 2017 19:30:44 -0400 Subject: [PATCH 085/612] Add libuv --- cmake/configs/default.cmake | 1 + cmake/projects/libuv/hunter.cmake | 28 ++++++++++++++++++++++++++++ examples/libuv/CMakeLists.txt | 29 +++++++++++++++++++++++++++++ examples/libuv/example.c | 17 +++++++++++++++++ 4 files changed, 75 insertions(+) create mode 100644 cmake/projects/libuv/hunter.cmake create mode 100644 examples/libuv/CMakeLists.txt create mode 100644 examples/libuv/example.c diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index dbb1845a8c..c5a27ecd9a 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -146,6 +146,7 @@ hunter_config(kbproto VERSION 1.0.6) hunter_config(libdaemon VERSION 0.14) hunter_config(libogg VERSION 1.3.2-cmake3) hunter_config(libsodium VERSION 1.0.10) +hunter_config(libuv VERSION 2.0.0) hunter_config(libxml2 VERSION 2.9.4) hunter_config(libyuv VERSION 1514-p3) hunter_config(log4cplus VERSION 1.2.0-p0) diff --git a/cmake/projects/libuv/hunter.cmake b/cmake/projects/libuv/hunter.cmake new file mode 100644 index 0000000000..c040dcc0ff --- /dev/null +++ b/cmake/projects/libuv/hunter.cmake @@ -0,0 +1,28 @@ +# libuv + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +# Load used modules +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_download) +include(hunter_pick_scheme) + +# List of versions here... +hunter_add_version( + PACKAGE_NAME + libuv + VERSION + 2.0.0 + URL + https://github.com/hunter-packages/libuv/archive/v2.0.0-hunter-release.tar.gz + SHA1 + 60dee8435f4c4136a2ecb6814a2f302641ef1093 + ) + +# Pick a download scheme +hunter_pick_scheme(DEFAULT url_sha1_cmake) # use scheme for cmake projects + +# Download package. +hunter_cacheable(libuv) +hunter_download(PACKAGE_NAME libuv) diff --git a/examples/libuv/CMakeLists.txt b/examples/libuv/CMakeLists.txt new file mode 100644 index 0000000000..1c85f589ba --- /dev/null +++ b/examples/libuv/CMakeLists.txt @@ -0,0 +1,29 @@ +# Copyright (c) 2017, Aaditya Kalsi +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-libuv) + +# download libuv +hunter_add_package(libuv) + +if(NOT EXISTS "${libuv_LICENSES}") + message(FATAL_ERROR "File not found: ${libuv_LICENSES}") +endif() + +message("License: ${libuv_LICENSES}") +message("CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}") + +find_package(libuv CONFIG REQUIRED) +add_executable(example example.c) + +target_link_libraries(example libuv::uv) + +enable_testing() + +add_test(example example) diff --git a/examples/libuv/example.c b/examples/libuv/example.c new file mode 100644 index 0000000000..e7794e45d7 --- /dev/null +++ b/examples/libuv/example.c @@ -0,0 +1,17 @@ +#include +#include +#include +#include + +int main() { + uv_loop_t *loop = malloc(sizeof(uv_loop_t)); + assert(loop); + uv_loop_init(loop); + + printf("Now quitting.\n"); + uv_run(loop, UV_RUN_DEFAULT); + + uv_loop_close(loop); + free(loop); + return 0; +} From b0c1b04a42c1e1154b0e14a4abf927ce1fe3a72b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Sat, 22 Apr 2017 13:03:37 +0200 Subject: [PATCH 086/612] jsoncpp: reorder versions from newest --- cmake/projects/jsoncpp/hunter.cmake | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/cmake/projects/jsoncpp/hunter.cmake b/cmake/projects/jsoncpp/hunter.cmake index 9925df1ecc..47712c635f 100644 --- a/cmake/projects/jsoncpp/hunter.cmake +++ b/cmake/projects/jsoncpp/hunter.cmake @@ -8,31 +8,30 @@ include(hunter_download) include(hunter_pick_scheme) include(hunter_cmake_args) -# List of versions here... +# List of versions: + hunter_add_version( PACKAGE_NAME jsoncpp VERSION - "0.7.0" + "1.7.7" URL - "https://github.com/open-source-parsers/jsoncpp/archive/0.7.0.tar.gz" + "https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz" SHA1 - 4fcb0e3275a1391856fc6ae21e36dce866b19393 + 7bbb47e25b3aa7c4c8b579ca46b32d55f32cb46e ) hunter_add_version( PACKAGE_NAME jsoncpp VERSION - "1.7.7" + "0.7.0" URL - "https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz" + "https://github.com/open-source-parsers/jsoncpp/archive/0.7.0.tar.gz" SHA1 - 7bbb47e25b3aa7c4c8b579ca46b32d55f32cb46e + 4fcb0e3275a1391856fc6ae21e36dce866b19393 ) -# Probably more versions for real packages... - # Pick a download scheme hunter_pick_scheme(DEFAULT url_sha1_cmake) # use scheme for cmake projects From 8ca80580f4dbe3a213d692e3539718dea63a196b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Sat, 22 Apr 2017 13:09:23 +0200 Subject: [PATCH 087/612] jsoncpp: add version 1.8.0 --- cmake/configs/default.cmake | 2 +- cmake/projects/jsoncpp/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 552dc5f382..d2a0e41f1d 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -65,7 +65,7 @@ if(MSVC_VERSION LESS 1600) # for VS10 - version without support C++11 hunter_config(jsoncpp VERSION 0.7.0) else() - hunter_config(jsoncpp VERSION 1.7.7) + hunter_config(jsoncpp VERSION 1.8.0) endif() hunter_config(LLVM VERSION ${HUNTER_Clang_VERSION}) hunter_config(LLVMCompilerRT VERSION ${HUNTER_Clang_VERSION}) diff --git a/cmake/projects/jsoncpp/hunter.cmake b/cmake/projects/jsoncpp/hunter.cmake index 47712c635f..66eb1dcf45 100644 --- a/cmake/projects/jsoncpp/hunter.cmake +++ b/cmake/projects/jsoncpp/hunter.cmake @@ -10,6 +10,17 @@ include(hunter_cmake_args) # List of versions: +hunter_add_version( + PACKAGE_NAME + jsoncpp + VERSION + "1.8.0" + URL + "https://github.com/open-source-parsers/jsoncpp/archive/1.8.0.tar.gz" + SHA1 + 40f7f34551012f68e822664a0b179e7e6cac5a97 +) + hunter_add_version( PACKAGE_NAME jsoncpp From 5663a39c38cc29db9f9c43cba968c00175ed1099 Mon Sep 17 00:00:00 2001 From: Alexandre Pretyman Date: Sun, 23 Apr 2017 01:02:45 -0300 Subject: [PATCH 088/612] OpenCV: bumped PACKAGE_INTERNAL_DEPS_ID --- cmake/projects/OpenCV/hunter.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/projects/OpenCV/hunter.cmake b/cmake/projects/OpenCV/hunter.cmake index d52596cdcd..4942511b15 100644 --- a/cmake/projects/OpenCV/hunter.cmake +++ b/cmake/projects/OpenCV/hunter.cmake @@ -330,4 +330,7 @@ hunter_pick_scheme(DEFAULT url_sha1_cmake) # * libexample_Ad.a hunter_cacheable(OpenCV) -hunter_download(PACKAGE_NAME OpenCV) +hunter_download( + PACKAGE_NAME OpenCV + PACKAGE_INTERNAL_DEPS_ID "1" +) From 4e9a23c2749d18fab4300df88ecb718216b8565e Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 23 Apr 2017 11:10:27 +0300 Subject: [PATCH 089/612] Qt example: use 'add_qt_android_apk' on Travis Enable testing since bug fixed: * https://github.com/travis-ci/travis-ci/issues/7558 --- examples/qt-camera/CMakeLists.txt | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/examples/qt-camera/CMakeLists.txt b/examples/qt-camera/CMakeLists.txt index a01df77d54..d05ef8c17d 100644 --- a/examples/qt-camera/CMakeLists.txt +++ b/examples/qt-camera/CMakeLists.txt @@ -44,18 +44,13 @@ if(ANDROID) list(APPEND CMAKE_MODULE_PATH "${QTANDROIDCMAKE_ROOT}") include(AddQtAndroidApk) - if(NOT "$ENV{TRAVIS}") - # Can't install dependencies to work with Android stuff: - # * https://github.com/travis-ci/travis-ci/issues/7558 - # * https://github.com/ruslo/hunter/issues/718 - add_qt_android_apk( - TARGET qt-camera-apk - BASE_TARGET qt-camera - LAUNCH_TARGET qt-camera-launch - PACKAGE_NAME camera.qt # must be no '-' (API 16 error) - MANIFEST "${CMAKE_CURRENT_LIST_DIR}/AndroidManifest.xml.in" - ) - endif() + add_qt_android_apk( + TARGET qt-camera-apk + BASE_TARGET qt-camera + LAUNCH_TARGET qt-camera-launch + PACKAGE_NAME camera.qt # must be no '-' (API 16 error) + MANIFEST "${CMAKE_CURRENT_LIST_DIR}/AndroidManifest.xml.in" + ) hunter_add_package(Android-SDK) message("Path to `android`: ${ANDROID-SDK_ROOT}/android-sdk/tools/android") From 7c5daaa058ed30dd903794af853cdd5314eb0abc Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 27 Apr 2017 12:29:30 +0300 Subject: [PATCH 090/612] Add 'Boost-log' example [skip ci] --- examples/Boost-log/CMakeLists.txt | 18 ++++++++++++++++++ examples/Boost-log/foo.cpp | 4 ++++ 2 files changed, 22 insertions(+) create mode 100644 examples/Boost-log/CMakeLists.txt create mode 100644 examples/Boost-log/foo.cpp diff --git a/examples/Boost-log/CMakeLists.txt b/examples/Boost-log/CMakeLists.txt new file mode 100644 index 0000000000..5aca4d0b6a --- /dev/null +++ b/examples/Boost-log/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright (c) 2013-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-boost) + +# download boost +hunter_add_package(Boost COMPONENTS log) + +# now boost can be used +find_package(Boost CONFIG REQUIRED log) +add_executable(foo foo.cpp) +target_link_libraries(foo Boost::log) diff --git a/examples/Boost-log/foo.cpp b/examples/Boost-log/foo.cpp new file mode 100644 index 0000000000..75cfa01846 --- /dev/null +++ b/examples/Boost-log/foo.cpp @@ -0,0 +1,4 @@ +#include + +int main() { +} From ea3d6fc2c73df8bb723b69b5790dc0eedae3b926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Cywi=C5=84ski?= Date: Thu, 27 Apr 2017 16:30:08 +0200 Subject: [PATCH 091/612] Adjusted available tacopie versions after moving it to hunter-packages and adding tacopieConfig.cmake --- cmake/configs/default.cmake | 2 +- cmake/projects/tacopie/hunter.cmake | 88 ++--------------------------- 2 files changed, 6 insertions(+), 84 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 4618fce102..b65ecd1054 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -262,4 +262,4 @@ if(ANDROID) endif() hunter_config(zookeeper VERSION 3.4.9-p2) -hunter_config(tacopie VERSION 2.4.0) +hunter_config(tacopie VERSION 2.4.0-h1) diff --git a/cmake/projects/tacopie/hunter.cmake b/cmake/projects/tacopie/hunter.cmake index 811a49dc86..cd5e53236c 100644 --- a/cmake/projects/tacopie/hunter.cmake +++ b/cmake/projects/tacopie/hunter.cmake @@ -12,88 +12,11 @@ hunter_add_version( PACKAGE_NAME tacopie VERSION - "2.4.0" + "2.4.0-h1" URL - "https://github.com/Cylix/tacopie/archive/2.4.0.tar.gz" + "https://github.com/hunter-packages/tacopie/archive/2.4.0-h1.tar.gz" SHA1 - 881ccc2d227275185bca80c288319054103bf33a -) - -hunter_add_version( - PACKAGE_NAME - tacopie - VERSION - "2.3.0" - URL - "https://github.com/Cylix/tacopie/archive/2.3.0.tar.gz" - SHA1 - f5d93c96d8c215c4ebecdbfff3bbfe1a62cd222e -) - -hunter_add_version( - PACKAGE_NAME - tacopie - VERSION - "2.2.0" - URL - "https://github.com/Cylix/tacopie/archive/2.2.0.tar.gz" - SHA1 - 1d08256f03fcaa2f37ac0a37d591fe9360e3268c -) - -hunter_add_version( - PACKAGE_NAME - tacopie - VERSION - "2.1.0" - URL - "https://github.com/Cylix/tacopie/archive/2.1.0.tar.gz" - SHA1 - d32484fe5c06f8696b032be4aefc4698e69a7077 -) - -hunter_add_version( - PACKAGE_NAME - tacopie - VERSION - "2.0.1" - URL - "https://github.com/Cylix/tacopie/archive/2.0.1.tar.gz" - SHA1 - 88315c02735d2eaf7558afd2fb2dace09eed05f8 -) - -hunter_add_version( - PACKAGE_NAME - tacopie - VERSION - "2.0.0" - URL - "https://github.com/Cylix/tacopie/archive/2.0.0.tar.gz" - SHA1 - 7522bb269252719bff9aa4a9e82d17c59c87b336 -) - -hunter_add_version( - PACKAGE_NAME - tacopie - VERSION - "1.1.0" - URL - "https://github.com/Cylix/tacopie/archive/1.1.0.tar.gz" - SHA1 - a89e0c08fbf84cda6f7421b8fe2c315bc7c51d9b -) - -hunter_add_version( - PACKAGE_NAME - tacopie - VERSION - "1.0.0" - URL - "https://github.com/Cylix/tacopie/archive/1.0.0.tar.gz" - SHA1 - 7d473dbc3a6a170fdbee028e3e540cf331296fc7 + 5b326dd4e4792e63d9261682205f32944719bed0 ) # Pick a download scheme @@ -101,7 +24,6 @@ hunter_pick_scheme(DEFAULT url_sha1_cmake) # use scheme for cmake projects # Download package. # Two versions of library will be build by default: -# * libexample_A.a -# * libexample_Ad.a +# * libtacopie.a +# * libtacopied.a hunter_download(PACKAGE_NAME tacopie) - From 463507855d1d94352880e45c05a8362303b0385e Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 27 Apr 2017 20:07:33 +0300 Subject: [PATCH 092/612] Boost 1.64.0 --- cmake/configs/default.cmake | 2 +- cmake/projects/Boost/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 050a870938..8f4a713511 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -39,7 +39,7 @@ hunter_config(Assimp VERSION 3.2-p1) hunter_config(Async++ VERSION 0.0.3-hunter) hunter_config(Avahi VERSION 0.6.31) hunter_config(BZip2 VERSION 1.0.6-p2) -hunter_config(Boost VERSION 1.63.0) +hunter_config(Boost VERSION 1.64.0) hunter_config(BoostCompute VERSION 0.5-p0) hunter_config(BoostProcess VERSION 0.5) hunter_config(CLAPACK VERSION 3.2.1) diff --git a/cmake/projects/Boost/hunter.cmake b/cmake/projects/Boost/hunter.cmake index df9a5cec32..7300c63fcc 100644 --- a/cmake/projects/Boost/hunter.cmake +++ b/cmake/projects/Boost/hunter.cmake @@ -15,6 +15,17 @@ set(Boost_NO_SYSTEM_PATHS ON) # use base url for official boost releases set(_hunter_boost_base_url "https://downloads.sourceforge.net/project/boost/boost/") +hunter_add_version( + PACKAGE_NAME + Boost + VERSION + "1.64.0" + URL + "${_hunter_boost_base_url}/1.64.0/boost_1_64_0.tar.bz2" + SHA1 + 51421ef259a4530edea0fbfc448460fcc5c64edb +) + hunter_add_version( PACKAGE_NAME Boost From dc51fefee11444bde0e5b0698d253b1b7479441e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Fri, 28 Apr 2017 17:15:31 +0200 Subject: [PATCH 093/612] OpenCL: add version 2.1-p3 --- cmake/configs/default.cmake | 2 +- cmake/projects/OpenCL/hunter.cmake | 19 +++++++++++++++++++ examples/OpenCL/main.cpp | 3 --- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 050a870938..513f8eef8d 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -77,7 +77,7 @@ hunter_config(Libssh2 VERSION 1.7.0) hunter_config(Lua VERSION 5.3.2) hunter_config(MySQL-client VERSION 6.1.9) hunter_config(OpenBLAS VERSION 0.2.19-p0) -hunter_config(OpenCL VERSION 2.1-p0) +hunter_config(OpenCL VERSION 2.1-p3) hunter_config(OpenCL-cpp VERSION 2.0.10-p0) hunter_config(OpenCV VERSION 3.2.0-p1) hunter_config(OpenCV-Extra VERSION 3.0.0) diff --git a/cmake/projects/OpenCL/hunter.cmake b/cmake/projects/OpenCL/hunter.cmake index 36d45ac6fb..d6a0632fb1 100644 --- a/cmake/projects/OpenCL/hunter.cmake +++ b/cmake/projects/OpenCL/hunter.cmake @@ -3,10 +3,22 @@ # Load used modules include(hunter_add_version) include(hunter_cacheable) +include(hunter_cmake_args) include(hunter_download) include(hunter_pick_scheme) # List of versions here... +hunter_add_version( + PACKAGE_NAME + OpenCL + VERSION + "2.1-p3" + URL + "https://github.com/hunter-packages/OpenCL-ICD-Loader/archive/2.1-p3.tar.gz" + SHA1 + be6a6c575088103f1b87c5202dc0f69e49b3764f +) + hunter_add_version( PACKAGE_NAME OpenCL @@ -18,6 +30,13 @@ hunter_add_version( 1cb4fed5bc4d0e1583c07e02f43daccab12eb99a ) + +hunter_cmake_args( + OpenCL + CMAKE_ARGS + OPENCL_TESTS=OFF +) + # Pick a download scheme hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(OpenCL) diff --git a/examples/OpenCL/main.cpp b/examples/OpenCL/main.cpp index d4eff3ade8..bfd0472a06 100644 --- a/examples/OpenCL/main.cpp +++ b/examples/OpenCL/main.cpp @@ -12,6 +12,3 @@ int main() clGetPlatformIDs(1, &platform_id, &ret_num_platforms); return 0; } - - - From 1b3ab1595417fe2e4437490d4edbcc8cc74e950a Mon Sep 17 00:00:00 2001 From: twiddle-bits Date: Sun, 30 Apr 2017 13:42:30 -0400 Subject: [PATCH 094/612] Add libuv --- docs/packages/all.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/all.rst b/docs/packages/all.rst index 54da1f3d12..5c4ce3a184 100644 --- a/docs/packages/all.rst +++ b/docs/packages/all.rst @@ -80,6 +80,7 @@ All packages * `imshow `__ * `ios_sim `__ * `irrXML `__ +* `libuv `__ * `libyuv `__ * `log4cplus `__ * `lzma `__ From 9e1646db76e1e44c053c018e84fb7541edeb017e Mon Sep 17 00:00:00 2001 From: Sacha Date: Tue, 2 May 2017 10:53:24 +1000 Subject: [PATCH 095/612] Add dlib 19.4-p1 package. --- cmake/projects/dlib/hunter.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cmake/projects/dlib/hunter.cmake b/cmake/projects/dlib/hunter.cmake index 70a28d488c..56ece270b9 100644 --- a/cmake/projects/dlib/hunter.cmake +++ b/cmake/projects/dlib/hunter.cmake @@ -9,6 +9,17 @@ include(hunter_cmake_args) include(hunter_download) include(hunter_pick_scheme) +hunter_add_version( + PACKAGE_NAME + dlib + VERSION + "19.4-p1" + URL + "https://github.com/hunter-packages/dlib/archive/v19.4-p1.tar.gz" + SHA1 + 4e6c8adfa97092bf45bfd83c3036d1e4a6052c84 +) + hunter_add_version( PACKAGE_NAME dlib From bf271e26844f2cc8c1b0f0038916df2b967c6303 Mon Sep 17 00:00:00 2001 From: Sacha Date: Tue, 2 May 2017 11:34:24 +1000 Subject: [PATCH 096/612] Default version of dlib: 19.4 --- cmake/configs/default.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 1d5b65e991..0b64f0c884 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -126,7 +126,7 @@ hunter_config(cxxopts VERSION 1.0.0-p0) hunter_config(damageproto VERSION 1.2.1) hunter_config(dbus VERSION 1.10.0-hunter-4) hunter_config(dest VERSION 0.8.0-p4) -hunter_config(dlib VERSION 19.2-p1) +hunter_config(dlib VERSION 19.4-p1) hunter_config(doctest VERSION 1.1.4-hunter-1) hunter_config(dri2proto VERSION 2.8) hunter_config(dri3proto VERSION 1.0) From 5934fa3ff49f1dcf12c3441a9e71f7a90575f196 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 5 May 2017 16:32:25 +0300 Subject: [PATCH 097/612] LTO (IPO): check CMake version --- cmake/modules/hunter_finalize.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/modules/hunter_finalize.cmake b/cmake/modules/hunter_finalize.cmake index ebca5f87bc..3f6ae22090 100644 --- a/cmake/modules/hunter_finalize.cmake +++ b/cmake/modules/hunter_finalize.cmake @@ -161,4 +161,8 @@ macro(hunter_finalize) # original path expected. E.g. NMake build: # * https://ci.appveyor.com/project/ingenue/hunter/build/1.0.1412/job/o8a21ue85ivt5d0p string(REPLACE "\\" "\\\\" CMAKE_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM}") + + if(CMAKE_INTERPROCEDURAL_OPTIMIZATION AND NOT POLICY CMP0069) + hunter_user_error("Unsuitable CMake version") + endif() endmacro() From 09c51941ff67a9412a1e1564066502b4db0581ca Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 5 May 2017 16:33:15 +0300 Subject: [PATCH 098/612] Use CMAKE_POLICY_DEFAULT_CMP0069 NEW CMP0069 should be set to new so that CMAKE_INTERPROCEDURAL_OPTIMIZATION will have effect without modifying CMake sources of external packages. --- cmake/modules/hunter_create_cache_file.cmake | 8 ++++++++ jenkins.py | 2 ++ 2 files changed, 10 insertions(+) diff --git a/cmake/modules/hunter_create_cache_file.cmake b/cmake/modules/hunter_create_cache_file.cmake index 2dd3b0bc34..38b76156c4 100644 --- a/cmake/modules/hunter_create_cache_file.cmake +++ b/cmake/modules/hunter_create_cache_file.cmake @@ -178,6 +178,14 @@ function(hunter_create_cache_file cache_path) "set(HUNTER_CACHED_CONFIGURATION_TYPES \"${HUNTER_CACHED_CONFIGURATION_TYPES}\" CACHE INTERNAL \"\")\n" ) + # CMP0069 should be set to NEW so we can build old projects with LTO + # without modifying source code + file( + APPEND + "${temp_path}" + "set(CMAKE_POLICY_DEFAULT_CMP0069 NEW CACHE INTERNAL \"\")\n" + ) + # Atomic operation file(RENAME "${temp_path}" "${cache_path}") endfunction() diff --git a/jenkins.py b/jenkins.py index 3dbf31ad2f..124698380a 100755 --- a/jenkins.py +++ b/jenkins.py @@ -200,6 +200,7 @@ def run(): '--home', project_dir, '--fwd', + 'CMAKE_POLICY_DEFAULT_CMP0069=NEW', 'HUNTER_ROOT={}'.format(hunter_root), 'TESTING_URL={}'.format(hunter_url), 'TESTING_SHA1={}'.format(hunter_sha1) @@ -275,6 +276,7 @@ def run(): '--fwd', 'HUNTER_DISABLE_BUILDS=ON', 'HUNTER_USE_CACHE_SERVERS=ONLY', + 'CMAKE_POLICY_DEFAULT_CMP0069=NEW', 'HUNTER_ROOT={}'.format(hunter_root), 'TESTING_URL={}'.format(hunter_url), 'TESTING_SHA1={}'.format(hunter_sha1) From 8c943dffd98b189db33ffbf4930bf7ee2c0e0dfb Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 5 May 2017 17:01:07 +0300 Subject: [PATCH 099/612] Add 'hunter_pick_archiver' module --- cmake/modules/hunter_pick_archiver.cmake | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 cmake/modules/hunter_pick_archiver.cmake diff --git a/cmake/modules/hunter_pick_archiver.cmake b/cmake/modules/hunter_pick_archiver.cmake new file mode 100644 index 0000000000..68dc6c2b45 --- /dev/null +++ b/cmake/modules/hunter_pick_archiver.cmake @@ -0,0 +1,36 @@ +# Copyright (c) 2017 Ruslan Baratov +# All rights reserved. + +# Set CMAKE_AR/CMAKE_RANLIB variables +function(hunter_pick_archiver) + if(NOT CMAKE_INTERPROCEDURAL_OPTIMIZATION) + return() + endif() + + string(COMPARE EQUAL "${CMAKE_CXX_COMPILER_ID}" "AppleClang" is_apple_clang) + string(COMPARE EQUAL "${CMAKE_CXX_COMPILER_ID}" "Clang" is_clang) + string(COMPARE EQUAL "${CMAKE_CXX_COMPILER_ID}" "GNU" is_gcc) + + if(is_gcc) + set(CMAKE_AR "${CMAKE_CXX_COMPILER_AR}" PARENT_SCOPE) + set(CMAKE_RANLIB "${CMAKE_CXX_COMPILER_RANLIB}" PARENT_SCOPE) + return() + endif() + + if(is_apple_clang) + # https://gitlab.kitware.com/cmake/cmake/blob/0e967e3b1dd8a705e304b4d94f1556249622d747/Modules/Compiler/Clang.cmake#L63-69 + return() + endif() + + if(NOT is_clang) + return() + endif() + + if(ANDROID) + # https://gitlab.kitware.com/cmake/cmake/blob/0e967e3b1dd8a705e304b4d94f1556249622d747/Modules/Compiler/Clang.cmake#L63-69 + return() + endif() + + set(CMAKE_AR "${CMAKE_CXX_COMPILER_AR}" PARENT_SCOPE) + set(CMAKE_RANLIB "${CMAKE_CXX_COMPILER_RANLIB}" PARENT_SCOPE) +endfunction() From 04a0de85e3bb4dc157a776ea0290914b2ac466ed Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 5 May 2017 17:04:01 +0300 Subject: [PATCH 100/612] Use 'hunter_pick_archiver' --- cmake/modules/hunter_autotools_project.cmake | 5 +++++ .../projects/Boost/schemes/url_sha1_boost_library.cmake.in | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/cmake/modules/hunter_autotools_project.cmake b/cmake/modules/hunter_autotools_project.cmake index eb9118d504..5d40018e53 100644 --- a/cmake/modules/hunter_autotools_project.cmake +++ b/cmake/modules/hunter_autotools_project.cmake @@ -59,6 +59,7 @@ include(CMakeParseArguments) # cmake_parse_arguments include(hunter_dump_cmake_flags) include(hunter_fatal_error) include(hunter_finalize) +include(hunter_pick_archiver) include(hunter_status_debug) include(hunter_test_string_not_empty) @@ -130,6 +131,10 @@ function(hunter_autotools_project target_name) endif() endif() + # -> CMAKE_AR + # -> CMAKE_RANLIB + hunter_pick_archiver() + string(TOUPPER ${PARAM_PACKAGE_CONFIGURATION_TYPES} config_type) # Sets the toolchain binaries # AR=${CMAKE_AR} diff --git a/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in b/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in index 54e57da4db..50bcc78aed 100644 --- a/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in +++ b/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in @@ -17,6 +17,7 @@ include(hunter_dump_cmake_flags) include(hunter_fatal_error) include(hunter_install_boost_config) include(hunter_internal_error) +include(hunter_pick_archiver) include(hunter_status_debug) include(hunter_status_print) include(hunter_test_string_not_empty) @@ -285,6 +286,11 @@ if(use_cmake_archiver) # We need custom '' and '' for # Android LTO ('*-gcc-ar' instead of '*-ar') # WARNING: no spaces between '' and '${CMAKE_AR}'! + + # -> CMAKE_AR + # -> CMAKE_RANLIB + hunter_pick_archiver() + file( APPEND ${boost_user_jam} From b2e0a004ea909ad3b6921b5c05968e4211346485 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 5 May 2017 17:15:16 +0300 Subject: [PATCH 101/612] hunter_dump_cmake_flags: Support LTO --- cmake/modules/hunter_dump_cmake_flags.cmake | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/cmake/modules/hunter_dump_cmake_flags.cmake b/cmake/modules/hunter_dump_cmake_flags.cmake index a42c1596d0..5ab56464f6 100644 --- a/cmake/modules/hunter_dump_cmake_flags.cmake +++ b/cmake/modules/hunter_dump_cmake_flags.cmake @@ -102,6 +102,7 @@ function(hunter_dump_cmake_flags) ) endif() + # PIC { string(COMPARE NOTEQUAL "${CMAKE_CXX_COMPILE_OPTIONS_PIC}" "" has_pic) if(CMAKE_POSITION_INDEPENDENT_CODE AND has_pic) set( @@ -115,6 +116,28 @@ function(hunter_dump_cmake_flags) CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_COMPILE_OPTIONS_PIC}" ) endif() + # } + + # IPO { + string(COMPARE NOTEQUAL "${CMAKE_CXX_COMPILE_OPTIONS_IPO}" "" has_ipo) + if(CMAKE_INTERPROCEDURAL_OPTIMIZATION AND has_ipo) + foreach(x ${CMAKE_CXX_COMPILE_OPTIONS_IPO}) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${x}") + endforeach() + endif() + + string(COMPARE NOTEQUAL "${CMAKE_C_COMPILE_OPTIONS_IPO}" "" has_ipo) + if(CMAKE_INTERPROCEDURAL_OPTIMIZATION AND has_ipo) + foreach(x ${CMAKE_C_COMPILE_OPTIONS_IPO}) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${x}") + endforeach() + endif() + + string(COMPARE NOTEQUAL "${CMAKE_CXX_LINK_OPTIONS_IPO}" "" has_ipo) + if(CMAKE_INTERPROCEDURAL_OPTIMIZATION AND has_ipo) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_CXX_LINK_OPTIONS_IPO}") + endif() + # } string(COMPARE EQUAL "${x_CPPFLAGS}" "" is_empty) if(NOT is_empty) From 13a0b9587a331ce372688917d4370ec3257478b3 Mon Sep 17 00:00:00 2001 From: Erik van het Hof Date: Fri, 5 May 2017 22:17:48 +0800 Subject: [PATCH 102/612] Add CapnProto 0.6.0 --- cmake/configs/default.cmake | 1 + cmake/projects/CapnProto/hunter.cmake | 20 ++++++++++++++++++++ examples/CapnProto/CMakeLists.txt | 14 ++++++++++++++ examples/CapnProto/foo.cpp | 7 +++++++ 4 files changed, 42 insertions(+) create mode 100644 cmake/projects/CapnProto/hunter.cmake create mode 100644 examples/CapnProto/CMakeLists.txt create mode 100644 examples/CapnProto/foo.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 0b64f0c884..7711a0af20 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -42,6 +42,7 @@ hunter_config(BZip2 VERSION 1.0.6-p2) hunter_config(Boost VERSION 1.64.0) hunter_config(BoostCompute VERSION 0.5-p0) hunter_config(BoostProcess VERSION 0.5) +hunter_config(CapnProto VERSION 0.6.0) hunter_config(CLAPACK VERSION 3.2.1) hunter_config(CURL VERSION 7.49.1-DEV-v4) hunter_config(Clang VERSION 3.6.2) diff --git a/cmake/projects/CapnProto/hunter.cmake b/cmake/projects/CapnProto/hunter.cmake new file mode 100644 index 0000000000..564582a593 --- /dev/null +++ b/cmake/projects/CapnProto/hunter.cmake @@ -0,0 +1,20 @@ +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME CapnProto + VERSION "0.6.0" + URL "https://capnproto.org/capnproto-c++-0.6.0.tar.gz" + SHA1 c601f0d9da8942fc19dffca79ac3f2279297047b +) + +hunter_cmake_args(CapnProto CMAKE_ARGS BUILD_TESTING=OFF) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(CapnProto) +hunter_download(PACKAGE_NAME CapnProto) diff --git a/examples/CapnProto/CMakeLists.txt b/examples/CapnProto/CMakeLists.txt new file mode 100644 index 0000000000..bf8f0a2c95 --- /dev/null +++ b/examples/CapnProto/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-capnproto) + +hunter_add_package(CapnProto) + +find_package(CapnProto CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo CapnProto::capnp) diff --git a/examples/CapnProto/foo.cpp b/examples/CapnProto/foo.cpp new file mode 100644 index 0000000000..0256abe3cd --- /dev/null +++ b/examples/CapnProto/foo.cpp @@ -0,0 +1,7 @@ +#include + +int main() { + ::capnp::MallocMessageBuilder message; + + return 0; +} From c9a282547d687688bfcededb1ad513dec1750804 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 5 May 2017 17:54:47 +0300 Subject: [PATCH 103/612] OpenSSL: ++PACKAGE_INTERNAL_DEPS_ID --- cmake/projects/OpenSSL/hunter.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/projects/OpenSSL/hunter.cmake b/cmake/projects/OpenSSL/hunter.cmake index 0a54fcdc39..7856251ac3 100755 --- a/cmake/projects/OpenSSL/hunter.cmake +++ b/cmake/projects/OpenSSL/hunter.cmake @@ -285,4 +285,4 @@ else() endif() hunter_cacheable(OpenSSL) -hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID "9") +hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID "10") From a5aeaf4933f56216d7f3dac2ca3e469fcb9d3844 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 5 May 2017 17:55:19 +0300 Subject: [PATCH 104/612] odb-boost: ++PACKAGE_INTERNAL_DEPS_ID --- cmake/projects/odb-boost/hunter.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/projects/odb-boost/hunter.cmake b/cmake/projects/odb-boost/hunter.cmake index d9a16a3aed..c439b67cf0 100644 --- a/cmake/projects/odb-boost/hunter.cmake +++ b/cmake/projects/odb-boost/hunter.cmake @@ -27,5 +27,5 @@ hunter_download(PACKAGE_NAME odb-boost PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libodb-boost.la" "lib/pkgconfig/libodb-boost.pc" - PACKAGE_INTERNAL_DEPS_ID "3" + PACKAGE_INTERNAL_DEPS_ID "4" ) From 9d39c05b4e8245509bd43f374618b5d0405b5b6b Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 5 May 2017 17:56:42 +0300 Subject: [PATCH 105/612] Boost: ++PACKAGE_INTERNAL_DEPS_ID --- cmake/projects/Boost/atomic/hunter.cmake | 2 +- cmake/projects/Boost/chrono/hunter.cmake | 2 +- cmake/projects/Boost/context/hunter.cmake | 2 +- cmake/projects/Boost/coroutine/hunter.cmake | 2 +- cmake/projects/Boost/date_time/hunter.cmake | 2 +- cmake/projects/Boost/exception/hunter.cmake | 2 +- cmake/projects/Boost/filesystem/hunter.cmake | 2 +- cmake/projects/Boost/graph/hunter.cmake | 2 +- cmake/projects/Boost/graph_parallel/hunter.cmake | 2 +- cmake/projects/Boost/hunter.cmake | 2 +- cmake/projects/Boost/hunter.cmake.in | 2 +- cmake/projects/Boost/iostreams/hunter.cmake | 2 +- cmake/projects/Boost/locale/hunter.cmake | 2 +- cmake/projects/Boost/log/hunter.cmake | 2 +- cmake/projects/Boost/math/hunter.cmake | 2 +- cmake/projects/Boost/mpi/hunter.cmake | 2 +- cmake/projects/Boost/program_options/hunter.cmake | 2 +- cmake/projects/Boost/python/hunter.cmake | 2 +- cmake/projects/Boost/random/hunter.cmake | 2 +- cmake/projects/Boost/regex/hunter.cmake | 2 +- cmake/projects/Boost/serialization/hunter.cmake | 2 +- cmake/projects/Boost/signals/hunter.cmake | 2 +- cmake/projects/Boost/system/hunter.cmake | 2 +- cmake/projects/Boost/test/hunter.cmake | 2 +- cmake/projects/Boost/thread/hunter.cmake | 2 +- cmake/projects/Boost/timer/hunter.cmake | 2 +- cmake/projects/Boost/wave/hunter.cmake | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/cmake/projects/Boost/atomic/hunter.cmake b/cmake/projects/Boost/atomic/hunter.cmake index 9007496c03..2f4dcced07 100644 --- a/cmake/projects/Boost/atomic/hunter.cmake +++ b/cmake/projects/Boost/atomic/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT atomic - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/chrono/hunter.cmake b/cmake/projects/Boost/chrono/hunter.cmake index 439965f9a6..9d15d3b165 100644 --- a/cmake/projects/Boost/chrono/hunter.cmake +++ b/cmake/projects/Boost/chrono/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT chrono - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/context/hunter.cmake b/cmake/projects/Boost/context/hunter.cmake index 2eb3ccd8bf..6f587315d8 100644 --- a/cmake/projects/Boost/context/hunter.cmake +++ b/cmake/projects/Boost/context/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT context - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/coroutine/hunter.cmake b/cmake/projects/Boost/coroutine/hunter.cmake index 4eec6665a8..8c76b12b3d 100644 --- a/cmake/projects/Boost/coroutine/hunter.cmake +++ b/cmake/projects/Boost/coroutine/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT coroutine - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/date_time/hunter.cmake b/cmake/projects/Boost/date_time/hunter.cmake index b1297021a5..59168c33a1 100644 --- a/cmake/projects/Boost/date_time/hunter.cmake +++ b/cmake/projects/Boost/date_time/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT date_time - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/exception/hunter.cmake b/cmake/projects/Boost/exception/hunter.cmake index 410d8efb5b..b8c44c3745 100644 --- a/cmake/projects/Boost/exception/hunter.cmake +++ b/cmake/projects/Boost/exception/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT exception - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/filesystem/hunter.cmake b/cmake/projects/Boost/filesystem/hunter.cmake index d451c4f23d..efb33fe6a9 100644 --- a/cmake/projects/Boost/filesystem/hunter.cmake +++ b/cmake/projects/Boost/filesystem/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT filesystem - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/graph/hunter.cmake b/cmake/projects/Boost/graph/hunter.cmake index ac9ed56ecc..caaa6a1bcf 100644 --- a/cmake/projects/Boost/graph/hunter.cmake +++ b/cmake/projects/Boost/graph/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT graph - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/graph_parallel/hunter.cmake b/cmake/projects/Boost/graph_parallel/hunter.cmake index 9b63b982f0..5decfbebdc 100644 --- a/cmake/projects/Boost/graph_parallel/hunter.cmake +++ b/cmake/projects/Boost/graph_parallel/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT graph_parallel - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/hunter.cmake b/cmake/projects/Boost/hunter.cmake index 7300c63fcc..7f75af8c55 100644 --- a/cmake/projects/Boost/hunter.cmake +++ b/cmake/projects/Boost/hunter.cmake @@ -256,4 +256,4 @@ hunter_add_version( hunter_pick_scheme(DEFAULT url_sha1_boost) hunter_cacheable(Boost) -hunter_download(PACKAGE_NAME Boost PACKAGE_INTERNAL_DEPS_ID "12") +hunter_download(PACKAGE_NAME Boost PACKAGE_INTERNAL_DEPS_ID "13") diff --git a/cmake/projects/Boost/hunter.cmake.in b/cmake/projects/Boost/hunter.cmake.in index b24e68fd6e..014340c348 100644 --- a/cmake/projects/Boost/hunter.cmake.in +++ b/cmake/projects/Boost/hunter.cmake.in @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT boost_component - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/iostreams/hunter.cmake b/cmake/projects/Boost/iostreams/hunter.cmake index 991214ebc5..414995734c 100644 --- a/cmake/projects/Boost/iostreams/hunter.cmake +++ b/cmake/projects/Boost/iostreams/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT iostreams - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/locale/hunter.cmake b/cmake/projects/Boost/locale/hunter.cmake index d61637c142..02aec9643f 100644 --- a/cmake/projects/Boost/locale/hunter.cmake +++ b/cmake/projects/Boost/locale/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT locale - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/log/hunter.cmake b/cmake/projects/Boost/log/hunter.cmake index d100c8cb3f..3410d7e54e 100644 --- a/cmake/projects/Boost/log/hunter.cmake +++ b/cmake/projects/Boost/log/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT log - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/math/hunter.cmake b/cmake/projects/Boost/math/hunter.cmake index ffecf8e75a..50b862bc9f 100644 --- a/cmake/projects/Boost/math/hunter.cmake +++ b/cmake/projects/Boost/math/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT math - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/mpi/hunter.cmake b/cmake/projects/Boost/mpi/hunter.cmake index cefa144bbf..1a23ec4a87 100644 --- a/cmake/projects/Boost/mpi/hunter.cmake +++ b/cmake/projects/Boost/mpi/hunter.cmake @@ -26,5 +26,5 @@ hunter_download( Boost PACKAGE_COMPONENT mpi - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/program_options/hunter.cmake b/cmake/projects/Boost/program_options/hunter.cmake index a60110bd64..2c8d568d8b 100644 --- a/cmake/projects/Boost/program_options/hunter.cmake +++ b/cmake/projects/Boost/program_options/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT program_options - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/python/hunter.cmake b/cmake/projects/Boost/python/hunter.cmake index efc3f7bc91..54c04c7c9d 100644 --- a/cmake/projects/Boost/python/hunter.cmake +++ b/cmake/projects/Boost/python/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT python - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/random/hunter.cmake b/cmake/projects/Boost/random/hunter.cmake index 780a3e1fd1..935b925234 100644 --- a/cmake/projects/Boost/random/hunter.cmake +++ b/cmake/projects/Boost/random/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT random - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/regex/hunter.cmake b/cmake/projects/Boost/regex/hunter.cmake index 1a389bb25c..07de07463a 100644 --- a/cmake/projects/Boost/regex/hunter.cmake +++ b/cmake/projects/Boost/regex/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT regex - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/serialization/hunter.cmake b/cmake/projects/Boost/serialization/hunter.cmake index cb026c135a..8e55141773 100644 --- a/cmake/projects/Boost/serialization/hunter.cmake +++ b/cmake/projects/Boost/serialization/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT serialization - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/signals/hunter.cmake b/cmake/projects/Boost/signals/hunter.cmake index 7a47fb0bb1..56f0d6dbda 100644 --- a/cmake/projects/Boost/signals/hunter.cmake +++ b/cmake/projects/Boost/signals/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT signals - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/system/hunter.cmake b/cmake/projects/Boost/system/hunter.cmake index 59a33364ac..24d34fd9d0 100644 --- a/cmake/projects/Boost/system/hunter.cmake +++ b/cmake/projects/Boost/system/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT system - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/test/hunter.cmake b/cmake/projects/Boost/test/hunter.cmake index bcc82556cd..1b45cfa9a6 100644 --- a/cmake/projects/Boost/test/hunter.cmake +++ b/cmake/projects/Boost/test/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT test - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/thread/hunter.cmake b/cmake/projects/Boost/thread/hunter.cmake index cdc021d578..cdc2f4526e 100644 --- a/cmake/projects/Boost/thread/hunter.cmake +++ b/cmake/projects/Boost/thread/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT thread - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/timer/hunter.cmake b/cmake/projects/Boost/timer/hunter.cmake index eebe957573..a8717c7fc2 100644 --- a/cmake/projects/Boost/timer/hunter.cmake +++ b/cmake/projects/Boost/timer/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT timer - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) diff --git a/cmake/projects/Boost/wave/hunter.cmake b/cmake/projects/Boost/wave/hunter.cmake index b4e8aec671..a5258227be 100644 --- a/cmake/projects/Boost/wave/hunter.cmake +++ b/cmake/projects/Boost/wave/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT wave - PACKAGE_INTERNAL_DEPS_ID "12" + PACKAGE_INTERNAL_DEPS_ID "13" ) From f119e0b42e05d48be668aa9529b56f3b7eca187c Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sat, 6 May 2017 20:39:53 +0300 Subject: [PATCH 106/612] Boost: iOS LTO support --- .../Boost/schemes/url_sha1_boost_ios_library.cmake.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/projects/Boost/schemes/url_sha1_boost_ios_library.cmake.in b/cmake/projects/Boost/schemes/url_sha1_boost_ios_library.cmake.in index 6841bd337b..c2c5fef255 100644 --- a/cmake/projects/Boost/schemes/url_sha1_boost_ios_library.cmake.in +++ b/cmake/projects/Boost/schemes/url_sha1_boost_ios_library.cmake.in @@ -11,6 +11,7 @@ include(ExternalProject) # ExternalProject_Add list(APPEND CMAKE_MODULE_PATH "@HUNTER_SELF@/cmake/modules") include(hunter_boost_component_b2_args) +include(hunter_dump_cmake_flags) include(hunter_install_boost_config) include(hunter_internal_error) include(hunter_status_debug) @@ -165,6 +166,9 @@ hunter_boost_component_b2_args( list(APPEND build_opts ${b2_component_opts}) +hunter_dump_cmake_flags() +# -> CMAKE_CXX_FLAGS + if(CMAKE_CXX_FLAGS) list(APPEND build_opts "cxxflags=${CMAKE_CXX_FLAGS}") endif() From 099e2476335273822cf2d80b2f9cb6873abf08ae Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 9 May 2017 23:32:02 +0300 Subject: [PATCH 107/612] Add LLVM example --- examples/LLVM/CMakeLists.txt | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 examples/LLVM/CMakeLists.txt diff --git a/examples/LLVM/CMakeLists.txt b/examples/LLVM/CMakeLists.txt new file mode 100644 index 0000000000..d2d4d2915f --- /dev/null +++ b/examples/LLVM/CMakeLists.txt @@ -0,0 +1,44 @@ +# Copyright (c) 2016-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-LLVM) + +# download LLVM +hunter_add_package(LLVM) + +# now LLVM can be used +find_package(LLVM CONFIG REQUIRED) + +if(NOT TARGET llvm-ar) + message(FATAL_ERROR "llvm-ar target not exists") +endif() +get_target_property(llvm_ar_path llvm-ar IMPORTED_LOCATION_RELEASE) +execute_process( + COMMAND ${llvm_ar_path} --version + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE output +) +if(NOT result EQUAL 0) + message(FATAL_ERROR "Command failed (${result}, ${output})") +endif() +message("llvm-ar info:\n${output}") + +unset(clang_path CACHE) +find_program(clang_path clang++ HITS "${LLVM_ROOT}/bin") +execute_process( + COMMAND ${clang_path} --version + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE output +) +if(NOT result EQUAL 0) + message(FATAL_ERROR "Command failed (${result}, ${output})") +endif() +message("clang++ info:\n${output}") From 65bfa813e79465a13721365e1a04b06858404500 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 9 May 2017 23:36:57 +0300 Subject: [PATCH 108/612] LLVM: use hunterized versions --- cmake/configs/default.cmake | 12 ++++++------ cmake/projects/Clang/hunter.cmake | 11 +++++++++++ cmake/projects/LLVM/hunter.cmake | 18 +++++++++++------- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 0b64f0c884..2cfc306c0f 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -44,8 +44,8 @@ hunter_config(BoostCompute VERSION 0.5-p0) hunter_config(BoostProcess VERSION 0.5) hunter_config(CLAPACK VERSION 3.2.1) hunter_config(CURL VERSION 7.49.1-DEV-v4) -hunter_config(Clang VERSION 3.6.2) -hunter_config(ClangToolsExtra VERSION ${HUNTER_Clang_VERSION}) +hunter_config(Clang VERSION 3.6.2-p0) +hunter_config(ClangToolsExtra VERSION 3.6.2) # Clang hunter_config(Comet VERSION 4.0.2) hunter_config(CppNetlib VERSION 0.10.1-hunter-3) hunter_config(CppNetlibUri VERSION 1.0.4-hunter) @@ -67,11 +67,11 @@ if(MSVC_VERSION LESS 1600) else() hunter_config(jsoncpp VERSION 1.8.0) endif() -hunter_config(LLVM VERSION ${HUNTER_Clang_VERSION}) -hunter_config(LLVMCompilerRT VERSION ${HUNTER_Clang_VERSION}) +hunter_config(LLVM VERSION 3.6.2-p0) # Clang +hunter_config(LLVMCompilerRT VERSION 3.6.0) # Clang hunter_config(Leathers VERSION 0.1.6) -hunter_config(Libcxx VERSION ${HUNTER_Clang_VERSION}) -hunter_config(Libcxxabi VERSION ${HUNTER_Clang_VERSION}) +hunter_config(Libcxx VERSION 3.6.2) # Clang +hunter_config(Libcxxabi VERSION 3.6.2) # Clang hunter_config(librtmp VERSION 2.4.0-p0) hunter_config(Libssh2 VERSION 1.7.0) hunter_config(Lua VERSION 5.3.2) diff --git a/cmake/projects/Clang/hunter.cmake b/cmake/projects/Clang/hunter.cmake index fd07fd2fe1..991694cc1f 100644 --- a/cmake/projects/Clang/hunter.cmake +++ b/cmake/projects/Clang/hunter.cmake @@ -7,6 +7,17 @@ include(hunter_add_version) include(hunter_download) include(hunter_pick_scheme) +hunter_add_version( + PACKAGE_NAME + LLVM + VERSION + "3.6.2-p0" + URL + "https://github.com/hunter-packages/clang/archive/v3.6.2-p0.tar.gz" + SHA1 + a83fb5364829f3836cbf0104cb54500359d4ea8c +) + hunter_add_version( PACKAGE_NAME Clang diff --git a/cmake/projects/LLVM/hunter.cmake b/cmake/projects/LLVM/hunter.cmake index a92b0f0ebc..ea5e9c060c 100644 --- a/cmake/projects/LLVM/hunter.cmake +++ b/cmake/projects/LLVM/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014, Ruslan Baratov +# Copyright (c) 2014-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -10,9 +10,16 @@ include(hunter_download) include(hunter_pick_scheme) include(hunter_report_broken_package) -hunter_add_package(Clang) # CLANG_ROOT -hunter_add_package(ClangToolsExtra) # CLANGTOOLSEXTRA_ROOT -hunter_add_package(LLVMCompilerRT) # LLVMCOMPILERRT_ROOT +hunter_add_version( + PACKAGE_NAME + LLVM + VERSION + "3.6.2-p0" + URL + "https://github.com/hunter-packages/llvm/archive/v3.6.2-p0.tar.gz" + SHA1 + 81eed993cbbc7243597a4b16d2e371618156396b +) hunter_add_version( PACKAGE_NAME @@ -61,9 +68,6 @@ hunter_add_version( hunter_cmake_args( LLVM CMAKE_ARGS - "LLVM_EXTERNAL_CLANG_SOURCE_DIR=${CLANG_ROOT}" - "LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=${CLANGTOOLSEXTRA_ROOT}" - "LLVM_EXTERNAL_COMPILER_RT_SOURCE_DIR=${LLVMCOMPILERRT_ROOT}" LLVM_INCLUDE_EXAMPLES=OFF LLVM_INCLUDE_TESTS=OFF LLVM_INCLUDE_DOCS=OFF From adec0b5d4cbe1950cb14551e6acd547e0f4631b7 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 9 May 2017 23:58:16 +0300 Subject: [PATCH 109/612] Remove PACKAGE_DEPENDS_ON workaround --- cmake/modules/hunter_download.cmake | 14 +------------- cmake/projects/LLVM/hunter.cmake | 6 +----- docs/reference/user-modules/hunter_download.rst | 7 ------- 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/cmake/modules/hunter_download.cmake b/cmake/modules/hunter_download.cmake index a2e497d065..d62ddb08ef 100644 --- a/cmake/modules/hunter_download.cmake +++ b/cmake/modules/hunter_download.cmake @@ -21,12 +21,11 @@ include(hunter_user_error) # Note: 'hunter_find_licenses' should be called before each return point function(hunter_download) set(one PACKAGE_NAME PACKAGE_COMPONENT PACKAGE_INTERNAL_DEPS_ID) - set(multiple PACKAGE_DEPENDS_ON PACKAGE_UNRELOCATABLE_TEXT_FILES) + set(multiple PACKAGE_UNRELOCATABLE_TEXT_FILES) cmake_parse_arguments(HUNTER "" "${one}" "${multiple}" ${ARGV}) # -> HUNTER_PACKAGE_NAME # -> HUNTER_PACKAGE_COMPONENT - # -> HUNTER_PACKAGE_DEPENDS_ON # -> HUNTER_PACKAGE_INTERNAL_DEPS_ID # -> HUNTER_PACKAGE_UNRELOCATABLE_TEXT_FILES @@ -240,17 +239,6 @@ function(hunter_download) DEPENDS_ON_COMPONENT "${HUNTER_PACKAGE_COMPONENT}" ) - foreach(deps ${HUNTER_PACKAGE_DEPENDS_ON}) - if(NOT HUNTER_PACKAGE_SCHEME_INSTALL) - hunter_internal_error("Non-install scheme can't depends on anything") - endif() - # Register explicit dependency - hunter_register_dependency( - PACKAGE "${HUNTER_PACKAGE_NAME};${HUNTER_PACKAGE_COMPONENT}" - DEPENDS_ON_PACKAGE "${deps}" - ) - endforeach() - if(EXISTS "${HUNTER_PACKAGE_DONE_STAMP}") hunter_status_debug("Package already installed: ${HUNTER_PACKAGE_NAME}") if(hunter_has_component) diff --git a/cmake/projects/LLVM/hunter.cmake b/cmake/projects/LLVM/hunter.cmake index ea5e9c060c..67b196d78e 100644 --- a/cmake/projects/LLVM/hunter.cmake +++ b/cmake/projects/LLVM/hunter.cmake @@ -84,8 +84,4 @@ if(MSVC_IDE) ) endif() -hunter_download( - PACKAGE_NAME LLVM - # Explicit dependencies since LLVM is not hunterized - PACKAGE_DEPENDS_ON Clang ClangToolsExtra LLVMCompilerRT -) +hunter_download(PACKAGE_NAME LLVM) diff --git a/docs/reference/user-modules/hunter_download.rst b/docs/reference/user-modules/hunter_download.rst index cb14326b74..ed15681bfa 100644 --- a/docs/reference/user-modules/hunter_download.rst +++ b/docs/reference/user-modules/hunter_download.rst @@ -9,7 +9,6 @@ hunter_download * `PACKAGE_NAME `__ * `PACKAGE_COMPONENT `__ - * `PACKAGE_DEPENDS_ON `__ * `PACKAGE_INTERNAL_DEPS_ID `__ Final stage of adding package to the project. This command will read all @@ -17,12 +16,6 @@ package related variables and start the real download/build (or cache unpack) instructions. Name of package and component set by ``PACKAGE_NAME`` and ``PACKAGE_COMPONENT``. -Option ``PACKAGE_DEPENDS_ON`` used to register dependency explicitly (this is a -**workaround** for non-hunterized packages and **should not be used**). -Note that dependencies tracked automatically in Hunter. Also note that this will -only register dependency without downloading it and in fact used only for -unpacking archives of ``Cache`` directory. - Option ``PACKAGE_INTERNAL_DEPS_ID`` is an identifier of internal files that build the package (like build scheme or additional scripts). This variable used by cache system to detect the necessity of update the binary cache of From 8c871b8f8d00e9f2460b1df7a8fa9a3a4dad0712 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 9 May 2017 23:59:18 +0300 Subject: [PATCH 110/612] LLVM: cacheable --- cmake/projects/LLVM/hunter.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/projects/LLVM/hunter.cmake b/cmake/projects/LLVM/hunter.cmake index 67b196d78e..8d91895e9b 100644 --- a/cmake/projects/LLVM/hunter.cmake +++ b/cmake/projects/LLVM/hunter.cmake @@ -4,6 +4,7 @@ # !!! DO NOT PLACE HEADER GUARDS HERE !!! include(hunter_add_version) +include(hunter_cacheable) include(hunter_cmake_args) include(hunter_configuration_types) include(hunter_download) @@ -84,4 +85,5 @@ if(MSVC_IDE) ) endif() +hunter_cacheable(LLVM) hunter_download(PACKAGE_NAME LLVM) From 20b2a75dd02135edd0ab39af8bf3f1b85b5c6f89 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 10 May 2017 00:00:47 +0300 Subject: [PATCH 111/612] Fix typo --- cmake/projects/Clang/hunter.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/projects/Clang/hunter.cmake b/cmake/projects/Clang/hunter.cmake index 991694cc1f..4c85e65c8a 100644 --- a/cmake/projects/Clang/hunter.cmake +++ b/cmake/projects/Clang/hunter.cmake @@ -9,7 +9,7 @@ include(hunter_pick_scheme) hunter_add_version( PACKAGE_NAME - LLVM + Clang VERSION "3.6.2-p0" URL From 4d66552150e6f27372238221050b365978f18c62 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 10 May 2017 07:08:51 +0300 Subject: [PATCH 112/612] LLVM example: Print paths --- examples/LLVM/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/LLVM/CMakeLists.txt b/examples/LLVM/CMakeLists.txt index d2d4d2915f..39e379e399 100644 --- a/examples/LLVM/CMakeLists.txt +++ b/examples/LLVM/CMakeLists.txt @@ -28,10 +28,10 @@ execute_process( if(NOT result EQUAL 0) message(FATAL_ERROR "Command failed (${result}, ${output})") endif() -message("llvm-ar info:\n${output}") +message("llvm-ar info (${llvm_ar_path}):\n${output}") unset(clang_path CACHE) -find_program(clang_path clang++ HITS "${LLVM_ROOT}/bin") +find_program(clang_path clang++ HINTS "${LLVM_ROOT}/bin") execute_process( COMMAND ${clang_path} --version RESULT_VARIABLE result @@ -41,4 +41,4 @@ execute_process( if(NOT result EQUAL 0) message(FATAL_ERROR "Command failed (${result}, ${output})") endif() -message("clang++ info:\n${output}") +message("clang++ info (${clang_path}):\n${output}") From fe48b51cd65c57bfa218ea08327899ba972b0cde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Cywi=C5=84ski?= Date: Wed, 10 May 2017 11:07:46 +0200 Subject: [PATCH 113/612] Added standard requirement (C++ 11) for example target for tacopie. --- examples/tacopie/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/tacopie/CMakeLists.txt b/examples/tacopie/CMakeLists.txt index c55ff35b3b..0712b019b1 100644 --- a/examples/tacopie/CMakeLists.txt +++ b/examples/tacopie/CMakeLists.txt @@ -16,4 +16,6 @@ hunter_add_package(tacopie) find_package(tacopie CONFIG REQUIRED) add_executable(foo foo.cpp) +set_property(TARGET foo PROPERTY CXX_STANDARD 11) + target_link_libraries(foo tacopie::tacopie) From dae1933ad6b3d7a938273a35651f0af0359ad773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Cywi=C5=84ski?= Date: Wed, 10 May 2017 11:11:16 +0200 Subject: [PATCH 114/612] Added hunter_cacheable to tacopie. --- cmake/projects/tacopie/hunter.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/projects/tacopie/hunter.cmake b/cmake/projects/tacopie/hunter.cmake index cd5e53236c..af3c56ef93 100644 --- a/cmake/projects/tacopie/hunter.cmake +++ b/cmake/projects/tacopie/hunter.cmake @@ -6,6 +6,7 @@ include(hunter_add_version) include(hunter_download) include(hunter_pick_scheme) +include(hunter_cacheable) # List of versions here... hunter_add_version( @@ -26,4 +27,5 @@ hunter_pick_scheme(DEFAULT url_sha1_cmake) # use scheme for cmake projects # Two versions of library will be build by default: # * libtacopie.a # * libtacopied.a +hunter_cacheable(tacopie) hunter_download(PACKAGE_NAME tacopie) From d61ae8e77c2c7e4662329bd86e71ad179463cd86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Cywi=C5=84ski?= Date: Wed, 10 May 2017 14:46:17 +0200 Subject: [PATCH 115/612] Added cpp_redis to cmake projects. --- cmake/configs/default.cmake | 1 + cmake/projects/cpp_redis/hunter.cmake | 31 +++++++++++++++++++++++++++ examples/cpp_redis/CMakeLists.txt | 20 +++++++++++++++++ examples/cpp_redis/foo.cpp | 4 ++++ 4 files changed, 56 insertions(+) create mode 100644 cmake/projects/cpp_redis/hunter.cmake create mode 100644 examples/cpp_redis/CMakeLists.txt create mode 100644 examples/cpp_redis/foo.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 95ae16f9a4..36a643df8e 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -265,3 +265,4 @@ endif() hunter_config(zookeeper VERSION 3.4.9-p2) hunter_config(tacopie VERSION 2.4.0-h1) +hunter_config(cpp_redis VERSION 3.5.0-h1) diff --git a/cmake/projects/cpp_redis/hunter.cmake b/cmake/projects/cpp_redis/hunter.cmake new file mode 100644 index 0000000000..86d65b21a5 --- /dev/null +++ b/cmake/projects/cpp_redis/hunter.cmake @@ -0,0 +1,31 @@ +# cmake/projects/cpp_redis/hunter.cmake + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +# Load used modules +include(hunter_add_version) +include(hunter_download) +include(hunter_pick_scheme) +include(hunter_cacheable) + +# List of versions here... +hunter_add_version( + PACKAGE_NAME + cpp_redis + VERSION + "3.5.0-h1" + URL + "https://github.com/hunter-packages/cpp_redis/archive/3.5.0-h1.tar.gz" + SHA1 + b88a7f6c303122f4f62f0c37cce8625a592b51d1 +) + +# Pick a download scheme +hunter_pick_scheme(DEFAULT url_sha1_cmake) # use scheme for cmake projects + +# Download package. +# Two versions of library will be build by default: +# * libcpp_redis.a +# * libcpp_redisd.a +hunter_cacheable(cpp_redis) +hunter_download(PACKAGE_NAME cpp_redis) diff --git a/examples/cpp_redis/CMakeLists.txt b/examples/cpp_redis/CMakeLists.txt new file mode 100644 index 0000000000..d242a23412 --- /dev/null +++ b/examples/cpp_redis/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (c) 2016, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-cpp_redis) + +# download cpp_redis +hunter_add_package(cpp_redis) + +# now cpp_redis can be used +find_package(cpp_redis CONFIG REQUIRED) + +add_executable(foo foo.cpp) +set_property(TARGET foo PROPERTY CXX_STANDARD 11) +target_link_libraries(foo cpp_redis::cpp_redis) diff --git a/examples/cpp_redis/foo.cpp b/examples/cpp_redis/foo.cpp new file mode 100644 index 0000000000..88467fccdd --- /dev/null +++ b/examples/cpp_redis/foo.cpp @@ -0,0 +1,4 @@ +#include + +int main() { +} From b6ad7448dea3356f570bdd07a024827fff586af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Cywi=C5=84ski?= Date: Wed, 10 May 2017 15:29:39 +0200 Subject: [PATCH 116/612] Linked tacopie wiki page. --- docs/packages/all.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/all.rst b/docs/packages/all.rst index 5c4ce3a184..50cb7250ac 100644 --- a/docs/packages/all.rst +++ b/docs/packages/all.rst @@ -98,6 +98,7 @@ All packages * `spdlog `__ * `sse2neon `__ * `szip `__ +* `TacoPie `__ * `thread-pool-cpp `__ * `tinydir `__ * `websocketpp `__ From aaed00fe6cdcb81e157b0781c164c98245d8602c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Cywi=C5=84ski?= Date: Thu, 11 May 2017 14:49:26 +0200 Subject: [PATCH 117/612] Linked cpp_redis wiki page. --- docs/packages/all.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/all.rst b/docs/packages/all.rst index 50cb7250ac..e8641e6950 100644 --- a/docs/packages/all.rst +++ b/docs/packages/all.rst @@ -18,6 +18,7 @@ All packages * `CURL `__ * `Catch `__ * `Comet `__ +* `cpp_redis `__ * `CppNetlib.URI `__ * `CsvParserCPlusPlus `__ * `Eigen `__ From 44736a1f916a5a4cd14aa93f30d51438147e28e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20K=C3=B6lker?= Date: Fri, 12 May 2017 19:30:03 +0000 Subject: [PATCH 118/612] spdlog: bump versions --- cmake/configs/default.cmake | 2 +- cmake/projects/spdlog/hunter.cmake | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 36a643df8e..5a487d9c1d 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -192,7 +192,7 @@ if(MSVC_VERSION LESS 1900) # for VS12 - version without support C++11 hunter_config(spdlog VERSION 1.0.0-p0) else() - hunter_config(spdlog VERSION 0.11.0-p0) + hunter_config(spdlog VERSION 0.13.0-p0) endif() hunter_config(szip VERSION 2.1.0-p1) hunter_config(thread-pool-cpp VERSION 1.0.0-p3) diff --git a/cmake/projects/spdlog/hunter.cmake b/cmake/projects/spdlog/hunter.cmake index 7b99f64196..32d6486099 100644 --- a/cmake/projects/spdlog/hunter.cmake +++ b/cmake/projects/spdlog/hunter.cmake @@ -19,6 +19,28 @@ hunter_add_version( 4d9967d165fc7ea2d561210bec2f50e60547daa6 ) +hunter_add_version( + PACKAGE_NAME + spdlog + VERSION + "0.13.0-p0" + URL + "https://github.com/hunter-packages/spdlog/archive/v0.13.0-p0.tar.gz" + SHA1 + b34b92075423d9da196daefe796316393a0fd593 +) + +hunter_add_version( + PACKAGE_NAME + spdlog + VERSION + "0.12.0-p0" + URL + "https://github.com/hunter-packages/spdlog/archive/v0.12.0-p0.tar.gz" + SHA1 + b10bf7b537198a5f2224c3e022db38da9b2f3d53 +) + hunter_add_version( PACKAGE_NAME spdlog From 477f5c0a3545833f20af6978d879541b9766ba60 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 14 May 2017 11:33:38 +0300 Subject: [PATCH 119/612] Android-ARM-EABI-v7a-System-Image 19_r05 [skip ci] --- cmake/configs/default.cmake | 1 + .../hunter.cmake | 24 +++++++++++++++++++ .../CMakeLists.txt | 12 ++++++++++ 3 files changed, 37 insertions(+) create mode 100755 cmake/projects/Android-ARM-EABI-v7a-System-Image/hunter.cmake create mode 100644 examples/Android-ARM-EABI-v7a-System-Image/CMakeLists.txt diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 5a487d9c1d..c38f986872 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -249,6 +249,7 @@ if(ANDROID) hunter_config(Android-Intel-x86-Atom-System-Image VERSION 19) hunter_config(Android-SDK-Platform VERSION 19_r04) hunter_config(Sources-for-Android-SDK VERSION 19) + hunter_config(Android-ARM-EABI-v7a-System-Image VERSION 19_r05) elseif(_is_api_16) hunter_config(Android-Google-APIs VERSION 16_r04) hunter_config(Android-Intel-x86-Atom-System-Image VERSION 16) diff --git a/cmake/projects/Android-ARM-EABI-v7a-System-Image/hunter.cmake b/cmake/projects/Android-ARM-EABI-v7a-System-Image/hunter.cmake new file mode 100755 index 0000000000..ca3b54adfb --- /dev/null +++ b/cmake/projects/Android-ARM-EABI-v7a-System-Image/hunter.cmake @@ -0,0 +1,24 @@ +# Copyright (c) 2015-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_download) +include(hunter_pick_scheme) + +# https://dl.google.com/android/repository/sys-img/android/sys-img.xml + +hunter_add_version( + PACKAGE_NAME + Android-ARM-EABI-v7a-System-Image + VERSION + "19_r05" + URL + "https://dl.google.com/android/repository/sys-img/android/armeabi-v7a-19_r05.zip" + SHA1 + d1a5fd4f2e1c013c3d3d9bfe7e9db908c3ed56fa +) + +hunter_pick_scheme(DEFAULT url_sha1_unpack) +hunter_download(PACKAGE_NAME Android-ARM-EABI-v7a-System-Image) diff --git a/examples/Android-ARM-EABI-v7a-System-Image/CMakeLists.txt b/examples/Android-ARM-EABI-v7a-System-Image/CMakeLists.txt new file mode 100644 index 0000000000..c94d59b409 --- /dev/null +++ b/examples/Android-ARM-EABI-v7a-System-Image/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2015, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(Foo) + +hunter_add_package(Android-ARM-EABI-v7a-System-Image) From 4cfb0db1169bf7b031f0edad2b77dc70bba11d9e Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 14 May 2017 12:13:41 +0300 Subject: [PATCH 120/612] Android-SDK-Tools 25.2.5 --- cmake/configs/default.cmake | 2 +- cmake/projects/Android-SDK-Tools/hunter.cmake | 34 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index c38f986872..0a589e792c 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -31,7 +31,7 @@ hunter_config(Android-Google-Repository VERSION 25) hunter_config(Android-Modules VERSION 1.0.0) hunter_config(Android-SDK VERSION 0.0.4) hunter_config(Android-SDK-Platform-tools VERSION r23.1.0) -hunter_config(Android-SDK-Tools VERSION 24.4.1) +hunter_config(Android-SDK-Tools VERSION 25.2.5) hunter_config(Android-Support-Repository VERSION 28) hunter_config(ARM_NEON_2_x86_SSE VERSION 1.0.0-p0) hunter_config(ArrayFire VERSION 3.3.1-p0) diff --git a/cmake/projects/Android-SDK-Tools/hunter.cmake b/cmake/projects/Android-SDK-Tools/hunter.cmake index 419d2ed522..213751b399 100755 --- a/cmake/projects/Android-SDK-Tools/hunter.cmake +++ b/cmake/projects/Android-SDK-Tools/hunter.cmake @@ -8,8 +8,20 @@ include(hunter_download) include(hunter_pick_scheme) # http://dl-ssl.google.com/android/repository/repository-10.xml +# http://dl-ssl.google.com/android/repository/repository-11.xml if(CMAKE_HOST_APPLE) + hunter_add_version( + PACKAGE_NAME + Android-SDK-Tools + VERSION + "25.2.5" + URL + "http://dl-ssl.google.com/android/repository/tools_r25.2.5-macosx.zip" + SHA1 + d2168d963ac5b616e3d3ddaf21511d084baf3659 + ) + hunter_add_version( PACKAGE_NAME Android-SDK-Tools @@ -65,6 +77,17 @@ if(CMAKE_HOST_APPLE) a567215d89b3ff80766e54f8f969b3487bce8d71 ) elseif(CMAKE_HOST_UNIX) + hunter_add_version( + PACKAGE_NAME + Android-SDK-Tools + VERSION + "25.2.5" + URL + "http://dl-ssl.google.com/android/repository/tools_r25.2.5-linux.zip" + SHA1 + 72df3aa1988c0a9003ccdfd7a13a7b8bd0f47fc1 + ) + hunter_add_version( PACKAGE_NAME Android-SDK-Tools @@ -120,6 +143,17 @@ elseif(CMAKE_HOST_UNIX) 398c38494d50d98dd9f3ae02899ba32be32c912d ) elseif(CMAKE_HOST_WIN32) + hunter_add_version( + PACKAGE_NAME + Android-SDK-Tools + VERSION + "25.2.5" + URL + "http://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip" + SHA1 + a7f7ebeae1c8d8f62d3a8466e9c81baee7cc31ca + ) + hunter_add_version( PACKAGE_NAME Android-SDK-Tools From ac638cdc550da2c9c57eb6e185a4852095dfe755 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 14 May 2017 12:21:29 +0300 Subject: [PATCH 121/612] Android-SDK-Platform-tools r25.0.5 --- cmake/configs/default.cmake | 2 +- .../Android-SDK-Platform-tools/hunter.cmake | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 0a589e792c..8d35f0a0fe 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -30,7 +30,7 @@ hunter_config(Android-Build-Tools VERSION 22.0.1) hunter_config(Android-Google-Repository VERSION 25) hunter_config(Android-Modules VERSION 1.0.0) hunter_config(Android-SDK VERSION 0.0.4) -hunter_config(Android-SDK-Platform-tools VERSION r23.1.0) +hunter_config(Android-SDK-Platform-tools VERSION r25.0.5) hunter_config(Android-SDK-Tools VERSION 25.2.5) hunter_config(Android-Support-Repository VERSION 28) hunter_config(ARM_NEON_2_x86_SSE VERSION 1.0.0-p0) diff --git a/cmake/projects/Android-SDK-Platform-tools/hunter.cmake b/cmake/projects/Android-SDK-Platform-tools/hunter.cmake index fa909f552c..eb646e41d9 100755 --- a/cmake/projects/Android-SDK-Platform-tools/hunter.cmake +++ b/cmake/projects/Android-SDK-Platform-tools/hunter.cmake @@ -7,7 +7,21 @@ include(hunter_add_version) include(hunter_download) include(hunter_pick_scheme) +# https://dl.google.com/android/repository/repository-10.xml +# https://dl.google.com/android/repository/repository-11.xml + if(CMAKE_HOST_APPLE) + hunter_add_version( + PACKAGE_NAME + Android-SDK-Platform-tools + VERSION + "r25.0.5" + URL + "http://dl-ssl.google.com/android/repository/platform-tools_r25.0.5-darwin.zip" + SHA1 + 9bbf65f80b05303a3576682d3350b087c4802283 + ) + hunter_add_version( PACKAGE_NAME Android-SDK-Platform-tools @@ -63,6 +77,17 @@ if(CMAKE_HOST_APPLE) 6675f9f583841972c5c5ef8d2c131e1209529fde ) elseif(CMAKE_HOST_UNIX) + hunter_add_version( + PACKAGE_NAME + Android-SDK-Platform-tools + VERSION + "r25.0.5" + URL + "http://dl-ssl.google.com/android/repository/platform-tools_r25.0.5-linux.zip" + SHA1 + 4c026e2445e8b898cb0fd5dedf710a666a78aaa7 + ) + hunter_add_version( PACKAGE_NAME Android-SDK-Platform-tools @@ -118,6 +143,17 @@ elseif(CMAKE_HOST_UNIX) 2502ade68af9f6288c4dd7726796599e8d9a4337 ) elseif(CMAKE_HOST_WIN32) + hunter_add_version( + PACKAGE_NAME + Android-SDK-Platform-tools + VERSION + "r25.0.5" + URL + "http://dl-ssl.google.com/android/repository/platform-tools_r25.0.5-windows.zip" + SHA1 + a59b3747414e3002e826f84470dc1a7ceeb1c6d4 + ) + hunter_add_version( PACKAGE_NAME Android-SDK-Platform-tools From 76474e74df8d1e3adfd4925a2c8e3ef737d5e470 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 14 May 2017 12:23:47 +0300 Subject: [PATCH 122/612] Android-Support-Repository 47 --- cmake/configs/default.cmake | 2 +- .../projects/Android-Support-Repository/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 8d35f0a0fe..de30be4684 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -32,7 +32,7 @@ hunter_config(Android-Modules VERSION 1.0.0) hunter_config(Android-SDK VERSION 0.0.4) hunter_config(Android-SDK-Platform-tools VERSION r25.0.5) hunter_config(Android-SDK-Tools VERSION 25.2.5) -hunter_config(Android-Support-Repository VERSION 28) +hunter_config(Android-Support-Repository VERSION 47) hunter_config(ARM_NEON_2_x86_SSE VERSION 1.0.0-p0) hunter_config(ArrayFire VERSION 3.3.1-p0) hunter_config(Assimp VERSION 3.2-p1) diff --git a/cmake/projects/Android-Support-Repository/hunter.cmake b/cmake/projects/Android-Support-Repository/hunter.cmake index c04d3a4bbc..d5e6513343 100755 --- a/cmake/projects/Android-Support-Repository/hunter.cmake +++ b/cmake/projects/Android-Support-Repository/hunter.cmake @@ -9,6 +9,17 @@ include(hunter_pick_scheme) # https://dl.google.com/android/repository/addon.xml +hunter_add_version( + PACKAGE_NAME + Android-Support-Repository + VERSION + "47" + URL + "http://dl-ssl.google.com/android/repository/android_m2repository_r47.zip" + SHA1 + a0d22beacc106a6977321f2b07d692ce4979e96a +) + hunter_add_version( PACKAGE_NAME Android-Support-Repository From 9ca38fb7ea70efd6773ee20a27b9e218aa0e6607 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 14 May 2017 12:49:33 +0300 Subject: [PATCH 123/612] Android-Google-Repository 47 --- cmake/configs/default.cmake | 2 +- cmake/projects/Android-Google-Repository/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index de30be4684..8f462825ff 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -27,7 +27,7 @@ include(hunter_user_error) hunter_config(AllTheFlopsThreads VERSION 0.1-p0) hunter_config(Android-Apk VERSION 1.1.13) hunter_config(Android-Build-Tools VERSION 22.0.1) -hunter_config(Android-Google-Repository VERSION 25) +hunter_config(Android-Google-Repository VERSION 47) hunter_config(Android-Modules VERSION 1.0.0) hunter_config(Android-SDK VERSION 0.0.4) hunter_config(Android-SDK-Platform-tools VERSION r25.0.5) diff --git a/cmake/projects/Android-Google-Repository/hunter.cmake b/cmake/projects/Android-Google-Repository/hunter.cmake index 880fc412f8..382fafb096 100755 --- a/cmake/projects/Android-Google-Repository/hunter.cmake +++ b/cmake/projects/Android-Google-Repository/hunter.cmake @@ -9,6 +9,17 @@ include(hunter_pick_scheme) # https://dl.google.com/android/repository/addon.xml +hunter_add_version( + PACKAGE_NAME + Android-Google-Repository + VERSION + "47" + URL + "https://dl.google.com/android/repository/android_m2repository_r47.zip" + SHA1 + a0d22beacc106a6977321f2b07d692ce4979e96a +) + hunter_add_version( PACKAGE_NAME Android-Google-Repository From 48a5da6a16b61cac1965fde4f473f6341e316725 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 14 May 2017 13:43:36 +0300 Subject: [PATCH 124/612] Android-SDK 0.0.5 [skip ci] --- cmake/configs/default.cmake | 2 +- cmake/projects/Android-SDK/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 8f462825ff..c3086d8e15 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -29,7 +29,7 @@ hunter_config(Android-Apk VERSION 1.1.13) hunter_config(Android-Build-Tools VERSION 22.0.1) hunter_config(Android-Google-Repository VERSION 47) hunter_config(Android-Modules VERSION 1.0.0) -hunter_config(Android-SDK VERSION 0.0.4) +hunter_config(Android-SDK VERSION 0.0.5) hunter_config(Android-SDK-Platform-tools VERSION r25.0.5) hunter_config(Android-SDK-Tools VERSION 25.2.5) hunter_config(Android-Support-Repository VERSION 47) diff --git a/cmake/projects/Android-SDK/hunter.cmake b/cmake/projects/Android-SDK/hunter.cmake index c663319697..a21a8fbf5c 100644 --- a/cmake/projects/Android-SDK/hunter.cmake +++ b/cmake/projects/Android-SDK/hunter.cmake @@ -9,6 +9,17 @@ include(hunter_configuration_types) include(hunter_download) include(hunter_pick_scheme) +hunter_add_version( + PACKAGE_NAME + Android-SDK + VERSION + "0.0.5" + URL + "https://github.com/hunter-packages/android-sdk/archive/v0.0.5.tar.gz" + SHA1 + fa27bf38136638b94942ef2219969191a9243356 +) + hunter_add_version( PACKAGE_NAME Android-SDK From 7908dbcf6a39214f60df18ee9862b950ac704c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 10 May 2017 17:11:23 +0200 Subject: [PATCH 125/612] Add libjson-rpc-cpp package --- cmake/configs/default.cmake | 1 + cmake/projects/libjson-rpc-cpp/hunter.cmake | 48 +++++++++++++++++++++ examples/libjson-rpc-cpp/CMakeLists.txt | 15 +++++++ examples/libjson-rpc-cpp/main.cpp | 23 ++++++++++ 4 files changed, 87 insertions(+) create mode 100644 cmake/projects/libjson-rpc-cpp/hunter.cmake create mode 100644 examples/libjson-rpc-cpp/CMakeLists.txt create mode 100644 examples/libjson-rpc-cpp/main.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 95ae16f9a4..e84bb21cd1 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -156,6 +156,7 @@ hunter_config(ippicv VERSION 20151201) hunter_config(irrXML VERSION 1.2) hunter_config(kbproto VERSION 1.0.6) hunter_config(libdaemon VERSION 0.14) +hunter_config(libjson-rpc-cpp VERSION 0.7.0-p0) hunter_config(libogg VERSION 1.3.2-cmake3) hunter_config(libsodium VERSION 1.0.10) hunter_config(libuv VERSION 2.0.0) diff --git a/cmake/projects/libjson-rpc-cpp/hunter.cmake b/cmake/projects/libjson-rpc-cpp/hunter.cmake new file mode 100644 index 0000000000..c82595fd28 --- /dev/null +++ b/cmake/projects/libjson-rpc-cpp/hunter.cmake @@ -0,0 +1,48 @@ +# cmake/projects/libjson-rpc-cpp/hunter.cmake + +include(hunter_add_version) +include(hunter_download) +include(hunter_pick_scheme) +include(hunter_cmake_args) + +# List of versions: + +hunter_add_version( + PACKAGE_NAME + libjson-rpc-cpp + VERSION + "0.7.0-p0" + URL + "https://github.com/hunter-packages/libjson-rpc-cpp/archive/v0.7.0-p0.tar.gz" + SHA1 + ddd5f12dfde6f7072d271071bd2c7b0a487de97f +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) + +set(_hunter_unix_cmake_args "") +if(UNIX) + # UNIX options. Disable all as they don't compile on macOS. + set( + _hunter_unix_cmake_args + UNIX_DOMAIN_SOCKET_SERVER=OFF + UNIX_DOMAIN_SOCKET_CLIENT=OFF + FILE_DESCRIPTOR_SERVER=OFF + FILE_DESCRIPTOR_CLIENT=OFF + ) +endif() + +hunter_cmake_args( + libjson-rpc-cpp + CMAKE_ARGS + BUILD_STATIC_LIBS=ON + WITH_COVERAGE=OFF + COMPILE_STUBGEN=OFF + COMPILE_EXAMPLES=OFF + COMPILE_TESTS=OFF + HTTP_CLIENT=ON + HTTP_SERVER=OFF # Requires microhttpd library. + ${_hunter_unix_cmake_args} +) + +hunter_download(PACKAGE_NAME libjson-rpc-cpp) diff --git a/examples/libjson-rpc-cpp/CMakeLists.txt b/examples/libjson-rpc-cpp/CMakeLists.txt new file mode 100644 index 0000000000..3e0ac99803 --- /dev/null +++ b/examples/libjson-rpc-cpp/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") +project(libjson-rpc-cpp-example) + +hunter_add_package(libjson-rpc-cpp) +find_package(libjson-rpc-cpp CONFIG REQUIRED) + +# FIXME: libcrypto does not links to pthread. +find_package(Threads) + +add_executable(${PROJECT_NAME} main.cpp) +target_link_libraries(${PROJECT_NAME} libjson-rpc-cpp::client Threads::Threads) diff --git a/examples/libjson-rpc-cpp/main.cpp b/examples/libjson-rpc-cpp/main.cpp new file mode 100644 index 0000000000..da3a6e59e0 --- /dev/null +++ b/examples/libjson-rpc-cpp/main.cpp @@ -0,0 +1,23 @@ +#include +#include +#include + +int main() +{ + jsonrpc::HttpClient http("http://localhost:8383"); + jsonrpc::Client client(http); + + Json::Value params; + params["name"] = "Peter"; + + try + { + std::cout << client.CallMethod("sayHello", params) << '\n'; + } + catch (jsonrpc::JsonRpcException const& e) + { + std::cerr << e.what() << '\n'; + } + + return 0; +} From 29c14cc47ef63d0f9ea69f337d87d06eca1a363a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Mon, 15 May 2017 16:42:07 +0200 Subject: [PATCH 126/612] Make libjson-rpc-cpp cacheable --- cmake/projects/libjson-rpc-cpp/hunter.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/projects/libjson-rpc-cpp/hunter.cmake b/cmake/projects/libjson-rpc-cpp/hunter.cmake index c82595fd28..7a82e9ca1a 100644 --- a/cmake/projects/libjson-rpc-cpp/hunter.cmake +++ b/cmake/projects/libjson-rpc-cpp/hunter.cmake @@ -1,6 +1,7 @@ # cmake/projects/libjson-rpc-cpp/hunter.cmake include(hunter_add_version) +include(hunter_cacheable) include(hunter_download) include(hunter_pick_scheme) include(hunter_cmake_args) @@ -45,4 +46,5 @@ hunter_cmake_args( ${_hunter_unix_cmake_args} ) +hunter_cacheable(libjson-rpc-cpp) hunter_download(PACKAGE_NAME libjson-rpc-cpp) From 4d7b792c33b93689da732c7701a425ecb9288c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Mon, 15 May 2017 17:42:06 +0200 Subject: [PATCH 127/612] Make jsoncpp cacheable --- cmake/projects/jsoncpp/hunter.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/projects/jsoncpp/hunter.cmake b/cmake/projects/jsoncpp/hunter.cmake index 66eb1dcf45..2d41addba9 100644 --- a/cmake/projects/jsoncpp/hunter.cmake +++ b/cmake/projects/jsoncpp/hunter.cmake @@ -4,6 +4,7 @@ # Load used modules include(hunter_add_version) +include(hunter_cacheable) include(hunter_download) include(hunter_pick_scheme) include(hunter_cmake_args) @@ -54,4 +55,5 @@ hunter_cmake_args( JSONCPP_WITH_CMAKE_PACKAGE=ON ) +hunter_cacheable(jsoncpp) hunter_download(PACKAGE_NAME jsoncpp) From cc7af958112cf4240465e7cb7b523c9e840588ef Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 15 May 2017 19:19:57 +0300 Subject: [PATCH 128/612] Template scheme files --- cmake/templates/package-download.cmake.in | 7 +++++++ cmake/templates/package-version.cmake.in | 12 ++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 cmake/templates/package-download.cmake.in create mode 100644 cmake/templates/package-version.cmake.in diff --git a/cmake/templates/package-download.cmake.in b/cmake/templates/package-download.cmake.in new file mode 100644 index 0000000000..077605fe27 --- /dev/null +++ b/cmake/templates/package-download.cmake.in @@ -0,0 +1,7 @@ +include(hunter_cacheable) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable("@PACKAGE_NAME@") +hunter_download(PACKAGE_NAME "@PACKAGE_NAME@") diff --git a/cmake/templates/package-version.cmake.in b/cmake/templates/package-version.cmake.in new file mode 100644 index 0000000000..579b44a2f7 --- /dev/null +++ b/cmake/templates/package-version.cmake.in @@ -0,0 +1,12 @@ +include(hunter_add_version) + +hunter_add_version( + PACKAGE_NAME + "@PACKAGE_NAME@" + VERSION + "@PACKAGE_SHA1@" + URL + "@PACKAGE_URL@" + SHA1 + "@PACKAGE_SHA1@" +) From c467439c6bcdce47ecd75863477d74537f646cb7 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 15 May 2017 19:20:55 +0300 Subject: [PATCH 129/612] Add 'hunter_pack_git_submodule' --- cmake/modules/hunter_pack_git_submodule.cmake | 247 ++++++++++++++++++ 1 file changed, 247 insertions(+) create mode 100644 cmake/modules/hunter_pack_git_submodule.cmake diff --git a/cmake/modules/hunter_pack_git_submodule.cmake b/cmake/modules/hunter_pack_git_submodule.cmake new file mode 100644 index 0000000000..472f185c93 --- /dev/null +++ b/cmake/modules/hunter_pack_git_submodule.cmake @@ -0,0 +1,247 @@ +include(CMakeParseArguments) # cmake_parse_arguments + +include(hunter_internal_error) +include(hunter_status_debug) + +set(_HUNTER_TEMPLATE_SCHEME_DIR "${CMAKE_CURRENT_LIST_DIR}/../templates") + +function(hunter_pack_git_submodule) + set(PACKAGE_NAME "${_hunter_current_project}") + string(COMPARE EQUAL "${PACKAGE_NAME}" "" is_empty) + if(is_empty) + hunter_internal_error("_hunter_current_project is empty") + endif() + + set(optional "") + set(one GIT_SUBMODULE PROJECT_FILE VERSION) + set(multiple "") + + # Introduce: + # * x_GIT_SUBMODULE + # * x_PROJECT_FILE + # * x_VERSION + cmake_parse_arguments(x "${optional}" "${one}" "${multiple}" "${ARGV}") + + string(COMPARE NOTEQUAL "${x_UNPARSED_ARGUMENTS}" "" has_unparsed) + if(has_unparsed) + hunter_internal_error("Unparsed arguments: ${x_UNPARSED_ARGUMENTS}") + endif() + + string(COMPARE EQUAL "${x_GIT_SUBMODULE}" "" is_empty) + if(is_empty) + hunter_internal_error("GIT_SUBMODULE is empty") + endif() + + find_package(Git REQUIRED) + hunter_status_debug("Using git executable: ${GIT_EXECUTABLE}") + + set(cmd "${GIT_EXECUTABLE}" rev-parse --show-toplevel) + execute_process( + COMMAND ${cmd} + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE error + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + + if(NOT result EQUAL 0) + hunter_internal_error( + "Command failed: ${cmd} (${result}, ${output}, ${error})" + ) + endif() + + set(top_git_directory "${output}") + + set(cmd "${GIT_EXECUTABLE}" submodule status "${x_GIT_SUBMODULE}") + execute_process( + COMMAND ${cmd} + WORKING_DIRECTORY "${top_git_directory}" + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE error + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + + if(NOT result EQUAL 0) + string(REPLACE ";" " " cmd "${cmd}") + hunter_internal_error( + "Command failed: '${cmd}' (${result}, ${output}, ${error})" + "To reproduce error go to '${top_git_directory}' and" + "run command '${cmd}'" + ) + endif() + + set(submodule_file "${top_git_directory}/.gitmodules") + if(NOT EXISTS "${submodule_file}") + hunter_internal_error("File not found: '${submodule_file}'") + endif() + set_property( + DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${submodule_file}" + ) + + set(submodule_dir "${top_git_directory}/${x_GIT_SUBMODULE}") + if(NOT EXISTS "${submodule_dir}") + hunter_internal_error("Directory not exist: '${submodule_dir}'") + endif() + + set(cmd "${GIT_EXECUTABLE}" status --porcelain) + execute_process( + COMMAND ${cmd} + WORKING_DIRECTORY "${submodule_dir}" + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE error + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + + if(NOT result EQUAL 0) + hunter_internal_error( + "Command failed: ${cmd} (${result}, ${output}, ${error})" + ) + endif() + + string(COMPARE EQUAL "${output}" "" is_empty) + if(NOT is_empty) + hunter_user_error( + "Git directory '${submodule_dir}' is dirty." + "Please commit or stash changes." + ) + endif() + + set(cmd "${GIT_EXECUTABLE}" rev-parse --git-path HEAD) + execute_process( + COMMAND ${cmd} + WORKING_DIRECTORY "${submodule_dir}" + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE error + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + + if(NOT result EQUAL 0) + hunter_internal_error( + "Command failed: ${cmd} (${result}, ${output}, ${error})" + ) + endif() + + set(head_file "${output}") + if(NOT EXISTS "${head_file}") + hunter_internal_error("File not found: '${head_file}'") + endif() + set_property( + DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${head_file}" + ) + + set(cmd "${GIT_EXECUTABLE}" rev-parse --symbolic-full-name HEAD) + execute_process( + COMMAND ${cmd} + WORKING_DIRECTORY "${submodule_dir}" + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE error + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + + if(NOT result EQUAL 0) + hunter_internal_error( + "Command failed: ${cmd} (${result}, ${output}, ${error})" + ) + endif() + + set(head_ref "${output}") + set(cmd "${GIT_EXECUTABLE}" rev-parse --git-path "${head_ref}") + execute_process( + COMMAND ${cmd} + WORKING_DIRECTORY "${submodule_dir}" + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE error + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + + if(NOT result EQUAL 0) + hunter_internal_error( + "Command failed: ${cmd} (${result}, ${output}, ${error})" + ) + endif() + + set(ref_file "${output}") + if(NOT EXISTS "${ref_file}") + hunter_internal_error("File not fond: ${ref_file}") + endif() + + set_property( + DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${ref_file}" + ) + + set(archives_directory "${CMAKE_CURRENT_BINARY_DIR}/_3rdParty/Hunter/git-archives") + file(MAKE_DIRECTORY "${archives_directory}") + + set(archive "${archives_directory}/${PACKAGE_NAME}.tar") + hunter_status_debug("Creating archive '${archive}'") + + set(cmd "${GIT_EXECUTABLE}" archive HEAD -o "${archive}") + execute_process( + COMMAND ${cmd} + WORKING_DIRECTORY "${submodule_dir}" + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE error + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + + if(NOT result EQUAL 0) + hunter_internal_error( + "Command failed: ${cmd} (${result}, ${output}, ${error})" + ) + endif() + + set(version_file "${archives_directory}/${PACKAGE_NAME}-version.cmake") + set(download_file "${archives_directory}/${PACKAGE_NAME}-download.cmake") + + file(SHA1 "${archive}" PACKAGE_SHA1) + set(PACKAGE_URL "file://${archive}") + + # Use: + # * PACKAGE_NAME + configure_file( + "${_HUNTER_TEMPLATE_SCHEME_DIR}/package-download.cmake.in" + "${download_file}" + @ONLY + ) + + # Use: + # * PACKAGE_NAME + # * PACKAGE_SHA1 + # * PACKAGE_URL + configure_file( + "${_HUNTER_TEMPLATE_SCHEME_DIR}/package-version.cmake.in" + "${version_file}" + @ONLY + ) + + set_property( + GLOBAL + PROPERTY + "HUNTER_${PACKAGE_NAME}_GIT_SUBMODULE_DIR" + "${archives_directory}" + ) + + set_property( + GLOBAL + APPEND + PROPERTY + HUNTER_SUBMODULE_PROJECTS + "${PACKAGE_NAME}" + ) + + set("${x_VERSION}" "${PACKAGE_SHA1}" PARENT_SCOPE) +endfunction() From 4acde9c31d1992d91db22d4ce8f9dcc8d0d3b9dc Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 15 May 2017 19:23:27 +0300 Subject: [PATCH 130/612] Add 'hunter_get_project_files_to_load' --- .../hunter_get_project_files_to_load.cmake | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 cmake/modules/hunter_get_project_files_to_load.cmake diff --git a/cmake/modules/hunter_get_project_files_to_load.cmake b/cmake/modules/hunter_get_project_files_to_load.cmake new file mode 100644 index 0000000000..9dd1edf121 --- /dev/null +++ b/cmake/modules/hunter_get_project_files_to_load.cmake @@ -0,0 +1,97 @@ +# Copyright (c) 2017 Ruslan Baratov +# All rights reserved. + +include(CMakeParseArguments) # cmake_parse_arguments + +include(hunter_internal_error) +include(hunter_test_string_not_empty) + +function(hunter_get_project_files_to_load) + hunter_test_string_not_empty("${HUNTER_SELF}") + + set(optional "") + set(one PROJECT_NAME FILES) + set(multiple COMPONENTS) + + # Introduce: + # * x_PROJECT_NAME + # * x_FILES + # * x_COMPONENTS + cmake_parse_arguments(x "${optional}" "${one}" "${multiple}" "${ARGV}") + + string(COMPARE NOTEQUAL "${x_UNPARSED_ARGUMENTS}" "" has_unparsed) + if(has_unparsed) + hunter_internal_error("Unparsed arguments: ${x_UNPARSED_ARGUMENTS}") + endif() + + string(COMPARE EQUAL "${x_PROJECT_NAME}" "" is_empty) + if(is_empty) + hunter_internal_error("PROJECT_NAME is empty") + endif() + + get_property( + git_submodule_dir + GLOBAL + PROPERTY + "HUNTER_${x_PROJECT_NAME}_GIT_SUBMODULE_DIR" + ) + + if(git_submodule_dir) + set(result_list "") + list( + APPEND + result_list + "${git_submodule_dir}/${x_PROJECT_NAME}-version.cmake" + ) + + set(hunter_cmake "${HUNTER_SELF}/cmake/projects/${x_PROJECT_NAME}/hunter.cmake") + + if(EXISTS "${hunter_cmake}") + list(APPEND result_list "${hunter_cmake}") + else() + list( + APPEND + result_list + "${git_submodule_dir}/${x_PROJECT_NAME}-download.cmake" + ) + endif() + + set("${x_FILES}" "${result_list}" PARENT_SCOPE) + return() + endif() + + set( + project_dir + "${HUNTER_SELF}/cmake/projects/${x_PROJECT_NAME}" + ) + if(NOT EXISTS "${project_dir}") + hunter_internal_error("Project '${x_PROJECT_NAME}' not found") + endif() + if(NOT IS_DIRECTORY "${project_dir}") + hunter_internal_error("Project '${x_PROJECT_NAME}' not found") + endif() + + # Check components + foreach(x ${x_COMPONENTS}) + set(dir "${project_dir}/${x}") + if(NOT EXISTS "${dir}") + hunter_internal_error( + "Component '${x}' not found in project '${x_PROJECT_NAME}'" + ) + endif() + if(NOT IS_DIRECTORY "${dir}") + hunter_internal_error( + "Component '${x}' not found in project '${x_PROJECT_NAME}'" + ) + endif() + endforeach() + + set(result_list "${project_dir}/hunter.cmake") + + # Load components + foreach(x ${x_COMPONENTS}) + list(APPEND result_list "${project_dir}/${x}/hunter.cmake") + endforeach() + + set("${x_FILES}" "${result_list}" PARENT_SCOPE) +endfunction() From ad4047d008e7a5cad87cd3a71ecc2c42be9962be Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 15 May 2017 19:25:46 +0300 Subject: [PATCH 131/612] hunter_config: Add GIT_SUBMODULE --- cmake/modules/hunter_add_package.cmake | 50 +++---------------- .../hunter_calculate_config_sha1.cmake | 26 ++++++++++ cmake/modules/hunter_config.cmake | 29 ++++++++++- 3 files changed, 62 insertions(+), 43 deletions(-) diff --git a/cmake/modules/hunter_add_package.cmake b/cmake/modules/hunter_add_package.cmake index 5b6c03338b..ec47f09619 100644 --- a/cmake/modules/hunter_add_package.cmake +++ b/cmake/modules/hunter_add_package.cmake @@ -5,6 +5,7 @@ include(CMakeParseArguments) # cmake_parse_arguments include(hunter_fatal_error) include(hunter_finalize) +include(hunter_get_project_files_to_load) include(hunter_internal_error) include(hunter_status_debug) include(hunter_test_string_not_empty) @@ -36,54 +37,19 @@ macro(hunter_add_package) endif() list(GET _hunter_ap_arg_UNPARSED_ARGUMENTS 0 _hunter_ap_project) - hunter_test_string_not_empty("${HUNTER_SELF}") - set( - _hunter_ap_project_dir - "${HUNTER_SELF}/cmake/projects/${_hunter_ap_project}" + hunter_get_project_files_to_load( + PROJECT_NAME "${_hunter_ap_project}" + COMPONENTS "${_hunter_ap_arg_COMPONENTS}" + FILES _hunter_ap_list ) - if(NOT EXISTS "${_hunter_ap_project_dir}") - hunter_internal_error("Project '${_hunter_ap_project}' not found") - endif() - if(NOT IS_DIRECTORY "${_hunter_ap_project_dir}") - hunter_internal_error("Project '${_hunter_ap_project}' not found") - endif() - - # Check components - foreach(_hunter_ap_component ${_hunter_ap_arg_COMPONENTS}) - set( - _hunter_ap_component_dir - "${_hunter_ap_project_dir}/${_hunter_ap_component}" - ) - if(NOT EXISTS "${_hunter_ap_component_dir}") - hunter_internal_error( - "Component '${_hunter_ap_component}' not found " - "in project '${_hunter_ap_project}'" - ) - endif() - if(NOT IS_DIRECTORY "${_hunter_ap_component_dir}") - hunter_internal_error( - "Component '${_hunter_ap_component}' not found " - "in project '${_hunter_ap_project}'" - ) - endif() - endforeach() - - unset(_hunter_ap_list) - list(APPEND _hunter_ap_list "${_hunter_ap_project_dir}/hunter.cmake") - - # Load components - foreach(_hunter_ap_component ${_hunter_ap_arg_COMPONENTS}) - list( - APPEND - _hunter_ap_list - "${_hunter_ap_project_dir}/${_hunter_ap_component}/hunter.cmake" - ) - endforeach() # do not use any variables after this 'foreach', because included files # may call 'hunter_add_package' and rewrite it foreach(x ${_hunter_ap_list}) hunter_status_debug("load: ${x}") + if(NOT EXISTS "${x}") + hunter_internal_error("File not found: '${x}'") + endif() include("${x}") hunter_status_debug("load: ${x} ... end") endforeach() diff --git a/cmake/modules/hunter_calculate_config_sha1.cmake b/cmake/modules/hunter_calculate_config_sha1.cmake index 5e2724538d..7577ed75d9 100644 --- a/cmake/modules/hunter_calculate_config_sha1.cmake +++ b/cmake/modules/hunter_calculate_config_sha1.cmake @@ -70,6 +70,11 @@ function(hunter_calculate_config_sha1 hunter_self hunter_base user_config) endif() set(projects "${real_projects}") + get_property(submodule_projects GLOBAL PROPERTY HUNTER_SUBMODULE_PROJECTS) + if(submodule_projects) + list(APPEND projects "${submodule_projects}") + endif() + list(REMOVE_DUPLICATES projects) list(SORT projects) # Create unified version @@ -88,6 +93,7 @@ function(hunter_calculate_config_sha1 hunter_self hunter_base user_config) "hunter_config(${x} " "VERSION ${version}" ) + string(COMPARE NOTEQUAL "${HUNTER_${x}_CMAKE_ARGS}" "" have_args) if(have_args) file(APPEND "${input_file}" " CMAKE_ARGS") @@ -95,6 +101,7 @@ function(hunter_calculate_config_sha1 hunter_self hunter_base user_config) file(APPEND "${input_file}" " \"${y}\"") endforeach() endif() + string(COMPARE NOTEQUAL "${HUNTER_${x}_CONFIGURATION_TYPES}" "" have_types) if(have_types) file(APPEND "${input_file}" " CONFIGURATION_TYPES") @@ -102,6 +109,25 @@ function(hunter_calculate_config_sha1 hunter_self hunter_base user_config) file(APPEND "${input_file}" " ${y}") endforeach() endif() + + list(FIND submodule_projects "${x}" submodule_found) + if(NOT submodule_found EQUAL -1) + get_property( + git_submodule_dir + GLOBAL + PROPERTY + "HUNTER_${x}_GIT_SUBMODULE_DIR" + ) + if(NOT EXISTS "${git_submodule_dir}") + hunter_internal_error("Property not found") + endif() + file( + APPEND + "${input_file}" + " GIT_SUBMODULE_DIR \"${git_submodule_dir}\"" + ) + endif() + file(APPEND "${input_file}" ")\n") endif() endforeach() diff --git a/cmake/modules/hunter_config.cmake b/cmake/modules/hunter_config.cmake index 5b13f56192..412772ad67 100644 --- a/cmake/modules/hunter_config.cmake +++ b/cmake/modules/hunter_config.cmake @@ -4,6 +4,7 @@ include(CMakeParseArguments) # cmake_parse_arguments include(hunter_fatal_error) +include(hunter_pack_git_submodule) include(hunter_unsetvar) include(hunter_user_error) @@ -16,7 +17,7 @@ macro(hunter_config) "error.unexpected.hunter_config" ) endif() - set(_hunter_one_value VERSION) + set(_hunter_one_value VERSION GIT_SUBMODULE GIT_SUBMODULE_DIR) set(_hunter_multiple_values CMAKE_ARGS CONFIGURATION_TYPES) cmake_parse_arguments( _hunter @@ -41,6 +42,32 @@ macro(hunter_config) # clear all hunter_unsetvar(${_hunter_root}) + string(COMPARE NOTEQUAL "${_hunter_GIT_SUBMODULE}" "" _hunter_submodule_create) + if(_hunter_submodule_create) + hunter_pack_git_submodule( + GIT_SUBMODULE "${_hunter_GIT_SUBMODULE}" + VERSION _hunter_VERSION + ) + endif() + + string(COMPARE NOTEQUAL "${_hunter_GIT_SUBMODULE_DIR}" "" _hunter_submodule_consume) + if(_hunter_submodule_consume) + set_property( + GLOBAL + PROPERTY + "HUNTER_${_hunter_current_project}_GIT_SUBMODULE_DIR" + "${_hunter_GIT_SUBMODULE_DIR}" + ) + + set_property( + GLOBAL + APPEND + PROPERTY + HUNTER_SUBMODULE_PROJECTS + "${_hunter_current_project}" + ) + endif() + if(_hunter_VERSION) set(HUNTER_${_hunter_current_project}_VERSION ${_hunter_VERSION}) set(HUNTER_${_hunter_current_project}_CMAKE_ARGS ${_hunter_CMAKE_ARGS}) From db8170257e6e1077e2e0ed859d561a5f1402cfcb Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 16 May 2017 14:59:35 +0300 Subject: [PATCH 132/612] Always allow builds of submodules --- cmake/modules/hunter_download.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cmake/modules/hunter_download.cmake b/cmake/modules/hunter_download.cmake index d62ddb08ef..e172ad1c4c 100644 --- a/cmake/modules/hunter_download.cmake +++ b/cmake/modules/hunter_download.cmake @@ -467,6 +467,18 @@ function(hunter_download) set(allow_builds FALSE) endif() + # Always allow builds of submodules + get_property(submodule_projects GLOBAL PROPERTY HUNTER_SUBMODULE_PROJECTS) + if(submodule_projects) + list(FIND submodule_projects "${HUNTER_PACKAGE_NAME}" submodule_found) + if(NOT submodule_found EQUAL -1) + set(allow_builds TRUE) + if(hunter_has_component) + hunter_internal_error("Submodule with components") + endif() + endif() + endif() + if(NOT allow_builds AND HUNTER_PACKAGE_SCHEME_INSTALL) hunter_fatal_error( "Building package from source is disabled (dir: ${HUNTER_PACKAGE_HOME_DIR})" From eab1ad8e7a2fd8826271d46a1ec52a96fe91109a Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 16 May 2017 12:12:10 +0300 Subject: [PATCH 133/612] Update year --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 279995dee8..6897dfb00b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -55,7 +55,7 @@ # General information about the project. project = 'Hunter' -copyright = '2013-2016, Ruslan Baratov' +copyright = '2013-2017, Ruslan Baratov' author = 'Ruslan Baratov' # The version info for the project you're documenting, acts as replacement for From 3a43d8f8ab67ae6083e4ae5e6169ed5c6bf5afd0 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 16 May 2017 18:41:00 +0300 Subject: [PATCH 134/612] Docs: hunter_config(GIT_SUBMODULE) --- docs/overview/what-is-it.rst | 1 + docs/reference/user-modules/hunter_config.rst | 7 + docs/user-guides/hunter-user.rst | 10 +- .../user-guides/hunter-user/git-submodule.rst | 241 ++++++++++++++++++ 4 files changed, 258 insertions(+), 1 deletion(-) create mode 100644 docs/user-guides/hunter-user/git-submodule.rst diff --git a/docs/overview/what-is-it.rst b/docs/overview/what-is-it.rst index 9adb13a954..4417f96d31 100644 --- a/docs/overview/what-is-it.rst +++ b/docs/overview/what-is-it.rst @@ -88,6 +88,7 @@ Default version from `default.cmake`_ .. seealso:: * :doc:`Detailed sources layout ` + * :doc:`Creating version on the fly from Git submodule ` .. _release: https://github.com/ruslo/hunter/releases .. _Atom feed: https://github.com/ruslo/hunter/releases.atom diff --git a/docs/reference/user-modules/hunter_config.rst b/docs/reference/user-modules/hunter_config.rst index b75f4b74ab..175a0a918b 100644 --- a/docs/reference/user-modules/hunter_config.rst +++ b/docs/reference/user-modules/hunter_config.rst @@ -32,4 +32,11 @@ something like this: > cmake -H. -B_builds -DOPTION1=OFF -DOPTION2=ON > cmake --build _builds --target install +Instead of using ``VERSION`` you can create source archive by packing +:doc:`Git submodule `: + +.. code-block:: cmake + + hunter_config( GIT_SUBMODULE "3rdparty/") + .. _ExternalProject_Add: http://www.cmake.org/cmake/help/v3.0/module/ExternalProject.html diff --git a/docs/user-guides/hunter-user.rst b/docs/user-guides/hunter-user.rst index 6859ea5f83..c278af0513 100644 --- a/docs/user-guides/hunter-user.rst +++ b/docs/user-guides/hunter-user.rst @@ -1,9 +1,17 @@ -.. Copyright (c) 2016, Ruslan Baratov +.. Copyright (c) 2016-2017, Ruslan Baratov .. All rights reserved. Hunter user ----------- +.. toctree:: + :maxdepth: 1 + + /user-guides/hunter-user/git-submodule + +TODO +==== + * add more find_packages * add toolchain-id flags * add hunter_add_package diff --git a/docs/user-guides/hunter-user/git-submodule.rst b/docs/user-guides/hunter-user/git-submodule.rst new file mode 100644 index 0000000000..0c65442938 --- /dev/null +++ b/docs/user-guides/hunter-user/git-submodule.rst @@ -0,0 +1,241 @@ +.. Copyright (c) 2017, Ruslan Baratov +.. All rights reserved. + +Use version from Git submodule +------------------------------ + +Hunter allows creation of archive with sources on the fly by getting it from +Git submodule. + +Example: + +.. code-block:: none + + > git clone https://github.com/hunter-test-cases/git-submodule-integration + > cd git-submodule-integration + [git-submodule-integration]> git submodule update --init . + +Submodule set in local config file: + +.. code-block:: cmake + :emphasize-lines: 9 + + # CMakeLists.txt + + cmake_minimum_required(VERSION 3.0) + + include("cmake/HunterGate.cmake") + HunterGate( + URL "https://github.com/ruslo/hunter/archive/v0.18.58.tar.gz" + SHA1 "3b39effc5ee1af4ef7487eabb1b0a7a7e10a7b3e" + LOCAL # <----- load cmake/Hunter/config.cmake + ) + +.. code-block:: cmake + + # cmake/Hunter/config.cmake + hunter_config(fruits GIT_SUBMODULE "3rdParty/fruits") + +Path to submodule is the same as in ``.gitmodules`` file: + +.. code-block:: none + :emphasize-lines: 3 + + [git-submodule-integration]> cat .gitmodules + [submodule "3rdParty/fruits"] + path = 3rdParty/fruits + url = https://github.com/cgold-examples/fruits + +On configure step Hunter will run ``git archive`` command to pack sources: + +.. code-block:: none + + [git-submodule-integration]> cmake -H. -B_builds -DHUNTER_STATUS_DEBUG=ON + ... + -- [hunter *** DEBUG *** ...] Creating archive '/.../git-submodule-integration/_builds/_3rdParty/Hunter/git-archives/fruits.tar' + ... + +Let's build project and run tests: + +.. code-block:: none + + [git-submodule-integration]> cmake --build _builds + [git-submodule-integration]> (cd _builds && ctest -VV) + ... + 1: Quick meal: + 1: plum x 2 + 1: pear x 1 + ... + +If you want to make changes to dependent project and test them you have +to **commit** patches first: + +.. code-block:: none + :emphasize-lines: 3, 6, 8 + + [git-submodule-integration]> cd 3rdParty/fruits + [fruits]> grep return lib/fruits/rosaceae/Plum.cpp + return "plum"; + [fruits]> vim lib/fruits/rosaceae/Plum.cpp + [fruits]> grep return lib/fruits/rosaceae/Plum.cpp + return "plum-v2"; + [fruits]> git add lib/fruits/rosaceae/Plum.cpp + [fruits]> git commit -m 'Update' + +Go back to parent directory and run build. There is no need to run configure +again, corresponding Git files watched by CMake hence configure will start +automatically on build step: + +.. code-block:: none + + [fruits]> cd ../.. + [git-submodule-integration]> cmake --build _builds + +Run tests to see changes: + +.. code-block:: none + :emphasize-lines: 3 + + [git-submodule-integration]> (cd _builds && ctest -VV) + 1: Quick meal: + 1: plum-v2 x 2 + 1: pear x 1 + +GIT_SUBMODULE vs add_subdirectory +================================= + +Note that we can achieve the same by adding sources with ``add_subdirectory``: + +.. code-block:: cmake + + # top level CMakeLists.txt + # ... + + add_subdirectory(3rdParty/fruits) + +The only pros of ``add_subdirectory`` approach is that build artifacts of the +``fruits`` will live in our ``_builds`` directory. ``GIT_SUBMODULE`` will add +new package in the same way as regular release-based packages added, meaning +that after installation all build artifacts will be removed. Every new version +start build from scratch. + +Next cons of using ``add_subdirectory``: + +* Dependent project ``fruits`` is not installed, hence CMake API usage may + be different. If package has target ``fruits_rosaceae`` internally then after + installation it can be ``fruits::fruits_rosaceae`` + +* For the same reason C++ API may be different, e.g. ``#include`` directives + +* It's not two separate projects now - it's one big project. Hence they will + share same cache which may lead to options conflicts, targets name conflicts, + targets from both projects will be installed, tests from both projects will + be run + +* Correctness. Note that ``add_subdirectory`` can be used only for dependencies + which is not used by other packages in Hunter. If current project use package + ``zoo`` which depends on ``fruits`` we can't do ``add_subdirectory(fruits)`` + since ``hunter_add_package(zoo)`` will build and use ``fruits`` from Hunter. + See next chapter for details + +Injection +========= + +``GIT_SUBMODULE`` allow you to correctly inject new version of package into +existent hierarchy of packages. + +For example let's take a look at the project which use TIFF, TIFF depends on +ZLIB: + +.. code-block:: none + + > git clone https://github.com/hunter-test-cases/git-submodule-integration-deps + > cd git-submodule-integration-deps + [git-submodule-integration-deps]> git submodule update --init . + +First let's remove ``LOCAL`` config and build standard TIFF with standard ZLIB: + +.. code-block:: cmake + :emphasize-lines: 5-8 + + # CMakeLists.txt + cmake_minimum_required(VERSION 3.0) + + include("cmake/HunterGate.cmake") + HunterGate( + URL "https://github.com/ruslo/hunter/archive/v0.18.58.tar.gz" + SHA1 "3b39effc5ee1af4ef7487eabb1b0a7a7e10a7b3e" + ) + + project(foo) + + hunter_add_package(TIFF) + find_package(TIFF CONFIG REQUIRED) + +Config-ID is ``f743b0b``: + +.. code-block:: none + :emphasize-lines: 6, 8 + + [git-submodule-integration-deps]> cmake -H. -B_builds -DHUNTER_STATUS_DEBUG=ON + ... + -- Downloading... + dst='~/.hunter/_Base/Download/ZLIB/1.2.8-p3/573dc28/v1.2.8-p3.tar.gz' + timeout='none' + -- Using src='https://github.com/hunter-packages/zlib/archive/v1.2.8-p3.tar.gz' + ... + /usr/bin/cc ... -isystem ~/.hunter/_Base/3b39eff/f743b0b/e1266bb/Install/include ... /.../tif_zip.c + +Now let's add ``LOCAL`` back and run build again: + +.. code-block:: cmake + :emphasize-lines: 9 + + # CMakeLists.txt + + cmake_minimum_required(VERSION 3.0) + + include("cmake/HunterGate.cmake") + HunterGate( + URL "https://github.com/ruslo/hunter/archive/v0.18.58.tar.gz" + SHA1 "3b39effc5ee1af4ef7487eabb1b0a7a7e10a7b3e" + LOCAL + ) + + project(foo) + + hunter_add_package(TIFF) + find_package(TIFF CONFIG REQUIRED) + +.. code-block:: cmake + :emphasize-lines: 2 + + # cmake/Hunter/config.cmake + hunter_config(ZLIB GIT_SUBMODULE "3rdparty/zlib") + +.. code-block:: none + + [git-submodule-integration-deps]> cmake -H. -B_builds -DHUNTER_STATUS_DEBUG=ON + +Now we are getting sources from locally created ``ZLIB.tar`` archive: + +.. code-block:: none + :emphasize-lines: 3 + + ... + -- verifying file... + file='/.../_builds/_3rdParty/Hunter/git-archives/ZLIB.tar' + ... + +And **rebuilding** TIFF with newly installed ZLIB, Config-ID changed from +``f743b0b`` to ``817c9cb``: + +.. code-block:: none + + /usr/bin/cc ... -isystem ~/.hunter/_Base/3b39eff/817c9cb/e1266bb/Install/include ... /.../tif_zip.c + +To achieve the same with ``add_subdirectory`` you have to clone TIFF package too. +Then you have to be sure that TIFF supports external ZLIB targets configuration, +call ``add_subdirectory(3rdparty/zlib)`` first, then ``add_subdirectory(3rdparty/TIFF)``. +Note that if you **don't know** that TIFF depends on ZLIB and you just call +``add_subdirectory(3rdparty/zlib)`` you will end up with incorrect configuration! From dbb404e5838cec16e2eea31b96fb01ec3fe136f5 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 16 May 2017 19:11:45 +0300 Subject: [PATCH 135/612] Docs: Fix spell --- docs/user-guides/hunter-user/git-submodule.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/user-guides/hunter-user/git-submodule.rst b/docs/user-guides/hunter-user/git-submodule.rst index 0c65442938..87b4a9c874 100644 --- a/docs/user-guides/hunter-user/git-submodule.rst +++ b/docs/user-guides/hunter-user/git-submodule.rst @@ -1,6 +1,12 @@ .. Copyright (c) 2017, Ruslan Baratov .. All rights reserved. +.. spelling:: + + Submodule + subdirectory + submodule + Use version from Git submodule ------------------------------ From f651e85df09e0ff9b8ad336b3a023add6c764117 Mon Sep 17 00:00:00 2001 From: Tom Mason Date: Tue, 16 May 2017 22:44:58 +0100 Subject: [PATCH 136/612] add newline at eof --- examples/tomcrypt/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tomcrypt/main.c b/examples/tomcrypt/main.c index 1b0248c36a..effca9d29b 100644 --- a/examples/tomcrypt/main.c +++ b/examples/tomcrypt/main.c @@ -37,4 +37,4 @@ int main(void) printf("\n"); return 0; -} \ No newline at end of file +} From 475906a07e9de7f5bf521a903c84e341e4397104 Mon Sep 17 00:00:00 2001 From: Zhuhao Wang Date: Thu, 27 Apr 2017 22:12:53 +0800 Subject: [PATCH 137/612] Add NASM --- cmake/configs/default.cmake | 1 + cmake/modules/hunter_pick_scheme.cmake | 10 ++- cmake/projects/NASM/hunter.cmake | 49 ++++++++++++++ .../schemes/url_sha1_nasm_windows.cmake.in | 65 +++++++++++++++++++ .../url_sha1_unpack_bin_install.cmake.in | 47 ++++++++++++++ .../hunter_package_scheme.rst | 23 +++---- examples/NASM/CMakeLists.txt | 32 +++++++++ 7 files changed, 215 insertions(+), 12 deletions(-) create mode 100644 cmake/projects/NASM/hunter.cmake create mode 100644 cmake/projects/NASM/schemes/url_sha1_nasm_windows.cmake.in create mode 100644 cmake/schemes/url_sha1_unpack_bin_install.cmake.in create mode 100644 examples/NASM/CMakeLists.txt diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 050a870938..cd9f9d6c6f 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -76,6 +76,7 @@ hunter_config(librtmp VERSION 2.4.0-p0) hunter_config(Libssh2 VERSION 1.7.0) hunter_config(Lua VERSION 5.3.2) hunter_config(MySQL-client VERSION 6.1.9) +hunter_config(NASM VERSION 2.12.02) hunter_config(OpenBLAS VERSION 0.2.19-p0) hunter_config(OpenCL VERSION 2.1-p0) hunter_config(OpenCL-cpp VERSION 2.0.10-p0) diff --git a/cmake/modules/hunter_pick_scheme.cmake b/cmake/modules/hunter_pick_scheme.cmake index 84ad65eeec..c0a0a03d1a 100644 --- a/cmake/modules/hunter_pick_scheme.cmake +++ b/cmake/modules/hunter_pick_scheme.cmake @@ -66,11 +66,19 @@ function(hunter_pick_scheme) is_unpack_install ) + string( + COMPARE + EQUAL + "${HUNTER_DOWNLOAD_SCHEME}" + "url_sha1_unpack_bin_install" + is_unpack_bin_install + ) + if(is_unpack) set(HUNTER_PACKAGE_SCHEME_UNPACK "1") elseif(is_download) set(HUNTER_PACKAGE_SCHEME_DOWNLOAD "1") - elseif(is_unpack_install) + elseif(is_unpack_install OR is_unpack_bin_install) set(HUNTER_PACKAGE_SCHEME_UNPACK_INSTALL "1") else() set(HUNTER_PACKAGE_SCHEME_INSTALL "1") diff --git a/cmake/projects/NASM/hunter.cmake b/cmake/projects/NASM/hunter.cmake new file mode 100644 index 0000000000..fca0f776fb --- /dev/null +++ b/cmake/projects/NASM/hunter.cmake @@ -0,0 +1,49 @@ +# Copyright (c) 2017, Zhuhao Wang +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_download) +include(hunter_pick_scheme) +include(hunter_configuration_types) + +if(MINGW) + # NASM only supports a subset of VS compilers on Windows. + hunter_add_version( + PACKAGE_NAME + NASM + VERSION + "2.12.02" + URL + "http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win32/nasm-2.12.02-win32.zip" + SHA1 + 07d7c742dcc1107d7a322db7a3a19065d7d1cbb4 + ) +else() + hunter_add_version( + PACKAGE_NAME + NASM + VERSION + "2.12.02" + URL + "http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/nasm-2.12.02.tar.gz" + SHA1 + 6d23d4be63f3a73d7df3053e65168f7906dd99e7 + ) +endif() + +if(MINGW OR MSYS) + hunter_pick_scheme(DEFAULT url_sha1_unpack_bin_install) +elseif(CMAKE_HOST_WIN32) + hunter_pick_scheme(DEFAULT url_sha1_nasm_windows) + hunter_cacheable(NASM) +else() + hunter_configuration_types(NASM CONFIGURATION_TYPES Release) + hunter_pick_scheme(DEFAULT url_sha1_autotools) + hunter_cacheable(NASM) +endif() + +hunter_download(PACKAGE_NAME NASM) + diff --git a/cmake/projects/NASM/schemes/url_sha1_nasm_windows.cmake.in b/cmake/projects/NASM/schemes/url_sha1_nasm_windows.cmake.in new file mode 100644 index 0000000000..557aab0c9b --- /dev/null +++ b/cmake/projects/NASM/schemes/url_sha1_nasm_windows.cmake.in @@ -0,0 +1,65 @@ +# Copyright (c) 2017, Zhuhao Wang +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) +project(Hunter) + +include(ExternalProject) # ExternalProject_Add + +# Scheme for download and install NASM library for Windows + +list(APPEND CMAKE_MODULE_PATH "@HUNTER_SELF@/cmake/modules") + +include(hunter_status_debug) +include(hunter_test_string_not_empty) + +hunter_status_debug("Scheme: url_sha1_nasm_windows") + +# Check preconditions +hunter_test_string_not_empty("@HUNTER_SELF@") +hunter_test_string_not_empty("@HUNTER_EP_NAME@") +hunter_test_string_not_empty("@HUNTER_PACKAGE_URL@") +hunter_test_string_not_empty("@HUNTER_PACKAGE_SHA1@") +hunter_test_string_not_empty("@HUNTER_PACKAGE_DOWNLOAD_DIR@") +hunter_test_string_not_empty("@HUNTER_PACKAGE_SOURCE_DIR@") +hunter_test_string_not_empty("@HUNTER_PACKAGE_INSTALL_PREFIX@") +hunter_test_string_not_empty("@HUNTER_MSVC_ARCH@") +hunter_test_string_not_empty("@HUNTER_MSVC_VCVARSALL@") +hunter_test_string_not_empty("@HUNTER_PACKAGE_LICENSE_DIR@") + +ExternalProject_Add( + "@HUNTER_EP_NAME@" + URL + "@HUNTER_PACKAGE_URL@" + URL_HASH + SHA1=@HUNTER_PACKAGE_SHA1@ + DOWNLOAD_DIR + "@HUNTER_PACKAGE_DOWNLOAD_DIR@" + SOURCE_DIR + "@HUNTER_PACKAGE_SOURCE_DIR@" + INSTALL_DIR + "@HUNTER_PACKAGE_INSTALL_PREFIX@" + # not used, just avoid creating Install/ empty directory + CONFIGURE_COMMAND + "@HUNTER_MSVC_VCVARSALL@" "@HUNTER_MSVC_ARCH@" + BUILD_COMMAND + nmake /f Mkfiles/msvc.mak + BUILD_IN_SOURCE + 1 + INSTALL_COMMAND + "@CMAKE_COMMAND@" + "-E" "make_directory" "@HUNTER_PACKAGE_INSTALL_PREFIX@/bin" + COMMAND + "@CMAKE_COMMAND@" + "-E" "copy" "nasm.exe" "ndisasm.exe" "@HUNTER_PACKAGE_INSTALL_PREFIX@/bin" + COMMAND + "@CMAKE_COMMAND@" + "-E" "copy_directory" "rdoff" "@HUNTER_PACKAGE_INSTALL_PREFIX@/bin" + COMMAND # Copy license files + "@CMAKE_COMMAND@" + "-C@HUNTER_ARGS_FILE@" # for 'HUNTER_INSTALL_LICENSE_FILES' + "-Dsrcdir=@HUNTER_PACKAGE_SOURCE_DIR@" + "-Ddstdir=@HUNTER_PACKAGE_LICENSE_DIR@" + -P + "@HUNTER_SELF@/scripts/try-copy-license.cmake" +) diff --git a/cmake/schemes/url_sha1_unpack_bin_install.cmake.in b/cmake/schemes/url_sha1_unpack_bin_install.cmake.in new file mode 100644 index 0000000000..ef4bce9819 --- /dev/null +++ b/cmake/schemes/url_sha1_unpack_bin_install.cmake.in @@ -0,0 +1,47 @@ +# Copyright (c) 2017, Zhuhao Wang +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) +project(Hunter) + +include(ExternalProject) # ExternalProject_Add + +list(APPEND CMAKE_MODULE_PATH "@HUNTER_SELF@/cmake/modules") + +include(hunter_status_debug) +include(hunter_test_string_not_empty) + +hunter_status_debug("Scheme: url_sha1_unpack_bin_install") + +# Check preconditions +hunter_test_string_not_empty("@HUNTER_SELF@") +hunter_test_string_not_empty("@HUNTER_EP_NAME@") +hunter_test_string_not_empty("@HUNTER_PACKAGE_URL@") +hunter_test_string_not_empty("@HUNTER_PACKAGE_SHA1@") +hunter_test_string_not_empty("@HUNTER_PACKAGE_DOWNLOAD_DIR@") +hunter_test_string_not_empty("@HUNTER_PACKAGE_SOURCE_DIR@") +hunter_test_string_not_empty("@HUNTER_PACKAGE_INSTALL_PREFIX@") + +ExternalProject_Add( + "@HUNTER_EP_NAME@" + URL + "@HUNTER_PACKAGE_URL@" + URL_HASH + SHA1=@HUNTER_PACKAGE_SHA1@ + DOWNLOAD_DIR + "@HUNTER_PACKAGE_DOWNLOAD_DIR@" + SOURCE_DIR + "@HUNTER_PACKAGE_SOURCE_DIR@" + INSTALL_DIR + "@HUNTER_PACKAGE_INSTALL_PREFIX@" + # not used, just avoid creating Install/ empty directory + CONFIGURE_COMMAND + "" + BUILD_COMMAND + "" + INSTALL_COMMAND + "@CMAKE_COMMAND@" + "-Dfrom=@HUNTER_PACKAGE_SOURCE_DIR@" + "-Dto=@HUNTER_PACKAGE_INSTALL_PREFIX@/bin" + -P "@HUNTER_SELF@/scripts/copy-files.cmake" +) diff --git a/docs/reference/internal-variables/hunter_package_scheme.rst b/docs/reference/internal-variables/hunter_package_scheme.rst index 9dfac75dd2..2966d3fb18 100644 --- a/docs/reference/internal-variables/hunter_package_scheme.rst +++ b/docs/reference/internal-variables/hunter_package_scheme.rst @@ -12,17 +12,18 @@ HUNTER_PACKAGE_SCHEME_ Type of the currently used scheme. Only one type should be set to ``1``, other types should have empty values. Next table describe the difference between them: -+--------------------------------------+-------------------------+-------------------+----------+------------+ -| | name | _ROOT | EP? [1]_ | cache [2]_ | -+======================================+=========================+===================+==========+============+ -| HUNTER_PACKAGE_SCHEME_DOWNLOAD | url_sha1_download | source directory | no | yes | -+--------------------------------------+-------------------------+-------------------+----------+------------+ -| HUNTER_PACKAGE_SCHEME_UNPACK | url_sha1_unpack | source directory | yes | yes | -+--------------------------------------+-------------------------+-------------------+----------+------------+ -| HUNTER_PACKAGE_SCHEME_UNPACK_INSTALL | url_sha1_unpack_install | install directory | yes | yes | -+--------------------------------------+-------------------------+-------------------+----------+------------+ -| HUNTER_PACKAGE_SCHEME_INSTALL | *other* | install directory | yes | no | -+--------------------------------------+-------------------------+-------------------+----------+------------+ ++------------------------------------------+-----------------------------+-------------------+----------+------------+ +| | name | _ROOT | EP? [1]_ | cache [2]_ | ++==========================================+=============================+===================+==========+============+ +| HUNTER_PACKAGE_SCHEME_DOWNLOAD | url_sha1_download | source directory | no | yes | ++------------------------------------------+-----------------------------+-------------------+----------+------------+ +| HUNTER_PACKAGE_SCHEME_UNPACK | url_sha1_unpack | source directory | yes | yes | ++------------------------------------------+-----------------------------+-------------------+----------+------------+ +| HUNTER_PACKAGE_SCHEME_UNPACK_INSTALL | url_sha1_unpack_install or | install directory | yes | yes | +| | url_sha1_unpack_bin_install | | | | ++------------------------------------------+-----------------------------+-------------------+----------+------------+ +| HUNTER_PACKAGE_SCHEME_INSTALL | *other* | install directory | yes | no | ++------------------------------------------+-----------------------------+-------------------+----------+------------+ .. [1] Does scheme use ExternalProject_Add? (information used while doing look up for stamps) .. [2] Is package cacheable by default? Yes - always cacheable, No - depends on the package (see ``hunter_cacheable``) diff --git a/examples/NASM/CMakeLists.txt b/examples/NASM/CMakeLists.txt new file mode 100644 index 0000000000..ea12240230 --- /dev/null +++ b/examples/NASM/CMakeLists.txt @@ -0,0 +1,32 @@ +# Copyright (c) 2017 Zhuhao Wang +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-NASM) + +hunter_add_package(NASM) + +find_program(NASM_EXECUTABLE + nasm + HINTS + ${NASM_ROOT}/bin + NO_DEFAULT_PATH + ) + +execute_process( + COMMAND "${NASM_EXECUTABLE}" -v + RESULT_VARIABLE result + OUTPUT_VARIABLE output + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + +if(NOT result EQUAL 0) + message(FATAL_ERROR "NASM failed") +endif() + +message("NASM version: ${output}") From ff03f0eea39fbe9d9ab12f5a8106c13224f79c0e Mon Sep 17 00:00:00 2001 From: Viktor Kirilov Date: Thu, 18 May 2017 11:10:34 +0300 Subject: [PATCH 138/612] [doctest] updating to version 1.2.0 also using the original repository instead of a fork --- cmake/projects/doctest/hunter.cmake | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cmake/projects/doctest/hunter.cmake b/cmake/projects/doctest/hunter.cmake index 5589761347..7b6aa37456 100644 --- a/cmake/projects/doctest/hunter.cmake +++ b/cmake/projects/doctest/hunter.cmake @@ -14,16 +14,15 @@ hunter_add_version( PACKAGE_NAME doctest VERSION - "1.1.4-hunter-1" + "1.2.0" URL - "https://github.com/piribes/doctest/archive/1.1.4-hunter-1.tar.gz" + "https://github.com/onqtam/doctest/archive/1.2.0.tar.gz" SHA1 - 684580f4cf1f40ca7750bea90facc4564a807c2a + 53f87a422c7cc842d9b3e06d5a7eb7e35307e6ac ) hunter_cmake_args(doctest CMAKE_ARGS - DOCTEST_SKIP_EXAMPLES=ON - DOCTEST_SKIP_COVERAGE=ON + DOCTEST_WITH_TESTS=OFF ) # Pick a download scheme From 16d0332279795e52dfae5434d3d88961c25e4371 Mon Sep 17 00:00:00 2001 From: Viktor Kirilov Date: Thu, 18 May 2017 11:12:01 +0300 Subject: [PATCH 139/612] [doctest] updating config to version 1.2.0 --- cmake/configs/default.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 953eb0680f..461a6d6f42 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -129,7 +129,7 @@ hunter_config(damageproto VERSION 1.2.1) hunter_config(dbus VERSION 1.10.0-hunter-4) hunter_config(dest VERSION 0.8.0-p4) hunter_config(dlib VERSION 19.4-p1) -hunter_config(doctest VERSION 1.1.4-hunter-1) +hunter_config(doctest VERSION 1.2.0) hunter_config(dri2proto VERSION 2.8) hunter_config(dri3proto VERSION 1.0) hunter_config(drm VERSION 2.4.67) From e8f9ca97db678e87964eab015d191b1e92fd82d3 Mon Sep 17 00:00:00 2001 From: Viktor Kirilov Date: Thu, 18 May 2017 11:39:18 +0300 Subject: [PATCH 140/612] [doctest] adding the old version back in --- cmake/projects/doctest/hunter.cmake | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cmake/projects/doctest/hunter.cmake b/cmake/projects/doctest/hunter.cmake index 7b6aa37456..0e1c70e81b 100644 --- a/cmake/projects/doctest/hunter.cmake +++ b/cmake/projects/doctest/hunter.cmake @@ -10,6 +10,17 @@ include(hunter_pick_scheme) include(hunter_cacheable) # List of versions here... +hunter_add_version( + PACKAGE_NAME + doctest + VERSION + "1.1.4-hunter-1" + URL + "https://github.com/piribes/doctest/archive/1.1.4-hunter-1.tar.gz" + SHA1 + 684580f4cf1f40ca7750bea90facc4564a807c2a +) + hunter_add_version( PACKAGE_NAME doctest @@ -22,6 +33,8 @@ hunter_add_version( ) hunter_cmake_args(doctest CMAKE_ARGS + DOCTEST_SKIP_EXAMPLES=ON + DOCTEST_SKIP_COVERAGE=ON DOCTEST_WITH_TESTS=OFF ) From 68fc9717da9bd2dd7e0918790d31560dc5584f0a Mon Sep 17 00:00:00 2001 From: Ubiquite Date: Thu, 18 May 2017 13:15:15 +0200 Subject: [PATCH 141/612] add jsoncpp to serialize.rst --- docs/packages/serialize.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/serialize.rst b/docs/packages/serialize.rst index 592b0b5e98..8470d39b37 100644 --- a/docs/packages/serialize.rst +++ b/docs/packages/serialize.rst @@ -18,3 +18,4 @@ Serialize * `RapidJSON `_ - A fast JSON parser/generator for C++ with both SAX/DOM style API * `RapidXML `_ - attempt to create the fastest XML parser possible, while retaining usability, portability and reasonable W3C compatibility. * `yaml-cpp `_ - human friendly data serialization standard for all programming languages. + * `jsoncpp `_ - A library that allows manipulating JSON values, including serialization and deserialization to and from strings. From d4152a25ddd66ca746953f25cb87c4531679aa50 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 18 May 2017 16:32:00 +0300 Subject: [PATCH 142/612] Docs: fix spell --- docs/packages/serialize.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/serialize.rst b/docs/packages/serialize.rst index 8470d39b37..b2c84e2e60 100644 --- a/docs/packages/serialize.rst +++ b/docs/packages/serialize.rst @@ -1,6 +1,7 @@ .. spelling:: json + deserialization Serialize --------- From f4d89c851dd5ceecb73ea94e3c38dc886d44a02e Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 21 May 2017 11:02:06 +0300 Subject: [PATCH 143/612] Add OpenNMTTokenizer --- cmake/configs/default.cmake | 1 + cmake/projects/OpenNMTTokenizer/hunter.cmake | 27 ++++++++++++++++++++ examples/OpenNMTTokenizer/CMakeLists.txt | 16 ++++++++++++ examples/OpenNMTTokenizer/foo.cpp | 11 ++++++++ 4 files changed, 55 insertions(+) create mode 100644 cmake/projects/OpenNMTTokenizer/hunter.cmake create mode 100644 examples/OpenNMTTokenizer/CMakeLists.txt create mode 100644 examples/OpenNMTTokenizer/foo.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index de9ea8f8ac..cdce05a814 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -83,6 +83,7 @@ hunter_config(OpenCL VERSION 2.1-p3) hunter_config(OpenCL-cpp VERSION 2.0.10-p0) hunter_config(OpenCV VERSION 3.2.0-p1) hunter_config(OpenCV-Extra VERSION 3.0.0) +hunter_config(OpenNMTTokenizer VERSION 0.2.0-p0) if(MSVC OR ANDROID) # FIXME: https://travis-ci.org/ingenue/hunter/jobs/215460184 # FIXME: https://ci.appveyor.com/project/ingenue/hunter/build/1.0.1470 diff --git a/cmake/projects/OpenNMTTokenizer/hunter.cmake b/cmake/projects/OpenNMTTokenizer/hunter.cmake new file mode 100644 index 0000000000..64ef2eee12 --- /dev/null +++ b/cmake/projects/OpenNMTTokenizer/hunter.cmake @@ -0,0 +1,27 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + OpenNMTTokenizer + VERSION + 0.2.0-p0 + URL + "https://github.com/hunter-packages/OpenNMT-Tokenizer/archive/v0.2.0-p0.tar.gz" + SHA1 + 8d6025d92014586c5ff5a831c13b9238e6c07da8 +) + +hunter_cmake_args(OpenNMTTokenizer CMAKE_ARGS LIB_ONLY=YES) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(OpenNMTTokenizer) +hunter_download(PACKAGE_NAME OpenNMTTokenizer) diff --git a/examples/OpenNMTTokenizer/CMakeLists.txt b/examples/OpenNMTTokenizer/CMakeLists.txt new file mode 100644 index 0000000000..5639f96d76 --- /dev/null +++ b/examples/OpenNMTTokenizer/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(foo) + +hunter_add_package(OpenNMTTokenizer) +find_package(OpenNMTTokenizer CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo OpenNMTTokenizer::OpenNMTTokenizer) diff --git a/examples/OpenNMTTokenizer/foo.cpp b/examples/OpenNMTTokenizer/foo.cpp new file mode 100644 index 0000000000..cd64cc6750 --- /dev/null +++ b/examples/OpenNMTTokenizer/foo.cpp @@ -0,0 +1,11 @@ +#include +#include + +int main() { + onmt::ITokenizer* tokenizer(0); + std::string line; + if (false) { + // Just check API + std::cout << tokenizer->tokenize(line); + } +} From 52cedfa140080e5e8ebcbed95940ad76846cf74e Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 21 May 2017 13:29:52 +0300 Subject: [PATCH 144/612] Add 'onmt' package --- cmake/configs/default.cmake | 1 + cmake/projects/onmt/hunter.cmake | 27 +++++++++++++++++++++++++++ examples/onmt/CMakeLists.txt | 16 ++++++++++++++++ examples/onmt/foo.cpp | 14 ++++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 cmake/projects/onmt/hunter.cmake create mode 100644 examples/onmt/CMakeLists.txt create mode 100644 examples/onmt/foo.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index cdce05a814..4e30cfc27f 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -180,6 +180,7 @@ hunter_config(odb-mysql VERSION 2.4.0) hunter_config(odb-pgsql VERSION 2.4.0) hunter_config(odb-sqlite VERSION 2.4.0) hunter_config(ogles_gpgpu VERSION 0.1.6-p2) +hunter_config(onmt VERSION 0.4.1-p0) hunter_config(openddlparser VERSION 0.1.0-p2) hunter_config(pciaccess VERSION 0.13.4) hunter_config(poly2tri VERSION 1.0.0) diff --git a/cmake/projects/onmt/hunter.cmake b/cmake/projects/onmt/hunter.cmake new file mode 100644 index 0000000000..49d430afa5 --- /dev/null +++ b/cmake/projects/onmt/hunter.cmake @@ -0,0 +1,27 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + onmt + VERSION + 0.4.1-p0 + URL + "https://github.com/hunter-packages/onmt/archive/v0.4.1-p0.tar.gz" + SHA1 + a691a53a695135cd38d85042bafacf734b3e6a5a +) + +hunter_cmake_args(onmt CMAKE_ARGS LIB_ONLY=YES WITH_OPENMP=OFF) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(onmt) +hunter_download(PACKAGE_NAME onmt) diff --git a/examples/onmt/CMakeLists.txt b/examples/onmt/CMakeLists.txt new file mode 100644 index 0000000000..08c66f3a3a --- /dev/null +++ b/examples/onmt/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(foo) + +hunter_add_package(onmt) +find_package(onmt CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo onmt::onmt) diff --git a/examples/onmt/foo.cpp b/examples/onmt/foo.cpp new file mode 100644 index 0000000000..cac1e343ea --- /dev/null +++ b/examples/onmt/foo.cpp @@ -0,0 +1,14 @@ +#include + +#include + +int main() +{ + // Create a new Translator object. + auto translator = onmt::TranslatorFactory::build("enfr_model_release.t7"); + + // Translate a tokenized sentence. + std::cout << translator->translate("Hello world !") << std::endl; + + return 0; +} From 5cf9eebf9bb54fb5634fcb120b1e36fb7d9111ad Mon Sep 17 00:00:00 2001 From: Ernesto Varoli Date: Mon, 22 May 2017 09:36:32 +0200 Subject: [PATCH 145/612] Added czmq package --- cmake/configs/default.cmake | 1 + cmake/projects/czmq/hunter.cmake | 76 ++++++++++++++++++++++++++++++++ examples/czmq/CMakeLists.txt | 15 +++++++ examples/czmq/main.cpp | 17 +++++++ 4 files changed, 109 insertions(+) create mode 100644 cmake/projects/czmq/hunter.cmake create mode 100644 examples/czmq/CMakeLists.txt create mode 100644 examples/czmq/main.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 4e30cfc27f..d45927a61a 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -127,6 +127,7 @@ hunter_config(crashpad VERSION v0.0.1-p0) hunter_config(crashup VERSION 0.0.2) hunter_config(cvmatio VERSION 1.0.27-p3) hunter_config(cxxopts VERSION 1.0.0-p0) +hunter_config(czmq VERSION 4.0.2-p0) hunter_config(damageproto VERSION 1.2.1) hunter_config(dbus VERSION 1.10.0-hunter-4) hunter_config(dest VERSION 0.8.0-p4) diff --git a/cmake/projects/czmq/hunter.cmake b/cmake/projects/czmq/hunter.cmake new file mode 100644 index 0000000000..856f5f29c0 --- /dev/null +++ b/cmake/projects/czmq/hunter.cmake @@ -0,0 +1,76 @@ +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + czmq + VERSION + "4.0.2-p0" + URL + "https://github.com/hunter-packages/czmq/archive/v4.0.2-p0.tar.gz" + SHA1 + e1bbc68f2d0fd0e062ba3c716a3a2f137ed0c7b4 +) + +hunter_add_version( + PACKAGE_NAME + czmq + VERSION + "4.0.1-p0" + URL + "https://github.com/hunter-packages/czmq/archive/v4.0.1-p0.tar.gz" + SHA1 + e78acc03a8b86d6209286df1f121755f7bc0bf97 +) + +hunter_add_version( + PACKAGE_NAME + czmq + VERSION + "4.0.0-p0" + URL + "https://github.com/hunter-packages/czmq/archive/v4.0.0-p0.tar.gz" + SHA1 + fa611741b65f0cb26fd9e1900421791b9c311dd6 +) + +hunter_add_version( + PACKAGE_NAME + czmq + VERSION + "3.0.2-p0" + URL + "https://github.com/hunter-packages/czmq/archive/v3.0.2-p0.tar.gz" + SHA1 + 94c1f2f080a9c9d02b71ba3a57c34a5bd2c74a8c +) + +hunter_add_version( + PACKAGE_NAME + czmq + VERSION + "3.0.1-p0" + URL + "https://github.com/hunter-packages/czmq/archive/v3.0.1-p0.tar.gz" + SHA1 + 571d3241e53e6c6282ac068ef169fe94166318b6 +) + +hunter_add_version( + PACKAGE_NAME + czmq + VERSION + "3.0.0-p0" + URL + "https://github.com/hunter-packages/czmq/archive/v3.0.0-p0.tar.gz" + SHA1 + b5dce40c8239ad1d6dbf87fb96ac3123f1c392d8 +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(czmq) +hunter_download(PACKAGE_NAME czmq) diff --git a/examples/czmq/CMakeLists.txt b/examples/czmq/CMakeLists.txt new file mode 100644 index 0000000000..2ecddedbc6 --- /dev/null +++ b/examples/czmq/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required (VERSION 3.2) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("${CMAKE_CURRENT_SOURCE_DIR}/../common.cmake") + +project(download-czmq) + +#set(THREADS_PREFER_PTHREAD_FLAG ON) + +hunter_add_package(czmq) +find_package(czmq REQUIRED CONFIG) + +add_executable(main main.cpp) +target_link_libraries(main czmq::czmq) diff --git a/examples/czmq/main.cpp b/examples/czmq/main.cpp new file mode 100644 index 0000000000..fd6afa5c6d --- /dev/null +++ b/examples/czmq/main.cpp @@ -0,0 +1,17 @@ +#include + + +int main() +{ + zsock_t *push = zsock_new_push ("inproc://example"); + zsock_t *pull = zsock_new_pull ("inproc://example"); + zstr_send (push, "Hello, World"); + + char *string = zstr_recv (pull); + puts (string); + zstr_free (&string); + + zsock_destroy (&pull); + zsock_destroy (&push); + return 0; +} From 3086af3f418d2e1c34649dbf108d5d985126da89 Mon Sep 17 00:00:00 2001 From: TungstenCrucible Date: Wed, 24 May 2017 16:11:14 +0200 Subject: [PATCH 146/612] removed server cache restriction of meta files now it is possible to use also nexus as cache server, not only github --- .../hunter_download_cache_meta_file.cmake | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/cmake/modules/hunter_download_cache_meta_file.cmake b/cmake/modules/hunter_download_cache_meta_file.cmake index df9fc22175..a0384915bb 100644 --- a/cmake/modules/hunter_download_cache_meta_file.cmake +++ b/cmake/modules/hunter_download_cache_meta_file.cmake @@ -65,20 +65,21 @@ function(hunter_download_cache_meta_file) foreach(server ${HUNTER_CACHE_SERVERS}) string(REGEX MATCH "^https://github.com/" is_github "${server}") if(NOT is_github) - hunter_user_error("Unknown cache server: ${server}") + set(local_url "${server}/meta/${local_suffix}") + set(done_url "${server}/meta/${done_suffix}") + else() + string( + REPLACE + "https://github.com/" + "https://raw.githubusercontent.com/" + url + "${server}" + ) + + set(local_url "${url}/master/${local_suffix}") + set(done_url "${url}/master/${done_suffix}") endif() - string( - REPLACE - "https://github.com/" - "https://raw.githubusercontent.com/" - url - "${server}" - ) - - set(local_url "${url}/master/${local_suffix}") - set(done_url "${url}/master/${done_suffix}") - hunter_status_debug("Downloading file (try #${x} of ${total_retry}):") hunter_status_debug(" ${done_url}") hunter_status_debug(" -> ${x_DONE}") From e9b7afa54fd2d310d4bff3ce4e5d60fc5be17b6b Mon Sep 17 00:00:00 2001 From: TungstenCrucible Date: Wed, 24 May 2017 16:15:42 +0200 Subject: [PATCH 147/612] removed server cache restriction of raw files now it is possible to use also nexus as cache server, not only github --- cmake/modules/hunter_download_cache_raw_file.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/modules/hunter_download_cache_raw_file.cmake b/cmake/modules/hunter_download_cache_raw_file.cmake index 1adb782015..307cc47ed3 100644 --- a/cmake/modules/hunter_download_cache_raw_file.cmake +++ b/cmake/modules/hunter_download_cache_raw_file.cmake @@ -71,11 +71,11 @@ function(hunter_download_cache_raw_file) foreach(server ${HUNTER_CACHE_SERVERS}) string(REGEX MATCH "^https://github.com/" is_github "${server}") if(NOT is_github) - hunter_user_error("Unknown cache server: ${server}") + set(url "${server}/raw/${suffix}") + else() + set(url "${server}/releases/download/cache/${suffix}") endif() - set(url "${server}/releases/download/cache/${suffix}") - hunter_status_debug("Downloading file (try #${x} of ${total_retry}):") hunter_status_debug(" ${url}") hunter_status_debug(" -> ${x_LOCAL}") From ff2385eab00e88d14cba1ab950b26ac4ac17d29d Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 26 May 2017 15:41:08 +0300 Subject: [PATCH 148/612] Flush cache: OpenCV patterns [skip ci] --- cmake/modules/hunter_flush_cache_variables.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmake/modules/hunter_flush_cache_variables.cmake b/cmake/modules/hunter_flush_cache_variables.cmake index ed7d8411ef..99556edb34 100644 --- a/cmake/modules/hunter_flush_cache_variables.cmake +++ b/cmake/modules/hunter_flush_cache_variables.cmake @@ -39,6 +39,16 @@ function(hunter_flush_cache_variables hunter_self) endif() # } + # From OpenCV Android { + if(x MATCHES "^OpenCV_3RDPARTY_LIB_DIR_(OPT|DBG)$") + set(cleanup TRUE) + endif() + + if(x MATCHES "^OpenCV_CONFIG_PATH$") + set(cleanup TRUE) + endif() + # } + # Exclude standard variables { set( std_variables_list From 7d83a1159c2bb72b7ffd3c5307e5838a5b25588a Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 26 May 2017 15:45:19 +0300 Subject: [PATCH 149/612] OpenSSL: 1.0.2l, 1.1.0f --- cmake/configs/default.cmake | 4 ++-- cmake/projects/OpenSSL/hunter.cmake | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 4e30cfc27f..229a702264 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -87,9 +87,9 @@ hunter_config(OpenNMTTokenizer VERSION 0.2.0-p0) if(MSVC OR ANDROID) # FIXME: https://travis-ci.org/ingenue/hunter/jobs/215460184 # FIXME: https://ci.appveyor.com/project/ingenue/hunter/build/1.0.1470 - hunter_config(OpenSSL VERSION 1.0.2k) + hunter_config(OpenSSL VERSION 1.0.2l) else() - hunter_config(OpenSSL VERSION 1.1.0e) + hunter_config(OpenSSL VERSION 1.1.0f) endif() hunter_config(PNG VERSION 1.6.26-p1) hunter_config(PocoCpp VERSION 1.7.6-p0) diff --git a/cmake/projects/OpenSSL/hunter.cmake b/cmake/projects/OpenSSL/hunter.cmake index 7856251ac3..9f64f330f2 100755 --- a/cmake/projects/OpenSSL/hunter.cmake +++ b/cmake/projects/OpenSSL/hunter.cmake @@ -52,6 +52,28 @@ hunter_add_version( 14eaed8edc7e48fe1f01924fa4561c1865c9c8ac ) +hunter_add_version( + PACKAGE_NAME + OpenSSL + VERSION + "1.1.0f" + URL + "https://github.com/openssl/openssl/archive/OpenSSL_1_1_0f.tar.gz" + SHA1 + 8fd0ba4c9bb98a1d380689704b132fe20c000a19 +) + +hunter_add_version( + PACKAGE_NAME + OpenSSL + VERSION + "1.0.2l" + URL + "https://github.com/openssl/openssl/archive/OpenSSL_1_0_2l.tar.gz" + SHA1 + 5bea0957b371627e8ebbee5bef221519e94d547c +) + hunter_add_version( PACKAGE_NAME OpenSSL From ab8feb0d416ff0cba84eaf98f2cf070a277a8b6e Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 28 May 2017 17:21:13 +0300 Subject: [PATCH 150/612] Cellar system --- cmake/modules/hunter_load_from_cache.cmake | 5 +- ...unter_patch_unrelocatable_text_files.cmake | 5 + cmake/modules/hunter_save_to_cache.cmake | 6 +- cmake/modules/hunter_unpack_directory.cmake | 174 +++++++++++++++--- 4 files changed, 154 insertions(+), 36 deletions(-) diff --git a/cmake/modules/hunter_load_from_cache.cmake b/cmake/modules/hunter_load_from_cache.cmake index c35cfca39a..eae1d4b932 100644 --- a/cmake/modules/hunter_load_from_cache.cmake +++ b/cmake/modules/hunter_load_from_cache.cmake @@ -203,10 +203,7 @@ function(hunter_load_from_cache) FROMSERVER "${from_server_file}" ) - if(NOT EXISTS "${archive_file}") - hunter_internal_error("archive file not found: ${archive_file}") - endif() - hunter_unpack_directory("${archive_file}" "${HUNTER_INSTALL_PREFIX}") + hunter_unpack_directory(${cache_sha1}) hunter_patch_unrelocatable_text_files( FROM "__HUNTER_PACKAGE_INSTALL_PREFIX__" diff --git a/cmake/modules/hunter_patch_unrelocatable_text_files.cmake b/cmake/modules/hunter_patch_unrelocatable_text_files.cmake index 84e853487b..20f50dbde8 100644 --- a/cmake/modules/hunter_patch_unrelocatable_text_files.cmake +++ b/cmake/modules/hunter_patch_unrelocatable_text_files.cmake @@ -42,6 +42,11 @@ function(hunter_patch_unrelocatable_text_files) string(REPLACE "${x_FROM}" "${x_TO}" line "${line}") set(output_content "${output_content}\n${line}") endforeach() + + # if file is a link we should remove it first, otherwise we will + # update original file too + file(REMOVE "${text_full_path}") + file(WRITE "${text_full_path}" "${output_content}\n") endforeach() endfunction() diff --git a/cmake/modules/hunter_save_to_cache.cmake b/cmake/modules/hunter_save_to_cache.cmake index 556418d765..fb6572bb87 100644 --- a/cmake/modules/hunter_save_to_cache.cmake +++ b/cmake/modules/hunter_save_to_cache.cmake @@ -98,13 +98,9 @@ function(hunter_save_to_cache) ) hunter_test_string_not_empty("${archive_sha1}") - set(archive_file "${cache_directory}/raw/${archive_sha1}.tar.bz2") - if(NOT EXISTS "${archive_file}") - hunter_internal_error("Archive not exists: ${archive_file}") - endif() ### Install to global directory from cache archive - hunter_unpack_directory("${archive_file}" "${HUNTER_INSTALL_PREFIX}") + hunter_unpack_directory(${archive_sha1}) hunter_patch_unrelocatable_text_files( FROM "__HUNTER_PACKAGE_INSTALL_PREFIX__" diff --git a/cmake/modules/hunter_unpack_directory.cmake b/cmake/modules/hunter_unpack_directory.cmake index c49af2fd87..0fe97e993f 100644 --- a/cmake/modules/hunter_unpack_directory.cmake +++ b/cmake/modules/hunter_unpack_directory.cmake @@ -1,45 +1,165 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. include(hunter_internal_error) include(hunter_print_cmd) include(hunter_status_debug) +include(hunter_test_string_not_empty) -function(hunter_unpack_directory archive dest_dir) - file(MAKE_DIRECTORY "${dest_dir}") +function(hunter_unpack_directory cache_sha1) + hunter_test_string_not_empty("${HUNTER_CACHED_ROOT}") + hunter_test_string_not_empty("${HUNTER_INSTALL_PREFIX}") + hunter_test_string_not_empty("${cache_sha1}") - set(cmd "${CMAKE_COMMAND}" "-E" "tar") - if(HUNTER_STATUS_DEBUG) - list(APPEND cmd "xvf") + if(CMAKE_HOST_UNIX) + set(use_link_script TRUE) else() - list(APPEND cmd "xf") + set(use_link_script FALSE) endif() - list(APPEND cmd "${archive}") - if(HUNTER_STATUS_DEBUG) - set(logging_params "") - elseif(HUNTER_STATUS_PRINT) - set(logging_params "") - else() - set(logging_params "OUTPUT_QUIET") + set(cache_directory "${HUNTER_CACHED_ROOT}/_Base/Cache") + set(cellar_directory "${HUNTER_CACHED_ROOT}/_Base/Cellar") + + hunter_make_directory( + "${cellar_directory}/${cache_sha1}" + "${cache_sha1}" + cellar_directory + ) + + set(unpack_stamp "${cellar_directory}/unpack.DONE") + set(cellar_raw_directory "${cellar_directory}/raw") + file(MAKE_DIRECTORY "${cellar_raw_directory}") + + set(list_of_directories "${cellar_directory}/directories.list") + set(list_of_files "${cellar_directory}/files.list") + set(link_script "${cellar_directory}/link-all.sh") + set(shell "/bin/bash") + + set(archive_file "${cache_directory}/raw/${cache_sha1}.tar.bz2") + if(NOT EXISTS "${archive_file}") + hunter_internal_error("archive file not found: ${archive_file}") endif() - hunter_status_debug("Unpacking:") - hunter_status_debug(" ${archive}") - hunter_status_debug(" -> ${dest_dir}") + if(NOT EXISTS "${unpack_stamp}") + hunter_lock_directory("${cellar_directory}" "") + endif() - hunter_print_cmd("${dest_dir}" "${cmd}") + # While waiting for lock other instance can do all the job + if(NOT EXISTS "${unpack_stamp}") + set(cmd "${CMAKE_COMMAND}" "-E" "tar") + if(HUNTER_STATUS_DEBUG) + list(APPEND cmd "xvf") + else() + list(APPEND cmd "xf") + endif() + list(APPEND cmd "${archive_file}") - execute_process( - COMMAND ${cmd} - WORKING_DIRECTORY "${dest_dir}" - RESULT_VARIABLE unpacking_result - ${logging_params} - ) + if(HUNTER_STATUS_DEBUG) + set(logging_params "") + elseif(HUNTER_STATUS_PRINT) + set(logging_params "") + else() + set(logging_params "OUTPUT_QUIET") + endif() + + hunter_status_debug("Unpacking to cellar:") + hunter_status_debug(" ${archive_file}") + hunter_status_debug(" -> ${cellar_raw_directory}") + + hunter_print_cmd("${cellar_raw_directory}" "${cmd}") + + execute_process( + COMMAND ${cmd} + WORKING_DIRECTORY "${cellar_raw_directory}" + RESULT_VARIABLE unpacking_result + ${logging_params} + ) + + if(unpacking_result EQUAL 0) + hunter_status_debug("Unpacked successfully") + else() + hunter_internal_error("Unpack failed") + endif() + + hunter_status_debug("Creating list of files and directories") + file( + GLOB_RECURSE + all + LIST_DIRECTORIES true + RELATIVE "${cellar_raw_directory}" + "${cellar_raw_directory}/*" + ) + + set(files "") + set(directories "") + foreach(x ${all}) + if(IS_DIRECTORY "${cellar_raw_directory}/${x}") + list(APPEND directories "${x}") + else() + list(APPEND files "${x}") + endif() + endforeach() + + # Create link script { + file(WRITE "${link_script}" "#!${shell}\n") + file(APPEND "${link_script}" "\n") + file( + APPEND + "${link_script}" + "export \"HUNTER_CELLAR_RAW_DIRECTORY=${cellar_raw_directory}\"\n\n" + ) + foreach(x ${files}) + file( + APPEND + "${link_script}" + "ln \\\n \"\${HUNTER_CELLAR_RAW_DIRECTORY}/${x}\" \\\n \"\$1/${x}\"\n\n" + ) + endforeach() + # } + + string(REPLACE ";" "\n" files "${files}") + string(REPLACE ";" "\n" directories "${directories}") + + file(WRITE "${list_of_files}" "${files}\n") + file(WRITE "${list_of_directories}" "${directories}\n") + + file(WRITE "${unpack_stamp}" "") + endif() + + hunter_status_debug("Creating directories") + file(STRINGS "${list_of_directories}" directories) + foreach(x ${directories}) + file(MAKE_DIRECTORY "${HUNTER_INSTALL_PREFIX}/${x}") + endforeach() + + hunter_status_debug("Removing old files") + file(STRINGS "${list_of_files}" files) + foreach(x ${files}) + file(REMOVE "${HUNTER_INSTALL_PREFIX}/${x}") + endforeach() + + if(use_link_script) + hunter_status_debug("Linking files") + if(NOT EXISTS "${shell}") + hunter_internal_error("File not found: '${shell}'") + endif() + set(cmd "${shell}" "${link_script}" "${HUNTER_INSTALL_PREFIX}") + hunter_print_cmd("${cellar_directory}" "${cmd}") + execute_process( + COMMAND ${cmd} + WORKING_DIRECTORY "${cellar_directory}" + RESULT_VARIABLE result + ) - if(unpacking_result EQUAL 0) - hunter_status_debug("Unpacked successfully") + if(NOT result EQUAL 0) + hunter_internal_error("Link script failed") + endif() else() - hunter_internal_error("Unpack failed") + hunter_status_debug("Copying files") + foreach(x ${files}) + set(full_dst_path "${HUNTER_INSTALL_PREFIX}/${x}") + get_filename_component(dst_dir "${full_dst_path}" DIRECTORY) + file(COPY "${cellar_raw_directory}/${x}" DESTINATION "${dst_dir}") + endforeach() endif() endfunction() From 71c56d28e5f4adb8892bc05304b309238a35bef0 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 28 May 2017 20:08:04 +0300 Subject: [PATCH 151/612] Update copyrights --- cmake/modules/hunter_download.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/modules/hunter_download.cmake b/cmake/modules/hunter_download.cmake index e172ad1c4c..a40391dc14 100644 --- a/cmake/modules/hunter_download.cmake +++ b/cmake/modules/hunter_download.cmake @@ -1,4 +1,5 @@ -# Copyright (c) 2013-2015, Ruslan Baratov, Aaditya Kalsi +# Copyright (c) 2013-2017, Ruslan Baratov +# Copyright (c) 2015, Aaditya Kalsi # All rights reserved. include(CMakeParseArguments) # cmake_parse_arguments From 70017ce35d20e305ba88bc0a3ab73b31fd6ef487 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 28 May 2017 21:00:52 +0300 Subject: [PATCH 152/612] New layout for scheme 'unpack' --- cmake/modules/hunter_download.cmake | 49 +++++++++++++++++++----- cmake/modules/hunter_find_licenses.cmake | 25 ++++++++---- 2 files changed, 58 insertions(+), 16 deletions(-) diff --git a/cmake/modules/hunter_download.cmake b/cmake/modules/hunter_download.cmake index a40391dc14..c2d97c19dc 100644 --- a/cmake/modules/hunter_download.cmake +++ b/cmake/modules/hunter_download.cmake @@ -158,7 +158,6 @@ function(hunter_download) "${HUNTER_PACKAGE_HOME_DIR}/__${HUNTER_PACKAGE_COMPONENT}" ) endif() - set(HUNTER_PACKAGE_DONE_STAMP "${HUNTER_PACKAGE_HOME_DIR}/DONE") if(hunter_has_binary_dir) set( HUNTER_PACKAGE_BUILD_DIR @@ -173,7 +172,6 @@ function(hunter_download) else() set(HUNTER_PACKAGE_BUILD_DIR "${HUNTER_PACKAGE_HOME_DIR}/Build") endif() - set(HUNTER_PACKAGE_SOURCE_DIR "${HUNTER_PACKAGE_HOME_DIR}/Source") if(HUNTER_PACKAGE_CACHEABLE) if(NOT HUNTER_PACKAGE_SCHEME_INSTALL) @@ -184,6 +182,25 @@ function(hunter_download) set(HUNTER_PACKAGE_INSTALL_PREFIX "${HUNTER_INSTALL_PREFIX}") endif() + if(HUNTER_PACKAGE_SCHEME_UNPACK) + string(SUBSTRING "${HUNTER_PACKAGE_SHA1}" 0 7 x) + set(hunter_lock_sources TRUE) + set( + hunter_lock_sources_dir + "${HUNTER_CACHED_ROOT}/_Base/Cellar/${HUNTER_PACKAGE_SHA1}/${x}" + ) + set(HUNTER_PACKAGE_SOURCE_DIR "${hunter_lock_sources_dir}/raw") + set(HUNTER_PACKAGE_DONE_STAMP "${hunter_lock_sources_dir}/unpack.DONE") + set(HUNTER_PACKAGE_LICENSE_DIR "${hunter_lock_sources_dir}/licenses") + set(HUNTER_PACKAGE_LICENSE_SEARCH_DIR "${HUNTER_PACKAGE_LICENSE_DIR}") + else() + set(hunter_lock_sources FALSE) + set(HUNTER_PACKAGE_SOURCE_DIR "${HUNTER_PACKAGE_HOME_DIR}/Source") + set(HUNTER_PACKAGE_DONE_STAMP "${HUNTER_PACKAGE_HOME_DIR}/DONE") + set(HUNTER_PACKAGE_LICENSE_DIR "${HUNTER_PACKAGE_INSTALL_PREFIX}/licenses/${HUNTER_PACKAGE_NAME}") + set(HUNTER_PACKAGE_LICENSE_SEARCH_DIR "${HUNTER_INSTALL_PREFIX}/licenses/${HUNTER_PACKAGE_NAME}") + endif() + if(HUNTER_PACKAGE_SCHEME_INSTALL) set(${root_name} "${HUNTER_INSTALL_PREFIX}") hunter_status_debug("Install to: ${HUNTER_INSTALL_PREFIX}") @@ -208,9 +225,6 @@ function(hunter_download) endif() endif() - # license file variable - set(HUNTER_PACKAGE_LICENSE_DIR "${HUNTER_PACKAGE_INSTALL_PREFIX}/licenses/${HUNTER_PACKAGE_NAME}") - set(${root_name} "${${root_name}}" PARENT_SCOPE) set(ENV{${root_name}} "${${root_name}}") hunter_status_print("${root_name}: ${${root_name}} (ver.: ${ver})") @@ -247,8 +261,11 @@ function(hunter_download) endif() # In: - # * HUNTER_INSTALL_PREFIX + # * HUNTER_PACKAGE_HOME_DIR + # * HUNTER_PACKAGE_LICENSE_SEARCH_DIR # * HUNTER_PACKAGE_NAME + # * HUNTER_PACKAGE_SCHEME_UNPACK + # * HUNTER_PACKAGE_SHA1 # Out: # * ${HUNTER_PACKAGE_NAME}_LICENSES (parent scope) hunter_find_licenses() @@ -267,6 +284,11 @@ function(hunter_download) "${HUNTER_BINARY_DIR}" HUNTER_ALREADY_LOCKED_DIRECTORIES ) endif() + if(hunter_lock_sources) + hunter_lock_directory( + "${hunter_lock_sources_dir}" HUNTER_ALREADY_LOCKED_DIRECTORIES + ) + endif() # While locking other instance can finish package building if(EXISTS "${HUNTER_PACKAGE_DONE_STAMP}") @@ -276,8 +298,11 @@ function(hunter_download) endif() # In: - # * HUNTER_INSTALL_PREFIX + # * HUNTER_PACKAGE_HOME_DIR + # * HUNTER_PACKAGE_LICENSE_SEARCH_DIR # * HUNTER_PACKAGE_NAME + # * HUNTER_PACKAGE_SCHEME_UNPACK + # * HUNTER_PACKAGE_SHA1 # Out: # * ${HUNTER_PACKAGE_NAME}_LICENSES (parent scope) hunter_find_licenses() @@ -307,8 +332,11 @@ function(hunter_download) endif() # In: - # * HUNTER_INSTALL_PREFIX + # * HUNTER_PACKAGE_HOME_DIR + # * HUNTER_PACKAGE_LICENSE_SEARCH_DIR # * HUNTER_PACKAGE_NAME + # * HUNTER_PACKAGE_SCHEME_UNPACK + # * HUNTER_PACKAGE_SHA1 # Out: # * ${HUNTER_PACKAGE_NAME}_LICENSES (parent scope) hunter_find_licenses() @@ -599,8 +627,11 @@ function(hunter_download) file(WRITE "${HUNTER_PACKAGE_DONE_STAMP}" "") # In: - # * HUNTER_INSTALL_PREFIX + # * HUNTER_PACKAGE_HOME_DIR + # * HUNTER_PACKAGE_LICENSE_SEARCH_DIR # * HUNTER_PACKAGE_NAME + # * HUNTER_PACKAGE_SCHEME_UNPACK + # * HUNTER_PACKAGE_SHA1 # Out: # * ${HUNTER_PACKAGE_NAME}_LICENSES (parent scope) hunter_find_licenses() diff --git a/cmake/modules/hunter_find_licenses.cmake b/cmake/modules/hunter_find_licenses.cmake index bfbd5f4d50..c2d5d40af8 100644 --- a/cmake/modules/hunter_find_licenses.cmake +++ b/cmake/modules/hunter_find_licenses.cmake @@ -8,19 +8,30 @@ include(hunter_test_string_not_empty) # We must use macro to set variable to parent scope of the caller. # # In: -# * HUNTER_INSTALL_PREFIX +# * HUNTER_PACKAGE_HOME_DIR +# * HUNTER_PACKAGE_LICENSE_SEARCH_DIR # * HUNTER_PACKAGE_NAME +# * HUNTER_PACKAGE_SCHEME_UNPACK +# * HUNTER_PACKAGE_SHA1 # Out: # * ${HUNTER_PACKAGE_NAME}_LICENSES (parent scope) macro(hunter_find_licenses) - hunter_test_string_not_empty("${HUNTER_INSTALL_PREFIX}") + hunter_test_string_not_empty("${HUNTER_PACKAGE_LICENSE_SEARCH_DIR}") hunter_test_string_not_empty("${HUNTER_PACKAGE_NAME}") - file( - GLOB - _licenses - "${HUNTER_INSTALL_PREFIX}/licenses/${HUNTER_PACKAGE_NAME}/*" - ) + file(GLOB _licenses "${HUNTER_PACKAGE_LICENSE_SEARCH_DIR}/*") set("${HUNTER_PACKAGE_NAME}_LICENSES" "${_licenses}" PARENT_SCOPE) + + # HACK (to refactor) { + if(HUNTER_PACKAGE_SCHEME_UNPACK) + hunter_test_string_not_empty("${HUNTER_PACKAGE_HOME_DIR}") + hunter_test_string_not_empty("${HUNTER_PACKAGE_SHA1}") + file( + WRITE + "${HUNTER_PACKAGE_HOME_DIR}/cache.sha1" + "${HUNTER_PACKAGE_SHA1}" + ) + endif() + # } endmacro() From 246ee9740c3f910104844df211e9eb596616111d Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 28 May 2017 23:10:28 +0300 Subject: [PATCH 153/612] Docs: update layout --- docs/reference/layouts/deployed.rst | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/docs/reference/layouts/deployed.rst b/docs/reference/layouts/deployed.rst index 682c3b142f..f5aaf57f53 100644 --- a/docs/reference/layouts/deployed.rst +++ b/docs/reference/layouts/deployed.rst @@ -1,4 +1,4 @@ -.. Copyright (c) 2016, Ruslan Baratov +.. Copyright (c) 2016-2017, Ruslan Baratov .. All rights reserved. Deployed @@ -61,7 +61,7 @@ is to allow Hunter to be deployed inside for development. .. code-block:: none - :emphasize-lines: 2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50 + :emphasize-lines: 2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54 _Base/ ├── / @@ -113,6 +113,7 @@ for development. │ ├── Install/ │ └── Dependencies/ ├── Download/ # see below + ├── Cellar/ # see below └── Cache/ # see below Download @@ -146,6 +147,7 @@ Hunter code). ├── Build/ └── Unpacked/ # Unpacked Hunter archive (HUNTER_SELF) + Cache ===== @@ -199,3 +201,25 @@ arguments, dependencies, etc.). ├─ deps.info # list of all dependencies and corresponding SHA1 of cache archive ├─ CACHE.DONE # stamp: deps.info and cache.sha1 created and ready to be used └─ from.server # info downloaded from server, no need to upload this entry + +Cellar +====== + +Cellar directory consists of unpacked raw cache archives and source archives of +``url_sha1_unpack`` packages: + +.. code-block:: none + :emphasize-lines: 2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42 + + Cellar/ + └─ / # SHA1 of unpacked archive + └─ / # first 7 digits of SHA1 + ├─ cmake.lock + ├─ SHA1 + ├─ DONE + ├─ unpack.DONE # stamp: unpack operation finished + ├─ directories.list # list of unpacked directories + ├─ files.list # list of unpacked files + ├─ link-all.sh # link script + ├─ licenses/ + └─ raw/ # directory with unpacked files From f5b8d8fd548d8e0f350ef74e02d6a9ad047fd5bf Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 29 May 2017 05:25:24 +0300 Subject: [PATCH 154/612] Update 'hunter_unpack_directory' unit test --- tests/hunter_unpack_directory/CMakeLists.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/hunter_unpack_directory/CMakeLists.txt b/tests/hunter_unpack_directory/CMakeLists.txt index 09e83bbbba..503177b211 100644 --- a/tests/hunter_unpack_directory/CMakeLists.txt +++ b/tests/hunter_unpack_directory/CMakeLists.txt @@ -10,22 +10,24 @@ include(hunter_pack_directory) include(hunter_unpack_directory) set(temp "${CMAKE_CURRENT_BINARY_DIR}/temp") +set(HUNTER_CACHED_ROOT "${temp}/root") +set(HUNTER_INSTALL_PREFIX "${temp}/install") set(dir_to_pack "${temp}/topack") -set(dir_to_unpack "${temp}/tounpack") file(WRITE "${dir_to_pack}/1.txt" "hello") file(WRITE "${dir_to_pack}/B/2.txt" "boo") file(WRITE "${dir_to_pack}/B/C/3.txt" "foo") -set(dest_dir "${temp}/dest") +set(dest_dir "${HUNTER_CACHED_ROOT}/_Base/Cache/raw") hunter_pack_directory("${dir_to_pack}" "${dest_dir}" result_sha1) -hunter_unpack_directory("${dest_dir}/${result_sha1}.tar.bz2" "${dir_to_unpack}") -set(expected_1 "${dir_to_unpack}/1.txt") -set(expected_2 "${dir_to_unpack}/B/2.txt") -set(expected_3 "${dir_to_unpack}/B/C/3.txt") +hunter_unpack_directory(${result_sha1}) + +set(expected_1 "${HUNTER_INSTALL_PREFIX}/1.txt") +set(expected_2 "${HUNTER_INSTALL_PREFIX}/B/2.txt") +set(expected_3 "${HUNTER_INSTALL_PREFIX}/B/C/3.txt") if(NOT EXISTS "${expected_1}") message(FATAL_ERROR "Not found: ${expected_1}") From c8f92f5e2bf3a024af7b416ff43f6e538638d0f5 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 29 May 2017 06:48:46 +0300 Subject: [PATCH 155/612] OpenSSL: add comments from wiki [skip ci] --- cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in b/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in index 8824b68488..9dab730282 100644 --- a/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in +++ b/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in @@ -49,6 +49,11 @@ if(ANDROID) else() hunter_user_error("Could not find android architecture. Please set ANDROID_ARCH_NAME in your toolchain or use CMake 3.7+") endif() + + # Building OpenSSL with Android: + # * https://wiki.openssl.org/index.php/Android#Build_the_OpenSSL_Library + # Set environment variables similar to 'setenv-android.sh' script: + # * https://wiki.openssl.org/index.php/Android#Adjust_the_Cross-Compile_Script set(configure_command # Ignored. Prevents script from checking host uname RELEASE=2.6.37 @@ -58,7 +63,7 @@ if(ANDROID) endif() # Pass C compiler through -set(configure_command +set(configure_command MACHINE=${CMAKE_SYSTEM_PROCESSOR} CC=${CMAKE_C_COMPILER} ${configure_command}) From be9085e9eea10dbb05f609d785fae3be0337a95a Mon Sep 17 00:00:00 2001 From: TungstenCrucible Date: Mon, 29 May 2017 12:59:25 +0200 Subject: [PATCH 156/612] added user guide how to use hunter with nexus added document which is explaining how to install, configure and manage Nexus Repository manager, which can be used as a cache server for Hunter --- .../hunter-user/nexus-cache-server.rst | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 docs/user-guides/hunter-user/nexus-cache-server.rst diff --git a/docs/user-guides/hunter-user/nexus-cache-server.rst b/docs/user-guides/hunter-user/nexus-cache-server.rst new file mode 100644 index 0000000000..ca97e66493 --- /dev/null +++ b/docs/user-guides/hunter-user/nexus-cache-server.rst @@ -0,0 +1,50 @@ +Using Nexus Repository manager as binary cache server +------------------------------ + +Hunter allows to upload binary cache to any server. If you want to use `github `__ +as a cache server, then you can execute `python script `__ +which is uploading cache binaries to `github `__ +directly. As an alternative you can also use ``Nexus Repository Manager``. + +Nexus installation +================================= + +In order to install and configure Nexus Repository Manager, please follow official Sonartype `documentation. `__ +There is also possibility do download ``docker images`` with preinstalled Nexus Repository Manager: + +* Nexus Repository Manager 2: https://github.com/sonatype/docker-nexus + +* Nexus Repository Manager 3: https://github.com/sonatype/docker-nexus3 + +Nexus adding, configuring and managing repositories +================================= + +To create new or manage existing repository follow this links: + +* Adding a new repository: https://books.sonatype.com/nexus-book/reference/config-sect-new-repo.html + +* Managing repositories: https://books.sonatype.com/nexus-book/reference/confignx-sect-manage-repo.html + +* Configuring repositories: https://books.sonatype.com/nexus-book/reference/confignx-sect-manage-repo.html#_configuring_repositories + +Uploading cache binaries to Nexus +================================= + +The simplest way to upload local cache binaries to Nexus server is by using ``curl``: + +.. code-block:: bash + + $ cd hunter/_Base/Cache/meta + $ CACHE_REPOSITORY_URL="http://my.nexus.server.com/content/repositories/hunter/cache" + $ find ./ -type f -exec curl -u nexuser:nexpwd --upload-file "{}" "$CACHE_REPOSITORY_URL/meta/{}" + $ cd ../raw + $ find ./ -type f -exec curl -u nexuser:nexpwd --upload-file "{}" "$CACHE_REPOSITORY_URL/raw/{}" + +Configuring Hunter to use Nexus +================================= + +To configure ``Hunter`` to use ``Nexus`` server, you must perform the following step: + +.. code-block:: cmake + + list(APPEND HUNTER_CACHE_SERVERS "http://my.nexus.server.com/content/repositories/hunter/cache") From ea62e634c8a70226420b1c340724a4feebca9145 Mon Sep 17 00:00:00 2001 From: TungstenCrucible Date: Mon, 29 May 2017 13:39:31 +0200 Subject: [PATCH 157/612] fixed title underline problems fixed WARNING: Title underline too short. --- docs/user-guides/hunter-user/nexus-cache-server.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/user-guides/hunter-user/nexus-cache-server.rst b/docs/user-guides/hunter-user/nexus-cache-server.rst index ca97e66493..17a39fe85f 100644 --- a/docs/user-guides/hunter-user/nexus-cache-server.rst +++ b/docs/user-guides/hunter-user/nexus-cache-server.rst @@ -1,5 +1,5 @@ Using Nexus Repository manager as binary cache server ------------------------------- +----------------------------------------------------- Hunter allows to upload binary cache to any server. If you want to use `github `__ as a cache server, then you can execute `python script `__ @@ -7,7 +7,7 @@ which is uploading cache binaries to `github `__ directly. As an alternative you can also use ``Nexus Repository Manager``. Nexus installation -================================= +================== In order to install and configure Nexus Repository Manager, please follow official Sonartype `documentation. `__ There is also possibility do download ``docker images`` with preinstalled Nexus Repository Manager: @@ -17,7 +17,7 @@ There is also possibility do download ``docker images`` with preinstalled Nexus * Nexus Repository Manager 3: https://github.com/sonatype/docker-nexus3 Nexus adding, configuring and managing repositories -================================= +=================================================== To create new or manage existing repository follow this links: @@ -41,7 +41,7 @@ The simplest way to upload local cache binaries to Nexus server is by using ``cu $ find ./ -type f -exec curl -u nexuser:nexpwd --upload-file "{}" "$CACHE_REPOSITORY_URL/raw/{}" Configuring Hunter to use Nexus -================================= +=============================== To configure ``Hunter`` to use ``Nexus`` server, you must perform the following step: From 096f1f6665c223c9b5e34d01c66bd91788372b5f Mon Sep 17 00:00:00 2001 From: TungstenCrucible Date: Mon, 29 May 2017 14:09:10 +0200 Subject: [PATCH 158/612] updated toctree of hunter-user guide --- docs/user-guides/hunter-user.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/user-guides/hunter-user.rst b/docs/user-guides/hunter-user.rst index c278af0513..502b56b9bc 100644 --- a/docs/user-guides/hunter-user.rst +++ b/docs/user-guides/hunter-user.rst @@ -8,6 +8,7 @@ Hunter user :maxdepth: 1 /user-guides/hunter-user/git-submodule + /user-guides/hunter-user/nexus-cache-server TODO ==== From 72a00810addb150833762803a5f95b293cb5454e Mon Sep 17 00:00:00 2001 From: TungstenCrucible Date: Mon, 29 May 2017 15:29:20 +0200 Subject: [PATCH 159/612] fixed spelling issues --- docs/user-guides/hunter-user/nexus-cache-server.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/user-guides/hunter-user/nexus-cache-server.rst b/docs/user-guides/hunter-user/nexus-cache-server.rst index 17a39fe85f..9e0964ff10 100644 --- a/docs/user-guides/hunter-user/nexus-cache-server.rst +++ b/docs/user-guides/hunter-user/nexus-cache-server.rst @@ -9,8 +9,8 @@ directly. As an alternative you can also use ``Nexus Repository Manager``. Nexus installation ================== -In order to install and configure Nexus Repository Manager, please follow official Sonartype `documentation. `__ -There is also possibility do download ``docker images`` with preinstalled Nexus Repository Manager: +In order to install and configure Nexus Repository Manager, please follow official `documentation. `__ +There is also possibility do download ``docker images`` where ``Nexus Repository Manager`` is already installed: * Nexus Repository Manager 2: https://github.com/sonatype/docker-nexus From a4e16e4386b03ef0d5ba15487a786b0c6b1a721e Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 30 May 2017 13:56:23 +0300 Subject: [PATCH 160/612] Docs: few improvements of 'Using Nexus Repository ...' --- .../hunter-user/nexus-cache-server.rst | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/docs/user-guides/hunter-user/nexus-cache-server.rst b/docs/user-guides/hunter-user/nexus-cache-server.rst index 9e0964ff10..ac30237499 100644 --- a/docs/user-guides/hunter-user/nexus-cache-server.rst +++ b/docs/user-guides/hunter-user/nexus-cache-server.rst @@ -1,36 +1,41 @@ Using Nexus Repository manager as binary cache server ----------------------------------------------------- -Hunter allows to upload binary cache to any server. If you want to use `github `__ -as a cache server, then you can execute `python script `__ -which is uploading cache binaries to `github `__ +Hunter allows to upload binary cache to any server. If you want to use `GitHub `__ +as a cache server, then you can execute +`python script `__ +which is uploading cache binaries to `GitHub `__ directly. As an alternative you can also use ``Nexus Repository Manager``. +.. seealso:: + + :doc:`/faq/why-binaries-from-server-not-used` + Nexus installation ================== -In order to install and configure Nexus Repository Manager, please follow official `documentation. `__ -There is also possibility do download ``docker images`` where ``Nexus Repository Manager`` is already installed: - -* Nexus Repository Manager 2: https://github.com/sonatype/docker-nexus +In order to install and configure Nexus Repository Manager, please follow +official `documentation `__. +There is also possibility do download ``docker images`` where +``Nexus Repository Manager`` is already installed: -* Nexus Repository Manager 3: https://github.com/sonatype/docker-nexus3 +* `Nexus Repository Manager 2 `__ +* `Nexus Repository Manager 3 `__ Nexus adding, configuring and managing repositories =================================================== To create new or manage existing repository follow this links: -* Adding a new repository: https://books.sonatype.com/nexus-book/reference/config-sect-new-repo.html - -* Managing repositories: https://books.sonatype.com/nexus-book/reference/confignx-sect-manage-repo.html - -* Configuring repositories: https://books.sonatype.com/nexus-book/reference/confignx-sect-manage-repo.html#_configuring_repositories +* `Adding a new repository `__ +* `Managing repositories `__ +* `Configuring repositories `__ Uploading cache binaries to Nexus ================================= -The simplest way to upload local cache binaries to Nexus server is by using ``curl``: +The simplest way to upload local cache binaries to Nexus server is by using +``cURL``: .. code-block:: bash @@ -43,7 +48,8 @@ The simplest way to upload local cache binaries to Nexus server is by using ``cu Configuring Hunter to use Nexus =============================== -To configure ``Hunter`` to use ``Nexus`` server, you must perform the following step: +To configure ``Hunter`` to use ``Nexus`` server, you must perform the following +step: .. code-block:: cmake From 5a6d6b2a266a098902c83cb0ea8f42a2aa2f3c3a Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sat, 3 Jun 2017 18:23:33 +0300 Subject: [PATCH 161/612] OpenNMTTokenizer 0.2.0-p1 --- cmake/configs/default.cmake | 2 +- cmake/projects/OpenNMTTokenizer/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 229a702264..6a3fe9a4ac 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -83,7 +83,7 @@ hunter_config(OpenCL VERSION 2.1-p3) hunter_config(OpenCL-cpp VERSION 2.0.10-p0) hunter_config(OpenCV VERSION 3.2.0-p1) hunter_config(OpenCV-Extra VERSION 3.0.0) -hunter_config(OpenNMTTokenizer VERSION 0.2.0-p0) +hunter_config(OpenNMTTokenizer VERSION 0.2.0-p1) if(MSVC OR ANDROID) # FIXME: https://travis-ci.org/ingenue/hunter/jobs/215460184 # FIXME: https://ci.appveyor.com/project/ingenue/hunter/build/1.0.1470 diff --git a/cmake/projects/OpenNMTTokenizer/hunter.cmake b/cmake/projects/OpenNMTTokenizer/hunter.cmake index 64ef2eee12..a23420d3de 100644 --- a/cmake/projects/OpenNMTTokenizer/hunter.cmake +++ b/cmake/projects/OpenNMTTokenizer/hunter.cmake @@ -20,6 +20,17 @@ hunter_add_version( 8d6025d92014586c5ff5a831c13b9238e6c07da8 ) +hunter_add_version( + PACKAGE_NAME + OpenNMTTokenizer + VERSION + 0.2.0-p1 + URL + "https://github.com/hunter-packages/OpenNMT-Tokenizer/archive/v0.2.0-p1.tar.gz" + SHA1 + 33c75c6d22a79a0410b28a518b57a5b257762f1f +) + hunter_cmake_args(OpenNMTTokenizer CMAKE_ARGS LIB_ONLY=YES) hunter_pick_scheme(DEFAULT url_sha1_cmake) From a145a289adb9bd78c4c77690171c8b13ad0a7c42 Mon Sep 17 00:00:00 2001 From: Sacha Refshauge Date: Mon, 5 Jun 2017 22:16:50 +1000 Subject: [PATCH 162/612] Add dlib v19.4-p2 --- cmake/configs/default.cmake | 2 +- cmake/projects/dlib/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 6a3fe9a4ac..868bd236fa 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -130,7 +130,7 @@ hunter_config(cxxopts VERSION 1.0.0-p0) hunter_config(damageproto VERSION 1.2.1) hunter_config(dbus VERSION 1.10.0-hunter-4) hunter_config(dest VERSION 0.8.0-p4) -hunter_config(dlib VERSION 19.4-p1) +hunter_config(dlib VERSION 19.4-p2) hunter_config(doctest VERSION 1.2.0) hunter_config(dri2proto VERSION 2.8) hunter_config(dri3proto VERSION 1.0) diff --git a/cmake/projects/dlib/hunter.cmake b/cmake/projects/dlib/hunter.cmake index 56ece270b9..fac70f086e 100644 --- a/cmake/projects/dlib/hunter.cmake +++ b/cmake/projects/dlib/hunter.cmake @@ -9,6 +9,17 @@ include(hunter_cmake_args) include(hunter_download) include(hunter_pick_scheme) +hunter_add_version( + PACKAGE_NAME + dlib + VERSION + "19.4-p2" + URL + "https://github.com/hunter-packages/dlib/archive/v19.4-p2.tar.gz" + SHA1 + 119231fe068799efd0922594dc580a18ebdb3a15 +) + hunter_add_version( PACKAGE_NAME dlib From 345d81333c426bfbbdf1ed53072e805659a353af Mon Sep 17 00:00:00 2001 From: Sacha Refshauge Date: Mon, 5 Jun 2017 23:13:55 +1000 Subject: [PATCH 163/612] Workaround for three known issues in OpenSSL for Android. --- cmake/configs/default.cmake | 3 +- .../OpenSSL/schemes/url_sha1_openssl.cmake.in | 30 +++++++++++++++---- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 6a3fe9a4ac..bb9ce9c3d9 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -84,8 +84,7 @@ hunter_config(OpenCL-cpp VERSION 2.0.10-p0) hunter_config(OpenCV VERSION 3.2.0-p1) hunter_config(OpenCV-Extra VERSION 3.0.0) hunter_config(OpenNMTTokenizer VERSION 0.2.0-p1) -if(MSVC OR ANDROID) - # FIXME: https://travis-ci.org/ingenue/hunter/jobs/215460184 +if(MSVC) # FIXME: https://ci.appveyor.com/project/ingenue/hunter/build/1.0.1470 hunter_config(OpenSSL VERSION 1.0.2l) else() diff --git a/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in b/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in index 9dab730282..bc725ac2bc 100644 --- a/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in +++ b/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in @@ -31,6 +31,12 @@ hunter_test_string_not_empty("@HUNTER_GLOBAL_SCRIPT_DIR@") if(APPLE) set(configure_command "./Configure") set(configure_opts "darwin64-x86_64-cc") +elseif(ANDROID) + # Using the ./config script is currently broken with -no* CFLAGS on ALL versions + # * https://github.com/openssl/openssl/issues/3493 + # * https://github.com/openssl/openssl/blob/OpenSSL_1_1_0-stable/Configure#L560 + # * https://wiki.openssl.org/index.php/Compilation_and_Installation#Configure_.26_Config + set(configure_command "./Configure") else() set(configure_command "./config") endif() @@ -54,12 +60,24 @@ if(ANDROID) # * https://wiki.openssl.org/index.php/Android#Build_the_OpenSSL_Library # Set environment variables similar to 'setenv-android.sh' script: # * https://wiki.openssl.org/index.php/Android#Adjust_the_Cross-Compile_Script - set(configure_command - # Ignored. Prevents script from checking host uname - RELEASE=2.6.37 - SYSTEM=android - ARCH=${ANDROID_SSL_ARCH} - ${configure_command}) + + # Using documented method (./config script): + #set(configure_command + # Ignored. Prevents ./config from checking host uname + # RELEASE=2.6.37 + # SYSTEM=android + # ARCH=${CMAKE_ANDROID_ARCH} + # ${configure_command}) + + # Using android-* targets is currently broken for Clang on ALL versions + # * https://github.com/openssl/openssl/pull/2229 + # The ./config script only detects Android x86 and armv7 targets anyway. + # * https://github.com/openssl/openssl/issues/2490 + if (CMAKE_ANDROID_ARCH MATCHES "mips64|arm64|x86_64") + set(configure_opts "linux-generic64") + else() + set(configure_opts "linux-generic32") + endif() endif() # Pass C compiler through From 5c4efa0c5145ab5b5e250c722cea1e4e94676a06 Mon Sep 17 00:00:00 2001 From: Sacha Refshauge Date: Mon, 5 Jun 2017 23:21:47 +1000 Subject: [PATCH 164/612] Add Leptonica package and example. --- cmake/configs/default.cmake | 1 + cmake/projects/Leptonica/hunter.cmake | 24 ++++++++++++++++++++++++ examples/Leptonica/CMakeLists.txt | 18 ++++++++++++++++++ examples/Leptonica/example.c | 9 +++++++++ 4 files changed, 52 insertions(+) create mode 100644 cmake/projects/Leptonica/hunter.cmake create mode 100644 examples/Leptonica/CMakeLists.txt create mode 100644 examples/Leptonica/example.c diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 229a702264..3c67749b88 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -71,6 +71,7 @@ endif() hunter_config(LLVM VERSION 3.6.2-p0) # Clang hunter_config(LLVMCompilerRT VERSION 3.6.0) # Clang hunter_config(Leathers VERSION 0.1.6) +hunter_config(Leptonica VERSION 1.74.2-p3) hunter_config(Libcxx VERSION 3.6.2) # Clang hunter_config(Libcxxabi VERSION 3.6.2) # Clang hunter_config(librtmp VERSION 2.4.0-p0) diff --git a/cmake/projects/Leptonica/hunter.cmake b/cmake/projects/Leptonica/hunter.cmake new file mode 100644 index 0000000000..55451bdd73 --- /dev/null +++ b/cmake/projects/Leptonica/hunter.cmake @@ -0,0 +1,24 @@ +# Copyright (c) 2017, Sacha Refshauge +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + Leptonica + VERSION + "1.74.2-p3" + URL + "https://github.com/hunter-packages/leptonica/archive/v1.74.2-p3.tar.gz" + SHA1 + ce7e50033e807c1145c858390315ad32844ce16b +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(Leptonica) +hunter_download(PACKAGE_NAME Leptonica) diff --git a/examples/Leptonica/CMakeLists.txt b/examples/Leptonica/CMakeLists.txt new file mode 100644 index 0000000000..ce62dd30d5 --- /dev/null +++ b/examples/Leptonica/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-Leptonica) + +# download Leptonica +hunter_add_package(Leptonica) +find_package(Leptonica CONFIG REQUIRED) +add_executable(example example.c) + +target_link_libraries(example Leptonica::leptonica) + +enable_testing() + +add_test(example example) diff --git a/examples/Leptonica/example.c b/examples/Leptonica/example.c new file mode 100644 index 0000000000..b2ed1bb6dc --- /dev/null +++ b/examples/Leptonica/example.c @@ -0,0 +1,9 @@ +#include +#include +#include + +int main() { + PIXA* pixaDisp = pixaCreate(0); + pixaDestroy(&pixaDisp); + return 0; +} From 2042c5758811917b7683a944e150ee9d670d88ee Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 5 Jun 2017 16:59:45 +0300 Subject: [PATCH 165/612] onmt 0.4.1-p2 --- cmake/configs/default.cmake | 2 +- cmake/projects/onmt/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 868bd236fa..0b8f8c119b 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -180,7 +180,7 @@ hunter_config(odb-mysql VERSION 2.4.0) hunter_config(odb-pgsql VERSION 2.4.0) hunter_config(odb-sqlite VERSION 2.4.0) hunter_config(ogles_gpgpu VERSION 0.1.6-p2) -hunter_config(onmt VERSION 0.4.1-p0) +hunter_config(onmt VERSION 0.4.1-p2) hunter_config(openddlparser VERSION 0.1.0-p2) hunter_config(pciaccess VERSION 0.13.4) hunter_config(poly2tri VERSION 1.0.0) diff --git a/cmake/projects/onmt/hunter.cmake b/cmake/projects/onmt/hunter.cmake index 49d430afa5..d32e4122eb 100644 --- a/cmake/projects/onmt/hunter.cmake +++ b/cmake/projects/onmt/hunter.cmake @@ -20,6 +20,17 @@ hunter_add_version( a691a53a695135cd38d85042bafacf734b3e6a5a ) +hunter_add_version( + PACKAGE_NAME + onmt + VERSION + 0.4.1-p2 + URL + "https://github.com/hunter-packages/onmt/archive/v0.4.1-p2.tar.gz" + SHA1 + a0b6cf26304e8049d7e8d68b0c80fc757fc0504a +) + hunter_cmake_args(onmt CMAKE_ARGS LIB_ONLY=YES WITH_OPENMP=OFF) hunter_pick_scheme(DEFAULT url_sha1_cmake) From 900ae7fa0ceca9684c0ca77422153cd0b4c13d48 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Mon, 5 Jun 2017 14:22:39 -0400 Subject: [PATCH 166/612] add nanoflann package https://github.com/hunter-packages/nanoflann --- cmake/configs/default.cmake | 1 + cmake/projects/nanoflann/hunter.cmake | 26 ++++++++++++++++++++++++++ examples/nanoflann/CMakeLists.txt | 17 +++++++++++++++++ examples/nanoflann/foo.cpp | 4 ++++ 4 files changed, 48 insertions(+) create mode 100644 cmake/projects/nanoflann/hunter.cmake create mode 100644 examples/nanoflann/CMakeLists.txt create mode 100644 examples/nanoflann/foo.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 0b8f8c119b..353dfa5b16 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -172,6 +172,7 @@ hunter_config(minizip VERSION 1.0.1-p1) hunter_config(mpark_variant VERSION 1.0.0) hunter_config(msgpack VERSION 1.4.1-p2) hunter_config(mtplz VERSION 0.1-p3) +hunter_config(nanoflann VERSION 1.2.3-p0) hunter_config(nlohmann-json VERSION 1.0.0-rc1-hunter-3) hunter_config(odb VERSION 2.4.0) hunter_config(odb-boost VERSION 2.4.0) diff --git a/cmake/projects/nanoflann/hunter.cmake b/cmake/projects/nanoflann/hunter.cmake new file mode 100644 index 0000000000..8ea9caf4b2 --- /dev/null +++ b/cmake/projects/nanoflann/hunter.cmake @@ -0,0 +1,26 @@ +# Copyright (c) 2016-2017, Ruslan Baratov +# Copyright (c) 2017, David Hirvonen +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + nanoflann + VERSION + 1.2.3-p0 + URL + "https://github.com/hunter-packages/nanoflann/archive/v1.2.3-p0.tar.gz" + SHA1 + 72a42a31056aab380eac09b9f00dab18e91235b8 + ) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(nanoflann) +hunter_download(PACKAGE_NAME nanoflann) diff --git a/examples/nanoflann/CMakeLists.txt b/examples/nanoflann/CMakeLists.txt new file mode 100644 index 0000000000..be909130e5 --- /dev/null +++ b/examples/nanoflann/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (c) 2016-2017, Ruslan Baratov +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-nanoflann) + +hunter_add_package(nanoflann) +find_package(nanoflann CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo nanoflann::nanoflann) diff --git a/examples/nanoflann/foo.cpp b/examples/nanoflann/foo.cpp new file mode 100644 index 0000000000..c9da6a3005 --- /dev/null +++ b/examples/nanoflann/foo.cpp @@ -0,0 +1,4 @@ +#include + +int main() { +} From e996d76ea9faf2fc40ee9153fd1b4862e5258c81 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Mon, 5 Jun 2017 14:32:59 -0400 Subject: [PATCH 167/612] examples + tests off by default --- cmake/projects/nanoflann/hunter.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/projects/nanoflann/hunter.cmake b/cmake/projects/nanoflann/hunter.cmake index 8ea9caf4b2..c0cd41a56b 100644 --- a/cmake/projects/nanoflann/hunter.cmake +++ b/cmake/projects/nanoflann/hunter.cmake @@ -24,3 +24,10 @@ hunter_add_version( hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(nanoflann) hunter_download(PACKAGE_NAME nanoflann) + +hunter_cmake_args( + nanoflann + CMAKE_ARGS + NANOFLANN_BUILD_EXAMPLES=OFF + NANOFLANN_BUILD_TESTS=OFF + ) From 96efaf65b5cbfcf41f4b86e513461d978baebb56 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Mon, 5 Jun 2017 14:46:06 -0400 Subject: [PATCH 168/612] add eigen3-nnls + example --- cmake/configs/default.cmake | 1 + cmake/projects/eigen3-nnls/hunter.cmake | 26 +++++++++++++++++++++++++ examples/eigen3-nnls/CMakeLists.txt | 17 ++++++++++++++++ examples/eigen3-nnls/foo.cpp | 5 +++++ 4 files changed, 49 insertions(+) create mode 100644 cmake/projects/eigen3-nnls/hunter.cmake create mode 100644 examples/eigen3-nnls/CMakeLists.txt create mode 100644 examples/eigen3-nnls/foo.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 0b8f8c119b..86e37be972 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -135,6 +135,7 @@ hunter_config(doctest VERSION 1.2.0) hunter_config(dri2proto VERSION 2.8) hunter_config(dri3proto VERSION 1.0) hunter_config(drm VERSION 2.4.67) +hunter_config(eigen3-nnls VERSION 1.0.0) hunter_config(eos VERSION 0.6.1-p1) hunter_config(FakeIt VERSION 2.0.3) hunter_config(fixesproto VERSION 5.0) diff --git a/cmake/projects/eigen3-nnls/hunter.cmake b/cmake/projects/eigen3-nnls/hunter.cmake new file mode 100644 index 0000000000..013364a0b6 --- /dev/null +++ b/cmake/projects/eigen3-nnls/hunter.cmake @@ -0,0 +1,26 @@ +# Copyright (c) 2016-2017, Ruslan Baratov +# Copyright (c) 2017, David Hirvonen +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + eigen3-nnls + VERSION + 1.0.0 + URL + "https://github.com/hunter-packages/eigen3-nnls/archive/v1.0.0.tar.gz" + SHA1 + 0bc34af72ace36e14dc8387e292e338ee30f620d + ) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(eigen3-nnls) +hunter_download(PACKAGE_NAME eigen3-nnls) diff --git a/examples/eigen3-nnls/CMakeLists.txt b/examples/eigen3-nnls/CMakeLists.txt new file mode 100644 index 0000000000..c24dac2f77 --- /dev/null +++ b/examples/eigen3-nnls/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (c) 2016-2017, Ruslan Baratov +# Copyright (c) 2017, David Hirvonen +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-eigen3-nnls) + +hunter_add_package(eigen3-nnls) +find_package(eigen3-nnls CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo eigen3-nnls::eigen3-nnls) diff --git a/examples/eigen3-nnls/foo.cpp b/examples/eigen3-nnls/foo.cpp new file mode 100644 index 0000000000..a3a6aadea1 --- /dev/null +++ b/examples/eigen3-nnls/foo.cpp @@ -0,0 +1,5 @@ +#include +#include + +int main() { +} From 923bf6b526391443536f89d67f30a47a578c4065 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Mon, 5 Jun 2017 14:54:18 -0400 Subject: [PATCH 169/612] update glm to 0.9.8.5 --- cmake/configs/default.cmake | 2 +- cmake/projects/glm/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 0b8f8c119b..b639491aba 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -145,7 +145,7 @@ hunter_config(geos VERSION 3.4.2) hunter_config(gflags VERSION 2.1.2-p1) hunter_config(glew VERSION 2.0.0) hunter_config(glfw VERSION 3.3.0-p1) -hunter_config(glm VERSION 0.9.7.6) +hunter_config(glm VERSION 0.9.8.5) hunter_config(glog VERSION 0.3.4-p2) hunter_config(glproto VERSION 1.4.17) hunter_config(half VERSION 1.1.0-p1) diff --git a/cmake/projects/glm/hunter.cmake b/cmake/projects/glm/hunter.cmake index bd0f7ecacd..bb15930c7e 100644 --- a/cmake/projects/glm/hunter.cmake +++ b/cmake/projects/glm/hunter.cmake @@ -6,6 +6,17 @@ include(hunter_pick_scheme) include(hunter_cacheable) include(hunter_download) +hunter_add_version( + PACKAGE_NAME + glm + VERSION + "0.9.8.5" + URL + "https://github.com/hunter-packages/glm/archive/0.9.8.5.tar.gz" + SHA1 + 04ff6d037916f85219e53731e08eb8660d14a38d + ) + hunter_add_version( PACKAGE_NAME glm From cb2ac3335e855fef2e2974b60db70da02a837932 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Mon, 5 Jun 2017 15:40:11 -0400 Subject: [PATCH 170/612] reorder cmake commands: make `hunter_download(PACK_NAME nanoflann)` last --- cmake/projects/nanoflann/hunter.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/projects/nanoflann/hunter.cmake b/cmake/projects/nanoflann/hunter.cmake index c0cd41a56b..47a4d38b3a 100644 --- a/cmake/projects/nanoflann/hunter.cmake +++ b/cmake/projects/nanoflann/hunter.cmake @@ -21,13 +21,13 @@ hunter_add_version( 72a42a31056aab380eac09b9f00dab18e91235b8 ) -hunter_pick_scheme(DEFAULT url_sha1_cmake) -hunter_cacheable(nanoflann) -hunter_download(PACKAGE_NAME nanoflann) - hunter_cmake_args( nanoflann CMAKE_ARGS NANOFLANN_BUILD_EXAMPLES=OFF NANOFLANN_BUILD_TESTS=OFF - ) + ) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(nanoflann) +hunter_download(PACKAGE_NAME nanoflann) From 1f02cf83681ea855140f1e71f18c254ca02b31f7 Mon Sep 17 00:00:00 2001 From: Sacha Date: Tue, 6 Jun 2017 06:42:31 +1000 Subject: [PATCH 171/612] Increment OpenSSL deps id --- cmake/projects/OpenSSL/hunter.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/projects/OpenSSL/hunter.cmake b/cmake/projects/OpenSSL/hunter.cmake index 9f64f330f2..e362a85ae2 100755 --- a/cmake/projects/OpenSSL/hunter.cmake +++ b/cmake/projects/OpenSSL/hunter.cmake @@ -307,4 +307,4 @@ else() endif() hunter_cacheable(OpenSSL) -hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID "10") +hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID "11") From c09842fffca3855ec986ff4f69a8f23e560b94b5 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Mon, 5 Jun 2017 18:06:33 -0400 Subject: [PATCH 172/612] add eos package 0.12.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add new hunter_add_version( .. 0.12.1 …) * order releases from newest (top) to oldest (bottom) * bump min version --- cmake/configs/default.cmake | 2 +- cmake/projects/eos/hunter.cmake | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index e78085d160..32098c1dc0 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -136,7 +136,7 @@ hunter_config(dri2proto VERSION 2.8) hunter_config(dri3proto VERSION 1.0) hunter_config(drm VERSION 2.4.67) hunter_config(eigen3-nnls VERSION 1.0.0) -hunter_config(eos VERSION 0.6.1-p1) +hunter_config(eos VERSION 0.12.1) hunter_config(FakeIt VERSION 2.0.3) hunter_config(fixesproto VERSION 5.0) hunter_config(flatbuffers VERSION 1.3.0-p3) diff --git a/cmake/projects/eos/hunter.cmake b/cmake/projects/eos/hunter.cmake index 8ff1c6573d..d8a152c441 100644 --- a/cmake/projects/eos/hunter.cmake +++ b/cmake/projects/eos/hunter.cmake @@ -14,11 +14,11 @@ hunter_add_version( PACKAGE_NAME eos VERSION - 0.6.1-p0 + 0.12.1 URL - "https://github.com/hunter-packages/eos/archive/v0.6.1-p0.tar.gz" + "https://github.com/hunter-packages/eos/archive/v0.12.1.tar.gz" SHA1 - 3ce7b579fb2795a0c464b2dea12ca9345cf86e91 + 151444ba987f4f02052534462c6c71e47a338404 ) hunter_add_version( @@ -32,6 +32,17 @@ hunter_add_version( 663e02aa35275f9dc447e8d4004e091f107eb686 ) +hunter_add_version( + PACKAGE_NAME + eos + VERSION + 0.6.1-p0 + URL + "https://github.com/hunter-packages/eos/archive/v0.6.1-p0.tar.gz" + SHA1 + 3ce7b579fb2795a0c464b2dea12ca9345cf86e91 +) + hunter_cmake_args( eos CMAKE_ARGS From 764d6460e7a9276a22adfa5fedc9e56052ec17a5 Mon Sep 17 00:00:00 2001 From: Sacha Date: Tue, 6 Jun 2017 08:47:51 +1000 Subject: [PATCH 173/612] Use ANDROID_SSL_ARCH instead of CMAKE_ANDROID_ARCH --- cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in b/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in index bc725ac2bc..fe44b5c527 100644 --- a/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in +++ b/cmake/projects/OpenSSL/schemes/url_sha1_openssl.cmake.in @@ -73,7 +73,7 @@ if(ANDROID) # * https://github.com/openssl/openssl/pull/2229 # The ./config script only detects Android x86 and armv7 targets anyway. # * https://github.com/openssl/openssl/issues/2490 - if (CMAKE_ANDROID_ARCH MATCHES "mips64|arm64|x86_64") + if (ANDROID_SSL_ARCH MATCHES "mips64|arm64|x86_64") set(configure_opts "linux-generic64") else() set(configure_opts "linux-generic32") From 0294adc76017ff5e1087aa63b7aa149a14bcd43a Mon Sep 17 00:00:00 2001 From: Ihar Kliashchou Date: Tue, 6 Jun 2017 02:21:34 +0300 Subject: [PATCH 174/612] OpenSSL iOS bitcode & deployment SDK version support --- .../schemes/url_sha1_openssl_ios.cmake.in | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/cmake/projects/OpenSSL/schemes/url_sha1_openssl_ios.cmake.in b/cmake/projects/OpenSSL/schemes/url_sha1_openssl_ios.cmake.in index 63bf11cda2..82782ee612 100644 --- a/cmake/projects/OpenSSL/schemes/url_sha1_openssl_ios.cmake.in +++ b/cmake/projects/OpenSSL/schemes/url_sha1_openssl_ios.cmake.in @@ -10,6 +10,7 @@ include(ExternalProject) # ExternalProject_Add list(APPEND CMAKE_MODULE_PATH "@HUNTER_SELF@/cmake/modules") +include(hunter_dump_cmake_flags) include(hunter_status_debug) include(hunter_test_string_not_empty) include(hunter_unsetvar) @@ -33,9 +34,26 @@ hunter_test_string_not_empty("@IOS_SDK_VERSION@") hunter_test_string_not_empty("@IPHONESIMULATOR_ROOT@") hunter_test_string_not_empty("@IPHONEOS_ROOT@") +hunter_dump_cmake_flags(SKIP_INCLUDES) +# -> CMAKE_CXX_FLAGS +# -> CMAKE_C_FLAGS + hunter_unsetvar(ssl_input_libraries) hunter_unsetvar(crypto_input_libraries) +string(COMPARE EQUAL "${CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE}" "YES" _embed_bitcode) +set(bitcode "") +if(_embed_bitcode) + set(bitcode "-fembed-bitcode") +endif() + +string(COMPARE EQUAL "${IOS_DEPLOYMENT_SDK_VERSION}" "" _no_deployment_sdk_version) +if(_no_deployment_sdk_version) + set(iphone_minversion "-miphoneos-version-min=@IOS_SDK_VERSION@") +else() + set(iphone_minversion "-miphoneos-version-min=${IOS_DEPLOYMENT_SDK_VERSION}") +endif() + foreach(arch @IPHONEOS_ARCHS@ @IPHONESIMULATOR_ARCHS@) list( APPEND @@ -81,13 +99,12 @@ ExternalProject_Add( foreach(variant @IPHONEOS_ARCHS@ @IPHONESIMULATOR_ARCHS@) set(iphoneos_archs @IPHONEOS_ARCHS@) + list(FIND iphoneos_archs ${variant} find_index) if(find_index EQUAL -1) - set(iphone_minversion "-miphoneos-version-min=@IOS_SDK_VERSION@") set(CROSS_TOP "@IPHONESIMULATOR_ROOT@") set(CROSS_SDK "iPhoneSimulator@IOS_SDK_VERSION@.sdk") else() - set(iphone_minversion "") set(CROSS_TOP "@IPHONEOS_ROOT@") set(CROSS_SDK "iPhoneOS@IOS_SDK_VERSION@.sdk") endif() @@ -122,6 +139,7 @@ foreach(variant @IPHONEOS_ARCHS@ @IPHONESIMULATOR_ARCHS@) "${noasm}" "--prefix=@HUNTER_PACKAGE_INSTALL_PREFIX@" "${iphone_minversion}" + "${bitcode}" "-arch ${variant}" BUILD_COMMAND . "@HUNTER_GLOBAL_SCRIPT_DIR@/clear-all.sh" && From 9fabbb014ddeb4ab7bcaaace0d8be69b858a7295 Mon Sep 17 00:00:00 2001 From: Sacha Refshauge Date: Tue, 6 Jun 2017 11:06:16 +1000 Subject: [PATCH 175/612] Leptonica: Fix MSVC 2015 --- cmake/configs/default.cmake | 2 +- cmake/projects/Leptonica/hunter.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 3c67749b88..d54650a4e7 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -71,7 +71,7 @@ endif() hunter_config(LLVM VERSION 3.6.2-p0) # Clang hunter_config(LLVMCompilerRT VERSION 3.6.0) # Clang hunter_config(Leathers VERSION 0.1.6) -hunter_config(Leptonica VERSION 1.74.2-p3) +hunter_config(Leptonica VERSION 1.74.2-p4) hunter_config(Libcxx VERSION 3.6.2) # Clang hunter_config(Libcxxabi VERSION 3.6.2) # Clang hunter_config(librtmp VERSION 2.4.0-p0) diff --git a/cmake/projects/Leptonica/hunter.cmake b/cmake/projects/Leptonica/hunter.cmake index 55451bdd73..0e2047d9a9 100644 --- a/cmake/projects/Leptonica/hunter.cmake +++ b/cmake/projects/Leptonica/hunter.cmake @@ -12,11 +12,11 @@ hunter_add_version( PACKAGE_NAME Leptonica VERSION - "1.74.2-p3" + "1.74.2-p4" URL - "https://github.com/hunter-packages/leptonica/archive/v1.74.2-p3.tar.gz" + "https://github.com/hunter-packages/leptonica/archive/v1.74.2-p4.tar.gz" SHA1 - ce7e50033e807c1145c858390315ad32844ce16b + b317631496a683759565fc925e5125fddf85466a ) hunter_pick_scheme(DEFAULT url_sha1_cmake) From 00612c6969c25e3ea63f89fd9208ab8c568f3b36 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Mon, 5 Jun 2017 21:12:42 -0400 Subject: [PATCH 176/612] Fix eos release 0.12.1 fix config install --- cmake/projects/eos/hunter.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/projects/eos/hunter.cmake b/cmake/projects/eos/hunter.cmake index d8a152c441..02cde3d40b 100644 --- a/cmake/projects/eos/hunter.cmake +++ b/cmake/projects/eos/hunter.cmake @@ -18,7 +18,7 @@ hunter_add_version( URL "https://github.com/hunter-packages/eos/archive/v0.12.1.tar.gz" SHA1 - 151444ba987f4f02052534462c6c71e47a338404 + a3839078423cc81d153db84267e9c2eb14564c88 ) hunter_add_version( From 989d2d4dcc78e7d0e4a740d15e08848daeeba04d Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 6 Jun 2017 11:52:56 +0300 Subject: [PATCH 177/612] OpenCV 3.2.0-p2 --- cmake/configs/default.cmake | 2 +- cmake/projects/OpenCV/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 6186b1f89d..e4f79c111c 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -81,7 +81,7 @@ hunter_config(NASM VERSION 2.12.02) hunter_config(OpenBLAS VERSION 0.2.19-p0) hunter_config(OpenCL VERSION 2.1-p3) hunter_config(OpenCL-cpp VERSION 2.0.10-p0) -hunter_config(OpenCV VERSION 3.2.0-p1) +hunter_config(OpenCV VERSION 3.2.0-p2) hunter_config(OpenCV-Extra VERSION 3.0.0) hunter_config(OpenNMTTokenizer VERSION 0.2.0-p1) if(MSVC) diff --git a/cmake/projects/OpenCV/hunter.cmake b/cmake/projects/OpenCV/hunter.cmake index 4942511b15..58ddb0745b 100644 --- a/cmake/projects/OpenCV/hunter.cmake +++ b/cmake/projects/OpenCV/hunter.cmake @@ -13,6 +13,17 @@ include(hunter_pick_scheme) # List of versions here... +hunter_add_version( + PACKAGE_NAME + OpenCV + VERSION + "3.2.0-p2" + URL + "https://github.com/hunter-packages/opencv/archive/v3.2.0-p2.tar.gz" + SHA1 + 99219206c4fb9b5b6f60e03112746461baf6c9ab +) + hunter_add_version( PACKAGE_NAME OpenCV From 2b956f6cb9460a3f3dfe377430a0cabc245d1f54 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Tue, 6 Jun 2017 07:27:58 -0400 Subject: [PATCH 178/612] fix 0.12.1 find_dependency() calls --- cmake/projects/eos/hunter.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/projects/eos/hunter.cmake b/cmake/projects/eos/hunter.cmake index 02cde3d40b..a104e66cb3 100644 --- a/cmake/projects/eos/hunter.cmake +++ b/cmake/projects/eos/hunter.cmake @@ -18,7 +18,7 @@ hunter_add_version( URL "https://github.com/hunter-packages/eos/archive/v0.12.1.tar.gz" SHA1 - a3839078423cc81d153db84267e9c2eb14564c88 + 76be9cba78faf3663d17414ddeeacd662106e0d9 ) hunter_add_version( From 5240bd3916f5751e2bce293e3599e58daf699641 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Tue, 6 Jun 2017 10:19:37 -0400 Subject: [PATCH 179/612] yet another config update --- cmake/projects/eos/hunter.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/projects/eos/hunter.cmake b/cmake/projects/eos/hunter.cmake index a104e66cb3..2a64b058ab 100644 --- a/cmake/projects/eos/hunter.cmake +++ b/cmake/projects/eos/hunter.cmake @@ -18,7 +18,7 @@ hunter_add_version( URL "https://github.com/hunter-packages/eos/archive/v0.12.1.tar.gz" SHA1 - 76be9cba78faf3663d17414ddeeacd662106e0d9 + cbc8143c270fe4ade45be47adae83f34db280659 ) hunter_add_version( From 35a6327b926c1a9429dbaa60c6ddf07efba0c5aa Mon Sep 17 00:00:00 2001 From: Ihar Kliashchou Date: Wed, 7 Jun 2017 01:55:56 +0300 Subject: [PATCH 180/612] OpenSSL iOS bitcode & deployment SDK version support --- cmake/modules/hunter_dump_cmake_flags.cmake | 19 ++++++++++++++++ .../schemes/url_sha1_openssl_ios.cmake.in | 22 ++++--------------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/cmake/modules/hunter_dump_cmake_flags.cmake b/cmake/modules/hunter_dump_cmake_flags.cmake index 5ab56464f6..32421a3f2d 100644 --- a/cmake/modules/hunter_dump_cmake_flags.cmake +++ b/cmake/modules/hunter_dump_cmake_flags.cmake @@ -20,6 +20,25 @@ function(hunter_dump_cmake_flags) hunter_internal_error("Unparsed arguments: ${x_UNPARSED_ARGUMENTS}") endif() + + if(APPLE) + if(IOS) + string(COMPARE EQUAL "${IOS_DEPLOYMENT_SDK_VERSION}" "" _no_deployment_sdk_version) + if(_no_deployment_sdk_version) + set(CMAKE_CXX_FLAGS "-miphoneos-version-min=@IOS_SDK_VERSION@") + set(CMAKE_C_FLAGS "-miphoneos-version-min=@IOS_SDK_VERSION@") + else() + set(CMAKE_CXX_FLAGS "-miphoneos-version-min=${IOS_DEPLOYMENT_SDK_VERSION}") + set(CMAKE_C_FLAGS "-miphoneos-version-min=${IOS_DEPLOYMENT_SDK_VERSION}") + endif() + endif() + + if(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fembed-bitcode") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fembed-bitcode") + endif() + endif() + set(cppflags "") if(ANDROID) diff --git a/cmake/projects/OpenSSL/schemes/url_sha1_openssl_ios.cmake.in b/cmake/projects/OpenSSL/schemes/url_sha1_openssl_ios.cmake.in index 82782ee612..eee9983316 100644 --- a/cmake/projects/OpenSSL/schemes/url_sha1_openssl_ios.cmake.in +++ b/cmake/projects/OpenSSL/schemes/url_sha1_openssl_ios.cmake.in @@ -41,18 +41,9 @@ hunter_dump_cmake_flags(SKIP_INCLUDES) hunter_unsetvar(ssl_input_libraries) hunter_unsetvar(crypto_input_libraries) -string(COMPARE EQUAL "${CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE}" "YES" _embed_bitcode) -set(bitcode "") -if(_embed_bitcode) - set(bitcode "-fembed-bitcode") -endif() - -string(COMPARE EQUAL "${IOS_DEPLOYMENT_SDK_VERSION}" "" _no_deployment_sdk_version) -if(_no_deployment_sdk_version) - set(iphone_minversion "-miphoneos-version-min=@IOS_SDK_VERSION@") -else() - set(iphone_minversion "-miphoneos-version-min=${IOS_DEPLOYMENT_SDK_VERSION}") -endif() +set(configure_opts iphoneos-cross threads no-shared) +# Pass C flags through +set(configure_opts ${configure_opts} ${CMAKE_C_FLAGS}) foreach(arch @IPHONEOS_ARCHS@ @IPHONESIMULATOR_ARCHS@) list( @@ -99,7 +90,6 @@ ExternalProject_Add( foreach(variant @IPHONEOS_ARCHS@ @IPHONESIMULATOR_ARCHS@) set(iphoneos_archs @IPHONEOS_ARCHS@) - list(FIND iphoneos_archs ${variant} find_index) if(find_index EQUAL -1) set(CROSS_TOP "@IPHONESIMULATOR_ROOT@") @@ -133,13 +123,9 @@ foreach(variant @IPHONEOS_ARCHS@ @IPHONESIMULATOR_ARCHS@) # not used, just avoid creating Install/ empty directory CONFIGURE_COMMAND ./Configure - iphoneos-cross - threads - no-shared + "${configure_opts}" "${noasm}" "--prefix=@HUNTER_PACKAGE_INSTALL_PREFIX@" - "${iphone_minversion}" - "${bitcode}" "-arch ${variant}" BUILD_COMMAND . "@HUNTER_GLOBAL_SCRIPT_DIR@/clear-all.sh" && From 4e8a53fc0f75fa3dbfdb327a3b76f654a27ed2b4 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 7 Jun 2017 22:32:21 +0300 Subject: [PATCH 181/612] CMAKE_CROSSCOMPILING should be set on iOS [skip ci] --- cmake/modules/hunter_finalize.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/modules/hunter_finalize.cmake b/cmake/modules/hunter_finalize.cmake index 3f6ae22090..c650eaa75c 100644 --- a/cmake/modules/hunter_finalize.cmake +++ b/cmake/modules/hunter_finalize.cmake @@ -165,4 +165,11 @@ macro(hunter_finalize) if(CMAKE_INTERPROCEDURAL_OPTIMIZATION AND NOT POLICY CMP0069) hunter_user_error("Unsuitable CMake version") endif() + + if(IOS AND NOT CMAKE_CROSSCOMPILING) + hunter_user_error( + "CMAKE_CROSSCOMPILING should be set on iOS." + " Please update your toolchain." + ) + endif() endmacro() From c2040450b23bbf57b6b8e0100531155564940adb Mon Sep 17 00:00:00 2001 From: Ihar Kliashchou Date: Thu, 8 Jun 2017 07:03:10 +0300 Subject: [PATCH 182/612] OpenSSL iOS bitcode & deployment SDK version support (Updated!) --- cmake/modules/hunter_dump_cmake_flags.cmake | 24 ++++++++++----------- cmake/projects/Boost/hunter.cmake | 2 +- cmake/projects/Boost/hunter.cmake.in | 2 +- cmake/projects/OpenSSL/hunter.cmake | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cmake/modules/hunter_dump_cmake_flags.cmake b/cmake/modules/hunter_dump_cmake_flags.cmake index 32421a3f2d..e430c0ffbe 100644 --- a/cmake/modules/hunter_dump_cmake_flags.cmake +++ b/cmake/modules/hunter_dump_cmake_flags.cmake @@ -5,6 +5,7 @@ include(CMakeParseArguments) # cmake_parse_arguments include(hunter_internal_error) include(hunter_get_lang_standard_flag) +include(hunter_test_string_not_empty) # Packages to test this function: # * Boost @@ -21,24 +22,23 @@ function(hunter_dump_cmake_flags) endif() - if(APPLE) - if(IOS) - string(COMPARE EQUAL "${IOS_DEPLOYMENT_SDK_VERSION}" "" _no_deployment_sdk_version) - if(_no_deployment_sdk_version) - set(CMAKE_CXX_FLAGS "-miphoneos-version-min=@IOS_SDK_VERSION@") - set(CMAKE_C_FLAGS "-miphoneos-version-min=@IOS_SDK_VERSION@") - else() - set(CMAKE_CXX_FLAGS "-miphoneos-version-min=${IOS_DEPLOYMENT_SDK_VERSION}") - set(CMAKE_C_FLAGS "-miphoneos-version-min=${IOS_DEPLOYMENT_SDK_VERSION}") - endif() + if(IOS) + hunter_test_string_not_empty("${IOS_SDK_VERSION}") + string(COMPARE EQUAL "${IOS_DEPLOYMENT_SDK_VERSION}" "" _no_deployment_sdk_version) + if(_no_deployment_sdk_version) + set(CMAKE_CXX_FLAGS "-miphoneos-version-min=${IOS_SDK_VERSION}") + set(CMAKE_C_FLAGS "-miphoneos-version-min=${IOS_SDK_VERSION}") + else() + set(CMAKE_CXX_FLAGS "-miphoneos-version-min=${IOS_DEPLOYMENT_SDK_VERSION}") + set(CMAKE_C_FLAGS "-miphoneos-version-min=${IOS_DEPLOYMENT_SDK_VERSION}") endif() - if(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE) + if(XCODE AND CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fembed-bitcode") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fembed-bitcode") endif() endif() - + set(cppflags "") if(ANDROID) diff --git a/cmake/projects/Boost/hunter.cmake b/cmake/projects/Boost/hunter.cmake index 7f75af8c55..a59a3c901d 100644 --- a/cmake/projects/Boost/hunter.cmake +++ b/cmake/projects/Boost/hunter.cmake @@ -256,4 +256,4 @@ hunter_add_version( hunter_pick_scheme(DEFAULT url_sha1_boost) hunter_cacheable(Boost) -hunter_download(PACKAGE_NAME Boost PACKAGE_INTERNAL_DEPS_ID "13") +hunter_download(PACKAGE_NAME Boost PACKAGE_INTERNAL_DEPS_ID "14") diff --git a/cmake/projects/Boost/hunter.cmake.in b/cmake/projects/Boost/hunter.cmake.in index 014340c348..c1cf4fe023 100644 --- a/cmake/projects/Boost/hunter.cmake.in +++ b/cmake/projects/Boost/hunter.cmake.in @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT boost_component - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/OpenSSL/hunter.cmake b/cmake/projects/OpenSSL/hunter.cmake index 9f64f330f2..019cd2f127 100755 --- a/cmake/projects/OpenSSL/hunter.cmake +++ b/cmake/projects/OpenSSL/hunter.cmake @@ -307,4 +307,4 @@ else() endif() hunter_cacheable(OpenSSL) -hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID "10") +hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID "12") From eff136aaeb3473408874c2b9efa5eb69c7a59d2e Mon Sep 17 00:00:00 2001 From: Ihar Kliashchou Date: Thu, 8 Jun 2017 11:50:20 +0300 Subject: [PATCH 183/612] OpenSSL iOS bitcode & deployment SDK version support (Updated!) Boost components PACKAGE_INTERNAL_DEPS_ID --- cmake/projects/Boost/atomic/hunter.cmake | 2 +- cmake/projects/Boost/chrono/hunter.cmake | 2 +- cmake/projects/Boost/context/hunter.cmake | 2 +- cmake/projects/Boost/coroutine/hunter.cmake | 2 +- cmake/projects/Boost/date_time/hunter.cmake | 2 +- cmake/projects/Boost/exception/hunter.cmake | 2 +- cmake/projects/Boost/filesystem/hunter.cmake | 2 +- cmake/projects/Boost/graph/hunter.cmake | 2 +- cmake/projects/Boost/graph_parallel/hunter.cmake | 2 +- cmake/projects/Boost/iostreams/hunter.cmake | 2 +- cmake/projects/Boost/locale/hunter.cmake | 2 +- cmake/projects/Boost/log/hunter.cmake | 2 +- cmake/projects/Boost/math/hunter.cmake | 2 +- cmake/projects/Boost/mpi/hunter.cmake | 2 +- cmake/projects/Boost/program_options/hunter.cmake | 2 +- cmake/projects/Boost/python/hunter.cmake | 2 +- cmake/projects/Boost/random/hunter.cmake | 2 +- cmake/projects/Boost/regex/hunter.cmake | 2 +- cmake/projects/Boost/serialization/hunter.cmake | 2 +- cmake/projects/Boost/signals/hunter.cmake | 2 +- cmake/projects/Boost/system/hunter.cmake | 2 +- cmake/projects/Boost/test/hunter.cmake | 2 +- cmake/projects/Boost/thread/hunter.cmake | 2 +- cmake/projects/Boost/timer/hunter.cmake | 2 +- cmake/projects/Boost/wave/hunter.cmake | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/cmake/projects/Boost/atomic/hunter.cmake b/cmake/projects/Boost/atomic/hunter.cmake index 2f4dcced07..96a2faa1da 100644 --- a/cmake/projects/Boost/atomic/hunter.cmake +++ b/cmake/projects/Boost/atomic/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT atomic - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/chrono/hunter.cmake b/cmake/projects/Boost/chrono/hunter.cmake index 9d15d3b165..63eaea0e83 100644 --- a/cmake/projects/Boost/chrono/hunter.cmake +++ b/cmake/projects/Boost/chrono/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT chrono - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/context/hunter.cmake b/cmake/projects/Boost/context/hunter.cmake index 6f587315d8..8a3fb7f6b3 100644 --- a/cmake/projects/Boost/context/hunter.cmake +++ b/cmake/projects/Boost/context/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT context - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/coroutine/hunter.cmake b/cmake/projects/Boost/coroutine/hunter.cmake index 8c76b12b3d..5e07037042 100644 --- a/cmake/projects/Boost/coroutine/hunter.cmake +++ b/cmake/projects/Boost/coroutine/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT coroutine - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/date_time/hunter.cmake b/cmake/projects/Boost/date_time/hunter.cmake index 59168c33a1..ee5d5678e9 100644 --- a/cmake/projects/Boost/date_time/hunter.cmake +++ b/cmake/projects/Boost/date_time/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT date_time - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/exception/hunter.cmake b/cmake/projects/Boost/exception/hunter.cmake index b8c44c3745..dd91d7daeb 100644 --- a/cmake/projects/Boost/exception/hunter.cmake +++ b/cmake/projects/Boost/exception/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT exception - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/filesystem/hunter.cmake b/cmake/projects/Boost/filesystem/hunter.cmake index efb33fe6a9..a791a8a43c 100644 --- a/cmake/projects/Boost/filesystem/hunter.cmake +++ b/cmake/projects/Boost/filesystem/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT filesystem - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/graph/hunter.cmake b/cmake/projects/Boost/graph/hunter.cmake index caaa6a1bcf..419ef6d923 100644 --- a/cmake/projects/Boost/graph/hunter.cmake +++ b/cmake/projects/Boost/graph/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT graph - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/graph_parallel/hunter.cmake b/cmake/projects/Boost/graph_parallel/hunter.cmake index 5decfbebdc..0add507db5 100644 --- a/cmake/projects/Boost/graph_parallel/hunter.cmake +++ b/cmake/projects/Boost/graph_parallel/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT graph_parallel - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/iostreams/hunter.cmake b/cmake/projects/Boost/iostreams/hunter.cmake index 414995734c..19d0138977 100644 --- a/cmake/projects/Boost/iostreams/hunter.cmake +++ b/cmake/projects/Boost/iostreams/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT iostreams - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/locale/hunter.cmake b/cmake/projects/Boost/locale/hunter.cmake index 02aec9643f..f68838d653 100644 --- a/cmake/projects/Boost/locale/hunter.cmake +++ b/cmake/projects/Boost/locale/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT locale - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/log/hunter.cmake b/cmake/projects/Boost/log/hunter.cmake index 3410d7e54e..e1dbcf8dbb 100644 --- a/cmake/projects/Boost/log/hunter.cmake +++ b/cmake/projects/Boost/log/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT log - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/math/hunter.cmake b/cmake/projects/Boost/math/hunter.cmake index 50b862bc9f..9f1720d48e 100644 --- a/cmake/projects/Boost/math/hunter.cmake +++ b/cmake/projects/Boost/math/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT math - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/mpi/hunter.cmake b/cmake/projects/Boost/mpi/hunter.cmake index 1a23ec4a87..aeb0992c86 100644 --- a/cmake/projects/Boost/mpi/hunter.cmake +++ b/cmake/projects/Boost/mpi/hunter.cmake @@ -26,5 +26,5 @@ hunter_download( Boost PACKAGE_COMPONENT mpi - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/program_options/hunter.cmake b/cmake/projects/Boost/program_options/hunter.cmake index 2c8d568d8b..7249bd014f 100644 --- a/cmake/projects/Boost/program_options/hunter.cmake +++ b/cmake/projects/Boost/program_options/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT program_options - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/python/hunter.cmake b/cmake/projects/Boost/python/hunter.cmake index 54c04c7c9d..3932b02951 100644 --- a/cmake/projects/Boost/python/hunter.cmake +++ b/cmake/projects/Boost/python/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT python - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/random/hunter.cmake b/cmake/projects/Boost/random/hunter.cmake index 935b925234..e442b26817 100644 --- a/cmake/projects/Boost/random/hunter.cmake +++ b/cmake/projects/Boost/random/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT random - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/regex/hunter.cmake b/cmake/projects/Boost/regex/hunter.cmake index 07de07463a..96ec2cec1b 100644 --- a/cmake/projects/Boost/regex/hunter.cmake +++ b/cmake/projects/Boost/regex/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT regex - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/serialization/hunter.cmake b/cmake/projects/Boost/serialization/hunter.cmake index 8e55141773..f91a5f791f 100644 --- a/cmake/projects/Boost/serialization/hunter.cmake +++ b/cmake/projects/Boost/serialization/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT serialization - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/signals/hunter.cmake b/cmake/projects/Boost/signals/hunter.cmake index 56f0d6dbda..eae009cb8a 100644 --- a/cmake/projects/Boost/signals/hunter.cmake +++ b/cmake/projects/Boost/signals/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT signals - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/system/hunter.cmake b/cmake/projects/Boost/system/hunter.cmake index 24d34fd9d0..f39d092a58 100644 --- a/cmake/projects/Boost/system/hunter.cmake +++ b/cmake/projects/Boost/system/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT system - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/test/hunter.cmake b/cmake/projects/Boost/test/hunter.cmake index 1b45cfa9a6..7acf8394c2 100644 --- a/cmake/projects/Boost/test/hunter.cmake +++ b/cmake/projects/Boost/test/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT test - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/thread/hunter.cmake b/cmake/projects/Boost/thread/hunter.cmake index cdc2f4526e..b2a95f0c17 100644 --- a/cmake/projects/Boost/thread/hunter.cmake +++ b/cmake/projects/Boost/thread/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT thread - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/timer/hunter.cmake b/cmake/projects/Boost/timer/hunter.cmake index a8717c7fc2..a0e3b42b5e 100644 --- a/cmake/projects/Boost/timer/hunter.cmake +++ b/cmake/projects/Boost/timer/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT timer - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) diff --git a/cmake/projects/Boost/wave/hunter.cmake b/cmake/projects/Boost/wave/hunter.cmake index a5258227be..e84bdafce7 100644 --- a/cmake/projects/Boost/wave/hunter.cmake +++ b/cmake/projects/Boost/wave/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT wave - PACKAGE_INTERNAL_DEPS_ID "13" + PACKAGE_INTERNAL_DEPS_ID "14" ) From 00e5402b46c2f9090ddc7deb7bed9c4ed56530c5 Mon Sep 17 00:00:00 2001 From: Ihar Kliashchou Date: Thu, 8 Jun 2017 11:55:38 +0300 Subject: [PATCH 184/612] OpenSSL iOS bitcode & deployment SDK version support (Updated!) --- cmake/modules/hunter_dump_cmake_flags.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/hunter_dump_cmake_flags.cmake b/cmake/modules/hunter_dump_cmake_flags.cmake index e430c0ffbe..f0a680e9de 100644 --- a/cmake/modules/hunter_dump_cmake_flags.cmake +++ b/cmake/modules/hunter_dump_cmake_flags.cmake @@ -33,7 +33,7 @@ function(hunter_dump_cmake_flags) set(CMAKE_C_FLAGS "-miphoneos-version-min=${IOS_DEPLOYMENT_SDK_VERSION}") endif() - if(XCODE AND CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE) + if(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fembed-bitcode") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fembed-bitcode") endif() From 17a350e81d337f7867007c2bd45e3d4ecf8a9c5c Mon Sep 17 00:00:00 2001 From: Ihar Kliashchou Date: Thu, 8 Jun 2017 12:35:50 +0300 Subject: [PATCH 185/612] OpenSSL iOS bitcode & deployment SDK version support (Updated!) OpenSSL & odb-boost --- cmake/projects/OpenSSL/hunter.cmake | 2 +- cmake/projects/odb-boost/hunter.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/projects/OpenSSL/hunter.cmake b/cmake/projects/OpenSSL/hunter.cmake index e362a85ae2..019cd2f127 100755 --- a/cmake/projects/OpenSSL/hunter.cmake +++ b/cmake/projects/OpenSSL/hunter.cmake @@ -307,4 +307,4 @@ else() endif() hunter_cacheable(OpenSSL) -hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID "11") +hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID "12") diff --git a/cmake/projects/odb-boost/hunter.cmake b/cmake/projects/odb-boost/hunter.cmake index c439b67cf0..06ef9ccf46 100644 --- a/cmake/projects/odb-boost/hunter.cmake +++ b/cmake/projects/odb-boost/hunter.cmake @@ -27,5 +27,5 @@ hunter_download(PACKAGE_NAME odb-boost PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libodb-boost.la" "lib/pkgconfig/libodb-boost.pc" - PACKAGE_INTERNAL_DEPS_ID "4" + PACKAGE_INTERNAL_DEPS_ID "5" ) From 24bd77f04eb48833f239bcefe0d9d97c5d0fec9f Mon Sep 17 00:00:00 2001 From: Sacha Refshauge Date: Fri, 9 Jun 2017 21:56:51 +1000 Subject: [PATCH 186/612] Add Beast package and example. --- cmake/configs/default.cmake | 1 + cmake/projects/Beast/hunter.cmake | 25 +++++++++++++++++++++++++ examples/Beast/CMakeLists.txt | 16 ++++++++++++++++ examples/Beast/example.cpp | 13 +++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 cmake/projects/Beast/hunter.cmake create mode 100644 examples/Beast/CMakeLists.txt create mode 100644 examples/Beast/example.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index e7c375f50a..98ddea5d98 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -38,6 +38,7 @@ hunter_config(ArrayFire VERSION 3.3.1-p0) hunter_config(Assimp VERSION 3.2-p1) hunter_config(Async++ VERSION 0.0.3-hunter) hunter_config(Avahi VERSION 0.6.31) +hunter_config(Beast VERSION 1.0.0-b32-hunter-4) hunter_config(BZip2 VERSION 1.0.6-p2) hunter_config(Boost VERSION 1.64.0) hunter_config(BoostCompute VERSION 0.5-p0) diff --git a/cmake/projects/Beast/hunter.cmake b/cmake/projects/Beast/hunter.cmake new file mode 100644 index 0000000000..b6996a735f --- /dev/null +++ b/cmake/projects/Beast/hunter.cmake @@ -0,0 +1,25 @@ +# Copyright (c) 2015, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + Beast + VERSION + "1.0.0-b32-hunter-4" + URL + "https://github.com/hunter-packages/Beast/archive/v1.0.0-b32-hunter-4.tar.gz" + SHA1 + 469ff269b5c437255b8392a6bcee829c07d59ce7 +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(Beast) +hunter_download(PACKAGE_NAME Beast) diff --git a/examples/Beast/CMakeLists.txt b/examples/Beast/CMakeLists.txt new file mode 100644 index 0000000000..38a87a3539 --- /dev/null +++ b/examples/Beast/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright (c) 2017, Sacha Refshauge +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-Beast) + +hunter_add_package(Beast) +find_package(Beast CONFIG REQUIRED) + +add_executable(example example.cpp) +target_link_libraries(example Beast::Beast) diff --git a/examples/Beast/example.cpp b/examples/Beast/example.cpp new file mode 100644 index 0000000000..1346e71a05 --- /dev/null +++ b/examples/Beast/example.cpp @@ -0,0 +1,13 @@ +#include +#include +#include + +int main() +{ + // Set up HTTP request + beast::http::request req; + req.version = 11; + beast::http::prepare(req); + + return 0; +} \ No newline at end of file From 4e5781c1814ceeb8e580b3dd56e9dd413bdf0aef Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 14 Jun 2017 00:45:43 +0300 Subject: [PATCH 187/612] Add HUNTER_SUPPRESS_LIST_OF_FILES --- cmake/modules/hunter_download.cmake | 5 +++++ cmake/modules/hunter_unpack_directory.cmake | 2 +- jenkins.py | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cmake/modules/hunter_download.cmake b/cmake/modules/hunter_download.cmake index c2d97c19dc..0fd56a4743 100644 --- a/cmake/modules/hunter_download.cmake +++ b/cmake/modules/hunter_download.cmake @@ -412,6 +412,11 @@ function(hunter_download) "${HUNTER_DOWNLOAD_TOOLCHAIN}" "set(HUNTER_KEEP_PACKAGE_SOURCES \"${HUNTER_KEEP_PACKAGE_SOURCES}\" CACHE INTERNAL \"\")\n" ) + file( + APPEND + "${HUNTER_DOWNLOAD_TOOLCHAIN}" + "set(HUNTER_SUPPRESS_LIST_OF_FILES \"${HUNTER_SUPPRESS_LIST_OF_FILES}\" CACHE INTERNAL \"\")\n" + ) string(COMPARE NOTEQUAL "${CMAKE_MAKE_PROGRAM}" "" has_make) if(has_make) diff --git a/cmake/modules/hunter_unpack_directory.cmake b/cmake/modules/hunter_unpack_directory.cmake index 0fe97e993f..575b194688 100644 --- a/cmake/modules/hunter_unpack_directory.cmake +++ b/cmake/modules/hunter_unpack_directory.cmake @@ -47,7 +47,7 @@ function(hunter_unpack_directory cache_sha1) # While waiting for lock other instance can do all the job if(NOT EXISTS "${unpack_stamp}") set(cmd "${CMAKE_COMMAND}" "-E" "tar") - if(HUNTER_STATUS_DEBUG) + if(HUNTER_STATUS_DEBUG AND NOT HUNTER_SUPPRESS_LIST_OF_FILES) list(APPEND cmd "xvf") else() list(APPEND cmd "xf") diff --git a/jenkins.py b/jenkins.py index 124698380a..5055a78993 100755 --- a/jenkins.py +++ b/jenkins.py @@ -201,6 +201,7 @@ def run(): project_dir, '--fwd', 'CMAKE_POLICY_DEFAULT_CMP0069=NEW', + 'HUNTER_SUPPRESS_LIST_OF_FILES=ON', 'HUNTER_ROOT={}'.format(hunter_root), 'TESTING_URL={}'.format(hunter_url), 'TESTING_SHA1={}'.format(hunter_sha1) @@ -277,6 +278,7 @@ def run(): 'HUNTER_DISABLE_BUILDS=ON', 'HUNTER_USE_CACHE_SERVERS=ONLY', 'CMAKE_POLICY_DEFAULT_CMP0069=NEW', + 'HUNTER_SUPPRESS_LIST_OF_FILES=ON', 'HUNTER_ROOT={}'.format(hunter_root), 'TESTING_URL={}'.format(hunter_url), 'TESTING_SHA1={}'.format(hunter_sha1) From a6ce80023b5adb8c3e4ae050b0fbec3fce856b51 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 14 Jun 2017 00:46:36 +0300 Subject: [PATCH 188/612] Remove version diff from logs --- cmake/modules/hunter_add_version.cmake | 3 --- 1 file changed, 3 deletions(-) diff --git a/cmake/modules/hunter_add_version.cmake b/cmake/modules/hunter_add_version.cmake index fe0ae90094..f7882fcf7e 100644 --- a/cmake/modules/hunter_add_version.cmake +++ b/cmake/modules/hunter_add_version.cmake @@ -47,9 +47,6 @@ function(hunter_add_version) endif() string(COMPARE NOTEQUAL "${${expected_version}}" "${h_VERSION}" version_diff) if(version_diff) - hunter_status_debug( - "Skip '${h_VERSION}' (looking for '${${expected_version}}')" - ) return() endif() From 117de52e844a5f416017f23a73ae9cee4296bd04 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 14 Jun 2017 00:53:34 +0300 Subject: [PATCH 189/612] Suppress install stage if HUNTER_SUPPRESS_LIST_OF_FILES=ON --- cmake/schemes/url_sha1_cmake.cmake.in | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cmake/schemes/url_sha1_cmake.cmake.in b/cmake/schemes/url_sha1_cmake.cmake.in index 7ca6c42876..762f324108 100644 --- a/cmake/schemes/url_sha1_cmake.cmake.in +++ b/cmake/schemes/url_sha1_cmake.cmake.in @@ -73,7 +73,7 @@ else() set(log_build 0) endif() -if("@HUNTER_PACKAGE_LOG_INSTALL@") +if("@HUNTER_PACKAGE_LOG_INSTALL@" OR "@HUNTER_SUPPRESS_LIST_OF_FILES@") set(log_install 1) else() set(log_install 0) @@ -126,9 +126,14 @@ foreach(configuration @HUNTER_PACKAGE_CONFIGURATION_TYPES@) INSTALL_DIR "@HUNTER_PACKAGE_INSTALL_PREFIX@" # not used, just avoid creating Install/ empty directory - BUILD_COMMAND "" - # this command is empty because all necessary targets will - # be built on install stage + BUILD_COMMAND + # Separate build and install stage so we can suppress install log + # which may consist of a long list of files + "@CMAKE_COMMAND@" + --build . + --config ${configuration} + -- + ${jobs_option} CMAKE_ARGS "-G@CMAKE_GENERATOR@" "-C@HUNTER_CACHE_FILE@" @@ -145,8 +150,6 @@ foreach(configuration @HUNTER_PACKAGE_CONFIGURATION_TYPES@) --build . --target install --config ${configuration} - -- - ${jobs_option} COMMAND # Copy license files "@CMAKE_COMMAND@" "-C@HUNTER_ARGS_FILE@" # for 'HUNTER_INSTALL_LICENSE_FILES' From 966b7ad04117c1a84fe385fadc60fd6ce1001e3d Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 14 Jun 2017 01:08:00 +0300 Subject: [PATCH 190/612] Suppress unpack log if HUNTER_SUPPRESS_LIST_OF_FILES=ON [skip ci] --- cmake/modules/hunter_pack_directory.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/hunter_pack_directory.cmake b/cmake/modules/hunter_pack_directory.cmake index 258ffa69ea..12428d3415 100644 --- a/cmake/modules/hunter_pack_directory.cmake +++ b/cmake/modules/hunter_pack_directory.cmake @@ -11,7 +11,7 @@ function(hunter_pack_directory dir_to_pack dest_dir result_sha1) set(temp "${dest_dir}/cache.tar.bz2") set(cmd "${CMAKE_COMMAND}" "-E" "tar") - if(HUNTER_STATUS_DEBUG) + if(HUNTER_STATUS_DEBUG AND NOT HUNTER_SUPPRESS_LIST_OF_FILES) list(APPEND cmd "cvjf") else() list(APPEND cmd "cjf") From ad1f18ed37ff5e8a6df14efd71f3d29543e6d5c5 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 13 Jun 2017 23:00:21 +0300 Subject: [PATCH 191/612] Add 'gauze' --- cmake/configs/default.cmake | 1 + cmake/projects/gauze/hunter.cmake | 26 ++++++++++++++++++++++++++ examples/gauze/CMakeLists.txt | 17 +++++++++++++++++ examples/gauze/foo.cpp | 5 +++++ 4 files changed, 49 insertions(+) create mode 100644 cmake/projects/gauze/hunter.cmake create mode 100644 examples/gauze/CMakeLists.txt create mode 100644 examples/gauze/foo.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 98ddea5d98..77301a8e64 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -143,6 +143,7 @@ hunter_config(fixesproto VERSION 5.0) hunter_config(flatbuffers VERSION 1.3.0-p3) hunter_config(fmt VERSION 3.0.0) hunter_config(freetype VERSION 2.6.2) +hunter_config(gauze VERSION 0.1.0) hunter_config(geos VERSION 3.4.2) hunter_config(gflags VERSION 2.1.2-p1) hunter_config(glew VERSION 2.0.0) diff --git a/cmake/projects/gauze/hunter.cmake b/cmake/projects/gauze/hunter.cmake new file mode 100644 index 0000000000..3ed6771eb0 --- /dev/null +++ b/cmake/projects/gauze/hunter.cmake @@ -0,0 +1,26 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + gauze + VERSION + 0.1.0 + URL + "https://github.com/hunter-packages/gauze/archive/v0.1.0.tar.gz" + SHA1 + 6944f77d5eb61c067acebf06231a29b90963b7c0 +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(gauze) +hunter_cmake_args(gauze CMAKE_ARGS GAUZE_BUILD_TESTS=OFF) +hunter_download(PACKAGE_NAME gauze) diff --git a/examples/gauze/CMakeLists.txt b/examples/gauze/CMakeLists.txt new file mode 100644 index 0000000000..d1ae89c7c6 --- /dev/null +++ b/examples/gauze/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-gauze) + +hunter_add_package(gauze) +find_package(gauze CONFIG REQUIRED) + +add_executable(foo foo.cpp) + +gauze_add_test(NAME foo COMMAND foo) diff --git a/examples/gauze/foo.cpp b/examples/gauze/foo.cpp new file mode 100644 index 0000000000..bb11dc98aa --- /dev/null +++ b/examples/gauze/foo.cpp @@ -0,0 +1,5 @@ +#include + +int gauze_main(int argc, char** argv) { + return EXIT_SUCCESS; +} From 4bb82d2fe7b90e9f51eb73f3c873a459277cea0d Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 14 Jun 2017 13:10:46 +0300 Subject: [PATCH 192/612] gauze 0.1.1 --- cmake/configs/default.cmake | 2 +- cmake/projects/gauze/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 77301a8e64..24c723a247 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -143,7 +143,7 @@ hunter_config(fixesproto VERSION 5.0) hunter_config(flatbuffers VERSION 1.3.0-p3) hunter_config(fmt VERSION 3.0.0) hunter_config(freetype VERSION 2.6.2) -hunter_config(gauze VERSION 0.1.0) +hunter_config(gauze VERSION 0.1.1) hunter_config(geos VERSION 3.4.2) hunter_config(gflags VERSION 2.1.2-p1) hunter_config(glew VERSION 2.0.0) diff --git a/cmake/projects/gauze/hunter.cmake b/cmake/projects/gauze/hunter.cmake index 3ed6771eb0..55838e6801 100644 --- a/cmake/projects/gauze/hunter.cmake +++ b/cmake/projects/gauze/hunter.cmake @@ -20,6 +20,17 @@ hunter_add_version( 6944f77d5eb61c067acebf06231a29b90963b7c0 ) +hunter_add_version( + PACKAGE_NAME + gauze + VERSION + 0.1.1 + URL + "https://github.com/hunter-packages/gauze/archive/v0.1.1.tar.gz" + SHA1 + 4993b09855e51047ea51136a05fcd6d0216f2716 +) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(gauze) hunter_cmake_args(gauze CMAKE_ARGS GAUZE_BUILD_TESTS=OFF) From 133ea9bcba68726277390cde7c5009c82a999ab7 Mon Sep 17 00:00:00 2001 From: dvirtz Date: Wed, 14 Jun 2017 18:08:15 +0300 Subject: [PATCH 193/612] make spdlog 0.13 available on VC++ 2013 as well --- cmake/configs/default.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 77301a8e64..756dd61e0e 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -197,7 +197,7 @@ hunter_config(renderproto VERSION 0.11.1) hunter_config(sm VERSION 1.2.1) hunter_config(sse2neon VERSION 1.0.0-p0) hunter_config(sparsehash VERSION 2.0.2) -if(MSVC_VERSION LESS 1900) +if(MSVC_VERSION LESS 1800) # for VS12 - version without support C++11 hunter_config(spdlog VERSION 1.0.0-p0) else() From 3c8b50347d09c264b620b989dde59ab500d10b3c Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 15 Jun 2017 07:45:40 +0300 Subject: [PATCH 194/612] Print packing errors [skip ci] --- cmake/modules/hunter_pack_directory.cmake | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/cmake/modules/hunter_pack_directory.cmake b/cmake/modules/hunter_pack_directory.cmake index 12428d3415..05f06d182e 100644 --- a/cmake/modules/hunter_pack_directory.cmake +++ b/cmake/modules/hunter_pack_directory.cmake @@ -36,27 +36,24 @@ function(hunter_pack_directory dir_to_pack dest_dir result_sha1) list(APPEND cmd "${x}") endforeach() - if(HUNTER_STATUS_DEBUG) - set(logging_params "") - elseif(HUNTER_STATUS_PRINT) - set(logging_params "") - else() - set(logging_params "OUTPUT_QUIET") - endif() - hunter_print_cmd("${dir_to_pack}" "${cmd}") execute_process( COMMAND ${cmd} WORKING_DIRECTORY "${dir_to_pack}" RESULT_VARIABLE packing_result - ${logging_params} + OUTPUT_VARIABLE packing_output + ERROR_VARIABLE packing_error + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE ) if(packing_result EQUAL 0) hunter_status_debug("Packing successful: ${temp}") else() - hunter_internal_error("Packing failed") + hunter_internal_error( + "Packing failed (${packing_result}, ${packing_output}, ${packing_error})" + ) endif() file(SHA1 "${temp}" archive_sha1) From 79197dd68de9fdeb2d5761a7e4d994baf431232f Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 16 Jun 2017 09:58:49 +0300 Subject: [PATCH 195/612] Visual Studio 15 2017: Fix vcvarsall location --- cmake/modules/hunter_setup_msvc.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/modules/hunter_setup_msvc.cmake b/cmake/modules/hunter_setup_msvc.cmake index e8373a311a..988d4077c5 100644 --- a/cmake/modules/hunter_setup_msvc.cmake +++ b/cmake/modules/hunter_setup_msvc.cmake @@ -131,6 +131,11 @@ macro(hunter_setup_msvc) endif() else() set(_hunter_vcvarsall_path "${_hunter_vcvarsall_path}/../../VC") + if(NOT HUNTER_MSVC_VERSION VERSION_LESS "15") + # Visual Studio 15 2017+ + # * https://github.com/ruslo/hunter/issues/836#issue-236352343 + set(_hunter_vcvarsall_path "${_hunter_vcvarsall_path}/Auxiliary/Build") + endif() endif() get_filename_component( From c8d10684f25c042c8e1ee365b5e88c1892ef69da Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 19 Jun 2017 22:37:23 +0300 Subject: [PATCH 196/612] LIST_DIRECTORIES require CMake 3.3 --- cmake/modules/hunter_unpack_directory.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/modules/hunter_unpack_directory.cmake b/cmake/modules/hunter_unpack_directory.cmake index 575b194688..f6b855289d 100644 --- a/cmake/modules/hunter_unpack_directory.cmake +++ b/cmake/modules/hunter_unpack_directory.cmake @@ -1,6 +1,8 @@ # Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. +cmake_minimum_required(VERSION 3.3) # LIST_DIRECTORIES + include(hunter_internal_error) include(hunter_print_cmd) include(hunter_status_debug) From f768b9bfb5d341d4c82da531527946beb5fe50a4 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 19 Jun 2017 22:47:35 +0300 Subject: [PATCH 197/612] LIST_DIRECTORIES require CMake 3.3 --- cmake/modules/hunter_unpack_directory.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmake/modules/hunter_unpack_directory.cmake b/cmake/modules/hunter_unpack_directory.cmake index f6b855289d..14bc4c108c 100644 --- a/cmake/modules/hunter_unpack_directory.cmake +++ b/cmake/modules/hunter_unpack_directory.cmake @@ -1,8 +1,6 @@ # Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. -cmake_minimum_required(VERSION 3.3) # LIST_DIRECTORIES - include(hunter_internal_error) include(hunter_print_cmd) include(hunter_status_debug) @@ -83,6 +81,14 @@ function(hunter_unpack_directory cache_sha1) hunter_internal_error("Unpack failed") endif() + # For LIST_DIRECTORIES + if(CMAKE_VERSION VERSION_LESS 3.3) + hunter_internal_error( + "CMake version 3.3 at least needed." + "Current version is ${CMAKE_VERSION}." + ) + endif() + hunter_status_debug("Creating list of files and directories") file( GLOB_RECURSE From 7e08b84a3c5da569a1fac3ac95b136261be2f95c Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 20 Jun 2017 12:07:55 +0300 Subject: [PATCH 198/612] Add 'AND use_link_script' --- cmake/modules/hunter_unpack_directory.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/hunter_unpack_directory.cmake b/cmake/modules/hunter_unpack_directory.cmake index 14bc4c108c..3b5f37b625 100644 --- a/cmake/modules/hunter_unpack_directory.cmake +++ b/cmake/modules/hunter_unpack_directory.cmake @@ -82,7 +82,7 @@ function(hunter_unpack_directory cache_sha1) endif() # For LIST_DIRECTORIES - if(CMAKE_VERSION VERSION_LESS 3.3) + if(CMAKE_VERSION VERSION_LESS 3.3 AND use_link_script) hunter_internal_error( "CMake version 3.3 at least needed." "Current version is ${CMAKE_VERSION}." From c69bc781bd8947fa03277ff90d2a41c59f1920f4 Mon Sep 17 00:00:00 2001 From: Ernesto Varoli Date: Wed, 21 Jun 2017 12:11:40 +0200 Subject: [PATCH 199/612] Using czmq package with correct targets --- cmake/configs/default.cmake | 2 +- cmake/projects/czmq/hunter.cmake | 41 ++++++++++++-------------------- 2 files changed, 16 insertions(+), 27 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index af72a6ace8..06c20c2e5b 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -128,7 +128,7 @@ hunter_config(crashpad VERSION v0.0.1-p0) hunter_config(crashup VERSION 0.0.2) hunter_config(cvmatio VERSION 1.0.27-p3) hunter_config(cxxopts VERSION 1.0.0-p0) -hunter_config(czmq VERSION 4.0.2-p0) +hunter_config(czmq VERSION 4.0.2-p1) hunter_config(damageproto VERSION 1.2.1) hunter_config(dbus VERSION 1.10.0-hunter-4) hunter_config(dest VERSION 0.8.0-p4) diff --git a/cmake/projects/czmq/hunter.cmake b/cmake/projects/czmq/hunter.cmake index 856f5f29c0..81bfcbc4b5 100644 --- a/cmake/projects/czmq/hunter.cmake +++ b/cmake/projects/czmq/hunter.cmake @@ -9,66 +9,55 @@ hunter_add_version( PACKAGE_NAME czmq VERSION - "4.0.2-p0" + "4.0.2-p1" URL - "https://github.com/hunter-packages/czmq/archive/v4.0.2-p0.tar.gz" + "https://github.com/hunter-packages/czmq/archive/v4.0.2-p1.tar.gz" SHA1 - e1bbc68f2d0fd0e062ba3c716a3a2f137ed0c7b4 + 6f0a60bdcccd8cadd8de14eb9562cda4e6b0e0b3 ) hunter_add_version( PACKAGE_NAME czmq VERSION - "4.0.1-p0" + "4.0.1-p2" URL - "https://github.com/hunter-packages/czmq/archive/v4.0.1-p0.tar.gz" + "https://github.com/hunter-packages/czmq/archive/v4.0.1-p2.tar.gz" SHA1 - e78acc03a8b86d6209286df1f121755f7bc0bf97 + aa52f864ac9f963634bfa46e48e2372b968cb8ef ) hunter_add_version( PACKAGE_NAME czmq VERSION - "4.0.0-p0" + "4.0.0-p2" URL - "https://github.com/hunter-packages/czmq/archive/v4.0.0-p0.tar.gz" + "https://github.com/hunter-packages/czmq/archive/v4.0.0-p2.tar.gz" SHA1 - fa611741b65f0cb26fd9e1900421791b9c311dd6 + 5644fc0cb17a57431d1fda541cf76cd0a70ab536 ) hunter_add_version( PACKAGE_NAME czmq VERSION - "3.0.2-p0" + "3.0.2-p1" URL - "https://github.com/hunter-packages/czmq/archive/v3.0.2-p0.tar.gz" + "https://github.com/hunter-packages/czmq/archive/v3.0.2-p1.tar.gz" SHA1 - 94c1f2f080a9c9d02b71ba3a57c34a5bd2c74a8c + 1824ab64761a09eb9047660afab2eccca4809fa8 ) hunter_add_version( PACKAGE_NAME czmq VERSION - "3.0.1-p0" + "3.0.1-p1" URL - "https://github.com/hunter-packages/czmq/archive/v3.0.1-p0.tar.gz" + "https://github.com/hunter-packages/czmq/archive/v3.0.1-p1.tar.gz" SHA1 - 571d3241e53e6c6282ac068ef169fe94166318b6 -) - -hunter_add_version( - PACKAGE_NAME - czmq - VERSION - "3.0.0-p0" - URL - "https://github.com/hunter-packages/czmq/archive/v3.0.0-p0.tar.gz" - SHA1 - b5dce40c8239ad1d6dbf87fb96ac3123f1c392d8 + a0f85e5a746b9b31204e16f952760bc3f054a433 ) hunter_pick_scheme(DEFAULT url_sha1_cmake) From 218f5b6a36a0270754e271628b4f2feebc044e26 Mon Sep 17 00:00:00 2001 From: hof Date: Thu, 22 Jun 2017 10:43:48 +0800 Subject: [PATCH 200/612] Update CapnProto to 0.6.1; Add to package list. --- cmake/configs/default.cmake | 2 +- cmake/projects/CapnProto/hunter.cmake | 7 +++++++ docs/packages/all.rst | 1 + docs/packages/messaging.rst | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 06c20c2e5b..f0e2e54364 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -43,7 +43,7 @@ hunter_config(BZip2 VERSION 1.0.6-p2) hunter_config(Boost VERSION 1.64.0) hunter_config(BoostCompute VERSION 0.5-p0) hunter_config(BoostProcess VERSION 0.5) -hunter_config(CapnProto VERSION 0.6.0) +hunter_config(CapnProto VERSION 0.6.1) hunter_config(CLAPACK VERSION 3.2.1) hunter_config(CURL VERSION 7.49.1-DEV-v4) hunter_config(Clang VERSION 3.6.2-p0) diff --git a/cmake/projects/CapnProto/hunter.cmake b/cmake/projects/CapnProto/hunter.cmake index 564582a593..fe667eab36 100644 --- a/cmake/projects/CapnProto/hunter.cmake +++ b/cmake/projects/CapnProto/hunter.cmake @@ -6,6 +6,13 @@ include(hunter_cmake_args) include(hunter_download) include(hunter_pick_scheme) +hunter_add_version( + PACKAGE_NAME CapnProto + VERSION "0.6.1" + URL "https://capnproto.org/capnproto-c++-0.6.1.tar.gz" + SHA1 745dc4c60c02d0a664574a63ec85ef7a03c57676 +) + hunter_add_version( PACKAGE_NAME CapnProto VERSION "0.6.0" diff --git a/docs/packages/all.rst b/docs/packages/all.rst index e8641e6950..8464b32141 100644 --- a/docs/packages/all.rst +++ b/docs/packages/all.rst @@ -16,6 +16,7 @@ All packages * `Boost.process `__ * `CLAPACK `__ * `CURL `__ +* `CapnProto `__ * `Catch `__ * `Comet `__ * `cpp_redis `__ diff --git a/docs/packages/messaging.rst b/docs/packages/messaging.rst index 11a91b85a0..bebc56c159 100644 --- a/docs/packages/messaging.rst +++ b/docs/packages/messaging.rst @@ -5,6 +5,7 @@ IPC/Messaging ------------- + * `CapnProto `_ - Cap'n Proto serialization/RPC system - core tools and C++ library * `Comet `_ - Modern (idiomatic>`_ binding between COM and C++ * `rabbitmq-c `_ - C-language AMQP client library for use with v2.0+ of the RabbitMQ broker. * `ZeroMQ `_ - provide an abstraction of asynchronous message queues, multiple messaging patterns, message filtering (subscriptions>`_, seamless access to multiple transport protocols and more. From 3e0f9f2165ec1c595fc4acd76fbd52026e67f704 Mon Sep 17 00:00:00 2001 From: hof Date: Thu, 22 Jun 2017 11:11:25 +0800 Subject: [PATCH 201/612] Add "Cap'n Proto RPC" --- docs/spelling.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/spelling.txt b/docs/spelling.txt index a578d420d9..08be835eb0 100644 --- a/docs/spelling.txt +++ b/docs/spelling.txt @@ -1,5 +1,6 @@ AppVeyor Bonjour +Cap'n CGold CMake CPack @@ -14,6 +15,8 @@ IDEs Installable Makefile NMake +Proto +RPC Scalable Shareable Stackoverflow From a355be2dd1dfed3efa01db569507a3b58a964676 Mon Sep 17 00:00:00 2001 From: Alexandre Pretyman Date: Sat, 24 Jun 2017 21:03:52 -0300 Subject: [PATCH 202/612] Added cmake/modules/hunter_pkgconfig_export_target --- .../hunter_pkgconfig_export_target.cmake | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 cmake/modules/hunter_pkgconfig_export_target.cmake diff --git a/cmake/modules/hunter_pkgconfig_export_target.cmake b/cmake/modules/hunter_pkgconfig_export_target.cmake new file mode 100644 index 0000000000..ac04739f44 --- /dev/null +++ b/cmake/modules/hunter_pkgconfig_export_target.cmake @@ -0,0 +1,129 @@ +# ---------------------------------------------------------------------- +# Auto creation of CMake targets from pkg-config +# +# Copyright (C) 2017 Alexandre Pretyman. All rights reserved. +# +# Looks for a pkgconfig module of a given name and exports a cmake +# target under the namespace PkgConfig::. +# ---------------------------------------------------------------------- + +include(FindPkgConfig) + +include(hunter_internal_error) +include(hunter_status_debug) + +function(hunter_pkgconfig_export_target PKG_CONFIG_MODULE) + set(target_name "PkgConfig::${PKG_CONFIG_MODULE}") + if(TARGET "${target_name}") + return() + endif() + pkg_check_modules(${PKG_CONFIG_MODULE} ${PKG_CONFIG_MODULE}) + if(NOT ${PKG_CONFIG_MODULE}_FOUND) + hunter_internal_error( + "Could not find pkg-config module: ${PKG_CONFIG_MODULE}" + ) + endif() + add_library("${target_name}" INTERFACE IMPORTED) + + # --- INTERFACE_INCLUDE_DIRECTORIES begin --- + hunter_status_debug( + "PKG_CONFIG_MODULE ${PKG_CONFIG_MODULE} INCLUDE_DIRS: ${${PKG_CONFIG_MODULE}_INCLUDE_DIRS}" + ) + string(COMPARE NOTEQUAL + "${${PKG_CONFIG_MODULE}_INCLUDE_DIRS}" + "" + has_include_dirs + ) + if(has_include_dirs) + set_target_properties("${target_name}" + PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES + "${${PKG_CONFIG_MODULE}_INCLUDE_DIRS}" + ) + endif() + # --- INTERFACE_INCLUDE_DIRECTORIES end --- + + # --- INTERFACE_LINK_LIBRARIES begin --- + set(link_libs) + + hunter_status_debug( + "PKG_CONFIG_MODULE ${PKG_CONFIG_MODULE} LDFLAGS: ${${PKG_CONFIG_MODULE}_LDFLAGS}" + ) + string(COMPARE NOTEQUAL + "${${PKG_CONFIG_MODULE}_LDFLAGS}" + "" + has_ldflags + ) + if(has_ldflags) + list(APPEND link_libs ${${PKG_CONFIG_MODULE}_LDFLAGS}) + endif() + + hunter_status_debug( + "PKG_CONFIG_MODULE ${PKG_CONFIG_MODULE} LDFLAGS_OTHER: ${${PKG_CONFIG_MODULE}_LDFLAGS_OTHER}" + ) + string(COMPARE NOTEQUAL + "${${PKG_CONFIG_MODULE}_LDFLAGS_OTHER}" + "" + has_ldflags_other + ) + if(has_ldflags_other) + list(APPEND link_libs ${${PKG_CONFIG_MODULE}_LDFLAGS_OTHER}) + endif() + + # No need to treat the pkg-config module's _LIBRARY_DIRS and _LIBRARIES + # as they are already included in LD_FLAGS + string(COMPARE NOTEQUAL + "${link_libs}" + "" + has_link_libs + ) + if(has_link_libs) + set_target_properties("${target_name}" + PROPERTIES + INTERFACE_LINK_LIBRARIES + "${link_libs}" + ) + endif() + # --- INTERFACE_LINK_LIBRARIES begin --- + + # --- INTERFACE_COMPILE_OPTIONS begin --- + set(compile_opts) + + hunter_status_debug( + "PKG_CONFIG_MODULE ${PKG_CONFIG_MODULE} CFLAGS: ${${PKG_CONFIG_MODULE}_CFLAGS}" + ) + string(COMPARE NOTEQUAL + "${${PKG_CONFIG_MODULE}_CFLAGS}" + "" + has_cflags) + if(has_cflags) + list(APPEND compile_opts ${${PKG_CONFIG_MODULE}_CFLAGS}) + endif() + + hunter_status_debug( + "PKG_CONFIG_MODULE ${PKG_CONFIG_MODULE} CFLAGS_OTHER: ${${PKG_CONFIG_MODULE}_CFLAGS_OTHER}" + ) + string(COMPARE NOTEQUAL + "${${PKG_CONFIG_MODULE}_CFLAGS_OTHER}" + "" + has_cflags_other + ) + if(has_cflags_other) + list(APPEND compile_opts ${${PKG_CONFIG_MODULE}_CFLAGS_OTHER}) + endif() + + string(COMPARE NOTEQUAL + "${compile_opts}" + "" + has_compile_opts + ) + if(has_compile_opts) + set_target_properties("${target_name}" + PROPERTIES + INTERFACE_COMPILE_OPTIONS + "${compile_opts}" + ) + endif() + # --- INTERFACE_COMPILE_OPTIONS end --- +endfunction() + From 49070bc9b39daa8817a4e3d0f3b759d16be6bd9f Mon Sep 17 00:00:00 2001 From: Sacha Refshauge Date: Sun, 25 Jun 2017 20:25:21 +1000 Subject: [PATCH 203/612] Add Tesseract project and example. --- cmake/configs/default.cmake | 1 + cmake/projects/Tesseract/hunter.cmake | 34 +++++++++++++++++++++++++++ examples/Tesseract/CMakeLists.txt | 16 +++++++++++++ examples/Tesseract/example.cpp | 10 ++++++++ 4 files changed, 61 insertions(+) create mode 100644 cmake/projects/Tesseract/hunter.cmake create mode 100644 examples/Tesseract/CMakeLists.txt create mode 100644 examples/Tesseract/example.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 06c20c2e5b..4380e1c50b 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -205,6 +205,7 @@ else() hunter_config(spdlog VERSION 0.13.0-p0) endif() hunter_config(szip VERSION 2.1.0-p1) +hunter_config(Tesseract VERSION 3.05.01-hunter-3) hunter_config(thread-pool-cpp VERSION 1.0.0-p3) hunter_config(tinydir VERSION 1.2-p0) hunter_config(websocketpp VERSION 0.7.0-p2) diff --git a/cmake/projects/Tesseract/hunter.cmake b/cmake/projects/Tesseract/hunter.cmake new file mode 100644 index 0000000000..294a6ecd0a --- /dev/null +++ b/cmake/projects/Tesseract/hunter.cmake @@ -0,0 +1,34 @@ +# Copyright (c) 2015, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + Tesseract + VERSION + "3.05.01-hunter-3" + URL + "https://github.com/hunter-packages/tesseract/archive/v3.05.01-hunter-3.tar.gz" + SHA1 + 0ccf9537a17634448618b21d3fd26537a26b94ae +) + +if(ANDROID OR MINGW) + hunter_cmake_args( + Tesseract + CMAKE_ARGS + Tesseract_USE_OPENCL=OFF +) +endif() + + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(Tesseract) +hunter_download(PACKAGE_NAME Tesseract) diff --git a/examples/Tesseract/CMakeLists.txt b/examples/Tesseract/CMakeLists.txt new file mode 100644 index 0000000000..82875820c5 --- /dev/null +++ b/examples/Tesseract/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright (c) 2017, Sacha Refshauge +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-Tesseract) + +hunter_add_package(Tesseract) +find_package(Tesseract CONFIG REQUIRED) + +add_executable(example example.cpp) +target_link_libraries(example Tesseract::libtesseract) diff --git a/examples/Tesseract/example.cpp b/examples/Tesseract/example.cpp new file mode 100644 index 0000000000..8afc7a981f --- /dev/null +++ b/examples/Tesseract/example.cpp @@ -0,0 +1,10 @@ +#include +#include + +int main() +{ + tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI(); + api->End(); + + return 0; +} From c001ce2c5532a4210f01ba00877837c6b34b8b46 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Tue, 27 Jun 2017 08:04:08 +0200 Subject: [PATCH 204/612] update eigen to 3.3.4 --- cmake/configs/default.cmake | 2 +- cmake/projects/Eigen/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 06c20c2e5b..dc3517da0e 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -52,7 +52,7 @@ hunter_config(Comet VERSION 4.0.2) hunter_config(CppNetlib VERSION 0.10.1-hunter-3) hunter_config(CppNetlibUri VERSION 1.0.4-hunter) hunter_config(CsvParserCPlusPlus VERSION 1.0.1) -hunter_config(Eigen VERSION 3.3.3-p0) +hunter_config(Eigen VERSION 3.3.4-p0) hunter_config(Expat VERSION 2.1.1) if(MSVC) hunter_config(getopt VERSION 1.0.0-p0) diff --git a/cmake/projects/Eigen/hunter.cmake b/cmake/projects/Eigen/hunter.cmake index 08c7abfad9..5cd5f2e86d 100644 --- a/cmake/projects/Eigen/hunter.cmake +++ b/cmake/projects/Eigen/hunter.cmake @@ -13,6 +13,17 @@ include(hunter_cacheable) hunter_cacheable(Eigen) # List of versions here... +hunter_add_version( + PACKAGE_NAME + Eigen + VERSION + "3.3.4-p0" + URL + "https://github.com/hunter-packages/eigen/archive/v3.3.4-p0.tar.gz" + SHA1 + 49dee30c5fedd8613a144f9bf6551fb46bb69e92 +) + hunter_add_version( PACKAGE_NAME Eigen From 4dc0a0fcff661911c0b472aae51c4b4eb7f3e5a1 Mon Sep 17 00:00:00 2001 From: Alexandre Pretyman Date: Sat, 24 Jun 2017 21:04:22 -0300 Subject: [PATCH 205/612] Added cmake/modules/hunter_get_build_flags --- cmake/modules/hunter_get_build_flags.cmake | 152 +++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 cmake/modules/hunter_get_build_flags.cmake diff --git a/cmake/modules/hunter_get_build_flags.cmake b/cmake/modules/hunter_get_build_flags.cmake new file mode 100644 index 0000000000..1d6312eeaf --- /dev/null +++ b/cmake/modules/hunter_get_build_flags.cmake @@ -0,0 +1,152 @@ +# Copyright (c) 2017 Ruslan Baratov, Alexandre Pretyman +# All rights reserved. +# +# This function dump build flags. +# Only OUT_* paramaters which are passed will be written too (i.e. optional) +# +# Usage example: +# hunter_get_build_flags( +# PACKAGE_CONFIGURATION_TYPES +# "Release" # Mandatory ONE build config type +# INSTALL_DIR +# "${HUNTER_INSTALL_DIR}" # Mandatory of hunter +# OUT_CPPFLAGS +# cppflags # set cppflags with preprocessor flags +# OUT_CFLAGS +# cflags # set cflags with c compilation flags +# OUT_CXXFLAGS +# cxxflags # set cxxflags with c++ compilation flags +# OUT_LDFLAGS +# ldflags # set ldflags with linking flags +# ) + +include(CMakeParseArguments) + +include(hunter_dump_cmake_flags) +include(hunter_fatal_error) +include(hunter_internal_error) +include(hunter_status_debug) + +function(hunter_get_build_flags) + set(optional_params) + set(one_value_params + INSTALL_DIR + OUT_CPPFLAGS + OUT_CFLAGS + OUT_CXXFLAGS + OUT_LDFLAGS + ) + set(multi_value_params + PACKAGE_CONFIGURATION_TYPES + ) + cmake_parse_arguments( + PARAM + "${optional_params}" + "${one_value_params}" + "${multi_value_params}" + ${ARGN} + ) + + if(PARAM_UNPARSED_ARGUMENTS) + hunter_internal_error( + "Invalid arguments passed to hunter_get_build_flags" + " ${PARAM_UNPARSED_ARGUMENTS}" + ) + endif() + + string(COMPARE NOTEQUAL "${PARAM_INSTALL_DIR}" "" has_install_dir) + if (NOT has_install_dir) + hunter_internal_error( + "hunter_get_build_flags expects INSTALL_DIR, it must be provided" + ) + endif() + + list(LENGTH PARAM_PACKAGE_CONFIGURATION_TYPES len) + if(NOT "${len}" EQUAL "1") + hunter_fatal_error( + "hunter_get_build_flags expects PACKAGE_CONFIGURATION_TYPES to have exactly 1 value, but has ${len} with elements: ${PARAM_PACKAGE_CONFIGURATION_TYPES}" + ) + endif() + string(TOUPPER ${PARAM_PACKAGE_CONFIGURATION_TYPES} config_type) + + hunter_status_debug( + "Build flags config ${config_type} on dir ${PARAM_GLOBAL_INSTALLDIR}" + ) + string(COMPARE NOTEQUAL "${PARAM_OUT_CPPFLAGS}" "" has_out_cppflags) + string(COMPARE NOTEQUAL "${PARAM_OUT_CFLAGS}" "" has_out_cflags) + string(COMPARE NOTEQUAL "${PARAM_OUT_CXXFLAGS}" "" has_out_cxxflags) + string(COMPARE NOTEQUAL "${PARAM_OUT_LDFLAGS}" "" has_out_ldflags) + + if(has_out_cppflags) + # CPPFLAGS=${PARAM_CPPFLAGS} [-D${COMPILE_DEFINITIONS}] + # [-I${INCLUDE_DIRECTORIES}] + # + # C Preprocessor flags + + hunter_dump_cmake_flags(CPPFLAGS cppflags) + set(cppflags "${cppflags} -I${PARAM_INSTALL_DIR}/include") + string(STRIP "${cppflags}" cppflags) + # build config type definitions + get_directory_property(defs + COMPILE_DEFINITIONS_${config_type} + ) + foreach(def ${defs}) + set(cppflags "${cppflags} -D${def}") + endforeach() + # non-build config specific definitions + get_directory_property(defs COMPILE_DEFINITIONS) + foreach(def ${defs}) + set(cppflags "${cppflags} -D${def}") + endforeach() + + get_directory_property(include_dirs INCLUDE_DIRECTORIES) + foreach(include_dir ${include_dirs}) + set(cppflags + "${cppflags} ${CMAKE_INCLUDE_SYSTEM_FLAG_CXX} ${include_dir}" + ) + endforeach() + + hunter_status_debug(" CPPFLAGS=${cppflags}") + set(${PARAM_OUT_CPPFLAGS} ${cppflags} PARENT_SCOPE) + endif() + + if(has_out_cflags) + # CFLAGS=${cflags} ${CMAKE_C_FLAGS} + # + # C Compiler Flags (defines or include directories should not be needed here) + set(cflags "${CMAKE_C_FLAGS_${config_type}} ${CMAKE_C_FLAGS}") + string(STRIP "${cflags}" cflags) + hunter_status_debug(" CFLAGS=${cflags}") + set(${PARAM_OUT_CFLAGS} ${cflags} PARENT_SCOPE) + endif() + + if(has_out_cxxflags) + # CXXFLAGS=${cxxflags} ${CMAKE_CXX_FLAGS} + # + # C++ Compiler flags (defines or include directories should not be needed here) + set(cxxflags + "${CMAKE_CXX_FLAGS_${config_type}} ${CMAKE_CXX_FLAGS} ${PARAM_CXXFLAGS}" + ) + string(STRIP "${cxxflags}" cxxflags) + hunter_status_debug(" CXXFLAGS=${cxxflags}") + set(${PARAM_OUT_CXXFLAGS} ${cflags} PARENT_SCOPE) + endif() + + if(has_out_ldflags) + # LDFLAGS=${ldflags} + # + # Linker flags + set(ldflags "-L${PARAM_INSTALL_DIR}/lib") + set(ldflags "${ldflags} ${CMAKE_EXE_LINKER_FLAGS_${config_type}}") + string(STRIP "${ldflags}" ldflags) + set(ldflags "${ldflags} ${CMAKE_EXE_LINKER_FLAGS}") + string(STRIP "${ldflags}" ldflags) + string(COMPARE NOTEQUAL "${ANDROID}" "" is_android) + if(is_android) + set(ldflags "${ldflags} ${__libstl}") + endif() + hunter_status_debug(" LDFLAGS=${ldflags}") + set(${PARAM_OUT_LDFLAGS} ${ldflags} PARENT_SCOPE) + endif() +endfunction() + From 5037c5a64f9034d8ebe11be92c897cf4aac072a0 Mon Sep 17 00:00:00 2001 From: dvirtz Date: Wed, 28 Jun 2017 23:16:09 +0300 Subject: [PATCH 206/612] added Beast to docs --- docs/packages/all.rst | 1 + docs/packages/networking.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/packages/all.rst b/docs/packages/all.rst index 8464b32141..50e077e057 100644 --- a/docs/packages/all.rst +++ b/docs/packages/all.rst @@ -11,6 +11,7 @@ All packages * `Autobahn-cpp `__ * `Avahi `__ * `BZip2 `__ +* `Beast `__ * `Boost `__ * `Boost.compute `__ * `Boost.process `__ diff --git a/docs/packages/networking.rst b/docs/packages/networking.rst index 81756de7d4..9afe50c2a3 100644 --- a/docs/packages/networking.rst +++ b/docs/packages/networking.rst @@ -9,6 +9,7 @@ Networking * `Autobahn-cpp `_ - open-source implementations of the The WebSocket Protocol and The Web Application Messaging Protocol (WAMP>`_ network protocols. * `Avahi `_ - Service Discovery for Linux using mDNS/DNS-SD -- compatible with Bonjour + * `Beast `__ - HTTP and WebSocket built on Boost.Asio in C++11 * `CppNetlib.URI `_ - C++ Network URI * `CURL `_ - A command line tool and library for transferring data with URL syntax * `Libssh2 `_ From f4a9de7b23f1fba70a61da7677a53d1c0aaaa320 Mon Sep 17 00:00:00 2001 From: dvirtz Date: Thu, 29 Jun 2017 08:17:31 +0300 Subject: [PATCH 207/612] added Asio to spelling section --- docs/packages/networking.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/networking.rst b/docs/packages/networking.rst index 9afe50c2a3..12a72579bd 100644 --- a/docs/packages/networking.rst +++ b/docs/packages/networking.rst @@ -3,6 +3,7 @@ mDNS DNS websocket + Asio Networking ---------- From 071943e746f269669633c9e1731894ea225e474f Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Wed, 21 Jun 2017 13:33:34 +0200 Subject: [PATCH 208/612] boost: add ability to cross compile boost - use CMAKE_HOST_WIN32 for both schemas - more generic b2 and bootstrap command setting - on windows use `b2` and `boostrap.bat` - otherwise use `./b2` and `./bootstrap.sh` - on mingw append `gcc` to bootstrap_cmd generic schema: - on apple prepend `clear-all.sh` before bootstrap_cmd lib schema: - on mingw always specify `target=windows` --- .../Boost/schemes/url_sha1_boost.cmake.in | 28 +++++++++---------- .../schemes/url_sha1_boost_library.cmake.in | 12 +++++--- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/cmake/projects/Boost/schemes/url_sha1_boost.cmake.in b/cmake/projects/Boost/schemes/url_sha1_boost.cmake.in index 37a811e591..45f64b3d1f 100644 --- a/cmake/projects/Boost/schemes/url_sha1_boost.cmake.in +++ b/cmake/projects/Boost/schemes/url_sha1_boost.cmake.in @@ -94,24 +94,24 @@ else() set(env_cmd "") endif() -if("@MSVC@") +if(CMAKE_HOST_WIN32) set(install_cmd "b2") set(bootstrap_cmd "bootstrap.bat") -elseif("@MINGW@") - # Test scenario: MinGW installed in system, Visual Studio - not - set(install_cmd "b2") - set(bootstrap_cmd "bootstrap.bat" "gcc") else() set(install_cmd "./b2") - if(APPLE) - # Clear Xcode environment - set( - bootstrap_cmd - . "@HUNTER_GLOBAL_SCRIPT_DIR@/clear-all.sh" && ./bootstrap.sh - ) - else() - set(bootstrap_cmd "./bootstrap.sh") - endif() + set(bootstrap_cmd "./bootstrap.sh") +endif() + +if("@MINGW@") + # Test scenario: MinGW installed in system, Visual Studio - not + list(APPEND bootstrap_cmd "gcc") +endif() +if(APPLE) + # Clear Xcode environment + set( + bootstrap_cmd + . "@HUNTER_GLOBAL_SCRIPT_DIR@/clear-all.sh" && ${bootstrap_cmd} + ) endif() if("@MSVC@") diff --git a/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in b/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in index 50bcc78aed..b83c2b3900 100644 --- a/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in +++ b/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in @@ -251,6 +251,10 @@ set( "--user-config=${boost_user_jam}" --with-@HUNTER_PACKAGE_COMPONENT@ ) +if("@MINGW@") + # cross compile from "linux" to "windows" using mingw + set(build_opts target-os=windows ${build_opts}) +endif() hunter_boost_component_b2_args( "@HUNTER_PACKAGE_COMPONENT@" @@ -337,17 +341,17 @@ if(@HUNTER_STATUS_DEBUG@) set(verbose_output "-d+2 --debug-configuration") endif() -if("@MSVC@") +if(CMAKE_HOST_WIN32) set(bootstrap_cmd "bootstrap.bat") set(b2_cmd "b2") -elseif("@MINGW@") - set(bootstrap_cmd "bootstrap.bat" "gcc") - set(b2_cmd "b2") else() set(bootstrap_cmd "./bootstrap.sh") set(b2_cmd "./b2") endif() +if("@MINGW@") + list(APPEND bootstrap_cmd "gcc") +endif() if(HUNTER_STATUS_DEBUG) file(READ "${boost_user_jam}" USER_JAM_CONTENT) From ecfa47e61119eb1b8fbd9b4704a374ff81560fbc Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Wed, 21 Jun 2017 15:18:13 +0200 Subject: [PATCH 209/612] boost: increase PACKAGE_INTERNAL_DEPS_ID to 15 --- cmake/projects/Boost/atomic/hunter.cmake | 2 +- cmake/projects/Boost/chrono/hunter.cmake | 2 +- cmake/projects/Boost/context/hunter.cmake | 2 +- cmake/projects/Boost/coroutine/hunter.cmake | 2 +- cmake/projects/Boost/date_time/hunter.cmake | 2 +- cmake/projects/Boost/exception/hunter.cmake | 2 +- cmake/projects/Boost/filesystem/hunter.cmake | 2 +- cmake/projects/Boost/graph/hunter.cmake | 2 +- cmake/projects/Boost/graph_parallel/hunter.cmake | 2 +- cmake/projects/Boost/hunter.cmake | 2 +- cmake/projects/Boost/hunter.cmake.in | 2 +- cmake/projects/Boost/iostreams/hunter.cmake | 2 +- cmake/projects/Boost/locale/hunter.cmake | 2 +- cmake/projects/Boost/log/hunter.cmake | 2 +- cmake/projects/Boost/math/hunter.cmake | 2 +- cmake/projects/Boost/mpi/hunter.cmake | 2 +- cmake/projects/Boost/program_options/hunter.cmake | 2 +- cmake/projects/Boost/python/hunter.cmake | 2 +- cmake/projects/Boost/random/hunter.cmake | 2 +- cmake/projects/Boost/regex/hunter.cmake | 2 +- cmake/projects/Boost/serialization/hunter.cmake | 2 +- cmake/projects/Boost/signals/hunter.cmake | 2 +- cmake/projects/Boost/system/hunter.cmake | 2 +- cmake/projects/Boost/test/hunter.cmake | 2 +- cmake/projects/Boost/thread/hunter.cmake | 2 +- cmake/projects/Boost/timer/hunter.cmake | 2 +- cmake/projects/Boost/wave/hunter.cmake | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/cmake/projects/Boost/atomic/hunter.cmake b/cmake/projects/Boost/atomic/hunter.cmake index 96a2faa1da..a8b2f10beb 100644 --- a/cmake/projects/Boost/atomic/hunter.cmake +++ b/cmake/projects/Boost/atomic/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT atomic - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/chrono/hunter.cmake b/cmake/projects/Boost/chrono/hunter.cmake index 63eaea0e83..8b2cddf748 100644 --- a/cmake/projects/Boost/chrono/hunter.cmake +++ b/cmake/projects/Boost/chrono/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT chrono - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/context/hunter.cmake b/cmake/projects/Boost/context/hunter.cmake index 8a3fb7f6b3..25bba583a2 100644 --- a/cmake/projects/Boost/context/hunter.cmake +++ b/cmake/projects/Boost/context/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT context - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/coroutine/hunter.cmake b/cmake/projects/Boost/coroutine/hunter.cmake index 5e07037042..441693c9bb 100644 --- a/cmake/projects/Boost/coroutine/hunter.cmake +++ b/cmake/projects/Boost/coroutine/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT coroutine - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/date_time/hunter.cmake b/cmake/projects/Boost/date_time/hunter.cmake index ee5d5678e9..6475d59eb2 100644 --- a/cmake/projects/Boost/date_time/hunter.cmake +++ b/cmake/projects/Boost/date_time/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT date_time - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/exception/hunter.cmake b/cmake/projects/Boost/exception/hunter.cmake index dd91d7daeb..a37af1516f 100644 --- a/cmake/projects/Boost/exception/hunter.cmake +++ b/cmake/projects/Boost/exception/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT exception - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/filesystem/hunter.cmake b/cmake/projects/Boost/filesystem/hunter.cmake index a791a8a43c..4cdab81624 100644 --- a/cmake/projects/Boost/filesystem/hunter.cmake +++ b/cmake/projects/Boost/filesystem/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT filesystem - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/graph/hunter.cmake b/cmake/projects/Boost/graph/hunter.cmake index 419ef6d923..dfc42ca673 100644 --- a/cmake/projects/Boost/graph/hunter.cmake +++ b/cmake/projects/Boost/graph/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT graph - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/graph_parallel/hunter.cmake b/cmake/projects/Boost/graph_parallel/hunter.cmake index 0add507db5..c165d9058a 100644 --- a/cmake/projects/Boost/graph_parallel/hunter.cmake +++ b/cmake/projects/Boost/graph_parallel/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT graph_parallel - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/hunter.cmake b/cmake/projects/Boost/hunter.cmake index a59a3c901d..48f692463e 100644 --- a/cmake/projects/Boost/hunter.cmake +++ b/cmake/projects/Boost/hunter.cmake @@ -256,4 +256,4 @@ hunter_add_version( hunter_pick_scheme(DEFAULT url_sha1_boost) hunter_cacheable(Boost) -hunter_download(PACKAGE_NAME Boost PACKAGE_INTERNAL_DEPS_ID "14") +hunter_download(PACKAGE_NAME Boost PACKAGE_INTERNAL_DEPS_ID "15") diff --git a/cmake/projects/Boost/hunter.cmake.in b/cmake/projects/Boost/hunter.cmake.in index c1cf4fe023..52186d010c 100644 --- a/cmake/projects/Boost/hunter.cmake.in +++ b/cmake/projects/Boost/hunter.cmake.in @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT boost_component - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/iostreams/hunter.cmake b/cmake/projects/Boost/iostreams/hunter.cmake index 19d0138977..41d19a7a80 100644 --- a/cmake/projects/Boost/iostreams/hunter.cmake +++ b/cmake/projects/Boost/iostreams/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT iostreams - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/locale/hunter.cmake b/cmake/projects/Boost/locale/hunter.cmake index f68838d653..d2c51f25b4 100644 --- a/cmake/projects/Boost/locale/hunter.cmake +++ b/cmake/projects/Boost/locale/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT locale - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/log/hunter.cmake b/cmake/projects/Boost/log/hunter.cmake index e1dbcf8dbb..128b2935cc 100644 --- a/cmake/projects/Boost/log/hunter.cmake +++ b/cmake/projects/Boost/log/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT log - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/math/hunter.cmake b/cmake/projects/Boost/math/hunter.cmake index 9f1720d48e..7968c0e26c 100644 --- a/cmake/projects/Boost/math/hunter.cmake +++ b/cmake/projects/Boost/math/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT math - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/mpi/hunter.cmake b/cmake/projects/Boost/mpi/hunter.cmake index aeb0992c86..5c01db9355 100644 --- a/cmake/projects/Boost/mpi/hunter.cmake +++ b/cmake/projects/Boost/mpi/hunter.cmake @@ -26,5 +26,5 @@ hunter_download( Boost PACKAGE_COMPONENT mpi - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/program_options/hunter.cmake b/cmake/projects/Boost/program_options/hunter.cmake index 7249bd014f..68a63dbcd7 100644 --- a/cmake/projects/Boost/program_options/hunter.cmake +++ b/cmake/projects/Boost/program_options/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT program_options - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/python/hunter.cmake b/cmake/projects/Boost/python/hunter.cmake index 3932b02951..29eeebe913 100644 --- a/cmake/projects/Boost/python/hunter.cmake +++ b/cmake/projects/Boost/python/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT python - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/random/hunter.cmake b/cmake/projects/Boost/random/hunter.cmake index e442b26817..6df74df5af 100644 --- a/cmake/projects/Boost/random/hunter.cmake +++ b/cmake/projects/Boost/random/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT random - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/regex/hunter.cmake b/cmake/projects/Boost/regex/hunter.cmake index 96ec2cec1b..2d3ee58d1d 100644 --- a/cmake/projects/Boost/regex/hunter.cmake +++ b/cmake/projects/Boost/regex/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT regex - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/serialization/hunter.cmake b/cmake/projects/Boost/serialization/hunter.cmake index f91a5f791f..be620d44cf 100644 --- a/cmake/projects/Boost/serialization/hunter.cmake +++ b/cmake/projects/Boost/serialization/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT serialization - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/signals/hunter.cmake b/cmake/projects/Boost/signals/hunter.cmake index eae009cb8a..8bf055d806 100644 --- a/cmake/projects/Boost/signals/hunter.cmake +++ b/cmake/projects/Boost/signals/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT signals - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/system/hunter.cmake b/cmake/projects/Boost/system/hunter.cmake index f39d092a58..82ba3a1b34 100644 --- a/cmake/projects/Boost/system/hunter.cmake +++ b/cmake/projects/Boost/system/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT system - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/test/hunter.cmake b/cmake/projects/Boost/test/hunter.cmake index 7acf8394c2..e818fba7b1 100644 --- a/cmake/projects/Boost/test/hunter.cmake +++ b/cmake/projects/Boost/test/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT test - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/thread/hunter.cmake b/cmake/projects/Boost/thread/hunter.cmake index b2a95f0c17..b8056c58a9 100644 --- a/cmake/projects/Boost/thread/hunter.cmake +++ b/cmake/projects/Boost/thread/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT thread - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/timer/hunter.cmake b/cmake/projects/Boost/timer/hunter.cmake index a0e3b42b5e..81a2415142 100644 --- a/cmake/projects/Boost/timer/hunter.cmake +++ b/cmake/projects/Boost/timer/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT timer - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) diff --git a/cmake/projects/Boost/wave/hunter.cmake b/cmake/projects/Boost/wave/hunter.cmake index e84bdafce7..f826e8ca58 100644 --- a/cmake/projects/Boost/wave/hunter.cmake +++ b/cmake/projects/Boost/wave/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT wave - PACKAGE_INTERNAL_DEPS_ID "14" + PACKAGE_INTERNAL_DEPS_ID "15" ) From b8c81ae2b2ed049e5c5deb49fa5d55bea61655c0 Mon Sep 17 00:00:00 2001 From: dvirtz Date: Thu, 29 Jun 2017 11:19:20 +0300 Subject: [PATCH 210/612] support MSVC 19.11 compiler --- cmake/modules/hunter_setup_msvc.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/hunter_setup_msvc.cmake b/cmake/modules/hunter_setup_msvc.cmake index 988d4077c5..04e136b249 100644 --- a/cmake/modules/hunter_setup_msvc.cmake +++ b/cmake/modules/hunter_setup_msvc.cmake @@ -41,7 +41,7 @@ macro(hunter_setup_msvc) string(COMPARE EQUAL "${MSVC_VERSION}" "1700" _vs_11_2012) string(COMPARE EQUAL "${MSVC_VERSION}" "1800" _vs_12_2013) string(COMPARE EQUAL "${MSVC_VERSION}" "1900" _vs_14_2015) - string(COMPARE EQUAL "${MSVC_VERSION}" "1910" _vs_15_2017) + string(REGEX MATCH "^191[01]$" _vs_15_2017 "${MSVC_VERSION}") if(_vs_8_2005) set(HUNTER_MSVC_VERSION "8") From d418d7a83473e311a4c0104afd6b2e0992065e8d Mon Sep 17 00:00:00 2001 From: Alexandre Pretyman Date: Sat, 24 Jun 2017 21:04:57 -0300 Subject: [PATCH 211/612] Added cmake/modules/hunter_get_toolchain_binaries --- .../hunter_get_toolchain_binaries.cmake | 168 ++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 cmake/modules/hunter_get_toolchain_binaries.cmake diff --git a/cmake/modules/hunter_get_toolchain_binaries.cmake b/cmake/modules/hunter_get_toolchain_binaries.cmake new file mode 100644 index 0000000000..fade89b63f --- /dev/null +++ b/cmake/modules/hunter_get_toolchain_binaries.cmake @@ -0,0 +1,168 @@ +include(hunter_internal_error) +include(hunter_pick_archiver) +include(hunter_status_debug) +include(hunter_test_string_not_empty) + +function(hunter_get_toolchain_binaries) + set(optional_params) + set(one_value_params + OUT_AR + OUT_AS + OUT_LD + OUT_NM + OUT_OBJCOPY + OUT_OBJDUMP + OUT_RANLIB + OUT_STRIP + OUT_CPP + OUT_CC + OUT_CXX + ) + set(multi_value_params) + cmake_parse_arguments( + PARAM + "${optional_params}" + "${one_value_params}" + "${multi_value_params}" + ${ARGN} + ) + + if(PARAM_UNPARSED_ARGUMENTS) + hunter_internal_error( + "Invalid arguments passed to hunter_get_toolchain_binaries" + " ${PARAM_UNPARSED_ARGUMENTS}" + ) + endif() + + + string(COMPARE NOTEQUAL "${ANDROID}" "" is_android) + string(COMPARE NOTEQUAL "${RASPBERRY_PI}" "" is_raspberry_pi) + if(is_android) + hunter_test_string_not_empty("${CMAKE_CXX_ANDROID_TOOLCHAIN_MACHINE}") + hunter_test_string_not_empty("${CMAKE_C_ANDROID_TOOLCHAIN_PREFIX}") + # CMAKE_C_ANDROID_TOOLCHAIN_SUFFIX can be empty + + # Extra Android variables that can't be set in toolchain + # (some variables available only after toolchain processed). + set( + CMAKE_C_PREPROCESSOR + "${CMAKE_C_ANDROID_TOOLCHAIN_PREFIX}cpp${CMAKE_C_ANDROID_TOOLCHAIN_SUFFIX}" + ) + if(NOT EXISTS "${CMAKE_C_PREPROCESSOR}") + hunter_internal_error("File not found: ${CMAKE_C_PREPROCESSOR}") + endif() + endif() + + if(is_android OR is_raspberry_pi) + hunter_test_string_not_empty("${CMAKE_C_FLAGS}") + hunter_test_string_not_empty("${CMAKE_CXX_FLAGS}") + hunter_test_string_not_empty("${CMAKE_AR}") + hunter_test_string_not_empty("${CMAKE_C_PREPROCESSOR}") + hunter_test_string_not_empty("${CMAKE_C_COMPILER}") + hunter_test_string_not_empty("${CMAKE_CXX_COMPILER}") + hunter_test_string_not_empty("${CMAKE_LINKER}") + hunter_test_string_not_empty("${CMAKE_NM}") + hunter_test_string_not_empty("${CMAKE_OBJCOPY}") + hunter_test_string_not_empty("${CMAKE_OBJDUMP}") + hunter_test_string_not_empty("${CMAKE_RANLIB}") + hunter_test_string_not_empty("${CMAKE_STRIP}") + endif() + + # -> CMAKE_AR + # -> CMAKE_RANLIB + hunter_pick_archiver() + + string(COMPARE NOTEQUAL "${PARAM_OUT_AR}" "" has_out_ar) + string(COMPARE NOTEQUAL "${PARAM_OUT_AS}" "" has_out_as) + string(COMPARE NOTEQUAL "${PARAM_OUT_LD}" "" has_out_ld) + string(COMPARE NOTEQUAL "${PARAM_OUT_NM}" "" has_out_nm) + string(COMPARE NOTEQUAL "${PARAM_OUT_OBJCOPY}" "" has_out_objcopy) + string(COMPARE NOTEQUAL "${PARAM_OUT_OBJDUMP}" "" has_out_objdump) + string(COMPARE NOTEQUAL "${PARAM_OUT_RANLIB}" "" has_out_ranlib) + string(COMPARE NOTEQUAL "${PARAM_OUT_STRIP}" "" has_out_strip) + string(COMPARE NOTEQUAL "${PARAM_OUT_CPP}" "" has_out_cpp) + string(COMPARE NOTEQUAL "${PARAM_OUT_CC}" "" has_out_cc) + string(COMPARE NOTEQUAL "${PARAM_OUT_CXX}" "" has_out_cxx) + + # Sets the toolchain binaries + # AR=${CMAKE_AR} + # AS=${CMAKE_ASM_COMPILER} + # LD=${CMAKE_LINKER} + # NM=${CMAKE_NM} + # OBJCOPY=${CMAKE_OBJCOPY} + # OBJDUMP=${CMAKE_OBJDUMP} + # RANLIB=${CMAKE_RANLIB} + # STRIP=${CMAKE_STRIP} + # CPP=${CMAKE_C_PREPROCESSOR} + # CC=${CMAKE_C_COMPILER} + # CXX=${CMAKE_CXX_COMPILER} + # + hunter_status_debug("Toolchain Binaries:") + if(has_out_ar) + hunter_status_debug(" AR=${CMAKE_AR}") + if(CMAKE_AR) + set(${PARAM_OUT_AR} ${CMAKE_AR} PARENT_SCOPE) + endif() + endif() + if(has_out_as) + hunter_status_debug(" AS=${CMAKE_ASM_COMPILER}") + if(CMAKE_ASM_COMPILER) + set(${PARAM_OUT_AS} ${CMAKE_ASM_COMPILER} PARENT_SCOPE) + endif() + endif() + if(has_out_ld) + hunter_status_debug(" LD=${CMAKE_LINKER}") + if(CMAKE_LINKER) + set(${PARAM_OUT_LD} ${CMAKE_LINKER} PARENT_SCOPE) + endif() + endif() + if(has_out_nm) + hunter_status_debug(" NM=${CMAKE_NM}") + if(CMAKE_NM) + set(${PARAM_OUT_NM} ${CMAKE_NM} PARENT_SCOPE) + endif() + endif() + if(has_out_objcopy) + hunter_status_debug(" OBJCOPY=${CMAKE_OBJCOPY}") + if(CMAKE_OBJCOPY) + set(${PARAM_OUT_OBJCOPY} ${CMAKE_OBJCOPY} PARENT_SCOPE) + endif() + endif() + if(has_out_objdump) + hunter_status_debug(" OBJDUMP=${CMAKE_OBJDUMP}") + if(CMAKE_OBJDUMP) + set(${PARAM_OUT_OBJDUMP} ${CMAKE_OBJDUMP} PARENT_SCOPE) + endif() + endif() + if(has_out_ranlib) + hunter_status_debug(" RANLIB=${CMAKE_RANLIB}") + if(CMAKE_RANLIB) + set(${PARAM_OUT_RANLIB} ${CMAKE_RANLIB} PARENT_SCOPE) + endif() + endif() + if(has_out_strip) + hunter_status_debug(" STRIP=${CMAKE_STRIP}") + if(CMAKE_STRIP) + set(${PARAM_OUT_STRIP} ${CMAKE_STRIP} PARENT_SCOPE) + endif() + endif() + if(has_out_cpp) + hunter_status_debug(" CPP=${CMAKE_C_PREPROCESSOR}") + if(CMAKE_C_PREPROCESSOR) + set(${PARAM_OUT_CPP} ${CMAKE_C_PREPROCESSOR} PARENT_SCOPE) + endif() + endif() + if(has_out_cc) + hunter_status_debug(" CC=${CMAKE_C_COMPILER}") + if(CMAKE_C_COMPILER) + set(${PARAM_OUT_CC} ${CMAKE_C_COMPILER} PARENT_SCOPE) + endif() + endif() + if(has_out_cxx) + hunter_status_debug(" CXX=${CMAKE_CXX_COMPILER}") + if(CMAKE_CXX_COMPILER) + set(${PARAM_OUT_CXX} ${CMAKE_CXX_COMPILER} PARENT_SCOPE) + endif() + endif() +endfunction() + From eb237501eaf67535297ba0cf418d7a3a51ff3efe Mon Sep 17 00:00:00 2001 From: Alexandre Pretyman Date: Sat, 24 Jun 2017 21:05:33 -0300 Subject: [PATCH 212/612] Added cmake/modules/hunter_autotools_configure_command --- .../hunter_autotools_configure_command.cmake | 229 ++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 cmake/modules/hunter_autotools_configure_command.cmake diff --git a/cmake/modules/hunter_autotools_configure_command.cmake b/cmake/modules/hunter_autotools_configure_command.cmake new file mode 100644 index 0000000000..9b3d2e3733 --- /dev/null +++ b/cmake/modules/hunter_autotools_configure_command.cmake @@ -0,0 +1,229 @@ +# Copyright (c) 2017 Ruslan Baratov, Alexandre Pretyman +# All rights reserved. +# +# This function generates a ./configure command line for autotools +# +# Usage example: +# hunter_autotools_project(out_command_line # saves the result in this var +# PACKAGE_CONFIGURATION_TYPES +# "Release" # Mandatory ONE build config type +# CONFIGURE_HOST +# "armv7" # passed to --configure-host= +# PACKAGE_INSTALL_DIR +# "${HUNTER_PACKAGE_INSTALL_DIR}" # passed to --prefix= +# INSTALL_DIR +# "${HUNTER_INSTALL_DIR}" # of hunter +# CPPFLAGS +# "-DEXTRA_CPP_FLAGS" # extra preprocessor flags +# CFLAGS +# "-O2" # extra c compilation flags +# CXXFLAGS +# "-Wall" # extra c++ compilation flags +# LDFLAGS +# "-lmycrazylib" # extra linking flags +# EXTRA_FLAGS +# --any-other # extra flags to be appended +# --flags +# --needed +# ) +include(CMakeParseArguments) + +include(hunter_dump_cmake_flags) +include(hunter_fatal_error) +include(hunter_get_build_flags) +include(hunter_get_toolchain_binaries) +include(hunter_internal_error) +include(hunter_status_debug) + +function(hunter_autotools_configure_command out_command_line) + set(optional_params) + set(one_value_params + CONFIGURE_HOST + PACKAGE_INSTALL_DIR + INSTALL_DIR + CPPFLAGS + CFLAGS + CXXFLAGS + LDFLAGS + ) + set(multi_value_params + PACKAGE_CONFIGURATION_TYPES + EXTRA_FLAGS + ) + cmake_parse_arguments( + PARAM + "${optional_params}" + "${one_value_params}" + "${multi_value_params}" + ${ARGN} + ) + + if(PARAM_UNPARSED_ARGUMENTS) + hunter_internal_error( + "Invalid arguments passed to hunter_autotools_configure_command" + " ${PARAM_UNPARSED_ARGUMENTS}" + ) + endif() + + set(configure_host) + string(COMPARE NOTEQUAL "${ANDROID}" "" is_android) + string(COMPARE NOTEQUAL "${IPHONEOS_ARCHS}${IPHONESIMULATOR_ARCHS}" "" is_ios) + string(COMPARE NOTEQUAL "${CROSS_COMPILE_TOOLCHAIN_PREFIX}" "" is_cross_compile) + if(is_android) + set(configure_host --host=${CMAKE_CXX_ANDROID_TOOLCHAIN_MACHINE}) + elseif(is_ios) + string(COMPARE NOTEQUAL "${PARAM_CONFIGURE_HOST}" "" has_configure_host) + if(has_configure_host) + set(configure_host --host=${PARAM_CONFIGURE_HOST}) + else() + hunter_fatal_error("hunter_autotools_configure_command on iOS build must supply a CONFIGURE_HOST") + endif() + elseif(is_cross_compile) + set(configure_host --host=${CROSS_COMPILE_TOOLCHAIN_PREFIX}) + endif() + + + + # Build the configure command line options + set(configure_command) + + list(APPEND configure_command "./configure") + string(COMPARE NOTEQUAL "${configure_host}" "" has_configure_host) + if(has_configure_host) + list(APPEND configure_command ${configure_host}) + endif() + + hunter_get_toolchain_binaries( + OUT_AR + ar + OUT_AS + as + OUT_LD + ld + OUT_NM + nm + OUT_OBJCOPY + objcopy + OUT_OBJDUMP + objdump + OUT_RANLIB + ranlib + OUT_STRIP + strip + OUT_CPP + cpp + OUT_CC + cc + OUT_CXX + cxx + ) + + set(toolchain_binaries) + if(ar) + list(APPEND toolchain_binaries "AR=${ar}") + endif() + if(as) + list(APPEND toolchain_binaries "AS=${as}") + endif() + if(ld) + list(APPEND toolchain_binaries "LD=${ld}") + endif() + if(nm) + list(APPEND toolchain_binaries "NM=${nm}") + endif() + if(objcopy) + list(APPEND toolchain_binaries "OBJCOPY=${objcopy}") + endif() + if(objdump) + list(APPEND toolchain_binaries "OBJDUMP=${objdump}") + endif() + if(ranlib) + list(APPEND toolchain_binaries "RANLIB=${ranlib}") + endif() + if(strip) + list(APPEND toolchain_binaries "STRIP=${strip}") + endif() + if(cpp) + list(APPEND toolchain_binaries "CPP=${cpp}") + endif() + if(cc) + list(APPEND toolchain_binaries "CC=${cc}") + endif() + if(cxx) + list(APPEND toolchain_binaries "CXX=${cxx}") + endif() + + if(toolchain_binaries) + list(APPEND configure_command ${toolchain_binaries}) + endif() + + list(LENGTH PARAM_PACKAGE_CONFIGURATION_TYPES len) + if(NOT "${len}" EQUAL "1") + hunter_fatal_error( + "Autotools PACKAGE_CONFIGURATION_TYPES has ${len} elements: ${PARAM_PACKAGE_CONFIGURATION_TYPES}. Only 1 is allowed" + WIKI "autools.package.configuration.types" + ) + endif() + string(TOUPPER ${PARAM_PACKAGE_CONFIGURATION_TYPES} config_type) + + hunter_get_build_flags( + INSTALL_DIR + ${PARAM_INSTALL_DIR} + PACKAGE_CONFIGURATION_TYPES + ${PARAM_PACKAGE_CONFIGURATION_TYPES} + OUT_CPPFLAGS + cppflags + OUT_CFLAGS + cflags + OUT_CXXFLAGS + cxxflags + OUT_LDFLAGS + ldflags + ) + # -> CMAKE_C_FLAGS + # -> CMAKE_CXX_FLAGS + hunter_status_debug("Autotools complation/linking flags:") + set(cppflags "${cppflags} ${PARAM_CPPFLAGS}") + string(STRIP "${cppflags}" cppflags) + hunter_status_debug(" CPPFLAGS=${cppflags}") + list(APPEND configure_command CPPFLAGS=${cppflags}) + + set(cflags "${cflags} ${PARAM_CFLAGS}") + string(STRIP "${cflags}" cflags) + hunter_status_debug(" CFLAGS=${cflags}") + list(APPEND configure_command CFLAGS=${cflags}) + + set(cxxflags "${cxxflags} ${PARAM_CXXFLAGS}") + string(STRIP "${cxxflags}" cxxflags) + hunter_status_debug(" CXXFLAGS=${cxxflags}") + list(APPEND configure_command CXXFLAGS=${cxxflags}) + + hunter_status_debug(" PARAM_LDFLAGS=${PARAM_LDFLAGS}") + set(ldflags "${ldflags} ${PARAM_LDFLAGS}") + string(STRIP "${ldflags}" ldflags) + hunter_status_debug(" LDFLAGS=${ldflags}") + list(APPEND configure_command LDFLAGS=${ldflags}) + + + if(PARAM_EXTRA_FLAGS) + list(APPEND configure_command ${PARAM_EXTRA_FLAGS}) + endif() + + # Hunter builds static libraries by default + if(BUILD_SHARED_LIBS) + list(APPEND configure_command --enable-shared --disable-static) + else() + list(APPEND configure_command --disable-shared --enable-static) + endif() + + list(APPEND configure_command "--prefix=${PARAM_PACKAGE_INSTALL_DIR}") + + if(HUNTER_STATUS_DEBUG) + string(REPLACE ";" " " final_configure_command "${configure_command}") + hunter_status_debug("Final configure command:") + hunter_status_debug(" ${final_configure_command}") + endif() + + set(${out_command_line} ${configure_command} PARENT_SCOPE) +endfunction() + From daed595157c8dba10f440118dfe9fd9a1c403244 Mon Sep 17 00:00:00 2001 From: Alexandre Pretyman Date: Sat, 24 Jun 2017 21:06:07 -0300 Subject: [PATCH 213/612] hunter_autotools_project: refactored behaviour into functions Refactored to use: hunter_get_build_flags hunter_get_toolchain_binaries hunter_autotoools_configure_command --- cmake/modules/hunter_autotools_project.cmake | 330 ++++--------------- 1 file changed, 67 insertions(+), 263 deletions(-) diff --git a/cmake/modules/hunter_autotools_project.cmake b/cmake/modules/hunter_autotools_project.cmake index 5d40018e53..cb985ac07a 100644 --- a/cmake/modules/hunter_autotools_project.cmake +++ b/cmake/modules/hunter_autotools_project.cmake @@ -56,10 +56,8 @@ include(ExternalProject) # ExternalProject_Add include(CMakeParseArguments) # cmake_parse_arguments -include(hunter_dump_cmake_flags) +include(hunter_autotools_configure_command) include(hunter_fatal_error) -include(hunter_finalize) -include(hunter_pick_archiver) include(hunter_status_debug) include(hunter_test_string_not_empty) @@ -98,7 +96,7 @@ function(hunter_autotools_project target_name) if(PARAM_UNPARSED_ARGUMENTS) hunter_internal_error( - "Invalid arguments passed to hunter_autotools_configure:" + "Invalid arguments passed to hunter_autotools_project:" " ${PARAM_UNPARSED_ARGUMENTS}" ) endif() @@ -108,269 +106,64 @@ function(hunter_autotools_project target_name) hunter_test_string_not_empty("${PARAM_INSTALL_DIR}") hunter_test_string_not_empty("${PARAM_PACKAGE_CONFIGURATION_TYPES}") - list(LENGTH PARAM_PACKAGE_CONFIGURATION_TYPES len) - if(NOT "${len}" EQUAL "1") - hunter_fatal_error( - "Autotools PACKAGE_CONFIGURATION_TYPES has ${len} elements: ${PARAM_PACKAGE_CONFIGURATION_TYPES}. Only 1 is allowed" - WIKI "autools.package.configuration.types" - ) - endif() + set(default_path "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin") + set(shell_env_path "PATH=${PARAM_GLOBAL_INSTALL_DIR}/bin:${default_path}") - if(ANDROID) - hunter_test_string_not_empty("${CMAKE_C_ANDROID_TOOLCHAIN_PREFIX}") - # CMAKE_C_ANDROID_TOOLCHAIN_SUFFIX can be empty + set(d1 "${root_id}/lib/pkgconfig") + set(d2 "${root_id}/share/pkgconfig") + set(shell_pkg_config_libdir "PKG_CONFIG_LIBDIR=${d1}:${d2}") - # Extra Android variables that can't be set in toolchain - # (some variables available only after toolchain processed). - set( - CMAKE_C_PREPROCESSOR - "${CMAKE_C_ANDROID_TOOLCHAIN_PREFIX}cpp${CMAKE_C_ANDROID_TOOLCHAIN_SUFFIX}" - ) - if(NOT EXISTS "${CMAKE_C_PREPROCESSOR}") - hunter_internal_error("File not found: ${CMAKE_C_PREPROCESSOR}") - endif() - endif() - - # -> CMAKE_AR - # -> CMAKE_RANLIB - hunter_pick_archiver() + set(clear_vars_shell_script "${PARAM_HUNTER_SELF}/scripts/clear-all.sh") - string(TOUPPER ${PARAM_PACKAGE_CONFIGURATION_TYPES} config_type) - # Sets the toolchain binaries - # AR=${CMAKE_AR} - # AS=${CMAKE_ASM_COMPILER} - # LD=${CMAKE_LINKER} - # NM=${CMAKE_NM} - # OBJCOPY=${CMAKE_OBJCOPY} - # OBJDUMP=${CMAKE_OBJDUMP} - # RANLIB=${CMAKE_RANLIB} - # STRIP=${CMAKE_STRIP} - # CPP=${CMAKE_C_PREPROCESSOR} - # CC=${CMAKE_C_COMPILER} - # CXX=${CMAKE_CXX_COMPILER} - # - set(toolchain_binaries) - if(CMAKE_AR) - list(APPEND toolchain_binaries AR=${CMAKE_AR}) - endif() - if(CMAKE_ASM_COMPILER) - list(APPEND toolchain_binaries AS=${CMAKE_ASM_COMPILER}) - endif() - if(CMAKE_LINKER) - list(APPEND toolchain_binaries LD=${CMAKE_LINKER}) - endif() - if(CMAKE_NM) - list(APPEND toolchain_binaries NM=${CMAKE_NM}) - endif() - if(CMAKE_OBJCOPY) - list(APPEND toolchain_binaries OBJCOPY=${CMAKE_OBJCOPY}) - endif() - if(CMAKE_OBJDUMP) - list(APPEND toolchain_binaries OBJDUMP=${CMAKE_OBJDUMP}) - endif() - if(CMAKE_RANLIB) - list(APPEND toolchain_binaries RANLIB=${CMAKE_RANLIB}) - endif() - if(CMAKE_STRIP) - list(APPEND toolchain_binaries STRIP=${CMAKE_STRIP}) - endif() - if(CMAKE_C_PREPROCESSOR) - list(APPEND toolchain_binaries CPP=${CMAKE_C_PREPROCESSOR}) - endif() - if(CMAKE_C_COMPILER) - list(APPEND toolchain_binaries CC=${CMAKE_C_COMPILER}) - endif() - if(CMAKE_CXX_COMPILER) - list(APPEND toolchain_binaries CXX=${CMAKE_CXX_COMPILER}) - endif() - - string(STRIP "${toolchain_binaries}" toolchain_binaries) - if(HUNTER_STATUS_DEBUG) - string( - REPLACE ";" "\n" toolchain_binaries_new_line "${toolchain_binaries}" - ) - hunter_status_debug("Toolchain Binaries:") - foreach(x ${toolchain_binaries}) - hunter_status_debug(" ${x}") - endforeach() - endif() - - # CPPFLAGS=${PARAM_CPPFLAGS} [-D${COMPILE_DEFINITIONS}] - # [-I${INCLUDE_DIRECTORIES}] - # - # C Preprocessor flags - set(cppflags "-I${PARAM_GLOBAL_INSTALL_DIR}/include") - # build config type definitions - get_directory_property(defs - COMPILE_DEFINITIONS_${config_type} + set(shell_env + . + ${clear_vars_shell_script} + && + ${shell_env_path} + ${shell_pkg_config_libdir} ) - foreach(def ${defs}) - set(cppflags "${cppflags} -D${def}") - endforeach() - # non-build config specific definitions - get_directory_property(defs COMPILE_DEFINITIONS) - foreach(def ${defs}) - set(cppflags "${cppflags} -D${def}") - endforeach() - - get_directory_property(include_dirs INCLUDE_DIRECTORIES) - foreach(include_dir ${include_dirs}) - set(cppflags - "${cppflags} ${CMAKE_INCLUDE_SYSTEM_FLAG_CXX} ${include_dir}" - ) - endforeach() - - hunter_dump_cmake_flags(CPPFLAGS cppflags) - # -> CMAKE_C_FLAGS - # -> CMAKE_CXX_FLAGS - - set(cppflags "${cppflags} ${PARAM_CPPFLAGS}") - string(STRIP "${cppflags}" cppflags) - hunter_status_debug("CPPFLAGS=${cppflags}") - # CFLAGS=${cflags} ${CMAKE_C_FLAGS} - # - # C Compiler Flags (defines or include directories should not be needed here) - set(cflags "${CMAKE_C_FLAGS_${config_type}} ${CMAKE_C_FLAGS} ${PARAM_CFLAGS}") - string(STRIP "${cflags}" cflags) - hunter_status_debug("CFLAGS=${cflags}") - - # CXXFLAGS=${cxxflags} ${CMAKE_CXX_FLAGS} - # - # C++ Compiler flags (defines or include directories should not be needed here) - set(cxxflags "${CMAKE_CXX_FLAGS_${config_type}} ${CMAKE_CXX_FLAGS} ${PARAM_CXXFLAGS}") - string(STRIP "${cxxflags}" cxxflags) - hunter_status_debug("CXXFLAGS=${cxxflags}") + # Build command and options + set(autotools_build_command "make") + string(COMPARE NOTEQUAL "${PARAM_PARALLEL_JOBS}" "" have_jobs) + if(have_jobs) + list(APPEND autotools_build_command "-j" "${PARAM_PARALLEL_JOBS}") + endif() - # LDFLAGS=${ldflags} - # - # Linker flags - set(ldflags "-L${PARAM_GLOBAL_INSTALL_DIR}/lib") - set(ldflags "${ldflags} ${CMAKE_EXE_LINKER_FLAGS_${config_type}}") - string(STRIP "${ldflags}" ldflags) - set(ldflags "${ldflags} ${CMAKE_EXE_LINKER_FLAGS}") - string(STRIP "${ldflags}" ldflags) - set(ldflags "${ldflags} ${PARAM_LDFLAGS}") - string(STRIP "${ldflags}" ldflags) - hunter_status_debug("LDFLAGS=${ldflags}") + set(build_command ${shell_env} ${autotools_build_command}) - set(configure_host) - string(COMPARE NOTEQUAL "${ANDROID}" "" is_android) string(COMPARE NOTEQUAL "${IPHONEOS_ARCHS}${IPHONESIMULATOR_ARCHS}" "" is_ios) - string(COMPARE NOTEQUAL "${CROSS_COMPILE_TOOLCHAIN_PREFIX}" "" is_cross_compile) - if(is_android) - # AWP: the checks below should also be done for the Raspberry Pi - # how could we do it without repetition? - hunter_test_string_not_empty("${CMAKE_C_FLAGS}") - hunter_test_string_not_empty("${CMAKE_CXX_FLAGS}") - hunter_test_string_not_empty("${CMAKE_AR}") - hunter_test_string_not_empty("${CMAKE_C_PREPROCESSOR}") - hunter_test_string_not_empty("${CMAKE_C_COMPILER}") - hunter_test_string_not_empty("${CMAKE_CXX_COMPILER}") - hunter_test_string_not_empty("${CMAKE_LINKER}") - hunter_test_string_not_empty("${CMAKE_NM}") - hunter_test_string_not_empty("${CMAKE_OBJCOPY}") - hunter_test_string_not_empty("${CMAKE_OBJDUMP}") - hunter_test_string_not_empty("${CMAKE_RANLIB}") - hunter_test_string_not_empty("${CMAKE_STRIP}") - - hunter_test_string_not_empty("${CMAKE_CXX_ANDROID_TOOLCHAIN_MACHINE}") - set(configure_host --host=${CMAKE_CXX_ANDROID_TOOLCHAIN_MACHINE}) - set(ldflags "${ldflags} ${__libstl}") - elseif(is_ios) + if(is_ios) hunter_status_debug("Autotools iOS IPHONEOS_ARCHS: ${IPHONEOS_ARCHS} IPHONESIMULATOR_ARCHS: ${IPHONESIMULATOR_ARCHS}") if(BUILD_SHARED_LIBS) hunter_fatal_error("Autotools: building iOS libraries as shared is not supported") endif() set(ios_architectures) list(APPEND ios_architectures ${IPHONEOS_ARCHS} ${IPHONESIMULATOR_ARCHS}) - elseif(is_cross_compile) - set(configure_host --host=${CROSS_COMPILE_TOOLCHAIN_PREFIX}) endif() - # Hunter builds static libraries by default - if(BUILD_SHARED_LIBS) - list(APPEND PARAM_EXTRA_FLAGS --enable-shared --disable-static) - else() - list(APPEND PARAM_EXTRA_FLAGS --disable-shared --enable-static) - endif() - - if(HUNTER_STATUS_DEBUG) - string(REPLACE ";" " " extra_flags "${PARAM_EXTRA_FLAGS}") - hunter_status_debug("EXTRA_FLAGS=${extra_flags}") - endif() - - # Build command and options - set(build_command . "${PARAM_HUNTER_SELF}/scripts/clear-all.sh" && make) - set(build_opts) - string(COMPARE NOTEQUAL "${PARAM_PARALLEL_JOBS}" "" have_jobs) - if(have_jobs) - list(APPEND build_opts "-j" "${PARAM_PARALLEL_JOBS}") - endif() - - set(configure_command . "${PARAM_HUNTER_SELF}/scripts/clear-all.sh" &&) - list(APPEND configure_command AR=${CMAKE_AR}) - - # see clear-all.sh - # PATH environment variable - set(default_path "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin") - list( - APPEND - configure_command - "PATH=${PARAM_GLOBAL_INSTALL_DIR}/bin:${default_path}" - ) - - # PKG_CONFIG_LIBDIR environment variable - # This info is also in hunter_finalize.cmake - set(d1 "${PARAM_GLOBAL_INSTALL_DIR}/lib/pkgconfig") - set(d2 "${PARAM_GLOBAL_INSTALL_DIR}/share/pkgconfig") - list(APPEND configure_command "PKG_CONFIG_LIBDIR=${d1}:${d2}") - - string(COMPARE NOTEQUAL "${PARAM_BOOTSTRAP}" "" have_bootstrap) - if(have_bootstrap) - list(APPEND configure_command "${PARAM_BOOTSTRAP}" &&) - endif() - - list(APPEND configure_command "./configure") - - # Build the configure command line options - set(configure_opts) - string(COMPARE NOTEQUAL "${configure_host}" "" has_configure_host) - if(has_configure_host) - list(APPEND configure_opts ${configure_host}) - endif() - - string(COMPARE NOTEQUAL "${toolchain_binaries}" "" has_changes) - if(has_changes) - list(APPEND configure_opts ${toolchain_binaries}) - endif() - - string(COMPARE NOTEQUAL "${cppflags}" "" has_cppflags) - if(has_cppflags) - list(APPEND configure_opts CPPFLAGS=${cppflags}) - endif() - - string(COMPARE NOTEQUAL "${cflags}" "" has_cflags) - if(has_cflags) - list(APPEND configure_opts CFLAGS=${cflags}) - endif() - - string(COMPARE NOTEQUAL "${cxxflags}" "" has_cxxflags) - if(has_cxxflags) - list(APPEND configure_opts CXXFLAGS=${cxxflags}) - endif() - - string(COMPARE NOTEQUAL "${ldflags}" "" hasldflags) - if(hasldflags) - list(APPEND configure_opts LDFLAGS=${ldflags}) - endif() + if(NOT is_ios) + hunter_autotools_configure_command(autotools_configure_command + PACKAGE_INSTALL_DIR + ${PARAM_INSTALL_DIR} + EXTRA_FLAGS + ${PARAM_EXTRA_FLAGS} + INSTALL_DIR + ${PARAM_GLOBAL_INSTALL_DIR} + PACKAGE_CONFIGURATION_TYPES + ${PARAM_PACKAGE_CONFIGURATION_TYPES} + CPPFLAGS + ${PARAM_CPPFLAGS} + CFLAGS + ${PARAM_CFLAGS} + CXXFLAGS + ${PARAM_CXXFLAGS} + LDFLAGS + ${PARAM_LDFLAGS} + ) - if(PARAM_EXTRA_FLAGS) - list(APPEND configure_opts ${PARAM_EXTRA_FLAGS}) - endif() + set(configure_command ${shell_env} ${autotools_configure_command}) - if(NOT is_ios) - hunter_status_debug("Autotools configure_opts: ${configure_opts} ") ExternalProject_Add(${target_name} URL ${PARAM_URL} @@ -384,12 +177,11 @@ function(hunter_autotools_project target_name) ${PARAM_INSTALL_DIR} # not used, just avoid creating Install/ empty directory CONFIGURE_COMMAND + "${PARAM_BOOTSTRAP}" + COMMAND ${configure_command} - ${configure_opts} - "--prefix=${PARAM_INSTALL_DIR}" BUILD_COMMAND ${build_command} - ${build_opts} BUILD_IN_SOURCE 1 INSTALL_COMMAND @@ -440,7 +232,6 @@ function(hunter_autotools_project target_name) endif() set(arch_flags) - set(configure_opts) # Extra space at the end of the arch_flags is needed below when appending # to configure_opts, please do not remove! if(is_simulator) @@ -448,13 +239,27 @@ function(hunter_autotools_project target_name) else() set(arch_flags "-arch ${ios_architecture} -isysroot ${IPHONEOS_SDK_ROOT} -miphoneos-version-min=${IOS_SDK_VERSION} ") endif() - list(APPEND configure_opts --host=${configure_host}) - list(APPEND configure_opts ${toolchain_binaries}) - list(APPEND configure_opts CPPFLAGS=${arch_flags}${cppflags}) - list(APPEND configure_opts CFLAGS=${arch_flags}${cflags}) - list(APPEND configure_opts CXXFLAGS=${arch_flags}${cxxflags}) - list(APPEND configure_opts LDFLAGS=${arch_flags}${ldflags}) - list(APPEND configure_opts ${PARAM_EXTRA_FLAGS}) + hunter_autotools_configure_command(autotools_configure_command + PACKAGE_INSTALL_DIR + ${arch_install_dir} + EXTRA_FLAGS + ${PARAM_EXTRA_FLAGS} + CONFIGURE_HOST + ${configure_host} + INSTALL_DIR + ${PARAM_GLOBAL_INSTALL_DIR} + PACKAGE_CONFIGURATION_TYPES + ${PARAM_PACKAGE_CONFIGURATION_TYPES} + CPPFLAGS + ${arch_flags}${PARAM_CPPFLAGS} + CFLAGS + ${arch_flags}${PARAM_CFLAGS} + CXXFLAGS + ${arch_flags}${PARAM_CXXFLAGS} + LDFLAGS + ${arch_flags}${PARAM_LDFLAGS} + ) + set(configure_command ${shell_env} ${autotools_configure_command}) # architecture specific source dir set(arch_source_dir @@ -479,12 +284,11 @@ function(hunter_autotools_project target_name) ${arch_install_dir} # not used, just avoid creating Install/ empty directory CONFIGURE_COMMAND + "${PARAM_BOOTSTRAP}" + COMMAND ${configure_command} - ${configure_opts} - "--prefix=${arch_install_dir}" BUILD_COMMAND ${build_command} - ${build_opts} BUILD_IN_SOURCE 1 INSTALL_COMMAND From 32389d82bf028f1feba80609c32ee91e1a7526d0 Mon Sep 17 00:00:00 2001 From: Alexandre Pretyman Date: Sat, 24 Jun 2017 21:08:49 -0300 Subject: [PATCH 214/612] Added package x264 --- cmake/projects/x264/hunter.cmake | 30 ++ .../x264/schemes/url_sha1_x264.cmake.in | 342 ++++++++++++++++++ 2 files changed, 372 insertions(+) create mode 100644 cmake/projects/x264/hunter.cmake create mode 100644 cmake/projects/x264/schemes/url_sha1_x264.cmake.in diff --git a/cmake/projects/x264/hunter.cmake b/cmake/projects/x264/hunter.cmake new file mode 100644 index 0000000000..75ed647d8c --- /dev/null +++ b/cmake/projects/x264/hunter.cmake @@ -0,0 +1,30 @@ +# Copyright (c) 2017 Alexandre Pretyman +# All rights reserved. + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_cmake_args) +include(hunter_configuration_types) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + x264 + VERSION + "snapshot-20170420-2245" + URL + "ftp://ftp.videolan.org/pub/x264/snapshots/x264-snapshot-20170420-2245.tar.bz2" + SHA1 + 679b8c4f39f375090bf64e5c80c83303e4ddc37c +) + +hunter_configuration_types(x264 CONFIGURATION_TYPES Release) +hunter_pick_scheme(DEFAULT url_sha1_x264) +hunter_cmake_args(x264 CMAKE_ARGS PKGCONFIG_EXPORT_TARGETS=x264) +hunter_cacheable(x264) +hunter_download( + PACKAGE_NAME x264 + PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/pkgconfig/x264.pc" +) + diff --git a/cmake/projects/x264/schemes/url_sha1_x264.cmake.in b/cmake/projects/x264/schemes/url_sha1_x264.cmake.in new file mode 100644 index 0000000000..bb66c92723 --- /dev/null +++ b/cmake/projects/x264/schemes/url_sha1_x264.cmake.in @@ -0,0 +1,342 @@ +# Copyright (c) 2017 Alexandre Pretyman +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) +project(Hunter) + +include(ExternalProject) # ExternalProject_Add + +# Scheme for building x264 libraries only (no programs) + +list(APPEND CMAKE_MODULE_PATH "@HUNTER_SELF@/cmake/modules") + +include(hunter_fatal_error) +include(hunter_get_build_flags) +include(hunter_get_toolchain_binaries) +include(hunter_report_broken_package) +include(hunter_status_debug) +include(hunter_status_print) +include(hunter_test_string_not_empty) + +hunter_status_debug("Scheme: url_sha1_x264") + +# Check preconditions +hunter_test_string_not_empty("@HUNTER_SELF@") +hunter_test_string_not_empty("@HUNTER_EP_NAME@") +hunter_test_string_not_empty("@HUNTER_PACKAGE_URL@") +hunter_test_string_not_empty("@HUNTER_PACKAGE_SHA1@") +hunter_test_string_not_empty("@HUNTER_PACKAGE_DOWNLOAD_DIR@") +hunter_test_string_not_empty("@HUNTER_PACKAGE_SOURCE_DIR@") +hunter_test_string_not_empty("@HUNTER_PACKAGE_INSTALL_PREFIX@") +hunter_test_string_not_empty("@HUNTER_PACKAGE_CONFIGURATION_TYPES@") +hunter_test_string_not_empty("@HUNTER_INSTALL_PREFIX@") +hunter_test_string_not_empty("@HUNTER_GLOBAL_SCRIPT_DIR@") + +if("@MSVC@") + hunter_user_error("x264 building under MSVC needs to be implemented") +endif() + +# Ideally the running of commands below should be changed in the future to, +# instead of using the shell variables, control the environment through CMake's +# ENV{var} and run the commands through execute_process(...) + +set(default_path "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin") +set(shell_env_path "PATH=@HUNTER_PACKAGE_INSTALL_PREFIX@/bin:${default_path}") + +set(d1 "${root_id}/lib/pkgconfig") +set(d2 "${root_id}/share/pkgconfig") +set(shell_pkg_config_libdir "PKG_CONFIG_LIBDIR=${d1}:${d2}") + +set(clear_vars_shell_script "@HUNTER_GLOBAL_SCRIPT_DIR@/clear-all.sh") + + +hunter_get_toolchain_binaries( + OUT_AR + ar + OUT_AS + as + OUT_LD + ld + OUT_NM + nm + OUT_OBJCOPY + objcopy + OUT_OBJDUMP + objdump + OUT_RANLIB + ranlib + OUT_STRIP + strip + OUT_CPP + cpp + OUT_CC + cc + OUT_CXX + cxx +) + +set(toolchain_binaries) +if(ar) + list(APPEND toolchain_binaries "AR=${ar}") +endif() +if(as) + list(APPEND toolchain_binaries "AS=${as}") +endif() +if(ld) + list(APPEND toolchain_binaries "LD=${ld}") +endif() +if(nm) + list(APPEND toolchain_binaries "NM=${nm}") +endif() +if(objcopy) + list(APPEND toolchain_binaries "OBJCOPY=${objcopy}") +endif() +if(objdump) + list(APPEND toolchain_binaries "OBJDUMP=${objdump}") +endif() +if(ranlib) + list(APPEND toolchain_binaries "RANLIB=${ranlib}") +endif() +if(strip) + list(APPEND toolchain_binaries "STRIP=${strip}") +endif() +if(cpp) + list(APPEND toolchain_binaries "CPP=${cpp}") +endif() +if(cc) + list(APPEND toolchain_binaries "CC=${cc}") +endif() +if(cxx) + list(APPEND toolchain_binaries "CXX=${cxx}") +endif() + +set(shell_env + . + ${clear_vars_shell_script} + && + ${shell_env_path} + ${shell_pkg_config_libdir} +) + +if(toolchain_binaries) + list(APPEND shell_env ${toolchain_binaries}) +endif() + +hunter_get_build_flags( + INSTALL_DIR + "@HUNTER_INSTALL_PREFIX@" + PACKAGE_CONFIGURATION_TYPES + "@HUNTER_PACKAGE_CONFIGURATION_TYPES@" + OUT_CPPFLAGS + cppflags + OUT_CFLAGS + cflags + OUT_LDFLAGS + ldflags +) + +set(x264_configure_command "./configure") + +if(CMAKE_CROSSCOMPILING) + set(configure_host) + string(COMPARE NOTEQUAL "${ANDROID}" "" is_android) + string(COMPARE NOTEQUAL "${IPHONEOS_ARCHS}${IPHONESIMULATOR_ARCHS}" "" is_ios) + string(COMPARE NOTEQUAL "${CROSS_COMPILE_TOOLCHAIN_PREFIX}" "" is_cross_compile) + if(is_android) + set(configure_host --host=${CMAKE_CXX_ANDROID_TOOLCHAIN_MACHINE}) + elseif(is_ios) + # for iOS the host setting is done below + elseif(is_cross_compile) + set(configure_host --host=${CROSS_COMPILE_TOOLCHAIN_PREFIX}) + endif() + + string(COMPARE NOTEQUAL "${configure_host}" "" has_configure_host) + if(has_configure_host) + list(APPEND x264_configure_command ${configure_host}) + endif() +endif() + + +list(APPEND x264_configure_command "--disable-cli") # build only libs + +if(NOT CMAKE_ASM_COMPILER OR DISABLE_ASM) + list(APPEND x264_configure_command "--disable-asm") +endif() + +set(cflags "${cppflags} ${cflags}") +string(STRIP "${cflags}" cflags) + +# Hunter builds static libraries by default +if(BUILD_SHARED_LIBS) + list(APPEND x264_configure_command --enable-shared --disable-static) +else() + list(APPEND x264_configure_command --disable-shared --enable-static) +endif() + + +set(x264_make_command "make") +if("@HUNTER_JOBS_OPTION@") + list(APPEND x264_make_command "-j" "@HUNTER_JOBS_OPTION@") +endif() + +#configure_command set below +set(build_command ${shell_env} ${x264_make_command}) +set(install_command ${shell_env} make install) + +string(COMPARE NOTEQUAL "${IPHONEOS_ARCHS}${IPHONESIMULATOR_ARCHS}" "" is_ios) +if(is_ios) + hunter_status_debug("x264 iOS IPHONEOS_ARCHS: ${IPHONEOS_ARCHS} IPHONESIMULATOR_ARCHS: ${IPHONESIMULATOR_ARCHS}") + if(BUILD_SHARED_LIBS) + hunter_fatal_error("x264: building iOS libraries as shared is not supported") + endif() + set(ios_architectures) + list(APPEND ios_architectures ${IPHONEOS_ARCHS} ${IPHONESIMULATOR_ARCHS}) +endif() + +if(NOT is_ios) + # The code below should be changed to set these flags as ENV{CFLAGS} and + # ENV{LDFLAGS} instead of --extra-* parameters below + # When the are spaces in ${cflags} and ${ldflags}, CMake puts the value + # inside double quotes, and the shell interprets it as a command instead of + # env var, returning error of CFLAGS=... command not found + list(APPEND x264_configure_command "--extra-cflags=${cflags}") + list(APPEND x264_configure_command "--extra-ldflags=${ldflags}") + list(APPEND x264_configure_command "--prefix=@HUNTER_PACKAGE_INSTALL_PREFIX@") + + set(configure_command ${shell_env} ${x264_configure_command}) + ExternalProject_Add( + "@HUNTER_EP_NAME@" + URL + @HUNTER_PACKAGE_URL@ + URL_HASH + SHA1=@HUNTER_PACKAGE_SHA1@ + DOWNLOAD_DIR + "@HUNTER_PACKAGE_DOWNLOAD_DIR@" + SOURCE_DIR + "@HUNTER_PACKAGE_SOURCE_DIR@" + INSTALL_DIR + "@HUNTER_PACKAGE_INSTALL_PREFIX@" + # not used, just avoid creating Install/ empty directory + CONFIGURE_COMMAND + ${configure_command} + BUILD_COMMAND + ${build_command} + BUILD_IN_SOURCE + 1 + INSTALL_COMMAND + ${install_command} + ) +else() + set(ios_universal_target "@HUNTER_EP_NAME@-universal") + set(merge_lipo_script "autotools-merge-lipo.cmake") + ExternalProject_Add(${ios_universal_target} + DOWNLOAD_COMMAND + "" + SOURCE_DIR + "@HUNTER_PACKAGE_SOURCE_DIR@/universal" + INSTALL_DIR + "@HUNTER_PACKAGE_INSTALL_PREFIX@" + # not used, just avoid creating Install/ empty directory + CONFIGURE_COMMAND + "" + BUILD_COMMAND + "" + BUILD_IN_SOURCE + 1 + INSTALL_COMMAND + ${CMAKE_COMMAND} + -P + "@HUNTER_PACKAGE_SOURCE_DIR@/universal/${merge_lipo_script}" + ) + set(ios_built_arch_roots) + set(multi_arch_install_root "@HUNTER_PACKAGE_BUILD_DIR@/multi-arch") + foreach(ios_architecture ${ios_architectures}) + hunter_status_debug("Autotools: building for iOS architecture ${ios_architecture}") + #clear the conf options + set(is_simulator FALSE) + if(${ios_architecture} STREQUAL "armv7" + OR ${ios_architecture} STREQUAL "armv7s") + set(configure_host "arm-apple-darwin") + elseif(${ios_architecture} STREQUAL "arm64") + set(configure_host "aarch64-apple-darwin") + elseif(${ios_architecture} STREQUAL "i386") + set(configure_host "i386-apple-darwin") + set(is_simulator TRUE) + elseif(${ios_architecture} STREQUAL "x86_64") + set(configure_host "x86_64-apple-darwin") + set(is_simulator TRUE) + else() + hunter_fatal_error("iOS architecture: ${ios_architecture} not supported") + endif() + + set(arch_flags) + # Extra space at the end of the arch_flags is needed below when appending + # to configure_opts, please do not remove! + if(is_simulator) + set(arch_flags "-arch ${ios_architecture} -isysroot ${IPHONESIMULATOR_SDK_ROOT} -miphoneos-version-min=${IOS_SDK_VERSION} ") + else() + set(arch_flags "-arch ${ios_architecture} -isysroot ${IPHONEOS_SDK_ROOT} -miphoneos-version-min=${IOS_SDK_VERSION} ") + endif() + + # architecture specific source dir + set(arch_source_dir + "@HUNTER_PACKAGE_SOURCE_DIR@/multi-arch-build/${ios_architecture}" + ) + set(arch_target + "${target_name}-${ios_architecture}" + ) + set(arch_install_dir + "${multi_arch_install_root}/${ios_architecture}" + ) + + set(configure_command + ${shell_env} + ${x264_configure_command} + "--host=${configure_host}" + "--extra-cflags=${arch_flags}${cflags}" + "--extra-ldflags=${arch_flags}${ldflags}" + "--prefix=${arch_install_dir}" + ) + ExternalProject_Add(${arch_target} + URL + @HUNTER_PACKAGE_URL@ + URL_HASH + SHA1=@HUNTER_PACKAGE_SHA1@ + DOWNLOAD_DIR + "@HUNTER_PACKAGE_DOWNLOAD_DIR@" + SOURCE_DIR + ${arch_source_dir} + INSTALL_DIR + ${arch_install_dir} + # not used, just avoid creating Install/ empty directory + CONFIGURE_COMMAND + ${configure_command} + BUILD_COMMAND + ${build_command} + BUILD_IN_SOURCE + 1 + INSTALL_COMMAND + ${install_command} + ) + + list(APPEND ios_built_arch_roots ${arch_install_dir}) + add_dependencies( + "${ios_universal_target}" + "${arch_target}" + ) + endforeach() + + set(HUNTER_PACKAGE_INSTALL_PREFIX "@HUNTER_PACKAGE_INSTALL_PREFIX@") + configure_file( + "@HUNTER_GLOBAL_SCRIPT_DIR@/${merge_lipo_script}.in" + "@HUNTER_PACKAGE_SOURCE_DIR@/universal/${merge_lipo_script}" + @ONLY + ) +endif() + +foreach(PKG_CONFIG_MODULE ${PKGCONFIG_EXPORT_TARGETS}) + configure_file( + "@HUNTER_GLOBAL_SCRIPT_DIR@/pkgconfig-export-targets.cmake.in" + "@HUNTER_PACKAGE_INSTALL_PREFIX@/lib/cmake/${PKG_CONFIG_MODULE}/${PKG_CONFIG_MODULE}Config.cmake" + ) +endforeach() From acd4584a5a57bc903f408e2ad2fec791ab4388d6 Mon Sep 17 00:00:00 2001 From: Alexandre Pretyman Date: Sat, 24 Jun 2017 21:09:17 -0300 Subject: [PATCH 215/612] Updated configs/default to add package x264 --- cmake/configs/default.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 06c20c2e5b..cb6effb18a 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -210,6 +210,7 @@ hunter_config(tinydir VERSION 1.2-p0) hunter_config(websocketpp VERSION 0.7.0-p2) hunter_config(wxWidgets VERSION 3.0.2) hunter_config(x11 VERSION 1.5.0) +hunter_config(x264 VERSION snapshot-20170420-2245) hunter_config(xau VERSION 1.0.7) hunter_config(xcb VERSION 1.11.1) hunter_config(xcb-proto VERSION 1.11) From 628e2e51da9aff5b8f17afeadf4ce8eafb88ecd5 Mon Sep 17 00:00:00 2001 From: Alexandre Pretyman Date: Sat, 24 Jun 2017 21:10:20 -0300 Subject: [PATCH 216/612] Added examples/x264 --- examples/x264/CMakeLists.txt | 24 ++++++ examples/x264/example.c | 140 +++++++++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+) create mode 100644 examples/x264/CMakeLists.txt create mode 100644 examples/x264/example.c diff --git a/examples/x264/CMakeLists.txt b/examples/x264/CMakeLists.txt new file mode 100644 index 0000000000..452b64ed75 --- /dev/null +++ b/examples/x264/CMakeLists.txt @@ -0,0 +1,24 @@ +# Copyright (c) 2017, Alexandre Pretyman + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") +include(hunter_pkgconfig_export_target) + +project(x264-example) + +hunter_add_package(x264) +find_package(x264 CONFIG REQUIRED) + +set(${PROJECT_NAME}_SOURCES + example.c +) + +add_executable(${PROJECT_NAME} + ${${PROJECT_NAME}_SOURCES} +) + +target_link_libraries(${PROJECT_NAME} PkgConfig::x264) + diff --git a/examples/x264/example.c b/examples/x264/example.c new file mode 100644 index 0000000000..0fb7fbdb2a --- /dev/null +++ b/examples/x264/example.c @@ -0,0 +1,140 @@ +/***************************************************************************** + * example.c: libx264 API usage example + ***************************************************************************** + * Copyright (C) 2014-2017 x264 project + * + * Authors: Anton Mitrofanov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. + * + * This program is also available under a commercial proprietary license. + * For more information, contact us at licensing@x264.com. + *****************************************************************************/ + +#ifdef _WIN32 +#include /* _setmode() */ +#include /* _O_BINARY */ +#endif + +#include +#include +#include + +#define FAIL_IF_ERROR( cond, ... )\ +do\ +{\ + if( cond )\ + {\ + fprintf( stderr, __VA_ARGS__ );\ + goto fail;\ + }\ +} while( 0 ) + +int main( int argc, char **argv ) +{ + int width, height; + x264_param_t param; + x264_picture_t pic; + x264_picture_t pic_out; + x264_t *h; + int i_frame = 0; + int i_frame_size; + x264_nal_t *nal; + int i_nal; + +#ifdef _WIN32 + _setmode( _fileno( stdin ), _O_BINARY ); + _setmode( _fileno( stdout ), _O_BINARY ); + _setmode( _fileno( stderr ), _O_BINARY ); +#endif + + FAIL_IF_ERROR( !(argc > 1), "Example usage: example 352x288 output.h264\n" ); + FAIL_IF_ERROR( 2 != sscanf( argv[1], "%dx%d", &width, &height ), "resolution not specified or incorrect\n" ); + + /* Get default params for preset/tuning */ + if( x264_param_default_preset( ¶m, "medium", NULL ) < 0 ) + goto fail; + + /* Configure non-default params */ + param.i_csp = X264_CSP_I420; + param.i_width = width; + param.i_height = height; + param.b_vfr_input = 0; + param.b_repeat_headers = 1; + param.b_annexb = 1; + + /* Apply profile restrictions. */ + if( x264_param_apply_profile( ¶m, "high" ) < 0 ) + goto fail; + + if( x264_picture_alloc( &pic, param.i_csp, param.i_width, param.i_height ) < 0 ) + goto fail; +#undef fail +#define fail fail2 + + h = x264_encoder_open( ¶m ); + if( !h ) + goto fail; +#undef fail +#define fail fail3 + + int luma_size = width * height; + int chroma_size = luma_size / 4; + /* Encode frames */ + for( ;; i_frame++ ) + { + /* Read input frame */ + if( fread( pic.img.plane[0], 1, luma_size, stdin ) != luma_size ) + break; + if( fread( pic.img.plane[1], 1, chroma_size, stdin ) != chroma_size ) + break; + if( fread( pic.img.plane[2], 1, chroma_size, stdin ) != chroma_size ) + break; + + pic.i_pts = i_frame; + i_frame_size = x264_encoder_encode( h, &nal, &i_nal, &pic, &pic_out ); + if( i_frame_size < 0 ) + goto fail; + else if( i_frame_size ) + { + if( !fwrite( nal->p_payload, i_frame_size, 1, stdout ) ) + goto fail; + } + } + /* Flush delayed frames */ + while( x264_encoder_delayed_frames( h ) ) + { + i_frame_size = x264_encoder_encode( h, &nal, &i_nal, NULL, &pic_out ); + if( i_frame_size < 0 ) + goto fail; + else if( i_frame_size ) + { + if( !fwrite( nal->p_payload, i_frame_size, 1, stdout ) ) + goto fail; + } + } + + x264_encoder_close( h ); + x264_picture_clean( &pic ); + return 0; + +#undef fail +fail3: + x264_encoder_close( h ); +fail2: + x264_picture_clean( &pic ); +fail: + return -1; +} From 40f964e9b14ce71cb380b462c5fb254209db8826 Mon Sep 17 00:00:00 2001 From: Alexandre Pretyman Date: Sat, 24 Jun 2017 21:11:08 -0300 Subject: [PATCH 217/612] Bumped odb-boost's PACKAGE_INTERNAL_DEPS_ID --- cmake/projects/odb-boost/hunter.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/projects/odb-boost/hunter.cmake b/cmake/projects/odb-boost/hunter.cmake index 06ef9ccf46..4f6ad8d9f6 100644 --- a/cmake/projects/odb-boost/hunter.cmake +++ b/cmake/projects/odb-boost/hunter.cmake @@ -27,5 +27,5 @@ hunter_download(PACKAGE_NAME odb-boost PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libodb-boost.la" "lib/pkgconfig/libodb-boost.pc" - PACKAGE_INTERNAL_DEPS_ID "5" + PACKAGE_INTERNAL_DEPS_ID "6" ) From dbaa8e09e4c8c92c982eec78b88d675a6d068004 Mon Sep 17 00:00:00 2001 From: Alexandre Pretyman Date: Mon, 26 Jun 2017 19:20:00 -0300 Subject: [PATCH 218/612] url_sha1_autotools: treats PKGCONFIG_EXPORT_TARGETS --- cmake/schemes/url_sha1_autotools.cmake.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/schemes/url_sha1_autotools.cmake.in b/cmake/schemes/url_sha1_autotools.cmake.in index 0792715b03..fa62334732 100644 --- a/cmake/schemes/url_sha1_autotools.cmake.in +++ b/cmake/schemes/url_sha1_autotools.cmake.in @@ -58,3 +58,10 @@ hunter_autotools_project("@HUNTER_EP_NAME@" BOOTSTRAP "${BOOTSTRAP}" ) + +foreach(PKG_CONFIG_MODULE ${PKGCONFIG_EXPORT_TARGETS}) + configure_file( + "@HUNTER_GLOBAL_SCRIPT_DIR@/pkgconfig-export-targets.cmake.in" + "@HUNTER_PACKAGE_INSTALL_PREFIX@/lib/cmake/${PKG_CONFIG_MODULE}/${PKG_CONFIG_MODULE}Config.cmake" + ) +endforeach() From 7d44b9afa44c14aa36f4e0cd9e9568ded8a4dd43 Mon Sep 17 00:00:00 2001 From: Alexandre Pretyman Date: Mon, 26 Jun 2017 19:22:16 -0300 Subject: [PATCH 219/612] Added pkgconfig-export-targets.cmake.in --- scripts/pkgconfig-export-targets.cmake.in | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 scripts/pkgconfig-export-targets.cmake.in diff --git a/scripts/pkgconfig-export-targets.cmake.in b/scripts/pkgconfig-export-targets.cmake.in new file mode 100644 index 0000000000..0f4c60daee --- /dev/null +++ b/scripts/pkgconfig-export-targets.cmake.in @@ -0,0 +1,11 @@ +# ---------------------------------------------------------------------- +# Auto creation of CMake targets from pkg-config +# +# Copyright (C) 2017 Alexandre Pretyman. All rights reserved. +# +# ---------------------------------------------------------------------- + +include(hunter_pkgconfig_export_target) + +hunter_pkgconfig_export_target("@PKG_CONFIG_MODULE@") + From f40019870daa5da8786952fa5d6edbaee0b7f64b Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sat, 1 Jul 2017 13:03:28 +0300 Subject: [PATCH 220/612] Add 'drishti_assets' [skip ci] --- cmake/configs/default.cmake | 1 + cmake/projects/drishti_assets/hunter.cmake | 24 ++++++++++++++++++++++ examples/drishti_assets/CMakeLists.txt | 17 +++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 cmake/projects/drishti_assets/hunter.cmake create mode 100644 examples/drishti_assets/CMakeLists.txt diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 0fc90e985c..26f03da341 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -136,6 +136,7 @@ hunter_config(dlib VERSION 19.4-p2) hunter_config(doctest VERSION 1.2.0) hunter_config(dri2proto VERSION 2.8) hunter_config(dri3proto VERSION 1.0) +hunter_config(drishti_assets VERSION 1.6) hunter_config(drm VERSION 2.4.67) hunter_config(eigen3-nnls VERSION 1.0.0) hunter_config(eos VERSION 0.12.1) diff --git a/cmake/projects/drishti_assets/hunter.cmake b/cmake/projects/drishti_assets/hunter.cmake new file mode 100644 index 0000000000..6b1e57ce1f --- /dev/null +++ b/cmake/projects/drishti_assets/hunter.cmake @@ -0,0 +1,24 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + drishti_assets + VERSION + 1.6 + URL + "https://github.com/elucideye/drishti-assets/archive/v1.6.tar.gz" + SHA1 + 7787ba57e30146c979780c79ae62e8299cfe3cfd +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(drishti_assets) +hunter_download(PACKAGE_NAME drishti_assets) diff --git a/examples/drishti_assets/CMakeLists.txt b/examples/drishti_assets/CMakeLists.txt new file mode 100644 index 0000000000..f12323a22d --- /dev/null +++ b/examples/drishti_assets/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-drishti_assets) + +hunter_add_package(drishti_assets) +find_package(drishti_assets CONFIG REQUIRED) + +if(NOT EXISTS "${DRISHTI_ASSETS_FACTORY}") + message(FATAL_ERROR "File not found: '${DRISHTI_ASSETS_FACTORY}'") +endif() From 760355eccbe2406d59ae1d33fb25a9a01ef093e0 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Thu, 29 Jun 2017 12:06:55 +0200 Subject: [PATCH 221/612] add LAPACK 3.7.1 (needs fortran) - add LAPACK example building targets blas and lapack - add LAPACK-CBLAS example using local cmake config file --- cmake/configs/default.cmake | 1 + cmake/projects/LAPACK/hunter.cmake | 41 ++++++++++++++++++++++++++++ examples/LAPACK-CBLAS/CMakeLists.txt | 35 ++++++++++++++++++++++++ examples/LAPACK-CBLAS/config.cmake | 4 +++ examples/LAPACK-CBLAS/foo.cpp | 14 ++++++++++ examples/LAPACK/CMakeLists.txt | 33 ++++++++++++++++++++++ examples/LAPACK/foo.cpp | 5 ++++ 7 files changed, 133 insertions(+) create mode 100644 cmake/projects/LAPACK/hunter.cmake create mode 100644 examples/LAPACK-CBLAS/CMakeLists.txt create mode 100644 examples/LAPACK-CBLAS/config.cmake create mode 100644 examples/LAPACK-CBLAS/foo.cpp create mode 100644 examples/LAPACK/CMakeLists.txt create mode 100644 examples/LAPACK/foo.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 14c4d2da60..415a2426e4 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -69,6 +69,7 @@ if(MSVC_VERSION LESS 1600) else() hunter_config(jsoncpp VERSION 1.8.0) endif() +hunter_config(LAPACK VERSION 3.7.1) hunter_config(LLVM VERSION 3.6.2-p0) # Clang hunter_config(LLVMCompilerRT VERSION 3.6.0) # Clang hunter_config(Leathers VERSION 0.1.6) diff --git a/cmake/projects/LAPACK/hunter.cmake b/cmake/projects/LAPACK/hunter.cmake new file mode 100644 index 0000000000..bd3e14359c --- /dev/null +++ b/cmake/projects/LAPACK/hunter.cmake @@ -0,0 +1,41 @@ +# Copyright (c) 2017, NeroBurner +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +# Load used modules +include(hunter_add_version) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) +include(hunter_cacheable) + +hunter_cacheable(LAPACK) + +# List of versions here... +hunter_add_version( + PACKAGE_NAME + LAPACK + VERSION + "3.7.1" + URL + https://github.com/hunter-packages/lapack/archive/v3.7.1-p0.tar.gz + SHA1 + 82616c0878fbe42f22ece5fadfb38e09456ba5b5 +) + +# pass cmake arguments +hunter_cmake_args( + LAPACK + CMAKE_ARGS + HUNTER_INSTALL_LICENSE_FILES=LICENSE +) + +# Pick a download scheme +hunter_pick_scheme(DEFAULT url_sha1_cmake) + +# Download package. +# Two versions of library will be build: +# * libexample_A.a +# * libexample_Ad.a +hunter_download(PACKAGE_NAME LAPACK) diff --git a/examples/LAPACK-CBLAS/CMakeLists.txt b/examples/LAPACK-CBLAS/CMakeLists.txt new file mode 100644 index 0000000000..4c5197b6fe --- /dev/null +++ b/examples/LAPACK-CBLAS/CMakeLists.txt @@ -0,0 +1,35 @@ +# Copyright (c) 2015, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + + +set(TESTING_CONFIG_OPT FILEPATH "${CMAKE_CURRENT_LIST_DIR}/config.cmake") +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-LAPACK) + +hunter_add_package(LAPACK) + +string(COMPARE EQUAL "${LAPACK_LICENSES}" "" is_empty) +if(is_empty) + message(FATAL_ERROR "Licenses not found") +endif() + +message("LAPACK licenses:") +foreach(x ${LAPACK_LICENSES}) + message("* ${x}") + if(NOT EXISTS "${LAPACK_LICENSES}") + message(FATAL_ERROR "File not found") + endif() +endforeach() + +find_package(cblas CONFIG REQUIRED) +# Test double library creation +find_package(cblas CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo cblas) + diff --git a/examples/LAPACK-CBLAS/config.cmake b/examples/LAPACK-CBLAS/config.cmake new file mode 100644 index 0000000000..48d3bab510 --- /dev/null +++ b/examples/LAPACK-CBLAS/config.cmake @@ -0,0 +1,4 @@ +hunter_config(LAPACK + VERSION ${HUNTER_LAPACK_VERSION} + CMAKE_ARGS CBLAS=ON + ) diff --git a/examples/LAPACK-CBLAS/foo.cpp b/examples/LAPACK-CBLAS/foo.cpp new file mode 100644 index 0000000000..3c55ffa7cd --- /dev/null +++ b/examples/LAPACK-CBLAS/foo.cpp @@ -0,0 +1,14 @@ +#include // std::cout +#include + +int main() { + double X[3]; + X[0] = 1; + X[1] = 2; + X[2] = 3; + const int N = 3; + const int incX = 1; + + double sum = cblas_dasum(N, X, incX); + std::cout << "sum over [1, 2, 3] = " << sum << std::endl; +} diff --git a/examples/LAPACK/CMakeLists.txt b/examples/LAPACK/CMakeLists.txt new file mode 100644 index 0000000000..c152432e03 --- /dev/null +++ b/examples/LAPACK/CMakeLists.txt @@ -0,0 +1,33 @@ +# Copyright (c) 2015, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-LAPACK) + +hunter_add_package(LAPACK) + +string(COMPARE EQUAL "${LAPACK_LICENSES}" "" is_empty) +if(is_empty) + message(FATAL_ERROR "Licenses not found") +endif() + +message("LAPACK licenses:") +foreach(x ${LAPACK_LICENSES}) + message("* ${x}") + if(NOT EXISTS "${LAPACK_LICENSES}") + message(FATAL_ERROR "File not found") + endif() +endforeach() + +find_package(LAPACK CONFIG REQUIRED) +# Test double library creation +find_package(LAPACK CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo blas lapack) + diff --git a/examples/LAPACK/foo.cpp b/examples/LAPACK/foo.cpp new file mode 100644 index 0000000000..b230adc8ae --- /dev/null +++ b/examples/LAPACK/foo.cpp @@ -0,0 +1,5 @@ +#include // std::cout + +int main() { + std::cout << "This program is doing nothing!" << std::endl; +} From 5fbdc33d5c904ca9764b91279214136561f7bf5a Mon Sep 17 00:00:00 2001 From: Ihar Kliashchou Date: Mon, 3 Jul 2017 23:50:40 +0300 Subject: [PATCH 222/612] Update fmt to 4.0.0 --- cmake/configs/default.cmake | 2 +- cmake/projects/fmt/hunter.cmake | 11 +++++++++++ examples/fmt/CMakeLists.txt | 4 +--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 26f03da341..1ad3c882da 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -143,7 +143,7 @@ hunter_config(eos VERSION 0.12.1) hunter_config(FakeIt VERSION 2.0.3) hunter_config(fixesproto VERSION 5.0) hunter_config(flatbuffers VERSION 1.3.0-p3) -hunter_config(fmt VERSION 3.0.0) +hunter_config(fmt VERSION 4.0.0) hunter_config(freetype VERSION 2.6.2) hunter_config(gauze VERSION 0.1.1) hunter_config(geos VERSION 3.4.2) diff --git a/cmake/projects/fmt/hunter.cmake b/cmake/projects/fmt/hunter.cmake index 322f008ef0..75e875a210 100644 --- a/cmake/projects/fmt/hunter.cmake +++ b/cmake/projects/fmt/hunter.cmake @@ -8,6 +8,17 @@ include(hunter_download) include(hunter_pick_scheme) # List of versions here... +hunter_add_version( + PACKAGE_NAME + fmt + VERSION + "4.0.0" + URL + "https://github.com/fmtlib/fmt/archive/4.0.0.tar.gz" + SHA1 + d52942b4a31fb94dbb2cca36c90e34209033408f +) + hunter_add_version( PACKAGE_NAME fmt diff --git a/examples/fmt/CMakeLists.txt b/examples/fmt/CMakeLists.txt index 62fc61cbd7..d3c463b235 100644 --- a/examples/fmt/CMakeLists.txt +++ b/examples/fmt/CMakeLists.txt @@ -6,9 +6,7 @@ project(download-fmt) hunter_add_package(fmt) -set (CMAKE_CXX_STANDARD 11) - find_package(fmt CONFIG REQUIRED) add_executable(fmtexample fmtexample.cpp) -target_link_libraries(fmtexample fmt) +target_link_libraries(fmtexample fmt::fmt) From bd608d3865d42af8e987f069b611443bf791a263 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Wed, 5 Jul 2017 17:22:30 +0200 Subject: [PATCH 223/612] update glog to 0.3.5-p0 --- cmake/configs/default.cmake | 2 +- cmake/projects/glog/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 26f03da341..86fd3ad834 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -151,7 +151,7 @@ hunter_config(gflags VERSION 2.1.2-p1) hunter_config(glew VERSION 2.0.0) hunter_config(glfw VERSION 3.3.0-p1) hunter_config(glm VERSION 0.9.8.5) -hunter_config(glog VERSION 0.3.4-p2) +hunter_config(glog VERSION 0.3.5-p0) hunter_config(glproto VERSION 1.4.17) hunter_config(half VERSION 1.1.0-p1) hunter_config(hdf5 VERSION 1.8.15-p1) diff --git a/cmake/projects/glog/hunter.cmake b/cmake/projects/glog/hunter.cmake index 0272995cec..0b37106e2b 100644 --- a/cmake/projects/glog/hunter.cmake +++ b/cmake/projects/glog/hunter.cmake @@ -9,6 +9,17 @@ include(hunter_cacheable) include(hunter_download) include(hunter_pick_scheme) +hunter_add_version( + PACKAGE_NAME + glog + VERSION + "0.3.5-p0" + URL + "https://github.com/hunter-packages/glog/archive/v0.3.5-p0.tar.gz" + SHA1 + 7b1137b2fb26115f1325534a7c3ffdd6014ccbf8 +) + hunter_add_version( PACKAGE_NAME glog From ef06ac546985390cffb4a20be0b07e9b18061314 Mon Sep 17 00:00:00 2001 From: Ihar Kliashchou Date: Thu, 6 Jul 2017 20:17:50 +0300 Subject: [PATCH 224/612] revert set (CMAKE_CXX_STANDARD 11) --- examples/fmt/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/fmt/CMakeLists.txt b/examples/fmt/CMakeLists.txt index d3c463b235..c0df412d5f 100644 --- a/examples/fmt/CMakeLists.txt +++ b/examples/fmt/CMakeLists.txt @@ -6,6 +6,8 @@ project(download-fmt) hunter_add_package(fmt) +set (CMAKE_CXX_STANDARD 11) + find_package(fmt CONFIG REQUIRED) add_executable(fmtexample fmtexample.cpp) From 0c7a6f8af0f53f7758fc305596a3c52fd3a068d4 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Thu, 29 Jun 2017 15:52:47 +0200 Subject: [PATCH 225/612] add suitesparse v4.5.1-p0 (needs LAPACK) - version of cmake project is v.1.3.1 - version of suitesparse is v4.5.1 - dependency: LAPACK --- cmake/configs/default.cmake | 1 + cmake/projects/SuiteSparse/hunter.cmake | 44 +++++++++++++++++++++++++ examples/SuiteSparse/CMakeLists.txt | 34 +++++++++++++++++++ examples/SuiteSparse/foo.cpp | 13 ++++++++ 4 files changed, 92 insertions(+) create mode 100644 cmake/projects/SuiteSparse/hunter.cmake create mode 100644 examples/SuiteSparse/CMakeLists.txt create mode 100644 examples/SuiteSparse/foo.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 725fe01252..9a197ebdaa 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -107,6 +107,7 @@ hunter_config(SDL2 VERSION 2.0.4-p2) hunter_config(SQLite3 VERSION autoconf-3080803) #R-Tree enabled hunter_config(Sober VERSION 0.1.3) hunter_config(Sugar VERSION 1.2.2) +hunter_config(SuiteSparse VERSION 4.5.1-p0) hunter_config(TIFF VERSION 4.0.2-p3) hunter_config(tommath VERSION 1.0-p2) hunter_config(tomcrypt VERSION 1.17-p1) diff --git a/cmake/projects/SuiteSparse/hunter.cmake b/cmake/projects/SuiteSparse/hunter.cmake new file mode 100644 index 0000000000..5a99bf182e --- /dev/null +++ b/cmake/projects/SuiteSparse/hunter.cmake @@ -0,0 +1,44 @@ +# Copyright (c) 2017, NeroBurner +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +# Load used modules +include(hunter_add_version) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) +include(hunter_cacheable) + +hunter_cacheable(SuiteSparse) + +# List of versions here... +## suitesparse-metis-for-windows version is 1.3.1 +## suitesparse library version is 4.5.1 +hunter_add_version( + PACKAGE_NAME + SuiteSparse + VERSION + "4.5.1-p0" + URL + "https://github.com/hunter-packages/suitesparse-metis-for-windows/archive/v1.3.1-p0.tar.gz" + SHA1 + 1350eab5d1a8d488e7b28d217fa751906d4767da +) + + +hunter_cmake_args( + SuiteSparse + CMAKE_ARGS + BUILD_METIS=NO + HUNTER_INSTALL_LICENSE_FILES=LICENSE.md +) + +# Pick a download scheme +hunter_pick_scheme(DEFAULT url_sha1_cmake) + +# Download package. +# Two versions of library will be build: +# * libexample_A.a +# * libexample_Ad.a +hunter_download(PACKAGE_NAME SuiteSparse) diff --git a/examples/SuiteSparse/CMakeLists.txt b/examples/SuiteSparse/CMakeLists.txt new file mode 100644 index 0000000000..2ccd027adb --- /dev/null +++ b/examples/SuiteSparse/CMakeLists.txt @@ -0,0 +1,34 @@ +# Copyright (c) 2017, NeroBurner +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-SuiteSparse) + +hunter_add_package(SuiteSparse) + +string(COMPARE EQUAL "${SuiteSparse_LICENSES}" "" is_empty) +if(is_empty) + message(FATAL_ERROR "Licenses not found") +endif() + +message("SuiteSparse licenses:") +foreach(x ${SuiteSparse_LICENSES}) + message("* ${x}") + if(NOT EXISTS "${SuiteSparse_LICENSES}") + message(FATAL_ERROR "File not found") + endif() +endforeach() + +find_package(SuiteSparse CONFIG REQUIRED) + +# Test double library creation +find_package(SuiteSparse CONFIG REQUIRED) + +# Create executable +add_executable(foo foo.cpp) +target_link_libraries(foo PRIVATE SuiteSparse::cholmod) diff --git a/examples/SuiteSparse/foo.cpp b/examples/SuiteSparse/foo.cpp new file mode 100644 index 0000000000..d09d1ba34d --- /dev/null +++ b/examples/SuiteSparse/foo.cpp @@ -0,0 +1,13 @@ +#include // std::cout +#include + +int main() { + // define variable + cholmod_dense *A; + + cholmod_common c ; + cholmod_start(&c) ; // start CHOLMOD + A = cholmod_ones(3, 3, CHOLMOD_REAL, &c) ; // A = ones(3,3) + std::cout << "norm(A): " << cholmod_norm_dense(A, 0, &c) << std::endl; + cholmod_finish (&c) ; // finish CHOLMOD +} From 7b9f7c92a82ab76dbed0ebf00cc84d45bc79ee77 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Fri, 7 Jul 2017 15:18:38 -0400 Subject: [PATCH 226/612] clear INSTALL variable see: https://github.com/ruslo/hunter/issues/795 --- scripts/clear-all.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/clear-all.cmake b/scripts/clear-all.cmake index a642a94a92..7b9f194a43 100644 --- a/scripts/clear-all.cmake +++ b/scripts/clear-all.cmake @@ -116,6 +116,7 @@ unset(ENV{ICONV}) unset(ENV{INFOPLIST_EXPAND_BUILD_SETTINGS}) unset(ENV{INFOPLIST_OUTPUT_FORMAT}) unset(ENV{INFOPLIST_PREPROCESS}) +unset(ENV{INSTALL}) unset(ENV{INSTALL_DIR}) unset(ENV{INSTALL_GROUP}) unset(ENV{INSTALL_MODE_FLAG}) From 0dc0c829ff5e70a0374c3cf718d4755a6737ee44 Mon Sep 17 00:00:00 2001 From: Vlooe Date: Thu, 11 May 2017 23:07:26 +0200 Subject: [PATCH 227/612] Boost: Added --ignore-site-config to install command https://github.com/ruslo/hunter/issues/423 --- cmake/projects/Boost/schemes/url_sha1_boost.cmake.in | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/projects/Boost/schemes/url_sha1_boost.cmake.in b/cmake/projects/Boost/schemes/url_sha1_boost.cmake.in index 45f64b3d1f..8b31ddd592 100644 --- a/cmake/projects/Boost/schemes/url_sha1_boost.cmake.in +++ b/cmake/projects/Boost/schemes/url_sha1_boost.cmake.in @@ -154,6 +154,7 @@ ExternalProject_Add( install ${boost_list} "--prefix=@HUNTER_PACKAGE_INSTALL_PREFIX@" + --ignore-site-config # Ignore Gentoo specific optimization "none" in site config that only the patched bjam of Gentoo can understand. COMMAND # Copy license files "@CMAKE_COMMAND@" "-C@HUNTER_ARGS_FILE@" # for 'HUNTER_INSTALL_LICENSE_FILES' From bf3c5f7d122067f0d9a1815c0f808c258acd3dbc Mon Sep 17 00:00:00 2001 From: Vlooe Date: Mon, 3 Jul 2017 23:51:41 +0200 Subject: [PATCH 228/612] Boost: increase PACKAGE_INTERNAL_DEPS_ID to 16 --- cmake/projects/Boost/atomic/hunter.cmake | 2 +- cmake/projects/Boost/chrono/hunter.cmake | 2 +- cmake/projects/Boost/context/hunter.cmake | 2 +- cmake/projects/Boost/coroutine/hunter.cmake | 2 +- cmake/projects/Boost/date_time/hunter.cmake | 2 +- cmake/projects/Boost/exception/hunter.cmake | 2 +- cmake/projects/Boost/filesystem/hunter.cmake | 2 +- cmake/projects/Boost/graph/hunter.cmake | 2 +- cmake/projects/Boost/graph_parallel/hunter.cmake | 2 +- cmake/projects/Boost/hunter.cmake | 2 +- cmake/projects/Boost/hunter.cmake.in | 2 +- cmake/projects/Boost/iostreams/hunter.cmake | 2 +- cmake/projects/Boost/locale/hunter.cmake | 2 +- cmake/projects/Boost/log/hunter.cmake | 2 +- cmake/projects/Boost/math/hunter.cmake | 2 +- cmake/projects/Boost/mpi/hunter.cmake | 2 +- cmake/projects/Boost/program_options/hunter.cmake | 2 +- cmake/projects/Boost/python/hunter.cmake | 2 +- cmake/projects/Boost/random/hunter.cmake | 2 +- cmake/projects/Boost/regex/hunter.cmake | 2 +- cmake/projects/Boost/serialization/hunter.cmake | 2 +- cmake/projects/Boost/signals/hunter.cmake | 2 +- cmake/projects/Boost/system/hunter.cmake | 2 +- cmake/projects/Boost/test/hunter.cmake | 2 +- cmake/projects/Boost/thread/hunter.cmake | 2 +- cmake/projects/Boost/timer/hunter.cmake | 2 +- cmake/projects/Boost/wave/hunter.cmake | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/cmake/projects/Boost/atomic/hunter.cmake b/cmake/projects/Boost/atomic/hunter.cmake index a8b2f10beb..87970ff1ed 100644 --- a/cmake/projects/Boost/atomic/hunter.cmake +++ b/cmake/projects/Boost/atomic/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT atomic - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/chrono/hunter.cmake b/cmake/projects/Boost/chrono/hunter.cmake index 8b2cddf748..e53095b8b5 100644 --- a/cmake/projects/Boost/chrono/hunter.cmake +++ b/cmake/projects/Boost/chrono/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT chrono - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/context/hunter.cmake b/cmake/projects/Boost/context/hunter.cmake index 25bba583a2..a254721d0d 100644 --- a/cmake/projects/Boost/context/hunter.cmake +++ b/cmake/projects/Boost/context/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT context - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/coroutine/hunter.cmake b/cmake/projects/Boost/coroutine/hunter.cmake index 441693c9bb..8facb44117 100644 --- a/cmake/projects/Boost/coroutine/hunter.cmake +++ b/cmake/projects/Boost/coroutine/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT coroutine - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/date_time/hunter.cmake b/cmake/projects/Boost/date_time/hunter.cmake index 6475d59eb2..659d1c1a3c 100644 --- a/cmake/projects/Boost/date_time/hunter.cmake +++ b/cmake/projects/Boost/date_time/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT date_time - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/exception/hunter.cmake b/cmake/projects/Boost/exception/hunter.cmake index a37af1516f..e7c65addaf 100644 --- a/cmake/projects/Boost/exception/hunter.cmake +++ b/cmake/projects/Boost/exception/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT exception - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/filesystem/hunter.cmake b/cmake/projects/Boost/filesystem/hunter.cmake index 4cdab81624..354e594520 100644 --- a/cmake/projects/Boost/filesystem/hunter.cmake +++ b/cmake/projects/Boost/filesystem/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT filesystem - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/graph/hunter.cmake b/cmake/projects/Boost/graph/hunter.cmake index dfc42ca673..4e8da3489b 100644 --- a/cmake/projects/Boost/graph/hunter.cmake +++ b/cmake/projects/Boost/graph/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT graph - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/graph_parallel/hunter.cmake b/cmake/projects/Boost/graph_parallel/hunter.cmake index c165d9058a..aaa507539f 100644 --- a/cmake/projects/Boost/graph_parallel/hunter.cmake +++ b/cmake/projects/Boost/graph_parallel/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT graph_parallel - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/hunter.cmake b/cmake/projects/Boost/hunter.cmake index 48f692463e..b7f4931ac7 100644 --- a/cmake/projects/Boost/hunter.cmake +++ b/cmake/projects/Boost/hunter.cmake @@ -256,4 +256,4 @@ hunter_add_version( hunter_pick_scheme(DEFAULT url_sha1_boost) hunter_cacheable(Boost) -hunter_download(PACKAGE_NAME Boost PACKAGE_INTERNAL_DEPS_ID "15") +hunter_download(PACKAGE_NAME Boost PACKAGE_INTERNAL_DEPS_ID "16") diff --git a/cmake/projects/Boost/hunter.cmake.in b/cmake/projects/Boost/hunter.cmake.in index 52186d010c..7be014639e 100644 --- a/cmake/projects/Boost/hunter.cmake.in +++ b/cmake/projects/Boost/hunter.cmake.in @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT boost_component - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/iostreams/hunter.cmake b/cmake/projects/Boost/iostreams/hunter.cmake index 41d19a7a80..7547d0722d 100644 --- a/cmake/projects/Boost/iostreams/hunter.cmake +++ b/cmake/projects/Boost/iostreams/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT iostreams - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/locale/hunter.cmake b/cmake/projects/Boost/locale/hunter.cmake index d2c51f25b4..9665eb6d48 100644 --- a/cmake/projects/Boost/locale/hunter.cmake +++ b/cmake/projects/Boost/locale/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT locale - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/log/hunter.cmake b/cmake/projects/Boost/log/hunter.cmake index 128b2935cc..7465426b2f 100644 --- a/cmake/projects/Boost/log/hunter.cmake +++ b/cmake/projects/Boost/log/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT log - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/math/hunter.cmake b/cmake/projects/Boost/math/hunter.cmake index 7968c0e26c..8022115503 100644 --- a/cmake/projects/Boost/math/hunter.cmake +++ b/cmake/projects/Boost/math/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT math - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/mpi/hunter.cmake b/cmake/projects/Boost/mpi/hunter.cmake index 5c01db9355..896c68cf6d 100644 --- a/cmake/projects/Boost/mpi/hunter.cmake +++ b/cmake/projects/Boost/mpi/hunter.cmake @@ -26,5 +26,5 @@ hunter_download( Boost PACKAGE_COMPONENT mpi - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/program_options/hunter.cmake b/cmake/projects/Boost/program_options/hunter.cmake index 68a63dbcd7..ecbfc9baba 100644 --- a/cmake/projects/Boost/program_options/hunter.cmake +++ b/cmake/projects/Boost/program_options/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT program_options - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/python/hunter.cmake b/cmake/projects/Boost/python/hunter.cmake index 29eeebe913..357e39f366 100644 --- a/cmake/projects/Boost/python/hunter.cmake +++ b/cmake/projects/Boost/python/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT python - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/random/hunter.cmake b/cmake/projects/Boost/random/hunter.cmake index 6df74df5af..d3e1688f11 100644 --- a/cmake/projects/Boost/random/hunter.cmake +++ b/cmake/projects/Boost/random/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT random - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/regex/hunter.cmake b/cmake/projects/Boost/regex/hunter.cmake index 2d3ee58d1d..f581036001 100644 --- a/cmake/projects/Boost/regex/hunter.cmake +++ b/cmake/projects/Boost/regex/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT regex - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/serialization/hunter.cmake b/cmake/projects/Boost/serialization/hunter.cmake index be620d44cf..ef062ca6e7 100644 --- a/cmake/projects/Boost/serialization/hunter.cmake +++ b/cmake/projects/Boost/serialization/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT serialization - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/signals/hunter.cmake b/cmake/projects/Boost/signals/hunter.cmake index 8bf055d806..d1bb08e8f3 100644 --- a/cmake/projects/Boost/signals/hunter.cmake +++ b/cmake/projects/Boost/signals/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT signals - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/system/hunter.cmake b/cmake/projects/Boost/system/hunter.cmake index 82ba3a1b34..3ff095a1f3 100644 --- a/cmake/projects/Boost/system/hunter.cmake +++ b/cmake/projects/Boost/system/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT system - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/test/hunter.cmake b/cmake/projects/Boost/test/hunter.cmake index e818fba7b1..c37461b067 100644 --- a/cmake/projects/Boost/test/hunter.cmake +++ b/cmake/projects/Boost/test/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT test - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/thread/hunter.cmake b/cmake/projects/Boost/thread/hunter.cmake index b8056c58a9..4fd484d819 100644 --- a/cmake/projects/Boost/thread/hunter.cmake +++ b/cmake/projects/Boost/thread/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT thread - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/timer/hunter.cmake b/cmake/projects/Boost/timer/hunter.cmake index 81a2415142..5febc22a0e 100644 --- a/cmake/projects/Boost/timer/hunter.cmake +++ b/cmake/projects/Boost/timer/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT timer - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) diff --git a/cmake/projects/Boost/wave/hunter.cmake b/cmake/projects/Boost/wave/hunter.cmake index f826e8ca58..b22b59f2d2 100644 --- a/cmake/projects/Boost/wave/hunter.cmake +++ b/cmake/projects/Boost/wave/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT wave - PACKAGE_INTERNAL_DEPS_ID "15" + PACKAGE_INTERNAL_DEPS_ID "16" ) From dc1a977628e84eae7469eb1d2037c61cdf23a2da Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sat, 8 Jul 2017 15:47:10 +0300 Subject: [PATCH 229/612] Fix PKG_CONFIG_LIBDIR [skip ci] --- cmake/modules/hunter_autotools_project.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/modules/hunter_autotools_project.cmake b/cmake/modules/hunter_autotools_project.cmake index cb985ac07a..bbe2d0101a 100644 --- a/cmake/modules/hunter_autotools_project.cmake +++ b/cmake/modules/hunter_autotools_project.cmake @@ -61,6 +61,8 @@ include(hunter_fatal_error) include(hunter_status_debug) include(hunter_test_string_not_empty) +# Packages to test this function: +# * xau function(hunter_autotools_project target_name) set(optional_params) set(one_value_params @@ -109,8 +111,8 @@ function(hunter_autotools_project target_name) set(default_path "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin") set(shell_env_path "PATH=${PARAM_GLOBAL_INSTALL_DIR}/bin:${default_path}") - set(d1 "${root_id}/lib/pkgconfig") - set(d2 "${root_id}/share/pkgconfig") + set(d1 "${PARAM_GLOBAL_INSTALL_DIR}/lib/pkgconfig") + set(d2 "${PARAM_GLOBAL_INSTALL_DIR}/share/pkgconfig") set(shell_pkg_config_libdir "PKG_CONFIG_LIBDIR=${d1}:${d2}") set(clear_vars_shell_script "${PARAM_HUNTER_SELF}/scripts/clear-all.sh") From 94ed78d86d8d9db7c0ab6dd5414df84ac0b74adc Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sat, 8 Jul 2017 15:56:41 +0300 Subject: [PATCH 230/612] Clear 'INSTALL' [skip ci] --- scripts/clear-all.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/clear-all.sh b/scripts/clear-all.sh index 300b7ff5d8..e7a935f731 100755 --- a/scripts/clear-all.sh +++ b/scripts/clear-all.sh @@ -116,6 +116,7 @@ unset ICONV unset INFOPLIST_EXPAND_BUILD_SETTINGS unset INFOPLIST_OUTPUT_FORMAT unset INFOPLIST_PREPROCESS +unset INSTALL unset INSTALL_DIR unset INSTALL_GROUP unset INSTALL_MODE_FLAG From 070f89a1454116704a57d766a386f989d1a9a297 Mon Sep 17 00:00:00 2001 From: Tom Mason Date: Sun, 9 Jul 2017 15:09:02 +0100 Subject: [PATCH 231/612] enable optional functionality in tomcrypt that depends on tommath --- cmake/configs/default.cmake | 2 +- cmake/projects/tomcrypt/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 229a702264..73c930a9f1 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -107,7 +107,7 @@ hunter_config(Sober VERSION 0.1.3) hunter_config(Sugar VERSION 1.2.2) hunter_config(TIFF VERSION 4.0.2-p3) hunter_config(tommath VERSION 1.0-p2) -hunter_config(tomcrypt VERSION 1.17-p1) +hunter_config(tomcrypt VERSION 1.17-p2) hunter_config(WTL VERSION 9.1.5321) hunter_config(Washer VERSION 0.1.2) hunter_config(WinSparkle VERSION 0.4.0) diff --git a/cmake/projects/tomcrypt/hunter.cmake b/cmake/projects/tomcrypt/hunter.cmake index 53bcc0fb3e..e01d941099 100644 --- a/cmake/projects/tomcrypt/hunter.cmake +++ b/cmake/projects/tomcrypt/hunter.cmake @@ -20,6 +20,17 @@ hunter_add_version( 3c9c61ee441b77517525528f5c191fa19801fd30 ) +hunter_add_version( + PACKAGE_NAME + tomcrypt + VERSION + "1.17-p2" + URL + "https://github.com/hunter-packages/libtomcrypt/archive/1.17-p2.tar.gz" + SHA1 + 90a3796bddd319fe12529d4b58e2ab23c15b7f1b +) + # Pick a download scheme hunter_pick_scheme(DEFAULT url_sha1_cmake) # use scheme for cmake projects From 04710c019ae6abbeb63b2b98a31647225b33e950 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 10 Jul 2017 19:47:40 +0300 Subject: [PATCH 232/612] Add 'drishti_faces' package --- cmake/configs/default.cmake | 1 + cmake/projects/drishti_faces/hunter.cmake | 24 +++++++++++++++++++++++ examples/drishti_faces/CMakeLists.txt | 17 ++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 cmake/projects/drishti_faces/hunter.cmake create mode 100644 examples/drishti_faces/CMakeLists.txt diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 70a797e1ba..d06c90982d 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -138,6 +138,7 @@ hunter_config(doctest VERSION 1.2.0) hunter_config(dri2proto VERSION 2.8) hunter_config(dri3proto VERSION 1.0) hunter_config(drishti_assets VERSION 1.6) +hunter_config(drishti_faces VERSION 1.1) hunter_config(drm VERSION 2.4.67) hunter_config(eigen3-nnls VERSION 1.0.0) hunter_config(eos VERSION 0.12.1) diff --git a/cmake/projects/drishti_faces/hunter.cmake b/cmake/projects/drishti_faces/hunter.cmake new file mode 100644 index 0000000000..a40d04d7da --- /dev/null +++ b/cmake/projects/drishti_faces/hunter.cmake @@ -0,0 +1,24 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + drishti_faces + VERSION + 1.1 + URL + "https://github.com/elucideye/drishti-faces/archive/v1.1.tar.gz" + SHA1 + 2518ff034bd4c2967cbab4fc7a69d30cf0de057a +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(drishti_faces) +hunter_download(PACKAGE_NAME drishti_faces) diff --git a/examples/drishti_faces/CMakeLists.txt b/examples/drishti_faces/CMakeLists.txt new file mode 100644 index 0000000000..e898c567ce --- /dev/null +++ b/examples/drishti_faces/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-drishti_faces) + +hunter_add_package(drishti_faces) +find_package(drishti_faces CONFIG REQUIRED) + +if(NOT EXISTS "${DRISHTI_FACES_EYE_IMAGE}") + message(FATAL_ERROR "File not found: '${DRISHTI_FACES_EYE_IMAGE}'") +endif() From 0ad59676968f4bf6d3f373a6b6fbe8f65dfc1c03 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 10 Jul 2017 20:50:05 +0300 Subject: [PATCH 233/612] Add 'aglet' package --- cmake/configs/default.cmake | 1 + cmake/projects/aglet/hunter.cmake | 24 ++++++++++++++++++++++++ examples/aglet/CMakeLists.txt | 16 ++++++++++++++++ examples/aglet/foo.cpp | 4 ++++ 4 files changed, 45 insertions(+) create mode 100644 cmake/projects/aglet/hunter.cmake create mode 100644 examples/aglet/CMakeLists.txt create mode 100644 examples/aglet/foo.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index d06c90982d..8733e541c8 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -118,6 +118,7 @@ hunter_config(ZMQPP VERSION 4.1.2) hunter_config(ZeroMQ VERSION 4.1.4-p2) hunter_config(caffe VERSION rc3-p2) hunter_config(Catch VERSION 1.5.9) +hunter_config(aglet VERSION 1.0) hunter_config(autobahn-cpp VERSION 0.2.0) hunter_config(boost-pba VERSION 1.0.0-p0) hunter_config(ccv VERSION 0.7-p6) diff --git a/cmake/projects/aglet/hunter.cmake b/cmake/projects/aglet/hunter.cmake new file mode 100644 index 0000000000..aeb6405035 --- /dev/null +++ b/cmake/projects/aglet/hunter.cmake @@ -0,0 +1,24 @@ +# Copyright (c) 2016-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + aglet + VERSION + 1.0 + URL + "https://github.com/elucideye/aglet/archive/v1.0.tar.gz" + SHA1 + fbc018f8d7fdb757b23daa972ac6f83aea87c30c +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(aglet) +hunter_download(PACKAGE_NAME aglet) diff --git a/examples/aglet/CMakeLists.txt b/examples/aglet/CMakeLists.txt new file mode 100644 index 0000000000..2e37296dd7 --- /dev/null +++ b/examples/aglet/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright (c) 2016-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-aglet) + +hunter_add_package(aglet) +find_package(aglet CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo PUBLIC aglet::aglet) diff --git a/examples/aglet/foo.cpp b/examples/aglet/foo.cpp new file mode 100644 index 0000000000..7fc78ec397 --- /dev/null +++ b/examples/aglet/foo.cpp @@ -0,0 +1,4 @@ +#include + +int main() { +} From 8350c2d0cc904e7cf6b568e11b6a030161a4c487 Mon Sep 17 00:00:00 2001 From: Andreas Schuh Date: Tue, 11 Jul 2017 18:13:58 +0100 Subject: [PATCH 234/612] Add gflags v2.2.1 and make it new default, update example --- cmake/configs/default.cmake | 2 +- cmake/projects/gflags/hunter.cmake | 11 +++++++++++ examples/gflags/CMakeLists.txt | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 3a5b98fa91..27535e1d65 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -112,7 +112,7 @@ hunter_config(flatbuffers VERSION 1.3.0-p3) hunter_config(fmt VERSION 3.0.0) hunter_config(freetype VERSION 2.6.2) hunter_config(geos VERSION 3.4.2) -hunter_config(gflags VERSION 2.1.2-p1) +hunter_config(gflags VERSION 2.2.1) hunter_config(glew VERSION 2.0.0) hunter_config(glfw VERSION 3.2-p0) hunter_config(glm VERSION 0.9.7.6) diff --git a/cmake/projects/gflags/hunter.cmake b/cmake/projects/gflags/hunter.cmake index 8dca5879bc..5a05628dab 100644 --- a/cmake/projects/gflags/hunter.cmake +++ b/cmake/projects/gflags/hunter.cmake @@ -30,6 +30,17 @@ hunter_add_version( 113255cba87b6af61663014f446e2d69d0d2bc3a ) +hunter_add_version( + PACKAGE_NAME + gflags + VERSION + 2.2.1 + URL + "https://github.com/gflags/gflags/archive/v2.2.1.tar.gz" + SHA1 + b1c82261c8b9c87fb2fb5de6bdf70121ad1cca58 +) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(gflags) hunter_download(PACKAGE_NAME gflags) diff --git a/examples/gflags/CMakeLists.txt b/examples/gflags/CMakeLists.txt index 6813fd6a79..f3ced8f42a 100644 --- a/examples/gflags/CMakeLists.txt +++ b/examples/gflags/CMakeLists.txt @@ -16,4 +16,4 @@ hunter_add_package(gflags) find_package(gflags CONFIG REQUIRED) add_executable(foo foo.cpp) -target_link_libraries(foo gflags-static) +target_link_libraries(foo gflags) From 5e7611928aa429cca3454e9c49db7e41e25168d8 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 12 Jul 2017 20:02:14 +0300 Subject: [PATCH 235/612] ogles_gpgpu 0.1.6-p3 --- cmake/configs/default.cmake | 2 +- cmake/projects/ogles_gpgpu/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index b31675d1aa..9b6df36893 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -188,7 +188,7 @@ hunter_config(odb-compiler VERSION 2.4.0) hunter_config(odb-mysql VERSION 2.4.0) hunter_config(odb-pgsql VERSION 2.4.0) hunter_config(odb-sqlite VERSION 2.4.0) -hunter_config(ogles_gpgpu VERSION 0.1.6-p2) +hunter_config(ogles_gpgpu VERSION 0.1.6-p3) hunter_config(onmt VERSION 0.4.1-p2) hunter_config(openddlparser VERSION 0.1.0-p2) hunter_config(pciaccess VERSION 0.13.4) diff --git a/cmake/projects/ogles_gpgpu/hunter.cmake b/cmake/projects/ogles_gpgpu/hunter.cmake index 447c63a732..f8979b0ab8 100644 --- a/cmake/projects/ogles_gpgpu/hunter.cmake +++ b/cmake/projects/ogles_gpgpu/hunter.cmake @@ -9,6 +9,17 @@ include(hunter_cmake_args) include(hunter_download) include(hunter_pick_scheme) +hunter_add_version( + PACKAGE_NAME + ogles_gpgpu + VERSION + 0.1.6-p3 + URL + "https://github.com/hunter-packages/ogles_gpgpu/archive/v0.1.6-p3.tar.gz" + SHA1 + 3ddef5cd88ae26776e86e5d0d0cf637d06a88d1f +) + hunter_add_version( PACKAGE_NAME ogles_gpgpu From 7dca935a0760230ccbc70653f3a4d5243439f5f0 Mon Sep 17 00:00:00 2001 From: Brian Orr Date: Wed, 12 Jul 2017 20:16:58 -0700 Subject: [PATCH 236/612] Update example to init the gflags library at startup --- examples/gflags/foo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/gflags/foo.cpp b/examples/gflags/foo.cpp index 4e67f321e7..6e373d314f 100644 --- a/examples/gflags/foo.cpp +++ b/examples/gflags/foo.cpp @@ -4,5 +4,7 @@ DEFINE_bool(big_menu, true, "Include 'advanced' options in the menu listing"); DEFINE_string(languages, "english,french,german", "comma-separated list of languages to offer in the 'lang' menu"); -int main() { +int main(int argc, char* argv[]) { + gflags::ParseCommandLineFlags(&argc, &argv, true); + return 0; } From a7c1880afd9bbac01d2d024e66b5af7f72ce7b59 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 14 Jul 2017 12:55:57 +0300 Subject: [PATCH 237/612] Add 'aes' package --- cmake/configs/default.cmake | 1 + cmake/projects/aes/hunter.cmake | 24 ++++++++++++++++++++++++ examples/aes/CMakeLists.txt | 16 ++++++++++++++++ examples/aes/foo.cpp | 10 ++++++++++ 4 files changed, 51 insertions(+) create mode 100644 cmake/projects/aes/hunter.cmake create mode 100644 examples/aes/CMakeLists.txt create mode 100644 examples/aes/foo.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 56a20e2efb..cb55ce3d83 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -119,6 +119,7 @@ hunter_config(ZMQPP VERSION 4.1.2) hunter_config(ZeroMQ VERSION 4.1.4-p2) hunter_config(caffe VERSION rc3-p2) hunter_config(Catch VERSION 1.5.9) +hunter_config(aes VERSION 0.0.1-p0) hunter_config(aglet VERSION 1.0) hunter_config(autobahn-cpp VERSION 0.2.0) hunter_config(boost-pba VERSION 1.0.0-p0) diff --git a/cmake/projects/aes/hunter.cmake b/cmake/projects/aes/hunter.cmake new file mode 100644 index 0000000000..92fdf75653 --- /dev/null +++ b/cmake/projects/aes/hunter.cmake @@ -0,0 +1,24 @@ +# Copyright (c) 2016-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + aes + VERSION + 0.0.1-p0 + URL + "https://github.com/hunter-packages/aes/archive/v0.0.1-p0.tar.gz" + SHA1 + 49ae29df3b0e0619c1db7e7696795c956386f71b +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(aes) +hunter_download(PACKAGE_NAME aes) diff --git a/examples/aes/CMakeLists.txt b/examples/aes/CMakeLists.txt new file mode 100644 index 0000000000..9e4c4ce8a1 --- /dev/null +++ b/examples/aes/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright (c) 2016-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-aes) + +hunter_add_package(aes) +find_package(aes CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo aes::aes) diff --git a/examples/aes/foo.cpp b/examples/aes/foo.cpp new file mode 100644 index 0000000000..1bd4df6ed5 --- /dev/null +++ b/examples/aes/foo.cpp @@ -0,0 +1,10 @@ +#include + +int main() { + uint8_t* input = 0; + uint8_t* key = 0; + uint8_t *output = 0; + uint32_t length = 0; + + AES_ECB_encrypt(input, key, output, length); +} From 00d70c68c79899306c37e169215db2ea6f3303d7 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 14 Jul 2017 13:34:13 +0300 Subject: [PATCH 238/612] Docs: Add link to pkg.aes [skip ci] --- docs/packages/all.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/all.rst b/docs/packages/all.rst index 50e077e057..7cacf6486e 100644 --- a/docs/packages/all.rst +++ b/docs/packages/all.rst @@ -60,6 +60,7 @@ All packages * `ZLIB `__ * `ZMQPP `__ * `ZeroMQ `__ +* `aes `__ * `boost-pba `__ * `caffe `__ * `ccv `__ From 48695028a5ddebc2af9b7c48207e713efeae376f Mon Sep 17 00:00:00 2001 From: Ihar Kliashchou Date: Sun, 16 Jul 2017 22:39:24 +0300 Subject: [PATCH 239/612] Openssl is rejected by Apple for using non-public API https://github.com/openssl/openssl/issues/2545 --- cmake/projects/OpenSSL/hunter.cmake | 2 +- cmake/projects/OpenSSL/schemes/url_sha1_openssl_ios.cmake.in | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/projects/OpenSSL/hunter.cmake b/cmake/projects/OpenSSL/hunter.cmake index 019cd2f127..b5001761a1 100755 --- a/cmake/projects/OpenSSL/hunter.cmake +++ b/cmake/projects/OpenSSL/hunter.cmake @@ -307,4 +307,4 @@ else() endif() hunter_cacheable(OpenSSL) -hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID "12") +hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID "13") diff --git a/cmake/projects/OpenSSL/schemes/url_sha1_openssl_ios.cmake.in b/cmake/projects/OpenSSL/schemes/url_sha1_openssl_ios.cmake.in index eee9983316..db88ce72c9 100644 --- a/cmake/projects/OpenSSL/schemes/url_sha1_openssl_ios.cmake.in +++ b/cmake/projects/OpenSSL/schemes/url_sha1_openssl_ios.cmake.in @@ -125,6 +125,7 @@ foreach(variant @IPHONEOS_ARCHS@ @IPHONESIMULATOR_ARCHS@) ./Configure "${configure_opts}" "${noasm}" + "no-async" "--prefix=@HUNTER_PACKAGE_INSTALL_PREFIX@" "-arch ${variant}" BUILD_COMMAND From d5e7d0995dacf5e79e5a3725a5653a9c00b39368 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 17 Jul 2017 12:51:10 +0300 Subject: [PATCH 240/612] aes 0.0.1-p1 --- cmake/configs/default.cmake | 2 +- cmake/projects/aes/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index cb55ce3d83..1f9b0b917d 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -119,7 +119,7 @@ hunter_config(ZMQPP VERSION 4.1.2) hunter_config(ZeroMQ VERSION 4.1.4-p2) hunter_config(caffe VERSION rc3-p2) hunter_config(Catch VERSION 1.5.9) -hunter_config(aes VERSION 0.0.1-p0) +hunter_config(aes VERSION 0.0.1-p1) hunter_config(aglet VERSION 1.0) hunter_config(autobahn-cpp VERSION 0.2.0) hunter_config(boost-pba VERSION 1.0.0-p0) diff --git a/cmake/projects/aes/hunter.cmake b/cmake/projects/aes/hunter.cmake index 92fdf75653..2d0cf381d7 100644 --- a/cmake/projects/aes/hunter.cmake +++ b/cmake/projects/aes/hunter.cmake @@ -19,6 +19,17 @@ hunter_add_version( 49ae29df3b0e0619c1db7e7696795c956386f71b ) +hunter_add_version( + PACKAGE_NAME + aes + VERSION + 0.0.1-p1 + URL + "https://github.com/hunter-packages/aes/archive/v0.0.1-p1.tar.gz" + SHA1 + 5ec961526679246b34332afd1d83c015c377bd79 +) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(aes) hunter_download(PACKAGE_NAME aes) From 2dab396d87b828e3eb43f736b2f6e38ee9e079b8 Mon Sep 17 00:00:00 2001 From: Tom Mason Date: Sun, 16 Jul 2017 18:37:12 +0100 Subject: [PATCH 241/612] add enet package --- cmake/configs/default.cmake | 1 + cmake/projects/enet/hunter.cmake | 27 +++++++++++++++++++++++++++ examples/enet/CMakeLists.txt | 14 ++++++++++++++ examples/enet/main.c | 15 +++++++++++++++ 4 files changed, 57 insertions(+) create mode 100644 cmake/projects/enet/hunter.cmake create mode 100644 examples/enet/CMakeLists.txt create mode 100644 examples/enet/main.c diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index cb55ce3d83..c6800e1b08 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -53,6 +53,7 @@ hunter_config(CppNetlib VERSION 0.10.1-hunter-3) hunter_config(CppNetlibUri VERSION 1.0.4-hunter) hunter_config(CsvParserCPlusPlus VERSION 1.0.1) hunter_config(Eigen VERSION 3.3.4-p0) +hunter_config(enet VERSION 1.3.13-p1) hunter_config(Expat VERSION 2.1.1) if(MSVC) hunter_config(getopt VERSION 1.0.0-p0) diff --git a/cmake/projects/enet/hunter.cmake b/cmake/projects/enet/hunter.cmake new file mode 100644 index 0000000000..962d789d85 --- /dev/null +++ b/cmake/projects/enet/hunter.cmake @@ -0,0 +1,27 @@ +# cmake/projects/Example/hunter.cmake + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +# Load used modules +include(hunter_add_version) +include(hunter_download) +include(hunter_pick_scheme) +include(hunter_cacheable) + +# List of versions here... +hunter_add_version( + PACKAGE_NAME + enet + VERSION + "1.3.13-p1" + URL + "https://github.com/hunter-packages/enet/archive/v1.3.13-p1.tar.gz" + SHA1 + 40f97cc8d5e41f36fab05c9170836fb55d64191e +) + +# Pick a download scheme +hunter_pick_scheme(DEFAULT url_sha1_cmake) # use scheme for cmake projects + +hunter_cacheable(enet) +hunter_download(PACKAGE_NAME enet) diff --git a/examples/enet/CMakeLists.txt b/examples/enet/CMakeLists.txt new file mode 100644 index 0000000000..278405aa1d --- /dev/null +++ b/examples/enet/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(example-enet) + +hunter_add_package(enet) + +find_package(enet CONFIG REQUIRED) + +add_executable(example-enet main.c) +target_link_libraries(example-enet enet::enet) diff --git a/examples/enet/main.c b/examples/enet/main.c new file mode 100644 index 0000000000..f9bac88548 --- /dev/null +++ b/examples/enet/main.c @@ -0,0 +1,15 @@ +#include +#include + +int +main (int argc, char ** argv) +{ + if (enet_initialize () != 0) + { + fprintf (stderr, "An error occurred while initializing ENet.\n"); + return EXIT_FAILURE; + } + atexit (enet_deinitialize); + + return 0; +} From 91584b2e745d65096b735819c545658724101405 Mon Sep 17 00:00:00 2001 From: Tom Mason Date: Mon, 17 Jul 2017 23:15:27 +0100 Subject: [PATCH 242/612] update bzip2 package see https://github.com/hunter-packages/bzip2/releases/tag/v1.0.6-p3 --- cmake/configs/default.cmake | 2 +- cmake/projects/BZip2/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 1f9b0b917d..c8e5fd22ad 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -39,7 +39,7 @@ hunter_config(Assimp VERSION 3.2-p1) hunter_config(Async++ VERSION 0.0.3-hunter) hunter_config(Avahi VERSION 0.6.31) hunter_config(Beast VERSION 1.0.0-b32-hunter-4) -hunter_config(BZip2 VERSION 1.0.6-p2) +hunter_config(BZip2 VERSION 1.0.6-p3) hunter_config(Boost VERSION 1.64.0) hunter_config(BoostCompute VERSION 0.5-p0) hunter_config(BoostProcess VERSION 0.5) diff --git a/cmake/projects/BZip2/hunter.cmake b/cmake/projects/BZip2/hunter.cmake index f9cd92b385..38227cf451 100644 --- a/cmake/projects/BZip2/hunter.cmake +++ b/cmake/projects/BZip2/hunter.cmake @@ -31,6 +31,17 @@ hunter_add_version( 76d5bdd269160a87948fec676c75c2bcc6888585 ) +hunter_add_version( + PACKAGE_NAME + BZip2 + VERSION + "1.0.6-p3" + URL + "https://github.com/hunter-packages/bzip2/archive/v1.0.6-p3.tar.gz" + SHA1 + f0ebd4c19c2ff663c2f75406c1a476211bf3d3c1 +) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(BZip2) hunter_download(PACKAGE_NAME BZip2) From a7329e8467f60c8263d717d701b43387863c78c8 Mon Sep 17 00:00:00 2001 From: Sacha Date: Tue, 18 Jul 2017 09:10:56 +1000 Subject: [PATCH 243/612] Add PostgreSQL 9.6.3, without requirement of bison+flex --- cmake/configs/default.cmake | 2 +- cmake/projects/PostgreSQL/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 1f9b0b917d..0528b3d72b 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -95,7 +95,7 @@ else() endif() hunter_config(PNG VERSION 1.6.26-p1) hunter_config(PocoCpp VERSION 1.7.6-p0) -hunter_config(PostgreSQL VERSION 9.5.0) +hunter_config(PostgreSQL VERSION 9.6.3) hunter_config(Protobuf VERSION 3.0.0-p1) hunter_config(Qt VERSION 5.5.1-cvpixelbuffer-2-p9) hunter_config(QtAndroidCMake VERSION 1.0.9) diff --git a/cmake/projects/PostgreSQL/hunter.cmake b/cmake/projects/PostgreSQL/hunter.cmake index 5481c83533..501550590d 100644 --- a/cmake/projects/PostgreSQL/hunter.cmake +++ b/cmake/projects/PostgreSQL/hunter.cmake @@ -9,6 +9,17 @@ include(hunter_configuration_types) include(hunter_pick_scheme) include(hunter_download) +hunter_add_version( + PACKAGE_NAME + PostgreSQL + VERSION + "9.6.3" + URL + "https://github.com/hunter-packages/PostgreSQL/archive/PostgreSQL-9.6.3.tar.gz" + SHA1 + 103d31238ef688295960082619968bda4aa01163 +) + hunter_add_version( PACKAGE_NAME PostgreSQL From 936fae5b74412af4afa0f5c108e27556e6834724 Mon Sep 17 00:00:00 2001 From: Sacha Refshauge Date: Tue, 18 Jul 2017 21:21:37 +1000 Subject: [PATCH 244/612] PostgreSQL: Missing hunter include. Fixed iOS and Android. --- cmake/projects/PostgreSQL/hunter.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/projects/PostgreSQL/hunter.cmake b/cmake/projects/PostgreSQL/hunter.cmake index 501550590d..b0eabb15fc 100644 --- a/cmake/projects/PostgreSQL/hunter.cmake +++ b/cmake/projects/PostgreSQL/hunter.cmake @@ -8,6 +8,7 @@ include(hunter_cacheable) include(hunter_configuration_types) include(hunter_pick_scheme) include(hunter_download) +include(hunter_cmake_args) hunter_add_version( PACKAGE_NAME From 823029a6eca2b6ce9760c46c9b3a6ef578c76c1d Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Wed, 19 Jul 2017 14:42:24 -0400 Subject: [PATCH 245/612] update aglet to v1.1.0 --- cmake/configs/default.cmake | 2 +- cmake/projects/aglet/hunter.cmake | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 1517b684ce..46269acc76 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -120,7 +120,7 @@ hunter_config(ZeroMQ VERSION 4.1.4-p2) hunter_config(caffe VERSION rc3-p2) hunter_config(Catch VERSION 1.5.9) hunter_config(aes VERSION 0.0.1-p1) -hunter_config(aglet VERSION 1.0) +hunter_config(aglet VERSION 1.1.0) hunter_config(autobahn-cpp VERSION 0.2.0) hunter_config(boost-pba VERSION 1.0.0-p0) hunter_config(ccv VERSION 0.7-p6) diff --git a/cmake/projects/aglet/hunter.cmake b/cmake/projects/aglet/hunter.cmake index aeb6405035..a4c369d680 100644 --- a/cmake/projects/aglet/hunter.cmake +++ b/cmake/projects/aglet/hunter.cmake @@ -1,4 +1,5 @@ # Copyright (c) 2016-2017, Ruslan Baratov +# Copyright (c) 2017, David Hirvonen # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -19,6 +20,17 @@ hunter_add_version( fbc018f8d7fdb757b23daa972ac6f83aea87c30c ) +hunter_add_version( + PACKAGE_NAME + aglet + VERSION + 1.1.0 + URL + "https://github.com/elucideye/aglet/archive/v1.1.0.tar.gz" + SHA1 + 1857a8d99c0224688d7131a09f295f48723209aa +) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(aglet) hunter_download(PACKAGE_NAME aglet) From 7edb7b32792e101eaa9dc01d0d0d27e2f46f36aa Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 20 Jul 2017 10:21:59 +0300 Subject: [PATCH 246/612] Add 'aglet' to docs --- docs/packages/all.rst | 1 + docs/packages/graphics.rst | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/packages/all.rst b/docs/packages/all.rst index 7cacf6486e..6943570b71 100644 --- a/docs/packages/all.rst +++ b/docs/packages/all.rst @@ -61,6 +61,7 @@ All packages * `ZMQPP `__ * `ZeroMQ `__ * `aes `__ +* `aglet `__ * `boost-pba `__ * `caffe `__ * `ccv `__ diff --git a/docs/packages/graphics.rst b/docs/packages/graphics.rst index 7b8135860e..936b01817b 100644 --- a/docs/packages/graphics.rst +++ b/docs/packages/graphics.rst @@ -5,5 +5,6 @@ Graphics 2D/3D -------------- - * `Assimp `_ - portable Open Source library to import various well-known 3D model formats in a uniform manner. + * `Assimp `_ - portable Open Source library to import various well-known 3D model formats in a uniform manner + * `aglet `__ - Tiny cross platform (headless) OpenGL context creation * `freetype `_ - render freetype fonts From c75f856b85fd9c29fc7953a8737ed7ff3a8f30c5 Mon Sep 17 00:00:00 2001 From: Nils Moehrle Date: Thu, 20 Jul 2017 09:55:15 +0200 Subject: [PATCH 247/612] Clarify error for incorrect usage of hunter_fatal_error --- cmake/modules/hunter_fatal_error.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/modules/hunter_fatal_error.cmake b/cmake/modules/hunter_fatal_error.cmake index 4eb5745f93..e58b00aef4 100644 --- a/cmake/modules/hunter_fatal_error.cmake +++ b/cmake/modules/hunter_fatal_error.cmake @@ -7,15 +7,15 @@ include(hunter_internal_error) include(hunter_wiki) function(hunter_fatal_error) - cmake_parse_arguments(hunter "" "WIKI" "" "${ARGV}") - if(NOT hunter_WIKI) - hunter_internal_error("Expected wiki") + cmake_parse_arguments(x "" "WIKI" "" "${ARGV}") + if(NOT x_WIKI) + hunter_internal_error("Expected argument WIKI") endif() message("") - foreach(x ${hunter_UNPARSED_ARGUMENTS}) + foreach(x ${x_UNPARSED_ARGUMENTS}) message("[hunter ** FATAL ERROR **] ${x}") endforeach() message("[hunter ** FATAL ERROR **] [Directory:${CMAKE_CURRENT_LIST_DIR}]") message("") - hunter_wiki("${hunter_WIKI}") + hunter_wiki("${x_WIKI}") endfunction() From 548ba10dc9221df01c36137ccb7860a92597008a Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 21 Jul 2017 19:45:34 +0300 Subject: [PATCH 248/612] Docs: Add 'ogles_gpgpu' to "Graphics 2D/3D" --- docs/packages/graphics.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/packages/graphics.rst b/docs/packages/graphics.rst index 936b01817b..6094a4c2a7 100644 --- a/docs/packages/graphics.rst +++ b/docs/packages/graphics.rst @@ -8,3 +8,4 @@ Graphics 2D/3D * `Assimp `_ - portable Open Source library to import various well-known 3D model formats in a uniform manner * `aglet `__ - Tiny cross platform (headless) OpenGL context creation * `freetype `_ - render freetype fonts + * `ogles_gpgpu `__ - GPGPU for mobile devices and embedded systems using OpenGL ES 2.0 From 520e025a67a360700d076a4f6d6b6cce85b23049 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 21 Jul 2017 20:09:00 +0000 Subject: [PATCH 249/612] Check Git version --- cmake/modules/hunter_pack_git_submodule.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/modules/hunter_pack_git_submodule.cmake b/cmake/modules/hunter_pack_git_submodule.cmake index 472f185c93..04c94dd2e1 100644 --- a/cmake/modules/hunter_pack_git_submodule.cmake +++ b/cmake/modules/hunter_pack_git_submodule.cmake @@ -35,6 +35,12 @@ function(hunter_pack_git_submodule) find_package(Git REQUIRED) hunter_status_debug("Using git executable: ${GIT_EXECUTABLE}") + # For '--git-path': + # * https://git-scm.com/docs/git-rev-parse/2.5.0 + if(GIT_VERSION_STRING VERSION_LESS "2.5.0") + hunter_user_error("At least Git 2.5.0 required") + endif() + set(cmd "${GIT_EXECUTABLE}" rev-parse --show-toplevel) execute_process( COMMAND ${cmd} From afba64f5d19c7e64f03979d7601a039be39b367f Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 23 Jul 2017 17:15:59 +0300 Subject: [PATCH 250/612] Report 'error.vs.devenv' error --- cmake/modules/hunter_setup_msvc.cmake | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cmake/modules/hunter_setup_msvc.cmake b/cmake/modules/hunter_setup_msvc.cmake index 04e136b249..cb11dac1a1 100644 --- a/cmake/modules/hunter_setup_msvc.cmake +++ b/cmake/modules/hunter_setup_msvc.cmake @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.0) +include(hunter_fatal_error) include(hunter_internal_error) include(hunter_status_debug) @@ -121,10 +122,18 @@ macro(hunter_setup_msvc) ) string(COMPARE EQUAL "${CMAKE_VS_DEVENV_COMMAND}" "" is_empty) if(is_empty) - hunter_internal_error("CMAKE_VS_DEVENV_COMMAND is empty") + hunter_fatal_error( + "Incorrect CMAKE_VS_DEVENV_COMMAND: is empty" + WIKI + error.vs.devenv + ) endif() if(NOT IS_ABSOLUTE "${CMAKE_VS_DEVENV_COMMAND}") - hunter_internal_error("CMAKE_VS_DEVENV_COMMAND is not absolute") + hunter_fatal_error( + "Incorrect CMAKE_VS_DEVENV_COMMAND: not absolute (${CMAKE_VS_DEVENV_COMMAND})" + WIKI + error.vs.devenv + ) endif() get_filename_component(_hunter_vcvarsall_path "${CMAKE_VS_DEVENV_COMMAND}" DIRECTORY) set(_hunter_vcvarsall_path "${_hunter_vcvarsall_path}/../../VC/Auxiliary/Build") From 6c4becf46099737e2572b1e84bb3e1b9b600446b Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Mon, 24 Jul 2017 11:29:50 +0200 Subject: [PATCH 251/612] ceres: don't build examples --- cmake/projects/ceres-solver/hunter.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/projects/ceres-solver/hunter.cmake b/cmake/projects/ceres-solver/hunter.cmake index ed21c158c7..76ba17f6c1 100644 --- a/cmake/projects/ceres-solver/hunter.cmake +++ b/cmake/projects/ceres-solver/hunter.cmake @@ -21,9 +21,11 @@ hunter_add_version( c8a24d83bf4b26b99fd8fc3bed28a267e6247c85 ) # explicitly remove dependency on gflags (only needed for tests) +# also don't build examples: when suitesparse is enabled the examples need Fortran libraries hunter_cmake_args(ceres-solver CMAKE_ARGS GFLAGS=OFF BUILD_TESTING=OFF + BUILD_EXAMPLES=OFF ) # Pick a download scheme From fc9831d84f49872ddb26200344a5cc0a9790dd3c Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Tue, 4 Jul 2017 15:33:56 +0200 Subject: [PATCH 252/612] ceres-solver: update to 1.12.0-p1 - add SuiteSparse from Hunter when CMake flag `SUITESPARSE` is set --- cmake/configs/default.cmake | 2 +- cmake/projects/ceres-solver/hunter.cmake | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 7bf2297f8d..30ad5296ab 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -126,7 +126,7 @@ hunter_config(autobahn-cpp VERSION 0.2.0) hunter_config(boost-pba VERSION 1.0.0-p0) hunter_config(ccv VERSION 0.7-p6) hunter_config(cereal VERSION 1.2.1-p1) -hunter_config(ceres-solver VERSION 1.12.0-p0) +hunter_config(ceres-solver VERSION 1.12.0-p1) hunter_config(clBLAS VERSION 2.10.0-p0) hunter_config(convertutf VERSION 1.0.1) hunter_config(crashpad VERSION v0.0.1-p0) diff --git a/cmake/projects/ceres-solver/hunter.cmake b/cmake/projects/ceres-solver/hunter.cmake index 76ba17f6c1..bf3a7911ed 100644 --- a/cmake/projects/ceres-solver/hunter.cmake +++ b/cmake/projects/ceres-solver/hunter.cmake @@ -9,7 +9,19 @@ include(hunter_pick_scheme) # use base url for hunter fork set(_hunter_ceres_base_url_fork "https://github.com/hunter-packages/ceres-solver/archive") + # List of versions +hunter_add_version( + PACKAGE_NAME + ceres-solver + VERSION + "1.12.0-p1" + URL + "${_hunter_ceres_base_url_fork}/v1.12.0-p1.tar.gz" + SHA1 + d8676dcfe72c19d77aa099a894b94515761e8e94 +) + hunter_add_version( PACKAGE_NAME ceres-solver From 18792bcf12b7178ca23e7bba11d7adfd7303ae8c Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Mon, 24 Jul 2017 11:32:40 +0200 Subject: [PATCH 253/612] ceres-solver: add example with SuiteSparse support --- .../ceres-solver-suitesparse/CMakeLists.txt | 28 ++++++++++++ .../ceres-solver-suitesparse/config.cmake | 5 +++ examples/ceres-solver-suitesparse/foo.cpp | 43 +++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 examples/ceres-solver-suitesparse/CMakeLists.txt create mode 100644 examples/ceres-solver-suitesparse/config.cmake create mode 100644 examples/ceres-solver-suitesparse/foo.cpp diff --git a/examples/ceres-solver-suitesparse/CMakeLists.txt b/examples/ceres-solver-suitesparse/CMakeLists.txt new file mode 100644 index 0000000000..db2fd3d79b --- /dev/null +++ b/examples/ceres-solver-suitesparse/CMakeLists.txt @@ -0,0 +1,28 @@ +# Copyright (c) 2015, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +set(TESTING_CONFIG_OPT FILEPATH "${CMAKE_CURRENT_LIST_DIR}/config.cmake") + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-ceres-solver) +# enable Fortran support, needed for LAPACK static libs +enable_language(Fortran) +# as alternative LAPACK can be built as shared lib by adding +# the following lines to config.cmake (uncommented) +#hunter_config(LAPACK +# VERSION ${HUNTER_LAPACK_VERSION} +# CMAKE_ARGS BUILD_SHARED_LIBS=ON +#) + +hunter_add_package(ceres-solver) + +find_package(Ceres CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo ceres) + diff --git a/examples/ceres-solver-suitesparse/config.cmake b/examples/ceres-solver-suitesparse/config.cmake new file mode 100644 index 0000000000..5c95e7f38e --- /dev/null +++ b/examples/ceres-solver-suitesparse/config.cmake @@ -0,0 +1,5 @@ +hunter_config(ceres-solver + VERSION ${HUNTER_ceres-solver_VERSION} + CMAKE_ARGS + SUITESPARSE=ON +) diff --git a/examples/ceres-solver-suitesparse/foo.cpp b/examples/ceres-solver-suitesparse/foo.cpp new file mode 100644 index 0000000000..0bae395a15 --- /dev/null +++ b/examples/ceres-solver-suitesparse/foo.cpp @@ -0,0 +1,43 @@ +#include +#include + +using ceres::AutoDiffCostFunction; +using ceres::CostFunction; +using ceres::Problem; +using ceres::Solver; +using ceres::Solve; + +struct ModelConst +{ + // Calculate the residuals, + // the input parameters are the ones optimized for + template + bool operator()(const T* const x, + T* residual) const { + residual[0] = T(42) - x[0]; + return true; + } +}; +int main(int argc, char* argv[]) { + Problem problem; + // variable to optimize in place + double x = 0; + Solver::Options options; + Solver::Summary summary; + + // use a sparse solver explicitly + options.linear_solver_type = ceres::SPARSE_NORMAL_CHOLESKY; + + // print minimizer output + options.minimizer_progress_to_stdout = true; + + // AutoDiffCostFunction + CostFunction* cost_fun + = new AutoDiffCostFunction( + new ModelConst()); + problem.AddResidualBlock(cost_fun, NULL, &x); + Solve(options, &problem, &summary); + + // output optimized result + std::cout << "x: " << x << std::endl; +} From f5b2790a1c6a6789f86ac3ab5dbc53b8ed4ef5f4 Mon Sep 17 00:00:00 2001 From: Tom Mason Date: Mon, 24 Jul 2017 11:02:41 +0100 Subject: [PATCH 254/612] Update SDL2 package to remove separate SDL2-static target see https://github.com/hunter-packages/SDL2/commit/8926da202eb67c85fd4acc8ecd6438469df20e16 --- cmake/configs/default.cmake | 2 +- cmake/projects/SDL2/hunter.cmake | 11 +++++++++++ examples/SDL2/CMakeLists.txt | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 7bf2297f8d..96867adfb8 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -104,7 +104,7 @@ hunter_config(QtCMakeExtra VERSION 1.0.22) hunter_config(QtQmlManager VERSION 1.0.0) hunter_config(RapidJSON VERSION 1.0.2-p2) hunter_config(RapidXML VERSION 1.13) -hunter_config(SDL2 VERSION 2.0.4-p2) +hunter_config(SDL2 VERSION 2.0.4-p3) hunter_config(SQLite3 VERSION autoconf-3080803) #R-Tree enabled hunter_config(Sober VERSION 0.1.3) hunter_config(Sugar VERSION 1.2.2) diff --git a/cmake/projects/SDL2/hunter.cmake b/cmake/projects/SDL2/hunter.cmake index 3ff2351559..b16ff05307 100644 --- a/cmake/projects/SDL2/hunter.cmake +++ b/cmake/projects/SDL2/hunter.cmake @@ -6,6 +6,17 @@ include(hunter_download) include(hunter_pick_scheme) include(hunter_cacheable) +hunter_add_version( + PACKAGE_NAME + SDL2 + VERSION + "2.0.4-p3" + URL + "https://github.com/hunter-packages/SDL2/archive/2.0.4-p3.tar.gz" + SHA1 + 811f7577fb71fd84a391ef8c4878325effb56a8c +) + hunter_add_version( PACKAGE_NAME SDL2 diff --git a/examples/SDL2/CMakeLists.txt b/examples/SDL2/CMakeLists.txt index 8ae814ff61..58ad2cf6c9 100644 --- a/examples/SDL2/CMakeLists.txt +++ b/examples/SDL2/CMakeLists.txt @@ -12,4 +12,4 @@ find_package(SDL2 CONFIG REQUIRED) add_executable(main main.cpp) target_link_libraries(main SDL2::SDL2main - SDL2::SDL2-static) + SDL2::SDL2) From b91b26d78db0754c94ab4714915241918e83a138 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Mon, 24 Jul 2017 15:30:14 +0200 Subject: [PATCH 255/612] ceres-solver: explicitly disable SUITESPARSE and LAPACK --- cmake/projects/ceres-solver/hunter.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/projects/ceres-solver/hunter.cmake b/cmake/projects/ceres-solver/hunter.cmake index bf3a7911ed..4b4656bda6 100644 --- a/cmake/projects/ceres-solver/hunter.cmake +++ b/cmake/projects/ceres-solver/hunter.cmake @@ -32,11 +32,15 @@ hunter_add_version( SHA1 c8a24d83bf4b26b99fd8fc3bed28a267e6247c85 ) -# explicitly remove dependency on gflags (only needed for tests) -# also don't build examples: when suitesparse is enabled the examples need Fortran libraries hunter_cmake_args(ceres-solver CMAKE_ARGS + # explicitly remove dependency on gflags (only needed for tests) GFLAGS=OFF + # explicitly disable suitesparse support + LAPACK=OFF + SUITESPARSE=OFF + # don't build tests BUILD_TESTING=OFF + # also don't build examples: when suitesparse is enabled the examples need Fortran libraries BUILD_EXAMPLES=OFF ) From 63cb3ba32ccd4e4daea80e13fd951e62ba439e7a Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Mon, 24 Jul 2017 15:32:33 +0200 Subject: [PATCH 256/612] ceres-solver: also enable LAPACK in example --- examples/ceres-solver-suitesparse/config.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ceres-solver-suitesparse/config.cmake b/examples/ceres-solver-suitesparse/config.cmake index 5c95e7f38e..ae85b060ce 100644 --- a/examples/ceres-solver-suitesparse/config.cmake +++ b/examples/ceres-solver-suitesparse/config.cmake @@ -1,5 +1,5 @@ hunter_config(ceres-solver - VERSION ${HUNTER_ceres-solver_VERSION} - CMAKE_ARGS + VERSION ${HUNTER_ceres-solver_VERSION} CMAKE_ARGS + LAPACK=ON SUITESPARSE=ON ) From c191fe2dff7e3d3f541940422b0ba2c6328d135f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Mon, 24 Jul 2017 17:26:24 +0200 Subject: [PATCH 257/612] GitHub upload script: Report non-existing "cache" release and do not retry --- maintenance/upload-cache-to-github.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/maintenance/upload-cache-to-github.py b/maintenance/upload-cache-to-github.py index 666a88404a..be13d69870 100755 --- a/maintenance/upload-cache-to-github.py +++ b/maintenance/upload-cache-to-github.py @@ -9,6 +9,9 @@ import sys import time +class Error(Exception): + pass + def sleep_time(attempt): if attempt <= 0: raise Exception('Unexpected') @@ -32,14 +35,18 @@ def func_out(*args, **kwargs): i = i + 1 try: return func_in(*args, **kwargs) + except Error as err: + # Treat Errors as fatal and do not retry. + # Also explicitly flush message to avoid "no output" issue on some CIs. + print('Error:\n {}'.format(err), flush=True) + raise err except Exception as exc: if i > retry_max: raise exc print('Operation failed. Exception:\n {}'.format(exc)) sec = sleep_time(i) - print('Retry #{} (of {}) after {} seconds'.format(i, retry_max, sec)) + print('Retry #{} (of {}) after {} seconds'.format(i, retry_max, sec), flush=True) time.sleep(sec) - raise Exception('Unreachable') return func_out # http://stackoverflow.com/a/16696317/2288008 @@ -87,6 +94,8 @@ def get_release_by_tag(self, tagname): ) r = requests.get(url, auth=self.auth) + if r.status_code == 404: + raise Error('Release {} does not exist. Create a GitHub release for with this tag'.format(tagname)) if not r.ok: raise Exception('Get tag id failed. Requested url: {}'.format(url)) From 74d8d6bbff1e8edd6a007ad52ba39f6ed8d5bfb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Mon, 24 Jul 2017 17:30:33 +0200 Subject: [PATCH 258/612] GitHub upload script: Cache release id --- maintenance/upload-cache-to-github.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/maintenance/upload-cache-to-github.py b/maintenance/upload-cache-to-github.py index be13d69870..f55784ab86 100755 --- a/maintenance/upload-cache-to-github.py +++ b/maintenance/upload-cache-to-github.py @@ -67,6 +67,7 @@ def __init__(self, username, password, repo_owner, repo): self.repo = repo self.auth = requests.auth.HTTPBasicAuth(username, password) self.simple_request() + self.release_id = None @retry def simple_request(self): @@ -180,7 +181,8 @@ def upload_bzip(self, url, local_path, release_id, asset_name): def upload_raw_file(self, local_path): tagname = 'cache' - release_id = self.get_release_by_tag(tagname) + if self.release_id is None: + self.release_id = self.get_release_by_tag(tagname) # https://developer.github.com/v3/repos/releases/#upload-a-release-asset # POST https:///repos/:owner/:repo/releases/:id/assets?name=foo.zip @@ -191,11 +193,11 @@ def upload_raw_file(self, local_path): url = 'https://uploads.github.com/repos/{}/{}/releases/{}/assets?name={}'.format( self.repo_owner, self.repo, - release_id, + self.release_id, asset_name ) - self.upload_bzip(url, local_path, release_id, asset_name) + self.upload_bzip(url, local_path, self.release_id, asset_name) @retry def create_new_file(self, local_path, github_path): From 2de4494637d1e8ee1c68016f109d49a6df4a5e0d Mon Sep 17 00:00:00 2001 From: rusdevops Date: Tue, 25 Jul 2017 21:35:04 +0300 Subject: [PATCH 259/612] Create CMakeLists.txt --- examples/pugixml/CMakeLists.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 examples/pugixml/CMakeLists.txt diff --git a/examples/pugixml/CMakeLists.txt b/examples/pugixml/CMakeLists.txt new file mode 100644 index 0000000000..f0eef9bc4b --- /dev/null +++ b/examples/pugixml/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (c) 2015, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-pugixml) + +# download pugixml +hunter_add_package(pugixml) + +# now pugixml can be used +find_package(pugixml CONFIG REQUIRED) + +set(CMAKE_CXX_STANDARD 11) +set(CXX_STANDARD_REQUIRED ON) +add_executable(example main.cpp) +target_link_libraries(example pugixml) From d7173106bfa7f593d4107141d4cb0351af700d6b Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 25 Jul 2017 21:35:50 +0300 Subject: [PATCH 260/612] Add 'hunter_find_helper' module --- cmake/modules/hunter_find_helper.cmake | 106 +++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 cmake/modules/hunter_find_helper.cmake diff --git a/cmake/modules/hunter_find_helper.cmake b/cmake/modules/hunter_find_helper.cmake new file mode 100644 index 0000000000..bda1050051 --- /dev/null +++ b/cmake/modules/hunter_find_helper.cmake @@ -0,0 +1,106 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(CMakeParseArguments) # cmake_parse_arguments + +include(hunter_internal_error) +include(hunter_status_debug) +include(hunter_user_error) + +function(hunter_find_helper) + set(optional "") + set(one LIBRARY HEADER) + set(multiple "") + + # Introduce: + # * x_LIBRARY + # * x_HEADER + cmake_parse_arguments(x "${optional}" "${one}" "${multiple}" "${ARGV}") + + string(COMPARE NOTEQUAL "${x_UNPARSED_ARGUMENTS}" "" has_unparsed) + if(has_unparsed) + hunter_internal_error(FATAL_ERROR "Unparsed arguments: ${x_UNPARSED_ARGUMENTS}") + endif() + + string(COMPARE EQUAL "${x_LIBRARY}" "" is_empty) + if(is_empty) + hunter_internal_error("No LIBRARY") + endif() + + string(COMPARE EQUAL "${x_HEADER}" "" is_empty) + if(is_empty) + hunter_internal_error("No HEADER") + endif() + + string(COMPARE EQUAL "${CMAKE_FIND_PACKAGE_NAME}" "" is_empty) + if(is_empty) + hunter_internal_error("CMAKE_FIND_PACKAGE_NAME is empty") + endif() + + set(package_name "${CMAKE_FIND_PACKAGE_NAME}") + + get_filename_component(parent_name "${CMAKE_PARENT_LIST_FILE}" NAME) + string(COMPARE EQUAL "${parent_name}" "Find${package_name}.cmake" is_equal) + if(NOT is_equal) + hunter_internal_error("Unexpected filename: ${CMAKE_PARENT_LIST_FILE}") + endif() + + set(err_msg "'find_package(${package_name})' should be called") + + if(NOT ${package_name}_FIND_REQUIRED) + hunter_user_error("${err_msg} with REQUIRED") + endif() + + if(${package_name}_FIND_QUIETLY) + hunter_user_error("${err_msg} without QUIET") + endif() + + string(COMPARE EQUAL "${${package_name}_FIND_VERSION}" "" is_empty) + if(NOT is_empty) + hunter_user_error("${err_msg} without version") + endif() + + string(COMPARE EQUAL "${${package_name}_FIND_COMPONENTS}" "" is_empty) + if(NOT is_empty) + hunter_user_error("${err_msg} without components") + endif() + + set(target_name "${package_name}::${package_name}") + if(TARGET "${target_name}") + return() + endif() + + add_library("${target_name}" UNKNOWN IMPORTED) + + unset(_hunter_library CACHE) + unset(_hunter_header CACHE) + + find_library(_hunter_library "${x_LIBRARY}") + find_path(_hunter_header "${x_HEADER}") + + set(wiki "https://github.com/ruslo/hunter/wiki/pkg.${package_name}") + set(details "See ${wiki} for details.") + + if(NOT _hunter_library) + hunter_user_error("Library '${x_LIBRARY}' not found in system. ${details}") + endif() + + if(NOT _hunter_header) + hunter_user_error("Header '${x_HEADER}' not found in system. ${details}") + endif() + + hunter_status_debug("Creating target '${target_name}':") + hunter_status_debug("* library: '${_hunter_library}'") + hunter_status_debug("* header: '${_hunter_header}'") + + set_target_properties( + "${target_name}" + PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGE "CXX" + IMPORTED_LOCATION "${_hunter_library}" + INTERFACE_INCLUDE_DIRECTORIES "" + ) + + unset(_hunter_library CACHE) + unset(_hunter_header CACHE) +endfunction() From 8abb81e50373a626b837d3844e36aaf3be09f3ac Mon Sep 17 00:00:00 2001 From: rusdevops Date: Tue, 25 Jul 2017 21:36:56 +0300 Subject: [PATCH 261/612] Create main.cpp --- examples/pugixml/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 examples/pugixml/main.cpp diff --git a/examples/pugixml/main.cpp b/examples/pugixml/main.cpp new file mode 100644 index 0000000000..492aaa3a15 --- /dev/null +++ b/examples/pugixml/main.cpp @@ -0,0 +1,10 @@ +#include +#include +#include + +int main(int argc, char *argv[]) { + pugi::xml_document doc; + pugi::xml_parse_result result = doc.load_file("test.xml"); + assert(result); + assert(strcmp(doc.child_value("root"), "Hello world!") == 0); +} From a9432fbbdf57aafc5f4a1dc625a1fb62a76948d2 Mon Sep 17 00:00:00 2001 From: rusdevops Date: Tue, 25 Jul 2017 21:37:46 +0300 Subject: [PATCH 262/612] Create hunter.cmake --- cmake/projects/pugixml/hunter.cmake | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 cmake/projects/pugixml/hunter.cmake diff --git a/cmake/projects/pugixml/hunter.cmake b/cmake/projects/pugixml/hunter.cmake new file mode 100644 index 0000000000..913d04a49b --- /dev/null +++ b/cmake/projects/pugixml/hunter.cmake @@ -0,0 +1,18 @@ +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME pugixml + VERSION "1.8.1" + URL "https://github.com/rusdevops/pugixml/archive/v1.8.1-hunter.tar.gz" + SHA1 005b1c8830e6f81f559d0b72f9f7ff320895847f +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(pugixml) +hunter_download(PACKAGE_NAME pugixml) From 36c2d8a0a322a3995825777632a96f26f6f341d7 Mon Sep 17 00:00:00 2001 From: rusdevops Date: Tue, 25 Jul 2017 21:38:28 +0300 Subject: [PATCH 263/612] Update default.cmake --- cmake/configs/default.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 96867adfb8..7714f925d3 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -199,6 +199,7 @@ hunter_config(poly2tri VERSION 1.0.0) hunter_config(polyclipping VERSION 4.8.8-p0) # for Assimp hunter_config(presentproto VERSION 1.0) hunter_config(pthread-stubs VERSION 0.3) +hunter_config(pugixml VERSION 1.8.1) hunter_config(rabbitmq-c VERSION 0.7.0-p1) hunter_config(randrproto VERSION 1.3.2) hunter_config(renderproto VERSION 0.11.1) From d701dd8052e7b89370aa1f34886021f2513cf539 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 25 Jul 2017 21:39:01 +0300 Subject: [PATCH 264/612] Add 'Find{android,android_log,egl,gles2}' modules --- cmake/find/Findandroid.cmake | 5 +++++ cmake/find/Findandroid_log.cmake | 5 +++++ cmake/find/Findegl.cmake | 5 +++++ cmake/find/Findgles2.cmake | 5 +++++ examples/android/CMakeLists.txt | 15 +++++++++++++++ examples/android/foo.cpp | 7 +++++++ examples/android_log/CMakeLists.txt | 15 +++++++++++++++ examples/android_log/foo.cpp | 8 ++++++++ examples/egl/CMakeLists.txt | 15 +++++++++++++++ examples/egl/foo.cpp | 7 +++++++ examples/gles2/CMakeLists.txt | 15 +++++++++++++++ examples/gles2/foo.cpp | 7 +++++++ 12 files changed, 109 insertions(+) create mode 100644 cmake/find/Findandroid.cmake create mode 100644 cmake/find/Findandroid_log.cmake create mode 100644 cmake/find/Findegl.cmake create mode 100644 cmake/find/Findgles2.cmake create mode 100644 examples/android/CMakeLists.txt create mode 100644 examples/android/foo.cpp create mode 100644 examples/android_log/CMakeLists.txt create mode 100644 examples/android_log/foo.cpp create mode 100644 examples/egl/CMakeLists.txt create mode 100644 examples/egl/foo.cpp create mode 100644 examples/gles2/CMakeLists.txt create mode 100644 examples/gles2/foo.cpp diff --git a/cmake/find/Findandroid.cmake b/cmake/find/Findandroid.cmake new file mode 100644 index 0000000000..dfc12b58ba --- /dev/null +++ b/cmake/find/Findandroid.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper) +hunter_find_helper(LIBRARY "android" HEADER "android/api-level.h") diff --git a/cmake/find/Findandroid_log.cmake b/cmake/find/Findandroid_log.cmake new file mode 100644 index 0000000000..ff6a4c7701 --- /dev/null +++ b/cmake/find/Findandroid_log.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper) +hunter_find_helper(LIBRARY "log" HEADER "android/log.h") diff --git a/cmake/find/Findegl.cmake b/cmake/find/Findegl.cmake new file mode 100644 index 0000000000..72c1323418 --- /dev/null +++ b/cmake/find/Findegl.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper) +hunter_find_helper(LIBRARY "EGL" HEADER "EGL/egl.h") diff --git a/cmake/find/Findgles2.cmake b/cmake/find/Findgles2.cmake new file mode 100644 index 0000000000..3f484274f8 --- /dev/null +++ b/cmake/find/Findgles2.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper) +hunter_find_helper(LIBRARY "GLESv2" HEADER "GLES2/gl2.h") diff --git a/examples/android/CMakeLists.txt b/examples/android/CMakeLists.txt new file mode 100644 index 0000000000..6da92b53b3 --- /dev/null +++ b/examples/android/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright (c) 2013-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-android) + +find_package(android REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo PUBLIC android::android) diff --git a/examples/android/foo.cpp b/examples/android/foo.cpp new file mode 100644 index 0000000000..3927d0ab49 --- /dev/null +++ b/examples/android/foo.cpp @@ -0,0 +1,7 @@ +// Copyright (c) 2017, Ruslan Baratov +// All rights reserved. + +#include + +int main() { +} diff --git a/examples/android_log/CMakeLists.txt b/examples/android_log/CMakeLists.txt new file mode 100644 index 0000000000..9a7d5205f7 --- /dev/null +++ b/examples/android_log/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright (c) 2013-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-android_log) + +find_package(android_log REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo PUBLIC android_log::android_log) diff --git a/examples/android_log/foo.cpp b/examples/android_log/foo.cpp new file mode 100644 index 0000000000..cf8724e83c --- /dev/null +++ b/examples/android_log/foo.cpp @@ -0,0 +1,8 @@ +// Copyright (c) 2015, Ruslan Baratov +// All rights reserved. + +#include + +int main() { + __android_log_print(ANDROID_LOG_INFO, "foo", "boo"); +} diff --git a/examples/egl/CMakeLists.txt b/examples/egl/CMakeLists.txt new file mode 100644 index 0000000000..033ba90868 --- /dev/null +++ b/examples/egl/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright (c) 2013-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-egl) + +find_package(egl REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo PUBLIC egl::egl) diff --git a/examples/egl/foo.cpp b/examples/egl/foo.cpp new file mode 100644 index 0000000000..1b4f7e6433 --- /dev/null +++ b/examples/egl/foo.cpp @@ -0,0 +1,7 @@ +// Copyright (c) 2017, Ruslan Baratov +// All rights reserved. + +#include + +int main() { +} diff --git a/examples/gles2/CMakeLists.txt b/examples/gles2/CMakeLists.txt new file mode 100644 index 0000000000..310737899c --- /dev/null +++ b/examples/gles2/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright (c) 2013-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-gles2) + +find_package(gles2 REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo PUBLIC gles2::gles2) diff --git a/examples/gles2/foo.cpp b/examples/gles2/foo.cpp new file mode 100644 index 0000000000..6cacee303c --- /dev/null +++ b/examples/gles2/foo.cpp @@ -0,0 +1,7 @@ +// Copyright (c) 2017, Ruslan Baratov +// All rights reserved. + +#include + +int main() { +} From 2302f59c265c9156be9fad4cf4956c90ceb10a5e Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 25 Jul 2017 22:09:38 +0300 Subject: [PATCH 265/612] Add testing note [skip ci] --- cmake/modules/hunter_find_helper.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/modules/hunter_find_helper.cmake b/cmake/modules/hunter_find_helper.cmake index bda1050051..cad5807ec3 100644 --- a/cmake/modules/hunter_find_helper.cmake +++ b/cmake/modules/hunter_find_helper.cmake @@ -7,6 +7,11 @@ include(hunter_internal_error) include(hunter_status_debug) include(hunter_user_error) +# Test examples: +# * android +# * android_log +# * egl +# * gles2 function(hunter_find_helper) set(optional "") set(one LIBRARY HEADER) From 0fd96551954f536ab7d4fe9c15612bbbd96243db Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 25 Jul 2017 22:17:55 +0300 Subject: [PATCH 266/612] Add 'Findgles3.cmake' [skip ci] --- cmake/find/Findgles3.cmake | 5 +++++ examples/gles3/CMakeLists.txt | 15 +++++++++++++++ examples/gles3/foo.cpp | 7 +++++++ 3 files changed, 27 insertions(+) create mode 100644 cmake/find/Findgles3.cmake create mode 100644 examples/gles3/CMakeLists.txt create mode 100644 examples/gles3/foo.cpp diff --git a/cmake/find/Findgles3.cmake b/cmake/find/Findgles3.cmake new file mode 100644 index 0000000000..736036697c --- /dev/null +++ b/cmake/find/Findgles3.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper) +hunter_find_helper(LIBRARY "GLESv3" HEADER "GLES3/gl3.h") diff --git a/examples/gles3/CMakeLists.txt b/examples/gles3/CMakeLists.txt new file mode 100644 index 0000000000..9037a81136 --- /dev/null +++ b/examples/gles3/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright (c) 2013-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-gles3) + +find_package(gles3 REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo PUBLIC gles3::gles3) diff --git a/examples/gles3/foo.cpp b/examples/gles3/foo.cpp new file mode 100644 index 0000000000..eb79372bbf --- /dev/null +++ b/examples/gles3/foo.cpp @@ -0,0 +1,7 @@ +// Copyright (c) 2017, Ruslan Baratov +// All rights reserved. + +#include + +int main() { +} From 15b0b3af376dabf432e0bdcef9173e96212b48a5 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 25 Jul 2017 23:10:08 +0300 Subject: [PATCH 267/612] Add Findosmesa.cmake [skip ci] --- cmake/find/Findosmesa.cmake | 5 +++++ examples/osmesa/CMakeLists.txt | 15 +++++++++++++++ examples/osmesa/foo.cpp | 7 +++++++ 3 files changed, 27 insertions(+) create mode 100644 cmake/find/Findosmesa.cmake create mode 100644 examples/osmesa/CMakeLists.txt create mode 100644 examples/osmesa/foo.cpp diff --git a/cmake/find/Findosmesa.cmake b/cmake/find/Findosmesa.cmake new file mode 100644 index 0000000000..cb4b756b7b --- /dev/null +++ b/cmake/find/Findosmesa.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper) +hunter_find_helper(LIBRARY "OSMesa" HEADER "GL/osmesa.h") diff --git a/examples/osmesa/CMakeLists.txt b/examples/osmesa/CMakeLists.txt new file mode 100644 index 0000000000..762d732124 --- /dev/null +++ b/examples/osmesa/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright (c) 2013-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-osmesa) + +find_package(osmesa REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo PUBLIC osmesa::osmesa) diff --git a/examples/osmesa/foo.cpp b/examples/osmesa/foo.cpp new file mode 100644 index 0000000000..afc6765c8a --- /dev/null +++ b/examples/osmesa/foo.cpp @@ -0,0 +1,7 @@ +// Copyright (c) 2017, Ruslan Baratov +// All rights reserved. + +#include + +int main() { +} From 5a4f21041975fb9e90ac7ffdd0e56bd47305af9f Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 25 Jul 2017 23:26:47 +0300 Subject: [PATCH 268/612] Add Findglapi.cmake [skip ci] --- cmake/find/Findglapi.cmake | 5 +++++ examples/glapi/CMakeLists.txt | 15 +++++++++++++++ examples/glapi/foo.cpp | 7 +++++++ 3 files changed, 27 insertions(+) create mode 100644 cmake/find/Findglapi.cmake create mode 100644 examples/glapi/CMakeLists.txt create mode 100644 examples/glapi/foo.cpp diff --git a/cmake/find/Findglapi.cmake b/cmake/find/Findglapi.cmake new file mode 100644 index 0000000000..e517e5835a --- /dev/null +++ b/cmake/find/Findglapi.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper) +hunter_find_helper(LIBRARY "glapi" HEADER "GL/osmesa.h") diff --git a/examples/glapi/CMakeLists.txt b/examples/glapi/CMakeLists.txt new file mode 100644 index 0000000000..dcc165a959 --- /dev/null +++ b/examples/glapi/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright (c) 2013-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-glapi) + +find_package(glapi REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo PUBLIC glapi::glapi) diff --git a/examples/glapi/foo.cpp b/examples/glapi/foo.cpp new file mode 100644 index 0000000000..afc6765c8a --- /dev/null +++ b/examples/glapi/foo.cpp @@ -0,0 +1,7 @@ +// Copyright (c) 2017, Ruslan Baratov +// All rights reserved. + +#include + +int main() { +} From 59f2ce14f8e5faec9bd45fb720ffe33b5d596ac0 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 26 Jul 2017 00:02:48 +0300 Subject: [PATCH 269/612] hunter_find_helper: Fix INTERFACE_INCLUDE_DIRECTORIES [skip ci] --- cmake/modules/hunter_find_helper.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/hunter_find_helper.cmake b/cmake/modules/hunter_find_helper.cmake index cad5807ec3..e18d3d5daa 100644 --- a/cmake/modules/hunter_find_helper.cmake +++ b/cmake/modules/hunter_find_helper.cmake @@ -103,7 +103,7 @@ function(hunter_find_helper) PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGE "CXX" IMPORTED_LOCATION "${_hunter_library}" - INTERFACE_INCLUDE_DIRECTORIES "" + INTERFACE_INCLUDE_DIRECTORIES "${_hunter_header}" ) unset(_hunter_library CACHE) From 3295697e4e137fb90d37d889e018c3ba0baef1fc Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 26 Jul 2017 09:37:37 +0300 Subject: [PATCH 270/612] HEADER for 'glapi' --- cmake/find/Findglapi.cmake | 2 +- examples/glapi/foo.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/find/Findglapi.cmake b/cmake/find/Findglapi.cmake index e517e5835a..746c2eea39 100644 --- a/cmake/find/Findglapi.cmake +++ b/cmake/find/Findglapi.cmake @@ -2,4 +2,4 @@ # All rights reserved. include(hunter_find_helper) -hunter_find_helper(LIBRARY "glapi" HEADER "GL/osmesa.h") +hunter_find_helper(LIBRARY "glapi" HEADER "GL/gl.h") diff --git a/examples/glapi/foo.cpp b/examples/glapi/foo.cpp index afc6765c8a..beaae32767 100644 --- a/examples/glapi/foo.cpp +++ b/examples/glapi/foo.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2017, Ruslan Baratov // All rights reserved. -#include +#include int main() { } From b82b58121e0208c1e067da4715c0f7f27e35c3a5 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 26 Jul 2017 09:54:28 +0300 Subject: [PATCH 271/612] hunter_find_helper: Update list of packages to test [skip ci] --- cmake/modules/hunter_find_helper.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/modules/hunter_find_helper.cmake b/cmake/modules/hunter_find_helper.cmake index e18d3d5daa..b6260e8f9a 100644 --- a/cmake/modules/hunter_find_helper.cmake +++ b/cmake/modules/hunter_find_helper.cmake @@ -11,7 +11,10 @@ include(hunter_user_error) # * android # * android_log # * egl +# * glapi # * gles2 +# * gles3 +# * osmesa function(hunter_find_helper) set(optional "") set(one LIBRARY HEADER) From 5f06083bc2b2973804111cf5f2b785e5da5b77e4 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 26 Jul 2017 11:06:11 +0300 Subject: [PATCH 272/612] glfw 3.3.0-p2 --- cmake/configs/default.cmake | 2 +- cmake/projects/glfw/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 743c95dafe..287cc6933c 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -155,7 +155,7 @@ hunter_config(gauze VERSION 0.1.1) hunter_config(geos VERSION 3.4.2) hunter_config(gflags VERSION 2.2.1) hunter_config(glew VERSION 2.0.0) -hunter_config(glfw VERSION 3.3.0-p1) +hunter_config(glfw VERSION 3.3.0-p2) hunter_config(glm VERSION 0.9.8.5) hunter_config(glog VERSION 0.3.5-p0) hunter_config(glproto VERSION 1.4.17) diff --git a/cmake/projects/glfw/hunter.cmake b/cmake/projects/glfw/hunter.cmake index a437fa7cb1..fdde670f83 100644 --- a/cmake/projects/glfw/hunter.cmake +++ b/cmake/projects/glfw/hunter.cmake @@ -45,6 +45,17 @@ hunter_add_version( 3b42c415f6f6f197768857d12ba44f77e9f1fc50 ) +hunter_add_version( + PACKAGE_NAME + glfw + VERSION + "3.3.0-p2" + URL + "https://github.com/hunter-packages/glfw/archive/3.3.0-p2.tar.gz" + SHA1 + 980c5b788849da9e8429e8f57a10569620b2fa07 +) + hunter_cmake_args( glfw CMAKE_ARGS From 3b1ce7fa664c389167d76969f0cdcfe70c1e911c Mon Sep 17 00:00:00 2001 From: Sacha Refshauge Date: Wed, 26 Jul 2017 21:30:42 +1000 Subject: [PATCH 273/612] Add Beast b84. Update example for new API. --- cmake/configs/default.cmake | 2 +- cmake/projects/Beast/hunter.cmake | 11 +++++++++++ examples/Beast/example.cpp | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 287cc6933c..fa7ae99bc6 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -38,7 +38,7 @@ hunter_config(ArrayFire VERSION 3.3.1-p0) hunter_config(Assimp VERSION 3.2-p1) hunter_config(Async++ VERSION 0.0.3-hunter) hunter_config(Avahi VERSION 0.6.31) -hunter_config(Beast VERSION 1.0.0-b32-hunter-4) +hunter_config(Beast VERSION 1.0.0-b84-hunter-0) hunter_config(BZip2 VERSION 1.0.6-p3) hunter_config(Boost VERSION 1.64.0) hunter_config(BoostCompute VERSION 0.5-p0) diff --git a/cmake/projects/Beast/hunter.cmake b/cmake/projects/Beast/hunter.cmake index b6996a735f..f04bf8f699 100644 --- a/cmake/projects/Beast/hunter.cmake +++ b/cmake/projects/Beast/hunter.cmake @@ -9,6 +9,17 @@ include(hunter_cmake_args) include(hunter_download) include(hunter_pick_scheme) +hunter_add_version( + PACKAGE_NAME + Beast + VERSION + "1.0.0-b84-hunter-0" + URL + "https://github.com/hunter-packages/Beast/archive/v1.0.0-b84-hunter-0.tar.gz" + SHA1 + 4268caa6c044fc8180d36d918aa731ffa931380d +) + hunter_add_version( PACKAGE_NAME Beast diff --git a/examples/Beast/example.cpp b/examples/Beast/example.cpp index 1346e71a05..1721c93392 100644 --- a/examples/Beast/example.cpp +++ b/examples/Beast/example.cpp @@ -7,7 +7,7 @@ int main() // Set up HTTP request beast::http::request req; req.version = 11; - beast::http::prepare(req); + req.prepare_payload(); return 0; -} \ No newline at end of file +} From 295a5265cd37ff1f0f169fdbf409ec01af07d5cd Mon Sep 17 00:00:00 2001 From: Sacha Refshauge Date: Wed, 26 Jul 2017 22:31:58 +1000 Subject: [PATCH 274/612] Add OpenBLAS 0.2.20 --- cmake/configs/default.cmake | 2 +- cmake/projects/OpenBLAS/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 287cc6933c..c63734663b 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -82,7 +82,7 @@ hunter_config(Libssh2 VERSION 1.7.0) hunter_config(Lua VERSION 5.3.2) hunter_config(MySQL-client VERSION 6.1.9) hunter_config(NASM VERSION 2.12.02) -hunter_config(OpenBLAS VERSION 0.2.19-p0) +hunter_config(OpenBLAS VERSION 0.2.20-p0) hunter_config(OpenCL VERSION 2.1-p3) hunter_config(OpenCL-cpp VERSION 2.0.10-p0) hunter_config(OpenCV VERSION 3.2.0-p2) diff --git a/cmake/projects/OpenBLAS/hunter.cmake b/cmake/projects/OpenBLAS/hunter.cmake index 02804e7e7c..c6144cc906 100644 --- a/cmake/projects/OpenBLAS/hunter.cmake +++ b/cmake/projects/OpenBLAS/hunter.cmake @@ -9,6 +9,17 @@ include(hunter_configuration_types) include(hunter_pick_scheme) include(hunter_download) +hunter_add_version( + PACKAGE_NAME + OpenBLAS + VERSION + 0.2.20-p0 + URL + "https://github.com/hunter-packages/OpenBLAS/archive/v0.2.20-p0.tar.gz" + SHA1 + 8f56263dda492f18972e55d51911a419d37eaba4 +) + hunter_add_version( PACKAGE_NAME OpenBLAS From f2049f64553b272f84f3f08b7759d3271cf691ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Thu, 27 Jul 2017 10:45:18 +0200 Subject: [PATCH 275/612] GitHub upload script: Port to Python 2 --- maintenance/upload-cache-to-github.py | 1 + 1 file changed, 1 insertion(+) diff --git a/maintenance/upload-cache-to-github.py b/maintenance/upload-cache-to-github.py index f55784ab86..1b915fff0a 100755 --- a/maintenance/upload-cache-to-github.py +++ b/maintenance/upload-cache-to-github.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +from __future__ import print_function import argparse import base64 From 0a65b2eeb9e34ad3dd8f5b032a804b42e6a70232 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 27 Jul 2017 17:44:07 +0300 Subject: [PATCH 276/612] OpenSSL depends on Threads --- cmake/find/FindOpenSSL.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/find/FindOpenSSL.cmake b/cmake/find/FindOpenSSL.cmake index e765c99e24..9e0a92f2cd 100644 --- a/cmake/find/FindOpenSSL.cmake +++ b/cmake/find/FindOpenSSL.cmake @@ -362,8 +362,9 @@ if(OPENSSL_FOUND) add_library(OpenSSL::Crypto UNKNOWN IMPORTED) set_target_properties(OpenSSL::Crypto PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${OPENSSL_INCLUDE_DIR}") + find_package(Threads REQUIRED) set_target_properties(OpenSSL::Crypto PROPERTIES - INTERFACE_LINK_LIBRARIES "${CMAKE_DL_LIBS}") + INTERFACE_LINK_LIBRARIES "${CMAKE_DL_LIBS};Threads::Threads") if(EXISTS "${OPENSSL_CRYPTO_LIBRARY}") set_target_properties(OpenSSL::Crypto PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C" From e9e86817de3927d2ebe6bb8fe98522fa6952dd07 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 27 Jul 2017 18:39:52 +0300 Subject: [PATCH 277/612] spdlog 0.13.0-p1 [skip ci] --- cmake/configs/default.cmake | 2 +- cmake/projects/spdlog/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 5746484089..a37360000d 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -210,7 +210,7 @@ if(MSVC_VERSION LESS 1800) # for VS12 - version without support C++11 hunter_config(spdlog VERSION 1.0.0-p0) else() - hunter_config(spdlog VERSION 0.13.0-p0) + hunter_config(spdlog VERSION 0.13.0-p1) endif() hunter_config(szip VERSION 2.1.0-p1) hunter_config(Tesseract VERSION 3.05.01-hunter-3) diff --git a/cmake/projects/spdlog/hunter.cmake b/cmake/projects/spdlog/hunter.cmake index 32d6486099..cdd59d9f20 100644 --- a/cmake/projects/spdlog/hunter.cmake +++ b/cmake/projects/spdlog/hunter.cmake @@ -30,6 +30,17 @@ hunter_add_version( b34b92075423d9da196daefe796316393a0fd593 ) +hunter_add_version( + PACKAGE_NAME + spdlog + VERSION + "0.13.0-p1" + URL + "https://github.com/hunter-packages/spdlog/archive/v0.13.0-p1.tar.gz" + SHA1 + edf9ba15852b181e16e1fe323878d8281941b376 +) + hunter_add_version( PACKAGE_NAME spdlog From 4fab26a3129aaaf5a5e855a206c080e7d4191547 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 27 Jul 2017 18:46:44 +0300 Subject: [PATCH 278/612] CURL 7.49.1-DEV-v5 [skip ci] --- cmake/configs/default.cmake | 2 +- cmake/projects/CURL/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index a37360000d..cd84ca3ae6 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -45,7 +45,7 @@ hunter_config(BoostCompute VERSION 0.5-p0) hunter_config(BoostProcess VERSION 0.5) hunter_config(CapnProto VERSION 0.6.1) hunter_config(CLAPACK VERSION 3.2.1) -hunter_config(CURL VERSION 7.49.1-DEV-v4) +hunter_config(CURL VERSION 7.49.1-DEV-v5) hunter_config(Clang VERSION 3.6.2-p0) hunter_config(ClangToolsExtra VERSION 3.6.2) # Clang hunter_config(Comet VERSION 4.0.2) diff --git a/cmake/projects/CURL/hunter.cmake b/cmake/projects/CURL/hunter.cmake index aaea061a4f..de334cdc51 100644 --- a/cmake/projects/CURL/hunter.cmake +++ b/cmake/projects/CURL/hunter.cmake @@ -26,6 +26,17 @@ hunter_add_version( 1b17954403db625d5422faf8c7fd68b5dde093f9 ) +hunter_add_version( + PACKAGE_NAME + CURL + VERSION + "7.49.1-DEV-v5" + URL + "https://github.com/hunter-packages/curl/archive/hunter-7.49.1-v5.tar.gz" + SHA1 + 159d73e83f6cde54469c838234d32ed917ec9b80 +) + if (ANDROID OR IOS) set(_curl_cmake_args From 644ec493595055cf2bd23959bdaf5c697b737435 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 27 Jul 2017 23:03:12 +0300 Subject: [PATCH 279/612] Add 'hunter_find_helper_framework' module --- .../hunter_find_helper_framework.cmake | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 cmake/modules/hunter_find_helper_framework.cmake diff --git a/cmake/modules/hunter_find_helper_framework.cmake b/cmake/modules/hunter_find_helper_framework.cmake new file mode 100644 index 0000000000..31ebff2645 --- /dev/null +++ b/cmake/modules/hunter_find_helper_framework.cmake @@ -0,0 +1,76 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(CMakeParseArguments) # cmake_parse_arguments + +include(hunter_internal_error) +include(hunter_user_error) + +# Test examples: +# * opengles +function(hunter_find_helper_framework) + set(optional "") + set(one FRAMEWORK) + set(multiple "") + + # Introduce: + # * x_FRAMEWORK + cmake_parse_arguments(x "${optional}" "${one}" "${multiple}" "${ARGV}") + + string(COMPARE NOTEQUAL "${x_UNPARSED_ARGUMENTS}" "" has_unparsed) + if(has_unparsed) + hunter_internal_error(FATAL_ERROR "Unparsed arguments: ${x_UNPARSED_ARGUMENTS}") + endif() + + string(COMPARE EQUAL "${x_FRAMEWORK}" "" is_empty) + if(is_empty) + hunter_internal_error("No FRAMEWORK") + endif() + + string(COMPARE EQUAL "${CMAKE_FIND_PACKAGE_NAME}" "" is_empty) + if(is_empty) + hunter_internal_error("CMAKE_FIND_PACKAGE_NAME is empty") + endif() + + set(package_name "${CMAKE_FIND_PACKAGE_NAME}") + + get_filename_component(parent_name "${CMAKE_PARENT_LIST_FILE}" NAME) + string(COMPARE EQUAL "${parent_name}" "Find${package_name}.cmake" is_equal) + if(NOT is_equal) + hunter_internal_error("Unexpected filename: ${CMAKE_PARENT_LIST_FILE}") + endif() + + set(err_msg "'find_package(${package_name})' should be called") + + if(NOT ${package_name}_FIND_REQUIRED) + hunter_user_error("${err_msg} with REQUIRED") + endif() + + if(${package_name}_FIND_QUIETLY) + hunter_user_error("${err_msg} without QUIET") + endif() + + string(COMPARE EQUAL "${${package_name}_FIND_VERSION}" "" is_empty) + if(NOT is_empty) + hunter_user_error("${err_msg} without version") + endif() + + string(COMPARE EQUAL "${${package_name}_FIND_COMPONENTS}" "" is_empty) + if(NOT is_empty) + hunter_user_error("${err_msg} without components") + endif() + + set(target_name "${package_name}::${package_name}") + if(TARGET "${target_name}") + return() + endif() + + add_library("${target_name}" IMPORTED INTERFACE) + + set_target_properties( + "${target_name}" + PROPERTIES + INTERFACE_LINK_LIBRARIES + "-framework ${x_FRAMEWORK}" + ) +endfunction() From d09a7697330560697c375c06f98a9f6f6b9cab50 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 27 Jul 2017 23:04:12 +0300 Subject: [PATCH 280/612] Add Findopengles --- cmake/find/Findopengles.cmake | 5 +++++ examples/opengles/CMakeLists.txt | 15 +++++++++++++++ examples/opengles/foo.mm | 18 ++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 cmake/find/Findopengles.cmake create mode 100644 examples/opengles/CMakeLists.txt create mode 100644 examples/opengles/foo.mm diff --git a/cmake/find/Findopengles.cmake b/cmake/find/Findopengles.cmake new file mode 100644 index 0000000000..e3824a3061 --- /dev/null +++ b/cmake/find/Findopengles.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "OpenGLES") diff --git a/examples/opengles/CMakeLists.txt b/examples/opengles/CMakeLists.txt new file mode 100644 index 0000000000..9b97f7b8b4 --- /dev/null +++ b/examples/opengles/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright (c) 2016-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-opengles) + +find_package(opengles REQUIRED) + +add_executable(foo foo.mm) +target_link_libraries(foo PUBLIC opengles::opengles) diff --git a/examples/opengles/foo.mm b/examples/opengles/foo.mm new file mode 100644 index 0000000000..d4f1817705 --- /dev/null +++ b/examples/opengles/foo.mm @@ -0,0 +1,18 @@ +#import + +#include // std::stringstream + +static void check_gl_error() +{ + auto e = glGetError(); + if (e != GL_NO_ERROR) + { + std::stringstream ss; + ss << "OpenGL error: " << int(e); + throw std::runtime_error(ss.str()); + } +} + +int main() { + check_gl_error(); +} From d669269ef6edb99863d76a6f9ca532a077742992 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 27 Jul 2017 23:28:03 +0300 Subject: [PATCH 281/612] Add Findfoundation --- cmake/find/Findfoundation.cmake | 5 +++++ examples/foundation/CMakeLists.txt | 15 +++++++++++++++ examples/foundation/foo.mm | 5 +++++ 3 files changed, 25 insertions(+) create mode 100644 cmake/find/Findfoundation.cmake create mode 100644 examples/foundation/CMakeLists.txt create mode 100644 examples/foundation/foo.mm diff --git a/cmake/find/Findfoundation.cmake b/cmake/find/Findfoundation.cmake new file mode 100644 index 0000000000..b825aafa79 --- /dev/null +++ b/cmake/find/Findfoundation.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "Foundation") diff --git a/examples/foundation/CMakeLists.txt b/examples/foundation/CMakeLists.txt new file mode 100644 index 0000000000..93297a109f --- /dev/null +++ b/examples/foundation/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright (c) 2016-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-foundation) + +find_package(foundation REQUIRED) + +add_executable(foo foo.mm) +target_link_libraries(foo PUBLIC foundation::foundation) diff --git a/examples/foundation/foo.mm b/examples/foundation/foo.mm new file mode 100644 index 0000000000..76a1858774 --- /dev/null +++ b/examples/foundation/foo.mm @@ -0,0 +1,5 @@ +#import + +int main() { + NSLog(@"Hello"); +} From 8f73d30929455061c99217a171225cc615c8753d Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 28 Jul 2017 00:09:47 +0300 Subject: [PATCH 282/612] Add frameworks: CoreGraphics, QuartzCore, UIKit --- cmake/find/Findcoregraphics.cmake | 5 +++++ cmake/find/Findquartzcore.cmake | 5 +++++ cmake/find/Finduikit.cmake | 5 +++++ 3 files changed, 15 insertions(+) create mode 100644 cmake/find/Findcoregraphics.cmake create mode 100644 cmake/find/Findquartzcore.cmake create mode 100644 cmake/find/Finduikit.cmake diff --git a/cmake/find/Findcoregraphics.cmake b/cmake/find/Findcoregraphics.cmake new file mode 100644 index 0000000000..e6cc3bba9e --- /dev/null +++ b/cmake/find/Findcoregraphics.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "CoreGraphics") diff --git a/cmake/find/Findquartzcore.cmake b/cmake/find/Findquartzcore.cmake new file mode 100644 index 0000000000..091f550dcc --- /dev/null +++ b/cmake/find/Findquartzcore.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "QuartzCore") diff --git a/cmake/find/Finduikit.cmake b/cmake/find/Finduikit.cmake new file mode 100644 index 0000000000..f3dad94de3 --- /dev/null +++ b/cmake/find/Finduikit.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "UIKit") From 77a8f1d868f401473e0fa8fcdbab492fbf970036 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 28 Jul 2017 00:35:31 +0300 Subject: [PATCH 283/612] More frameworks * Accelerate * AssetsLibrary * AVFoundation * CoreData * CoreFoundation * CoreLocation * CoreMedia * CoreVideo * GLKit * ImageIO [skip ci] --- cmake/find/Findaccelerate.cmake | 5 +++++ cmake/find/Findassetslibrary.cmake | 5 +++++ cmake/find/Findavfoundation.cmake | 5 +++++ cmake/find/Findcoredata.cmake | 5 +++++ cmake/find/Findcorefoundation.cmake | 5 +++++ cmake/find/Findcorelocation.cmake | 5 +++++ cmake/find/Findcoremedia.cmake | 5 +++++ cmake/find/Findcorevideo.cmake | 5 +++++ cmake/find/Findglkit.cmake | 5 +++++ cmake/find/Findimageio.cmake | 5 +++++ 10 files changed, 50 insertions(+) create mode 100644 cmake/find/Findaccelerate.cmake create mode 100644 cmake/find/Findassetslibrary.cmake create mode 100644 cmake/find/Findavfoundation.cmake create mode 100644 cmake/find/Findcoredata.cmake create mode 100644 cmake/find/Findcorefoundation.cmake create mode 100644 cmake/find/Findcorelocation.cmake create mode 100644 cmake/find/Findcoremedia.cmake create mode 100644 cmake/find/Findcorevideo.cmake create mode 100644 cmake/find/Findglkit.cmake create mode 100644 cmake/find/Findimageio.cmake diff --git a/cmake/find/Findaccelerate.cmake b/cmake/find/Findaccelerate.cmake new file mode 100644 index 0000000000..4ed1c187ef --- /dev/null +++ b/cmake/find/Findaccelerate.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "Accelerate") diff --git a/cmake/find/Findassetslibrary.cmake b/cmake/find/Findassetslibrary.cmake new file mode 100644 index 0000000000..5f4af55167 --- /dev/null +++ b/cmake/find/Findassetslibrary.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "AssetsLibrary") diff --git a/cmake/find/Findavfoundation.cmake b/cmake/find/Findavfoundation.cmake new file mode 100644 index 0000000000..f17e61a6ff --- /dev/null +++ b/cmake/find/Findavfoundation.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "AVFoundation") diff --git a/cmake/find/Findcoredata.cmake b/cmake/find/Findcoredata.cmake new file mode 100644 index 0000000000..308ec63ca1 --- /dev/null +++ b/cmake/find/Findcoredata.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "CoreData") diff --git a/cmake/find/Findcorefoundation.cmake b/cmake/find/Findcorefoundation.cmake new file mode 100644 index 0000000000..fc820c9895 --- /dev/null +++ b/cmake/find/Findcorefoundation.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "CoreFoundation") diff --git a/cmake/find/Findcorelocation.cmake b/cmake/find/Findcorelocation.cmake new file mode 100644 index 0000000000..d26a8318bd --- /dev/null +++ b/cmake/find/Findcorelocation.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "CoreLocation") diff --git a/cmake/find/Findcoremedia.cmake b/cmake/find/Findcoremedia.cmake new file mode 100644 index 0000000000..19e2d1d01e --- /dev/null +++ b/cmake/find/Findcoremedia.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "CoreMedia") diff --git a/cmake/find/Findcorevideo.cmake b/cmake/find/Findcorevideo.cmake new file mode 100644 index 0000000000..8533f7262e --- /dev/null +++ b/cmake/find/Findcorevideo.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "CoreVideo") diff --git a/cmake/find/Findglkit.cmake b/cmake/find/Findglkit.cmake new file mode 100644 index 0000000000..aa118ab274 --- /dev/null +++ b/cmake/find/Findglkit.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "GLKit") diff --git a/cmake/find/Findimageio.cmake b/cmake/find/Findimageio.cmake new file mode 100644 index 0000000000..9e51ece105 --- /dev/null +++ b/cmake/find/Findimageio.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "ImageIO") From 67fba1c596f8d7e69b6115d574800d31e2b12760 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 28 Jul 2017 16:59:23 +0300 Subject: [PATCH 284/612] Update submodule --- gate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gate b/gate index e9b9f7d390..a0b94e93c2 160000 --- a/gate +++ b/gate @@ -1 +1 @@ -Subproject commit e9b9f7d3900e9deb04c18a9513d93c240a72c0a1 +Subproject commit a0b94e93c2ae421edc62fac1444b0f66c7f07fa0 From 4f1fdb5f085b324212a02b0542cbaa870b8b1e0e Mon Sep 17 00:00:00 2001 From: rusdevops Date: Fri, 28 Jul 2017 18:48:45 +0300 Subject: [PATCH 285/612] Add WDC package --- cmake/configs/default.cmake | 1 + cmake/projects/WDC/hunter.cmake | 46 +++++++++++++++++++++++++++++ examples/WDC/CMakeLists.txt | 14 +++++++++ examples/WDC/init.cpp | 52 +++++++++++++++++++++++++++++++++ 4 files changed, 113 insertions(+) create mode 100644 cmake/projects/WDC/hunter.cmake create mode 100644 examples/WDC/CMakeLists.txt create mode 100644 examples/WDC/init.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index cd84ca3ae6..8fe3ce01e2 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -113,6 +113,7 @@ hunter_config(TIFF VERSION 4.0.2-p3) hunter_config(tommath VERSION 1.0-p2) hunter_config(tomcrypt VERSION 1.17-p2) hunter_config(WTL VERSION 9.1.5321) +hunter_config(WDC VERSION 1.0.9) hunter_config(Washer VERSION 0.1.2) hunter_config(WinSparkle VERSION 0.4.0) hunter_config(ZLIB VERSION 1.2.8-p3) diff --git a/cmake/projects/WDC/hunter.cmake b/cmake/projects/WDC/hunter.cmake new file mode 100644 index 0000000000..2823fc42b7 --- /dev/null +++ b/cmake/projects/WDC/hunter.cmake @@ -0,0 +1,46 @@ +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME WDC + VERSION "1.0.9" + URL "https://github.com/CloudPolis/webdav-client-cpp/archive/v1.0.9.tar.gz" + SHA1 a4035ce5ac73581384c71105a4716839e1f54b5f +) + +hunter_add_version( + PACKAGE_NAME WDC + VERSION "1.0.8" + URL "https://github.com/CloudPolis/webdav-client-cpp/archive/v1.0.8.tar.gz" + SHA1 10db2c64fd9165011c9caaea572e07bf97c817cd +) + +hunter_add_version( + PACKAGE_NAME WDC + VERSION "1.0.7" + URL "https://github.com/CloudPolis/webdav-client-cpp/archive/v1.0.7.tar.gz" + SHA1 58dd5181bf11f842f6eb8c7206d89070f2d52190 +) + +hunter_add_version( + PACKAGE_NAME WDC + VERSION "1.0.6" + URL "https://github.com/CloudPolis/webdav-client-cpp/archive/v1.0.6.tar.gz" + SHA1 db0358658f689cc9118d96acf1d6de6eeb4d9041 +) + +hunter_add_version( + PACKAGE_NAME WDC + VERSION "1.0.5" + URL "https://github.com/CloudPolis/webdav-client-cpp/archive/v1.0.5.tar.gz" + SHA1 5f0d0cce727d079f3acc822737fc5e9f93aabed2 +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(WDC) +hunter_download(PACKAGE_NAME WDC) diff --git a/examples/WDC/CMakeLists.txt b/examples/WDC/CMakeLists.txt new file mode 100644 index 0000000000..fcc1f46f2a --- /dev/null +++ b/examples/WDC/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.3) + +include("../common.cmake") + +set(CMAKE_CXX_STANDARD 11) +set(CXX_STANDARD_REQUIRED ON) + +project(download-wdc) + +hunter_add_package(WDC) +find_package(WDC CONFIG REQUIRED) + +add_executable(example init.cpp) +target_link_libraries(example WDC::libwdc) diff --git a/examples/WDC/init.cpp b/examples/WDC/init.cpp new file mode 100644 index 0000000000..6eabeff8f2 --- /dev/null +++ b/examples/WDC/init.cpp @@ -0,0 +1,52 @@ +#include +#include +#include + +std::map base_options = { + { "webdav_hostname", "https://webdav.yandex.ru" }, + { "webdav_username", "{webdav_username}" }, + { "webdav_password", "{webdav_password}" } +}; + +std::map options_with_proxy = { + { "webdav_hostname", "https://webdav.yandex.ru" }, + { "webdav_username", "{webdav_username}" }, + { "webdav_password", "{webdav_password}" }, + { "proxy_hostname", "https://10.0.0.1:8080" }, + { "proxy_username", "{proxy_username}" }, + { "proxy_password", "{proxy_password}" } +}; + +std::map options_with_cert = { + { "webdav_hostname", "https://webdav.yandex.ru" }, + { "webdav_username", "{webdav_username}" }, + { "webdav_password", "{webdav_password}" }, + { "cert_path", "/etc/ssl/certs/client.crt" }, + { "key_path", "/etc/ssl/private/client.key" } +}; + +std::string options_to_string(const std::map & options) { + std::stringstream stream; + for (auto& option :options) { + stream << "\t" << option.first << ": " << option.second << std::endl; + } + return stream.str(); +} + +int main() { + + auto various_options = { + base_options, + options_with_proxy, + options_with_cert + }; + + for (auto options : various_options) { + std::unique_ptr client(WebDAV::Client::Init(options)); + bool is_connected = client->check(); + std::cout << "Client with options: " << std::endl; + std::cout << options_to_string(options); + std::cout << " is " << (is_connected ? " " : "not ") << "connected" << std::endl; + std::cout << std::endl; + } +} From c3b65562dd3d62dac29fde15ea90616b81a8c0b9 Mon Sep 17 00:00:00 2001 From: x10mind Date: Sat, 29 Jul 2017 12:36:02 +0300 Subject: [PATCH 286/612] Catch v1.8.2-po --- cmake/configs/default.cmake | 2 +- cmake/projects/Catch/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index cd84ca3ae6..fcec3cde5a 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -119,7 +119,7 @@ hunter_config(ZLIB VERSION 1.2.8-p3) hunter_config(ZMQPP VERSION 4.1.2) hunter_config(ZeroMQ VERSION 4.1.4-p2) hunter_config(caffe VERSION rc3-p2) -hunter_config(Catch VERSION 1.5.9) +hunter_config(Catch VERSION 1.8.2-p0) hunter_config(aes VERSION 0.0.1-p1) hunter_config(aglet VERSION 1.1.0) hunter_config(autobahn-cpp VERSION 0.2.0) diff --git a/cmake/projects/Catch/hunter.cmake b/cmake/projects/Catch/hunter.cmake index 3f27a68340..3640685df4 100644 --- a/cmake/projects/Catch/hunter.cmake +++ b/cmake/projects/Catch/hunter.cmake @@ -8,6 +8,17 @@ include(hunter_pick_scheme) include(hunter_cacheable) include(hunter_download) +hunter_add_version( + PACKAGE_NAME + Catch + VERSION + "1.8.2-p0" + URL + "https://github.com/hunter-packages/Catch/archive/v1.8.2-p0-hunter.tar.gz" + SHA1 + d8de13879e7be959d95a8e4a0daa2d5eb5fef807 +) + hunter_add_version( PACKAGE_NAME Catch From c7cc4d26c442511b6dd6c701692d9b60317ba364 Mon Sep 17 00:00:00 2001 From: dan-42 Date: Wed, 26 Jul 2017 18:46:46 +0200 Subject: [PATCH 287/612] FEATURE: add support for nlohman_json V2.1.1 --- cmake/configs/default.cmake | 2 +- cmake/projects/nlohmann-json/hunter.cmake | 9 +++++++++ examples/nlohmann-json/CMakeLists.txt | 7 +++---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index cd84ca3ae6..080d21be3a 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -184,7 +184,7 @@ hunter_config(mpark_variant VERSION 1.0.0) hunter_config(msgpack VERSION 1.4.1-p2) hunter_config(mtplz VERSION 0.1-p3) hunter_config(nanoflann VERSION 1.2.3-p0) -hunter_config(nlohmann-json VERSION 1.0.0-rc1-hunter-3) +hunter_config(nlohmann-json VERSION 2.1.1) hunter_config(odb VERSION 2.4.0) hunter_config(odb-boost VERSION 2.4.0) hunter_config(odb-compiler VERSION 2.4.0) diff --git a/cmake/projects/nlohmann-json/hunter.cmake b/cmake/projects/nlohmann-json/hunter.cmake index 301cc74a88..2b429bdd74 100644 --- a/cmake/projects/nlohmann-json/hunter.cmake +++ b/cmake/projects/nlohmann-json/hunter.cmake @@ -20,7 +20,16 @@ hunter_add_version( SHA1 4f0300ebb08b28ac6bca0f947ffd6afde64386ef ) +hunter_add_version( + PACKAGE_NAME nlohmann-json + VERSION "2.1.1" + URL "https://github.com/nlohmann/json/archive/v2.1.1.tar.gz" + SHA1 abee5b79c8a04ece60c496759f4bd002e9cd5077 +) + + hunter_cmake_args(nlohmann-json CMAKE_ARGS JSON_BUILD_TESTS=OFF) +hunter_cmake_args(nlohmann-json CMAKE_ARGS JSON_BuildTests=OFF) hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(nlohmann-json) diff --git a/examples/nlohmann-json/CMakeLists.txt b/examples/nlohmann-json/CMakeLists.txt index cc7fc06e86..7de78ad2f7 100644 --- a/examples/nlohmann-json/CMakeLists.txt +++ b/examples/nlohmann-json/CMakeLists.txt @@ -6,10 +6,9 @@ include("../common.cmake") project(dowload-nlohmann-json) -hunter_add_package(nlohmann-json) -find_package(nlohmann-json) +hunter_add_package(nlohmann_json) +find_package(nlohmann_json CONFIG REQUIRED) add_executable(main main.cpp) -target_link_libraries(main - nlohmann-json::nlohmann-json) +target_link_libraries(main) From 9751025b751ecb5ff0e4bc5024a065f47aa2c9de Mon Sep 17 00:00:00 2001 From: dan-42 Date: Wed, 26 Jul 2017 19:14:36 +0200 Subject: [PATCH 288/612] REFACTOR: adapt new naming scheme with underscore --- cmake/configs/default.cmake | 2 +- cmake/projects/nlohmann-json/hunter.cmake | 36 ------------------- cmake/projects/nlohmann_json/hunter.cmake | 21 +++++++++++ .../CMakeLists.txt | 2 -- .../{nlohmann-json => nlohmann_json}/main.cpp | 0 5 files changed, 22 insertions(+), 39 deletions(-) delete mode 100644 cmake/projects/nlohmann-json/hunter.cmake create mode 100644 cmake/projects/nlohmann_json/hunter.cmake rename examples/{nlohmann-json => nlohmann_json}/CMakeLists.txt (90%) rename examples/{nlohmann-json => nlohmann_json}/main.cpp (100%) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 080d21be3a..1959e8e950 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -184,7 +184,7 @@ hunter_config(mpark_variant VERSION 1.0.0) hunter_config(msgpack VERSION 1.4.1-p2) hunter_config(mtplz VERSION 0.1-p3) hunter_config(nanoflann VERSION 1.2.3-p0) -hunter_config(nlohmann-json VERSION 2.1.1) +hunter_config(nlohmann_json VERSION 2.1.1) hunter_config(odb VERSION 2.4.0) hunter_config(odb-boost VERSION 2.4.0) hunter_config(odb-compiler VERSION 2.4.0) diff --git a/cmake/projects/nlohmann-json/hunter.cmake b/cmake/projects/nlohmann-json/hunter.cmake deleted file mode 100644 index 2b429bdd74..0000000000 --- a/cmake/projects/nlohmann-json/hunter.cmake +++ /dev/null @@ -1,36 +0,0 @@ -# !!! DO NOT PLACE HEADER GUARDS HERE !!! - -include(hunter_add_version) -include(hunter_cacheable) -include(hunter_cmake_args) -include(hunter_download) -include(hunter_pick_scheme) - -hunter_add_version( - PACKAGE_NAME nlohmann-json - VERSION "1.0.0-rc1-hunter-2" - URL "https://github.com/hunter-packages/json/archive/v1.0.0-rc1-hunter-2.tar.gz" - SHA1 2db824ca17678c8918575bbab982e6ae93283433 -) - -hunter_add_version( - PACKAGE_NAME nlohmann-json - VERSION "1.0.0-rc1-hunter-3" - URL "https://github.com/hunter-packages/json/archive/v1.0.0-rc1-hunter-3.tar.gz" - SHA1 4f0300ebb08b28ac6bca0f947ffd6afde64386ef -) - -hunter_add_version( - PACKAGE_NAME nlohmann-json - VERSION "2.1.1" - URL "https://github.com/nlohmann/json/archive/v2.1.1.tar.gz" - SHA1 abee5b79c8a04ece60c496759f4bd002e9cd5077 -) - - -hunter_cmake_args(nlohmann-json CMAKE_ARGS JSON_BUILD_TESTS=OFF) -hunter_cmake_args(nlohmann-json CMAKE_ARGS JSON_BuildTests=OFF) - -hunter_pick_scheme(DEFAULT url_sha1_cmake) -hunter_cacheable(nlohmann-json) -hunter_download(PACKAGE_NAME nlohmann-json) diff --git a/cmake/projects/nlohmann_json/hunter.cmake b/cmake/projects/nlohmann_json/hunter.cmake new file mode 100644 index 0000000000..d0ea1f8ec1 --- /dev/null +++ b/cmake/projects/nlohmann_json/hunter.cmake @@ -0,0 +1,21 @@ +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME nlohmann_json + VERSION "2.1.1" + URL "https://github.com/nlohmann/json/archive/v2.1.1.tar.gz" + SHA1 abee5b79c8a04ece60c496759f4bd002e9cd5077 +) + + +hunter_cmake_args(nlohmann_json CMAKE_ARGS JSON_BuildTests=OFF) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(nlohmann_json) +hunter_download(PACKAGE_NAME nlohmann_json) diff --git a/examples/nlohmann-json/CMakeLists.txt b/examples/nlohmann_json/CMakeLists.txt similarity index 90% rename from examples/nlohmann-json/CMakeLists.txt rename to examples/nlohmann_json/CMakeLists.txt index 7de78ad2f7..ceb570f0a8 100644 --- a/examples/nlohmann-json/CMakeLists.txt +++ b/examples/nlohmann_json/CMakeLists.txt @@ -10,5 +10,3 @@ hunter_add_package(nlohmann_json) find_package(nlohmann_json CONFIG REQUIRED) add_executable(main main.cpp) - -target_link_libraries(main) diff --git a/examples/nlohmann-json/main.cpp b/examples/nlohmann_json/main.cpp similarity index 100% rename from examples/nlohmann-json/main.cpp rename to examples/nlohmann_json/main.cpp From 699d5db9d7684f0e5956a193b54f95d197b4317e Mon Sep 17 00:00:00 2001 From: dan-42 Date: Thu, 27 Jul 2017 18:36:43 +0200 Subject: [PATCH 289/612] FIX nlohmann_json example, missing target_link_libraries --- examples/nlohmann_json/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/nlohmann_json/CMakeLists.txt b/examples/nlohmann_json/CMakeLists.txt index ceb570f0a8..cad2d10e90 100644 --- a/examples/nlohmann_json/CMakeLists.txt +++ b/examples/nlohmann_json/CMakeLists.txt @@ -10,3 +10,5 @@ hunter_add_package(nlohmann_json) find_package(nlohmann_json CONFIG REQUIRED) add_executable(main main.cpp) + +target_link_libraries(main nlohmann_json) From 43014faa21b51acaba10bb94d84def22f82f9b8c Mon Sep 17 00:00:00 2001 From: dan-42 Date: Thu, 27 Jul 2017 19:43:29 +0200 Subject: [PATCH 290/612] FIX example nlohman_json include changed with V2.1.1 --- examples/nlohmann_json/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/nlohmann_json/main.cpp b/examples/nlohmann_json/main.cpp index 1031b42f5c..bd52bb9c84 100644 --- a/examples/nlohmann_json/main.cpp +++ b/examples/nlohmann_json/main.cpp @@ -1,5 +1,5 @@ #include -#include +#include int main (int argc, char** argv) { From 9cc93efdee2db17c76670cb198d980cbba95331d Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 30 Jul 2017 22:07:23 +0300 Subject: [PATCH 291/612] nlohmann_json 2.1.1-p0 --- cmake/configs/default.cmake | 2 +- cmake/projects/nlohmann_json/hunter.cmake | 7 +++---- examples/nlohmann_json/main.cpp | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 1959e8e950..22792a48fe 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -184,7 +184,7 @@ hunter_config(mpark_variant VERSION 1.0.0) hunter_config(msgpack VERSION 1.4.1-p2) hunter_config(mtplz VERSION 0.1-p3) hunter_config(nanoflann VERSION 1.2.3-p0) -hunter_config(nlohmann_json VERSION 2.1.1) +hunter_config(nlohmann_json VERSION 2.1.1-p0) hunter_config(odb VERSION 2.4.0) hunter_config(odb-boost VERSION 2.4.0) hunter_config(odb-compiler VERSION 2.4.0) diff --git a/cmake/projects/nlohmann_json/hunter.cmake b/cmake/projects/nlohmann_json/hunter.cmake index d0ea1f8ec1..61ca93f6fb 100644 --- a/cmake/projects/nlohmann_json/hunter.cmake +++ b/cmake/projects/nlohmann_json/hunter.cmake @@ -8,12 +8,11 @@ include(hunter_pick_scheme) hunter_add_version( PACKAGE_NAME nlohmann_json - VERSION "2.1.1" - URL "https://github.com/nlohmann/json/archive/v2.1.1.tar.gz" - SHA1 abee5b79c8a04ece60c496759f4bd002e9cd5077 + VERSION "2.1.1-p0" + URL "https://github.com/hunter-packages/json/archive/v2.1.1-p0.tar.gz" + SHA1 baf11b83387a7c4b2b6eb1e280f69084185813c0 ) - hunter_cmake_args(nlohmann_json CMAKE_ARGS JSON_BuildTests=OFF) hunter_pick_scheme(DEFAULT url_sha1_cmake) diff --git a/examples/nlohmann_json/main.cpp b/examples/nlohmann_json/main.cpp index bd52bb9c84..1031b42f5c 100644 --- a/examples/nlohmann_json/main.cpp +++ b/examples/nlohmann_json/main.cpp @@ -1,5 +1,5 @@ #include -#include +#include int main (int argc, char** argv) { From 966ef76cc951d12058f7419d7b3642f82d724072 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 31 Jul 2017 14:32:49 +0300 Subject: [PATCH 292/612] Link files from cellar: add Python implementation --- cmake/modules/hunter_unpack_directory.cmake | 86 +++++++---------- scripts/link-all.cmake | 102 ++++++++++++++++++++ scripts/link-all.py | 48 +++++++++ 3 files changed, 184 insertions(+), 52 deletions(-) create mode 100644 scripts/link-all.cmake create mode 100644 scripts/link-all.py diff --git a/cmake/modules/hunter_unpack_directory.cmake b/cmake/modules/hunter_unpack_directory.cmake index 3b5f37b625..8e8adf2de2 100644 --- a/cmake/modules/hunter_unpack_directory.cmake +++ b/cmake/modules/hunter_unpack_directory.cmake @@ -7,16 +7,11 @@ include(hunter_status_debug) include(hunter_test_string_not_empty) function(hunter_unpack_directory cache_sha1) + hunter_test_string_not_empty("${HUNTER_SELF}") hunter_test_string_not_empty("${HUNTER_CACHED_ROOT}") hunter_test_string_not_empty("${HUNTER_INSTALL_PREFIX}") hunter_test_string_not_empty("${cache_sha1}") - if(CMAKE_HOST_UNIX) - set(use_link_script TRUE) - else() - set(use_link_script FALSE) - endif() - set(cache_directory "${HUNTER_CACHED_ROOT}/_Base/Cache") set(cellar_directory "${HUNTER_CACHED_ROOT}/_Base/Cellar") @@ -32,8 +27,7 @@ function(hunter_unpack_directory cache_sha1) set(list_of_directories "${cellar_directory}/directories.list") set(list_of_files "${cellar_directory}/files.list") - set(link_script "${cellar_directory}/link-all.sh") - set(shell "/bin/bash") + set(shell_link_script "${cellar_directory}/link-all.sh") set(archive_file "${cache_directory}/raw/${cache_sha1}.tar.bz2") if(NOT EXISTS "${archive_file}") @@ -81,45 +75,32 @@ function(hunter_unpack_directory cache_sha1) hunter_internal_error("Unpack failed") endif() - # For LIST_DIRECTORIES - if(CMAKE_VERSION VERSION_LESS 3.3 AND use_link_script) - hunter_internal_error( - "CMake version 3.3 at least needed." - "Current version is ${CMAKE_VERSION}." - ) - endif() - hunter_status_debug("Creating list of files and directories") + # Note: LIST_DIRECTORIES available only since CMake 3.3 file( GLOB_RECURSE - all - LIST_DIRECTORIES true + files RELATIVE "${cellar_raw_directory}" "${cellar_raw_directory}/*" ) - set(files "") set(directories "") - foreach(x ${all}) - if(IS_DIRECTORY "${cellar_raw_directory}/${x}") - list(APPEND directories "${x}") - else() - list(APPEND files "${x}") - endif() + foreach(x ${files}) + get_filename_component(file_dir "${x}" DIRECTORY) + list(APPEND directories "${file_dir}") endforeach() + list(REMOVE_DUPLICATES directories) # Create link script { - file(WRITE "${link_script}" "#!${shell}\n") - file(APPEND "${link_script}" "\n") file( - APPEND - "${link_script}" + WRITE + "${shell_link_script}" "export \"HUNTER_CELLAR_RAW_DIRECTORY=${cellar_raw_directory}\"\n\n" ) foreach(x ${files}) file( APPEND - "${link_script}" + "${shell_link_script}" "ln \\\n \"\${HUNTER_CELLAR_RAW_DIRECTORY}/${x}\" \\\n \"\$1/${x}\"\n\n" ) endforeach() @@ -146,28 +127,29 @@ function(hunter_unpack_directory cache_sha1) file(REMOVE "${HUNTER_INSTALL_PREFIX}/${x}") endforeach() - if(use_link_script) - hunter_status_debug("Linking files") - if(NOT EXISTS "${shell}") - hunter_internal_error("File not found: '${shell}'") - endif() - set(cmd "${shell}" "${link_script}" "${HUNTER_INSTALL_PREFIX}") - hunter_print_cmd("${cellar_directory}" "${cmd}") - execute_process( - COMMAND ${cmd} - WORKING_DIRECTORY "${cellar_directory}" - RESULT_VARIABLE result - ) - - if(NOT result EQUAL 0) - hunter_internal_error("Link script failed") - endif() + hunter_status_debug("Linking files") + set( + cmd + "${CMAKE_COMMAND}" + "-DHUNTER_INSTALL_PREFIX=${HUNTER_INSTALL_PREFIX}" + "-DLIST_OF_FILES=${list_of_files}" + "-DSHELL_LINK_SCRIPT=${shell_link_script}" + "-DCELLAR_RAW_DIRECTORY=${cellar_raw_directory}" + "-DPYTHON_LINK_SCRIPT=${HUNTER_SELF}/scripts/link-all.py" + "-P" + "${HUNTER_SELF}/scripts/link-all.cmake" + ) + hunter_print_cmd("${cellar_directory}" "${cmd}") + execute_process( + COMMAND ${cmd} + WORKING_DIRECTORY "${cellar_directory}" + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE error + ) + if(result EQUAL 0) + hunter_status_debug("Linking done: ${output}, ${error}") else() - hunter_status_debug("Copying files") - foreach(x ${files}) - set(full_dst_path "${HUNTER_INSTALL_PREFIX}/${x}") - get_filename_component(dst_dir "${full_dst_path}" DIRECTORY) - file(COPY "${cellar_raw_directory}/${x}" DESTINATION "${dst_dir}") - endforeach() + hunter_internal_error("Link script failed: ${result}, ${output}, ${error}") endif() endfunction() diff --git a/scripts/link-all.cmake b/scripts/link-all.cmake new file mode 100644 index 0000000000..f34daec852 --- /dev/null +++ b/scripts/link-all.cmake @@ -0,0 +1,102 @@ +cmake_minimum_required(VERSION 3.0) + +string(COMPARE EQUAL "${HUNTER_INSTALL_PREFIX}" "" is_empty) +if(is_empty) + message(FATAL_ERROR "HUNTER_INSTALL_PREFIX is empty") +endif() + +if(NOT EXISTS "${HUNTER_INSTALL_PREFIX}") + message(FATAL_ERROR "Directory not exists: ${HUNTER_INSTALL_PREFIX}") +endif() + +string(COMPARE EQUAL "${LIST_OF_FILES}" "" is_empty) +if(is_empty) + message(FATAL_ERROR "LIST_OF_FILES is empty") +endif() + +if(NOT EXISTS "${LIST_OF_FILES}") + message(FATAL_ERROR "File not exists: ${LIST_OF_FILES}") +endif() + +string(COMPARE EQUAL "${SHELL_LINK_SCRIPT}" "" is_empty) +if(is_empty) + message(FATAL_ERROR "SHELL_LINK_SCRIPT is empty") +endif() + +if(NOT EXISTS "${SHELL_LINK_SCRIPT}") + message(FATAL_ERROR "File not exists: ${SHELL_LINK_SCRIPT}") +endif() + +string(COMPARE EQUAL "${CELLAR_RAW_DIRECTORY}" "" is_empty) +if(is_empty) + message(FATAL_ERROR "CELLAR_RAW_DIRECTORY is empty") +endif() + +if(NOT EXISTS "${CELLAR_RAW_DIRECTORY}") + message(FATAL_ERROR "Directory not found: ${CELLAR_RAW_DIRECTORY}") +endif() + +string(COMPARE EQUAL "${PYTHON_LINK_SCRIPT}" "" is_empty) +if(is_empty) + message(FATAL_ERROR "PYTHON_LINK_SCRIPT is empty") +endif() + +if(NOT EXISTS "${PYTHON_LINK_SCRIPT}") + message(FATAL_ERROR "File not exists: ${PYTHON_LINK_SCRIPT}") +endif() + +find_package(PythonInterp 3) +if(PYTHONINTERP_FOUND) + message("Link files using Python: ${PYTHON_EXECUTABLE}") + set( + cmd + "${PYTHON_EXECUTABLE}" + "${PYTHON_LINK_SCRIPT}" + "--list" + "${LIST_OF_FILES}" + "--cellar" + "${CELLAR_RAW_DIRECTORY}" + "--dest" + "${HUNTER_INSTALL_PREFIX}" + ) + execute_process( + COMMAND ${cmd} + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE error + ) + if(NOT result EQUAL 0) + message( + FATAL_ERROR + "Python script failed: ${cmd}, ${result}, ${output}, ${error}" + ) + endif() + return() +endif() + +set(shell "/bin/bash") +if(EXISTS "${shell}") + message("Link files using shell: ${shell}") + set(cmd "${shell}" "${SHELL_LINK_SCRIPT}" "${HUNTER_INSTALL_PREFIX}") + execute_process( + COMMAND ${cmd} + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE error + ) + if(NOT result EQUAL 0) + message( + FATAL_ERROR + "Shell script failed: ${cmd}, ${result}, ${output}, ${error}" + ) + endif() + return() +endif() + +message("Copy files") +file(STRINGS "${LIST_OF_FILES}" files) +foreach(x ${files}) + set(full_dst_path "${HUNTER_INSTALL_PREFIX}/${x}") + get_filename_component(dst_dir "${full_dst_path}" DIRECTORY) + file(COPY "${CELLAR_RAW_DIRECTORY}/${x}" DESTINATION "${dst_dir}") +endforeach() diff --git a/scripts/link-all.py b/scripts/link-all.py new file mode 100644 index 0000000000..c6b89aff63 --- /dev/null +++ b/scripts/link-all.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python3 + +import argparse +import os +import sys +import multiprocessing + +parser = argparse.ArgumentParser(description='File link script') + +parser.add_argument('--list', required=True) +parser.add_argument('--cellar', required=True) +parser.add_argument('--dest', required=True) + +cmd_args = parser.parse_args() + +src_list = [] +with open(cmd_args.list, 'r') as f: + for line in f: + src_list.append(line.strip()) + +list_len = len(src_list) +proc_num = multiprocessing.cpu_count() +files_per_job = list_len // proc_num + +def job(job_index): + try: + begin_ind = files_per_job * job_index + end_ind = files_per_job * (job_index + 1) + last_job = (job_index == proc_num - 1) + if last_job: + end_ind = list_len + for i in range(begin_ind, end_ind): + filename = src_list[i] + link_from = os.path.join(cmd_args.cellar, filename) + link_to = os.path.join(cmd_args.dest, filename) + os.link(link_from, link_to) + return 0 + except Exception as exc: + print('Exception caught: {}'.format(exc)) + return 1 + +pool = multiprocessing.Pool(processes=proc_num) +result = pool.map(job, range(proc_num)) +pool.close() +pool.join() + +if 1 in result: + sys.exit('Some job failed') From 0b8dddd4ae50af029a4aad629475c26e67508605 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 31 Jul 2017 17:53:34 +0300 Subject: [PATCH 293/612] Fix Windows --- scripts/link-all.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/link-all.py b/scripts/link-all.py index c6b89aff63..737ccba4ed 100644 --- a/scripts/link-all.py +++ b/scripts/link-all.py @@ -39,10 +39,14 @@ def job(job_index): print('Exception caught: {}'.format(exc)) return 1 -pool = multiprocessing.Pool(processes=proc_num) -result = pool.map(job, range(proc_num)) -pool.close() -pool.join() +def run_link(): + pool = multiprocessing.Pool(processes=proc_num) + result = pool.map(job, range(proc_num)) + pool.close() + pool.join() -if 1 in result: - sys.exit('Some job failed') + if 1 in result: + sys.exit('Some job failed') + +if __name__ == '__main__': + run_link() From e8ac84b6c8576eb557aa2853b08cfe78679abd5f Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 1 Aug 2017 12:07:25 +0300 Subject: [PATCH 294/612] Android-ARM-EABI-v7a-System-Image 21_r04 [skip ci] --- cmake/configs/default.cmake | 1 + .../Android-ARM-EABI-v7a-System-Image/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 9905cc3a88..6ce862e485 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -264,6 +264,7 @@ if(ANDROID) hunter_config(Android-Intel-x86-Atom-System-Image VERSION 21) hunter_config(Android-SDK-Platform VERSION 21_r02) hunter_config(Sources-for-Android-SDK VERSION 21) + hunter_config(Android-ARM-EABI-v7a-System-Image VERSION 21_r04) elseif(_is_api_19) hunter_config(Android-Google-APIs VERSION 19_r18) hunter_config(Android-Intel-x86-Atom-System-Image VERSION 19) diff --git a/cmake/projects/Android-ARM-EABI-v7a-System-Image/hunter.cmake b/cmake/projects/Android-ARM-EABI-v7a-System-Image/hunter.cmake index ca3b54adfb..a5a1b38523 100755 --- a/cmake/projects/Android-ARM-EABI-v7a-System-Image/hunter.cmake +++ b/cmake/projects/Android-ARM-EABI-v7a-System-Image/hunter.cmake @@ -20,5 +20,16 @@ hunter_add_version( d1a5fd4f2e1c013c3d3d9bfe7e9db908c3ed56fa ) +hunter_add_version( + PACKAGE_NAME + Android-ARM-EABI-v7a-System-Image + VERSION + "21_r04" + URL + "https://dl.google.com/android/repository/sys-img/android/armeabi-v7a-21_r04.zip" + SHA1 + 8c606f81306564b65e41303d2603e4c42ded0d10 +) + hunter_pick_scheme(DEFAULT url_sha1_unpack) hunter_download(PACKAGE_NAME Android-ARM-EABI-v7a-System-Image) From 3af9f9b211d6c6014a0b4990f33c05648a936d63 Mon Sep 17 00:00:00 2001 From: Tom Mason Date: Tue, 1 Aug 2017 12:08:36 +0100 Subject: [PATCH 295/612] minor update to sdl package see https://github.com/hunter-packages/SDL2/releases/tag/2.0.4-p4 --- cmake/configs/default.cmake | 2 +- cmake/projects/SDL2/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 9905cc3a88..78d5b30d82 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -104,7 +104,7 @@ hunter_config(QtCMakeExtra VERSION 1.0.22) hunter_config(QtQmlManager VERSION 1.0.0) hunter_config(RapidJSON VERSION 1.0.2-p2) hunter_config(RapidXML VERSION 1.13) -hunter_config(SDL2 VERSION 2.0.4-p3) +hunter_config(SDL2 VERSION 2.0.4-p4) hunter_config(SQLite3 VERSION autoconf-3080803) #R-Tree enabled hunter_config(Sober VERSION 0.1.3) hunter_config(Sugar VERSION 1.2.2) diff --git a/cmake/projects/SDL2/hunter.cmake b/cmake/projects/SDL2/hunter.cmake index b16ff05307..9c07308452 100644 --- a/cmake/projects/SDL2/hunter.cmake +++ b/cmake/projects/SDL2/hunter.cmake @@ -6,6 +6,17 @@ include(hunter_download) include(hunter_pick_scheme) include(hunter_cacheable) +hunter_add_version( + PACKAGE_NAME + SDL2 + VERSION + "2.0.4-p4" + URL + "https://github.com/hunter-packages/SDL2/archive/2.0.4-p4.tar.gz" + SHA1 + 523d8fd427f707541c7e600ad4c37e0e7bdc3662 +) + hunter_add_version( PACKAGE_NAME SDL2 From 2fc3a176e635840bcad7d41cafbce6bc1c0f46fc Mon Sep 17 00:00:00 2001 From: Tom Mason Date: Tue, 1 Aug 2017 19:10:20 +0100 Subject: [PATCH 296/612] add SDL_mixer package --- cmake/configs/default.cmake | 1 + cmake/projects/SDL_mixer/hunter.cmake | 22 +++ examples/SDL_mixer/CMakeLists.txt | 14 ++ examples/SDL_mixer/main.cpp | 237 ++++++++++++++++++++++++++ 4 files changed, 274 insertions(+) create mode 100644 cmake/projects/SDL_mixer/hunter.cmake create mode 100644 examples/SDL_mixer/CMakeLists.txt create mode 100644 examples/SDL_mixer/main.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 7a60767c1b..cc7a836a6c 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -105,6 +105,7 @@ hunter_config(QtQmlManager VERSION 1.0.0) hunter_config(RapidJSON VERSION 1.0.2-p2) hunter_config(RapidXML VERSION 1.13) hunter_config(SDL2 VERSION 2.0.4-p4) +hunter_config(SDL_mixer VERSION 2.0.1-p1) hunter_config(SQLite3 VERSION autoconf-3080803) #R-Tree enabled hunter_config(Sober VERSION 0.1.3) hunter_config(Sugar VERSION 1.2.2) diff --git a/cmake/projects/SDL_mixer/hunter.cmake b/cmake/projects/SDL_mixer/hunter.cmake new file mode 100644 index 0000000000..2c0c258ddc --- /dev/null +++ b/cmake/projects/SDL_mixer/hunter.cmake @@ -0,0 +1,22 @@ +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +# Load used modules +include(hunter_add_version) +include(hunter_download) +include(hunter_pick_scheme) +include(hunter_cacheable) + +hunter_add_version( + PACKAGE_NAME + SDL_mixer + VERSION + "2.0.1-p1" + URL + "https://github.com/hunter-packages/SDL_mixer/archive/v2.0.1-p1.tar.gz" + SHA1 + b4e97fb430309d5218185afa702f16f0129678be +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(SDL_mixer) +hunter_download(PACKAGE_NAME SDL_mixer) diff --git a/examples/SDL_mixer/CMakeLists.txt b/examples/SDL_mixer/CMakeLists.txt new file mode 100644 index 0000000000..7513c72fff --- /dev/null +++ b/examples/SDL_mixer/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required (VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(SDL_mixer-test) + +hunter_add_package(SDL_mixer) +find_package(SDL_mixer CONFIG REQUIRED) + +add_executable(main main.cpp) +target_link_libraries(main + SDL_mixer::SDL_mixer) diff --git a/examples/SDL_mixer/main.cpp b/examples/SDL_mixer/main.cpp new file mode 100644 index 0000000000..ccf1fb02cc --- /dev/null +++ b/examples/SDL_mixer/main.cpp @@ -0,0 +1,237 @@ +/* + PLAYMUS: A test application for the SDL mixer library. + Copyright (C) 1997-2016 Sam Lantinga + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + +/* Quiet windows compiler warnings */ +#define _CRT_SECURE_NO_WARNINGS + +/* $Id$ */ + +#include +#include +#include + +#ifdef unix +#include +#endif + +#include "SDL.h" +#include "SDL_mixer.h" + +#ifdef HAVE_SIGNAL_H +#include +#endif + + +static int audio_open = 0; +static Mix_Music *music = NULL; +static int next_track = 0; + +void CleanUp(int exitcode) +{ + if( Mix_PlayingMusic() ) { + Mix_FadeOutMusic(1500); + SDL_Delay(1500); + } + if ( music ) { + Mix_FreeMusic(music); + music = NULL; + } + if ( audio_open ) { + Mix_CloseAudio(); + audio_open = 0; + } + SDL_Quit(); + exit(exitcode); +} + +void Usage(char *argv0) +{ + fprintf(stderr, "Usage: %s [-i] [-l] [-8] [-r rate] [-c channels] [-b buffers] [-v N] [-rwops] \n", argv0); +} + +void Menu(void) +{ + char buf[10]; + + printf("Available commands: (p)ause (r)esume (h)alt volume(v#) > "); + fflush(stdin); + if (scanf("%s",buf) == 1) { + switch(buf[0]){ + case 'p': case 'P': + Mix_PauseMusic(); + break; + case 'r': case 'R': + Mix_ResumeMusic(); + break; + case 'h': case 'H': + Mix_HaltMusic(); + break; + case 'v': case 'V': + Mix_VolumeMusic(atoi(buf+1)); + break; + } + } + printf("Music playing: %s Paused: %s\n", Mix_PlayingMusic() ? "yes" : "no", + Mix_PausedMusic() ? "yes" : "no"); +} + +#ifdef HAVE_SIGNAL_H + +void IntHandler(int sig) +{ + switch (sig) { + case SIGINT: + next_track++; + break; + } +} + +#endif + +int main(int argc, char *argv[]) +{ + int audio_rate; + Uint16 audio_format; + int audio_channels; + int audio_buffers; + int audio_volume = MIX_MAX_VOLUME; + int looping = 0; + int interactive = 0; + int rwops = 0; + int i; + + /* Initialize variables */ + audio_rate = 22050; + audio_format = AUDIO_S16; + audio_channels = 2; + audio_buffers = 4096; + + /* Check command line usage */ + for ( i=1; argv[i] && (*argv[i] == '-'); ++i ) { + if ( (strcmp(argv[i], "-r") == 0) && argv[i+1] ) { + ++i; + audio_rate = atoi(argv[i]); + } else + if ( strcmp(argv[i], "-m") == 0 ) { + audio_channels = 1; + } else + if ( (strcmp(argv[i], "-c") == 0) && argv[i+1] ) { + ++i; + audio_channels = atoi(argv[i]); + } else + if ( (strcmp(argv[i], "-b") == 0) && argv[i+1] ) { + ++i; + audio_buffers = atoi(argv[i]); + } else + if ( (strcmp(argv[i], "-v") == 0) && argv[i+1] ) { + ++i; + audio_volume = atoi(argv[i]); + } else + if ( strcmp(argv[i], "-l") == 0 ) { + looping = -1; + } else + if ( strcmp(argv[i], "-i") == 0 ) { + interactive = 1; + } else + if ( strcmp(argv[i], "-8") == 0 ) { + audio_format = AUDIO_U8; + } else + if ( strcmp(argv[i], "-rwops") == 0 ) { + rwops = 1; + } else { + Usage(argv[0]); + return(1); + } + } + if ( ! argv[i] ) { + Usage(argv[0]); + return(1); + } + + /* Initialize the SDL library */ + if ( SDL_Init(SDL_INIT_AUDIO) < 0 ) { + fprintf(stderr, "Couldn't initialize SDL: %s\n",SDL_GetError()); + return(255); + } + +#ifdef HAVE_SIGNAL_H + signal(SIGINT, IntHandler); + signal(SIGTERM, CleanUp); +#endif + + /* Open the audio device */ + if (Mix_OpenAudio(audio_rate, audio_format, audio_channels, audio_buffers) < 0) { + fprintf(stderr, "Couldn't open audio: %s\n", SDL_GetError()); + return(2); + } else { + Mix_QuerySpec(&audio_rate, &audio_format, &audio_channels); + printf("Opened audio at %d Hz %d bit %s (%s), %d bytes audio buffer\n", audio_rate, + (audio_format&0xFF), + (audio_channels > 2) ? "surround" : (audio_channels > 1) ? "stereo" : "mono", + (audio_format&0x1000) ? "BE" : "LE", + audio_buffers ); + } + audio_open = 1; + + /* Set the music volume */ + Mix_VolumeMusic(audio_volume); + + /* Set the external music player, if any */ + Mix_SetMusicCMD(SDL_getenv("MUSIC_CMD")); + + while (argv[i]) { + next_track = 0; + + /* Load the requested music file */ + if ( rwops ) { + music = Mix_LoadMUS_RW(SDL_RWFromFile(argv[i], "rb"), SDL_TRUE); + } else { + music = Mix_LoadMUS(argv[i]); + } + if ( music == NULL ) { + fprintf(stderr, "Couldn't load %s: %s\n", + argv[i], SDL_GetError()); + CleanUp(2); + } + + /* Play and then exit */ + printf("Playing %s\n", argv[i]); + Mix_FadeInMusic(music,looping,2000); + while ( !next_track && (Mix_PlayingMusic() || Mix_PausedMusic()) ) { + if(interactive) + Menu(); + else + SDL_Delay(100); + } + Mix_FreeMusic(music); + music = NULL; + + /* If the user presses Ctrl-C more than once, exit. */ + SDL_Delay(500); + if ( next_track > 1 ) break; + + i++; + } + CleanUp(0); + + /* Not reached, but fixes compiler warnings */ + return 0; +} From ee99db75ba564c08078a48163277f7dc590f0a7a Mon Sep 17 00:00:00 2001 From: Tom Mason Date: Tue, 1 Aug 2017 19:30:22 +0100 Subject: [PATCH 297/612] fix SDL_mixer example --- examples/SDL_mixer/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/SDL_mixer/CMakeLists.txt b/examples/SDL_mixer/CMakeLists.txt index 7513c72fff..14d4fed7b7 100644 --- a/examples/SDL_mixer/CMakeLists.txt +++ b/examples/SDL_mixer/CMakeLists.txt @@ -11,4 +11,5 @@ find_package(SDL_mixer CONFIG REQUIRED) add_executable(main main.cpp) target_link_libraries(main - SDL_mixer::SDL_mixer) + SDL_mixer::SDL_mixer + SDL2::SDL2main) From 53c9ab0e2189188ec6998d29f1d886b3dd964020 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Thu, 3 Aug 2017 12:03:07 +0200 Subject: [PATCH 298/612] add module hunter_parse_cmake_args_for_keyword --- .../hunter_parse_cmake_args_for_keyword.cmake | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 cmake/modules/hunter_parse_cmake_args_for_keyword.cmake diff --git a/cmake/modules/hunter_parse_cmake_args_for_keyword.cmake b/cmake/modules/hunter_parse_cmake_args_for_keyword.cmake new file mode 100644 index 0000000000..6800254f0d --- /dev/null +++ b/cmake/modules/hunter_parse_cmake_args_for_keyword.cmake @@ -0,0 +1,63 @@ +# Copyright (c) 2017, NeroBurner +# All rights reserved. + +include(CMakeParseArguments) # cmake_parse_arguments + +include(hunter_internal_error) +include(hunter_status_debug) + +function(hunter_parse_cmake_args_for_keyword cmake_args) + set(optional "") + set(one KEYWORD OUTPUT) + set(multiple CMAKE_ARGS) + + # Introduce: + # * x_CMAKE_ARGS + # * x_KEYWORD + # * x_OUTPUT + cmake_parse_arguments(x "${optional}" "${one}" "${multiple}" "${ARGV}") + + string(COMPARE NOTEQUAL "${x_UNPARSED_ARGUMENTS}" "" has_unparsed) + if(has_unparsed) + hunter_internal_error("Unparsed arguments: ${x_UNPARSED_ARGUMENTS}") + endif() + + string(COMPARE EQUAL "${x_KEYWORD}" "" is_empty) + if(is_empty) + hunter_internal_error("KEYWORD is empty") + endif() + string(COMPARE EQUAL "${x_OUTPUT}" "" is_empty) + if(is_empty) + hunter_internal_error("OUTPUT is empty") + endif() + + # get KEYWORD from CMAKE_ARGS + set(output) + foreach(entry ${x_CMAKE_ARGS}) + string(FIND "${entry}" "=" update_var) + if(update_var EQUAL -1) + # nothing to to + else() + # Format = + # Note that we can have more than one '=' sign, e.g. A=-opt=value1 + string(REGEX REPLACE "=.*" "" var_name "${entry}") + + # 'string(REGEX REPLACE' will replace as much patterns as it found so + # it's not possible to replace only one '=' as we need. + string(LENGTH "${var_name}" var_name_len) + math(EXPR value_begin "${var_name_len} + 1") + string(SUBSTRING "${entry}" "${value_begin}" -1 var_value) + + # Check for submodule-source-dir keyword + string(COMPARE EQUAL "${var_name}" "${x_KEYWORD}" is_keyword) + if(is_keyword) + hunter_status_debug("Found ${var_name} = '${var_value}'") + set(output "${var_value}") + endif() + endif() + endforeach() + + # set OUTPUT variable + set("${x_OUTPUT}" "${output}" PARENT_SCOPE) +endfunction() + From ca7bdb875e97f275fe3e9bd9d7097c16b9bd02da Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Wed, 2 Aug 2017 15:57:08 +0200 Subject: [PATCH 299/612] add HUNTER_SUBMODULE_SOURCE_SUBDIR to hunter_config - hunter_config: - use hunter_parse_cmake_args_for_keyword with keyword `HUNTER_SUBMODULE_SOURCE_SUBDIR` - pass found value to hunter_pack_git_submodule - hunter_pack_git_submodule: - add argument SUBMODULE_SOURCE_SUBDIR - if argument is set pass subdir to `git archive` call as `HEAD:${subdir}` --- cmake/modules/hunter_config.cmake | 9 +++++++++ cmake/modules/hunter_pack_git_submodule.cmake | 15 +++++++++++++-- .../hunter_parse_cmake_args_for_keyword.cmake | 2 +- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/cmake/modules/hunter_config.cmake b/cmake/modules/hunter_config.cmake index 412772ad67..96c22dbbad 100644 --- a/cmake/modules/hunter_config.cmake +++ b/cmake/modules/hunter_config.cmake @@ -7,6 +7,7 @@ include(hunter_fatal_error) include(hunter_pack_git_submodule) include(hunter_unsetvar) include(hunter_user_error) +include(hunter_parse_cmake_args_for_keyword) macro(hunter_config) if(NOT HUNTER_ALLOW_CONFIG_LOADING) @@ -44,9 +45,17 @@ macro(hunter_config) string(COMPARE NOTEQUAL "${_hunter_GIT_SUBMODULE}" "" _hunter_submodule_create) if(_hunter_submodule_create) + # get HUNTER_SUBMODULE_SOURCE_SUBDIR from CMAKE_ARGS + hunter_parse_cmake_args_for_keyword( + CMAKE_ARGS ${_hunter_CMAKE_ARGS} + KEYWORD HUNTER_SUBMODULE_SOURCE_SUBDIR + OUTPUT _source_subdir + ) + hunter_pack_git_submodule( GIT_SUBMODULE "${_hunter_GIT_SUBMODULE}" VERSION _hunter_VERSION + SUBMODULE_SOURCE_SUBDIR "${_source_subdir}" ) endif() diff --git a/cmake/modules/hunter_pack_git_submodule.cmake b/cmake/modules/hunter_pack_git_submodule.cmake index 04c94dd2e1..841e4607ee 100644 --- a/cmake/modules/hunter_pack_git_submodule.cmake +++ b/cmake/modules/hunter_pack_git_submodule.cmake @@ -13,13 +13,14 @@ function(hunter_pack_git_submodule) endif() set(optional "") - set(one GIT_SUBMODULE PROJECT_FILE VERSION) + set(one GIT_SUBMODULE PROJECT_FILE VERSION SUBMODULE_SOURCE_SUBDIR) set(multiple "") # Introduce: # * x_GIT_SUBMODULE # * x_PROJECT_FILE # * x_VERSION + # * x_SUBMODULE_SOURCE_SUBDIR cmake_parse_arguments(x "${optional}" "${one}" "${multiple}" "${ARGV}") string(COMPARE NOTEQUAL "${x_UNPARSED_ARGUMENTS}" "" has_unparsed) @@ -193,7 +194,17 @@ function(hunter_pack_git_submodule) set(archive "${archives_directory}/${PACKAGE_NAME}.tar") hunter_status_debug("Creating archive '${archive}'") - set(cmd "${GIT_EXECUTABLE}" archive HEAD -o "${archive}") + # check if whole submodule or just a subfolder is to be archived + string(COMPARE EQUAL "${x_SUBMODULE_SOURCE_SUBDIR}" "" is_empty) + if(is_empty) + hunter_status_debug("No SUBMODULE_SOURCE_SUBDIR specified, archive whole submodule") + set(source_flag) + else() + hunter_status_debug("SUBMODULE_SOURCE_SUBDIR specified, only archive subfolder: ${x_SUBMODULE_SOURCE_SUBDIR}") + set(source_flag ":${x_SUBMODULE_SOURCE_SUBDIR}") + endif() + + set(cmd "${GIT_EXECUTABLE}" archive HEAD${source_flag} -o "${archive}") execute_process( COMMAND ${cmd} WORKING_DIRECTORY "${submodule_dir}" diff --git a/cmake/modules/hunter_parse_cmake_args_for_keyword.cmake b/cmake/modules/hunter_parse_cmake_args_for_keyword.cmake index 6800254f0d..f5f800d159 100644 --- a/cmake/modules/hunter_parse_cmake_args_for_keyword.cmake +++ b/cmake/modules/hunter_parse_cmake_args_for_keyword.cmake @@ -6,7 +6,7 @@ include(CMakeParseArguments) # cmake_parse_arguments include(hunter_internal_error) include(hunter_status_debug) -function(hunter_parse_cmake_args_for_keyword cmake_args) +function(hunter_parse_cmake_args_for_keyword) set(optional "") set(one KEYWORD OUTPUT) set(multiple CMAKE_ARGS) From d5654b7c626ca18ceeff4a561023c1b473bcf6df Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Thu, 3 Aug 2017 15:05:36 +0200 Subject: [PATCH 300/612] docs: reword git-submodule documentation --- .../user-guides/hunter-user/git-submodule.rst | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/docs/user-guides/hunter-user/git-submodule.rst b/docs/user-guides/hunter-user/git-submodule.rst index 87b4a9c874..01bb5c04e9 100644 --- a/docs/user-guides/hunter-user/git-submodule.rst +++ b/docs/user-guides/hunter-user/git-submodule.rst @@ -10,8 +10,8 @@ Use version from Git submodule ------------------------------ -Hunter allows creation of archive with sources on the fly by getting it from -Git submodule. +Hunter allows the creation of an archive with sources on the fly by getting it +from a Git submodule. Example: @@ -21,7 +21,8 @@ Example: > cd git-submodule-integration [git-submodule-integration]> git submodule update --init . -Submodule set in local config file: +To instruct Hunter to use the contents of the submodule, add a local config file +and set the ``GIT_SUBMODULE`` flag: .. code-block:: cmake :emphasize-lines: 9 @@ -42,7 +43,7 @@ Submodule set in local config file: # cmake/Hunter/config.cmake hunter_config(fruits GIT_SUBMODULE "3rdParty/fruits") -Path to submodule is the same as in ``.gitmodules`` file: +The path set by the ``GIT_SUBMODULE`` flag is the same as in the ``.gitmodules`` file: .. code-block:: none :emphasize-lines: 3 @@ -52,7 +53,7 @@ Path to submodule is the same as in ``.gitmodules`` file: path = 3rdParty/fruits url = https://github.com/cgold-examples/fruits -On configure step Hunter will run ``git archive`` command to pack sources: +At the configure step Hunter will run the command ``git archive`` to pack sources: .. code-block:: none @@ -61,7 +62,7 @@ On configure step Hunter will run ``git archive`` command to pack sources: -- [hunter *** DEBUG *** ...] Creating archive '/.../git-submodule-integration/_builds/_3rdParty/Hunter/git-archives/fruits.tar' ... -Let's build project and run tests: +Let's build the project and run tests: .. code-block:: none @@ -73,8 +74,8 @@ Let's build project and run tests: 1: pear x 1 ... -If you want to make changes to dependent project and test them you have -to **commit** patches first: +If you want to make changes to the dependent project (the one added +as submodule) and test them, you have to **commit** patches first: .. code-block:: none :emphasize-lines: 3, 6, 8 @@ -88,9 +89,9 @@ to **commit** patches first: [fruits]> git add lib/fruits/rosaceae/Plum.cpp [fruits]> git commit -m 'Update' -Go back to parent directory and run build. There is no need to run configure -again, corresponding Git files watched by CMake hence configure will start -automatically on build step: +Go back to the parent directory and run build. There is no need to run +configure again, corresponding Git files are watched by CMake hence the +configure step will start automatically when the build step is invoked: .. code-block:: none From 13e5151615e2928955c043b92c43ffa54ad3cff0 Mon Sep 17 00:00:00 2001 From: NeroBurner Date: Thu, 3 Aug 2017 15:55:05 +0200 Subject: [PATCH 301/612] docs: fix link to donation.md --- docs/donations.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/donations.rst b/docs/donations.rst index ea7bafc068..18978bc737 100644 --- a/docs/donations.rst +++ b/docs/donations.rst @@ -4,4 +4,4 @@ Donations --------- -* `Donations `_ +* `Donations `_ From 60f0ec27a88e4f9dd286bb260e33f82756956df5 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 3 Aug 2017 17:16:48 +0300 Subject: [PATCH 302/612] Removing out-of-date and never used [skip ci] --- donate.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/donate.md b/donate.md index b75918b3cb..2b97ad733e 100644 --- a/donate.md +++ b/donate.md @@ -5,14 +5,6 @@ If you like this project and it's goals consider supporting it by making a donat [![Donate][2]][1] -[![Gratipay](https://img.shields.io/gratipay/Hunter.svg?style=social&label=donate)](https://www.gratipay.com/Hunter/) - -Sberbank of Russia: -* 5469 3800 3946 0992 (USD) -* 5469 3800 2768 7895 (RUB) - -Also https://www.bountysource.com/ can be used to open a bounty for the exact problem. For such issues badge [bounty](https://github.com/ruslo/hunter/issues?q=is%3Aopen+is%3Aissue+label%3Abounty) will be added automatically. - Thanks! :) [1]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UN8PDZZ3Q7VVL From 7f41d6fcfca78268e91612374f272d89c01bbce0 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Thu, 3 Aug 2017 16:01:59 +0200 Subject: [PATCH 303/612] docs: add 'subfolder' as valid word --- docs/spelling.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/spelling.txt b/docs/spelling.txt index 08be835eb0..f5882261d9 100644 --- a/docs/spelling.txt +++ b/docs/spelling.txt @@ -40,5 +40,6 @@ reconstructible reproducibility sanitizers shareable +subfolder toolchain toolchains From 7087e5c68262b17578f10d45c513f313026405df Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Thu, 3 Aug 2017 15:06:33 +0200 Subject: [PATCH 304/612] docs: add source_subdir documentation --- docs/user-guides/hunter-user/git-submodule.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/user-guides/hunter-user/git-submodule.rst b/docs/user-guides/hunter-user/git-submodule.rst index 01bb5c04e9..b69ee75eb4 100644 --- a/docs/user-guides/hunter-user/git-submodule.rst +++ b/docs/user-guides/hunter-user/git-submodule.rst @@ -108,6 +108,19 @@ Run tests to see changes: 1: plum-v2 x 2 1: pear x 1 +Use subdirectory of submodule +============================= + +To instruct hunter to archive a subdirectory of the Git submodule add the keyword ``HUNTER_SUBMODULE_SOURCE_SUBDIR`` to the CMake arguments: + +.. code-block:: cmake + + # cmake/Hunter/config.cmake + hunter_config(fruits GIT_SUBMODULE "3rdParty/fruits" + CMAKE_ARGS "HUNTER_SUBMODULE_SOURCE_SUBDIR=app") + +The created archive will contain just the subfolder ``app`` of the submodule. + GIT_SUBMODULE vs add_subdirectory ================================= From 4bdbab798b3ab22b603d84b803a44e531eba073a Mon Sep 17 00:00:00 2001 From: caseymcc Date: Fri, 4 Aug 2017 12:39:29 -0500 Subject: [PATCH 305/612] adds install config --- cmake/configs/default.cmake | 2 +- cmake/projects/MySQL-client/hunter.cmake | 11 +++++++++++ examples/MySQL-client/CMakeLists.txt | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 56a20e2efb..431e43fc6f 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -79,7 +79,7 @@ hunter_config(Libcxxabi VERSION 3.6.2) # Clang hunter_config(librtmp VERSION 2.4.0-p0) hunter_config(Libssh2 VERSION 1.7.0) hunter_config(Lua VERSION 5.3.2) -hunter_config(MySQL-client VERSION 6.1.9) +hunter_config(MySQL-client VERSION 6.1.9-p0) hunter_config(NASM VERSION 2.12.02) hunter_config(OpenBLAS VERSION 0.2.19-p0) hunter_config(OpenCL VERSION 2.1-p3) diff --git a/cmake/projects/MySQL-client/hunter.cmake b/cmake/projects/MySQL-client/hunter.cmake index 801d802cc6..b76b4e7aa7 100644 --- a/cmake/projects/MySQL-client/hunter.cmake +++ b/cmake/projects/MySQL-client/hunter.cmake @@ -31,6 +31,17 @@ hunter_add_version( 3268345d8e324d11380cd26475e1669bc5ff2fa0 ) +hunter_add_version( + PACKAGE_NAME + MySQL-client + VERSION + "6.1.9-p0" + URL + "https://github.com/hunter-packages/mysql-client/archive/v1.6.9-p0.tar.gz" + SHA1 + 64c3fb0500e03fc0ee188dca1ec33e52c2f54e32 +) + # https://github.com/ruslo/hunter/issues/705 # hunter_cacheable(MySQL-client) diff --git a/examples/MySQL-client/CMakeLists.txt b/examples/MySQL-client/CMakeLists.txt index 31dbab496d..b52f0bf8b2 100644 --- a/examples/MySQL-client/CMakeLists.txt +++ b/examples/MySQL-client/CMakeLists.txt @@ -7,7 +7,7 @@ include("../common.cmake") project(MySQL-client-example) hunter_add_package(MySQL-client) -find_package(MySQL-client REQUIRED) +find_package(MySQL-client CONFIG REQUIRED) set(${PROJECT_NAME}_SOURCES main.c @@ -17,5 +17,5 @@ add_executable(${PROJECT_NAME} ${${PROJECT_NAME}_SOURCES} ) -target_link_libraries(${PROJECT_NAME} "MySQL::client") +target_link_libraries(${PROJECT_NAME} "MySQL::libmysql") From c68ccb5a193cb1cb18b8ace15d79e0bafcb82190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Sun, 6 Aug 2017 09:29:14 +0200 Subject: [PATCH 306/612] Fix Python 2 compatibility in upload-cache-to-github.py In print function in Python 2, there is no "flush" argument. The old "sys.stdout.flush()" must be used. --- maintenance/upload-cache-to-github.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/maintenance/upload-cache-to-github.py b/maintenance/upload-cache-to-github.py index 1b915fff0a..a2da9af6a1 100755 --- a/maintenance/upload-cache-to-github.py +++ b/maintenance/upload-cache-to-github.py @@ -39,14 +39,16 @@ def func_out(*args, **kwargs): except Error as err: # Treat Errors as fatal and do not retry. # Also explicitly flush message to avoid "no output" issue on some CIs. - print('Error:\n {}'.format(err), flush=True) + print('Error:\n {}'.format(err)) + sys.stdout.flush() raise err except Exception as exc: if i > retry_max: raise exc print('Operation failed. Exception:\n {}'.format(exc)) sec = sleep_time(i) - print('Retry #{} (of {}) after {} seconds'.format(i, retry_max, sec), flush=True) + print('Retry #{} (of {}) after {} seconds'.format(i, retry_max, sec)) + sys.stdout.flush() time.sleep(sec) return func_out From 717781108d4456671495828e1dfc6f5d691a9d0b Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 6 Aug 2017 18:18:34 +0300 Subject: [PATCH 307/612] Update 'gate' submodule [skip ci] --- gate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gate b/gate index a0b94e93c2..769e091b24 160000 --- a/gate +++ b/gate @@ -1 +1 @@ -Subproject commit a0b94e93c2ae421edc62fac1444b0f66c7f07fa0 +Subproject commit 769e091b2417e3b814fd4a0a92d1dae07a769f49 From 829007151534847434aa8d939e35f6246c9fb95a Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 6 Aug 2017 18:40:10 +0300 Subject: [PATCH 308/612] Docs: "Disabled mode" helper modules --- docs/overview/compatibility.rst | 51 ++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/docs/overview/compatibility.rst b/docs/overview/compatibility.rst index 8038de0c81..b2d4bfab10 100644 --- a/docs/overview/compatibility.rst +++ b/docs/overview/compatibility.rst @@ -1,4 +1,4 @@ -.. Copyright (c) 2016, Ruslan Baratov +.. Copyright (c) 2016-2017, Ruslan Baratov .. All rights reserved. Backward compatibility @@ -8,15 +8,13 @@ Turn Hunter off by adding one option `HUNTER_ENABLED=NO`_ to use your old settings. For example: .. code-block:: cmake - :emphasize-lines: 1 + :emphasize-lines: 3 - hunter_add_package(OpenSSL) + add_executable(foo openssl-example.cpp) + hunter_add_package(OpenSSL) find_package(OpenSSL REQUIRED) - include_directories("${OPENSSL_INCLUDE_DIR}") - - add_executable(foo openssl-example.cpp) - target_link_libraries(foo ${OPENSSL_LIBRARIES}) + target_link_libraries(foo PUBLIC OpenSSL::SSL OpenSSL::Crypto) by default this code will trigger download and build of OpenSSL: @@ -49,8 +47,8 @@ system library will be used instead: CMakeFiles/foo.dir/openssl-example.cpp.o -o foo -rdynamic - -lssl - -lcrypto + /usr/lib/x86_64-linux-gnu/libssl.so + /usr/lib/x86_64-linux-gnu/libcrypto.so ``HUNTER_ENABLED=NO`` can be set by default using CMake ``option``: @@ -71,8 +69,35 @@ it still can be used in Hunter, no extra modifications needed. .. _HUNTER_ENABLED=NO: https://github.com/ruslo/hunter/wiki/usr.variables#hunter_enabled -.. warning:: +Helper modules +============== + +Not all packages have the same CMake usage API. E.g. for CURL in Hunter +there is imported target ``CURL::libcurl`` but there are only +``CURL_INCLUDE_DIRS`` and ``CURL_LIBRARIES`` defined in standard ``FindCURL`` +module. + +To mimic Hunter API `disabled-mode `__ +modules can be used. + +``HunterGate`` will load them automatically when ``HUNTER_ENABLED=OFF`` and +they are located in ``${CMAKE_CURRENT_LIST_DIR}/cmake/Hunter/disabled-mode``: + +.. code-block:: none + + > cmake -H. -B_builds -DHUNTER_ENABLED=NO -DHUNTER_STATUS_DEBUG=ON + -- [hunter *** DEBUG *** ...] Adding "disabled-mode" modules: /.../cmake/Hunter/disabled-mode + +Module ``CURLConfig`` from "disabled-mode" modules will be added to CMake +search path, loaded, call standard ``FindCURL`` and create imported target +``CURL::libcurl``. This will allow to use same API with and without Hunter: + +.. code-block:: cmake + + hunter_add_package(CURL) + find_package(CURL CONFIG REQUIRED) + target_link_libraries(foo PUBLIC CURL::libcurl) + +.. admonition:: Examples on GitHub - Using old-style ``FOO_LIBRARIES`` variable instead of imported ``Foo::foo`` - targets will make your project non-relocatable because of full paths, so - probably you have to change this code to ``Foo::foo`` anyway. + * `Disabled mode example `__ From 102bf8ae385125110ab2400e639f49ee3eb3032f Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 7 Aug 2017 15:03:31 +0300 Subject: [PATCH 309/612] Docs: Fix link --- docs/overview/customization/build-types.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/overview/customization/build-types.rst b/docs/overview/customization/build-types.rst index 54fd57286d..49b58b224c 100644 --- a/docs/overview/customization/build-types.rst +++ b/docs/overview/customization/build-types.rst @@ -4,4 +4,4 @@ Build types ----------- -* `Build types like Release/Debug `_ +* `Build types like Release/Debug `__ From 0b8a839fd4708a6f309a42464c4160b3ffc73bcb Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 7 Aug 2017 15:50:14 +0300 Subject: [PATCH 310/612] Set WORKING_DIRECTORY explicitly --- scripts/link-all.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/link-all.cmake b/scripts/link-all.cmake index f34daec852..d38dd31a62 100644 --- a/scripts/link-all.cmake +++ b/scripts/link-all.cmake @@ -61,6 +61,7 @@ if(PYTHONINTERP_FOUND) ) execute_process( COMMAND ${cmd} + WORKING_DIRECTORY "${CELLAR_RAW_DIRECTORY}" RESULT_VARIABLE result OUTPUT_VARIABLE output ERROR_VARIABLE error @@ -80,6 +81,7 @@ if(EXISTS "${shell}") set(cmd "${shell}" "${SHELL_LINK_SCRIPT}" "${HUNTER_INSTALL_PREFIX}") execute_process( COMMAND ${cmd} + WORKING_DIRECTORY "${CELLAR_RAW_DIRECTORY}" RESULT_VARIABLE result OUTPUT_VARIABLE output ERROR_VARIABLE error From be47752e7489809c51c0e4effa1dac12e7c56283 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 7 Aug 2017 16:55:37 +0300 Subject: [PATCH 311/612] Add link to SO [skip ci] --- scripts/link-all.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/link-all.cmake b/scripts/link-all.cmake index d38dd31a62..17c6d6108f 100644 --- a/scripts/link-all.cmake +++ b/scripts/link-all.cmake @@ -70,6 +70,7 @@ if(PYTHONINTERP_FOUND) message( FATAL_ERROR "Python script failed: ${cmd}, ${result}, ${output}, ${error}" + "(may help: https://stackoverflow.com/a/2009505/2288008)" ) endif() return() From d3c4992f6b53c9b38cd6814ed57e27f79b0ed261 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Mon, 7 Aug 2017 10:59:48 +0200 Subject: [PATCH 312/612] finalize: create TOOLCHAIN before CONFIG - call hunter_calculate_toolchain_sha1 before hunter_calculate_config_sha1 - switch config and toolchain SHA1 in folder structure to be _BASE/${HUNTER_ID}/${HUNTER_TOOLCHAIN_ID}/${HUNTER_CONIG_ID} - update modules which create files in HUNTER_TOOLCHAIN_ID_PATH to use config path instead --- .../modules/hunter_apply_gate_settings.cmake | 39 ++++++++++++++++--- .../hunter_calculate_config_sha1.cmake | 12 +++++- .../hunter_calculate_toolchain_sha1.cmake | 6 --- cmake/modules/hunter_create_cache_file.cmake | 4 +- .../hunter_create_dependency_entry.cmake | 4 +- cmake/modules/hunter_download.cmake | 6 +-- cmake/modules/hunter_finalize.cmake | 14 +++---- cmake/modules/hunter_get_package_deps.cmake | 4 +- .../modules/hunter_register_dependency.cmake | 4 +- 9 files changed, 60 insertions(+), 33 deletions(-) diff --git a/cmake/modules/hunter_apply_gate_settings.cmake b/cmake/modules/hunter_apply_gate_settings.cmake index 52fb2c236a..bb5c86082d 100644 --- a/cmake/modules/hunter_apply_gate_settings.cmake +++ b/cmake/modules/hunter_apply_gate_settings.cmake @@ -74,11 +74,7 @@ function(hunter_apply_gate_settings) set(hunter_base "${HUNTER_GATE_ROOT}/_Base") - # HUNTER_GATE_CONFIG_SHA1 - hunter_calculate_config_sha1( - "${hunter_self}" "${hunter_base}" "${config_location}" - ) - + # define configuration type variables string(COMPARE EQUAL "${HUNTER_CONFIGURATION_TYPES}" "" use_default) if(use_default) set(HUNTER_CONFIGURATION_TYPES "Release;Debug") @@ -102,9 +98,40 @@ function(hunter_apply_gate_settings) endif() endforeach() - # HUNTER_GATE_TOOLCHAIN_SHA1 + # * defines: HUNTER_GATE_TOOLCHAIN_SHA1 + # * needs: HUNTER_CONFIGURATION_TYPES + # * creates: global_toolchain_info at + # "${hunter_base}/${HUNTER_GATE_SHA1}/${HUNTER_GATE_TOOLCHAIN_SHA1}/toolchain.info" hunter_calculate_toolchain_sha1("${hunter_self}" "${hunter_base}") + # set PATH variables for hunter and toolchain + hunter_make_directory("${hunter_base}" "${HUNTER_GATE_SHA1}" hunter_id_path) + hunter_make_directory( + "${hunter_id_path}" + "${HUNTER_GATE_TOOLCHAIN_SHA1}" + hunter_toolchain_id_path + ) + set(HUNTER_ID_PATH "${hunter_id_path}" PARENT_SCOPE) + set(HUNTER_TOOLCHAIN_ID_PATH "${hunter_toolchain_id_path}") + set(HUNTER_TOOLCHAIN_ID_PATH "${hunter_toolchain_id_path}" PARENT_SCOPE) + + # * defines: HUNTER_GATE_CONFIG_SHA1 + # * needs: HUNTER_TOOLCHAIN_ID_PATH + # * creates: unified global config file at + # "${hunter_base}/${HUNTER_GATE_SHA1}/${HUNTER_GATE_TOOLCHAIN_SHA1}/${HUNTER_GATE_CONFIG_SHA1/config.cmake" + hunter_calculate_config_sha1( + "${hunter_self}" "${hunter_base}" "${config_location}" + ) + # set PATH variables for config folder + hunter_make_directory( + "${hunter_toolchain_id_path}" + "${HUNTER_GATE_CONFIG_SHA1}" + hunter_config_id_path + ) + set(HUNTER_CONFIG_ID_PATH "${hunter_config_id_path}" PARENT_SCOPE) + + + # test if mandatory variables are set hunter_test_string_not_empty("${HUNTER_GATE_ROOT}") hunter_test_string_not_empty("${HUNTER_GATE_SHA1}") hunter_test_string_not_empty("${HUNTER_GATE_CONFIG_SHA1}") diff --git a/cmake/modules/hunter_calculate_config_sha1.cmake b/cmake/modules/hunter_calculate_config_sha1.cmake index 7577ed75d9..f389c81af0 100644 --- a/cmake/modules/hunter_calculate_config_sha1.cmake +++ b/cmake/modules/hunter_calculate_config_sha1.cmake @@ -135,10 +135,20 @@ function(hunter_calculate_config_sha1 hunter_self hunter_base user_config) file(SHA1 "${work_dir}/config.cmake" HUNTER_GATE_CONFIG_SHA1) set(HUNTER_GATE_CONFIG_SHA1 "${HUNTER_GATE_CONFIG_SHA1}" PARENT_SCOPE) hunter_make_directory("${hunter_base}" "${HUNTER_GATE_SHA1}" hunter_id_path) + hunter_make_directory( - "${hunter_id_path}" "${HUNTER_GATE_CONFIG_SHA1}" hunter_config_id_path + "${hunter_id_path}" + "${HUNTER_GATE_TOOLCHAIN_SHA1}" + hunter_toolchain_id_path ) + hunter_make_directory( + "${hunter_toolchain_id_path}" + "${HUNTER_GATE_CONFIG_SHA1}" + hunter_config_id_path + ) + + set(dst "${hunter_config_id_path}/config.cmake") if(EXISTS "${dst}") diff --git a/cmake/modules/hunter_calculate_toolchain_sha1.cmake b/cmake/modules/hunter_calculate_toolchain_sha1.cmake index afb7a78d58..0d2fd88fc1 100644 --- a/cmake/modules/hunter_calculate_toolchain_sha1.cmake +++ b/cmake/modules/hunter_calculate_toolchain_sha1.cmake @@ -112,12 +112,6 @@ function(hunter_calculate_toolchain_sha1 hunter_self hunter_base) hunter_make_directory( "${hunter_id_path}" - "${HUNTER_GATE_CONFIG_SHA1}" - hunter_config_id_path - ) - - hunter_make_directory( - "${hunter_config_id_path}" "${HUNTER_GATE_TOOLCHAIN_SHA1}" hunter_toolchain_id_path ) diff --git a/cmake/modules/hunter_create_cache_file.cmake b/cmake/modules/hunter_create_cache_file.cmake index 38b76156c4..86340bc402 100644 --- a/cmake/modules/hunter_create_cache_file.cmake +++ b/cmake/modules/hunter_create_cache_file.cmake @@ -10,15 +10,15 @@ function(hunter_create_cache_file cache_path) hunter_test_string_not_empty("${HUNTER_CACHED_ROOT}") hunter_test_string_not_empty("${HUNTER_SHA1}") hunter_test_string_not_empty("${HUNTER_CONFIG_SHA1}") + hunter_test_string_not_empty("${HUNTER_CONFIG_ID_PATH}") hunter_test_string_not_empty("${HUNTER_VERSION}") hunter_test_string_not_empty("${HUNTER_TOOLCHAIN_SHA1}") - hunter_test_string_not_empty("${HUNTER_TOOLCHAIN_ID_PATH}") if(EXISTS "${cache_path}") return() endif() - hunter_lock_directory("${HUNTER_TOOLCHAIN_ID_PATH}" "") + hunter_lock_directory("${HUNTER_CONFIG_ID_PATH}" "") # While waiting for lock other instance can create this file if(EXISTS "${cache_path}") diff --git a/cmake/modules/hunter_create_dependency_entry.cmake b/cmake/modules/hunter_create_dependency_entry.cmake index f81a9b94cb..926ea80268 100644 --- a/cmake/modules/hunter_create_dependency_entry.cmake +++ b/cmake/modules/hunter_create_dependency_entry.cmake @@ -16,7 +16,7 @@ function(hunter_create_dependency_entry) hunter_test_string_not_empty("${x_PACKAGE}") hunter_test_string_not_empty("${x_RESULT}") - hunter_test_string_not_empty("${HUNTER_TOOLCHAIN_ID_PATH}") + hunter_test_string_not_empty("${HUNTER_CONFIG_ID_PATH}") string(COMPARE NOTEQUAL "${x_COMPONENT}" "" has_component) string(COMPARE NOTEQUAL "${x_UNPARSED_ARGUMENTS}" "" has_unparsed) @@ -24,7 +24,7 @@ function(hunter_create_dependency_entry) hunter_internal_error("Unparsed: ${x_UNPARSED_ARGUMENTS}") endif() - set(top_dir "${HUNTER_TOOLCHAIN_ID_PATH}/Build") + set(top_dir "${HUNTER_CONFIG_ID_PATH}/Build") set(dep_dir "${top_dir}/${x_PACKAGE}") if(has_component) diff --git a/cmake/modules/hunter_download.cmake b/cmake/modules/hunter_download.cmake index 0fd56a4743..b6c8abd5c5 100644 --- a/cmake/modules/hunter_download.cmake +++ b/cmake/modules/hunter_download.cmake @@ -44,7 +44,7 @@ function(hunter_download) hunter_test_string_not_empty("${HUNTER_INSTALL_PREFIX}") hunter_test_string_not_empty("${HUNTER_PACKAGE_NAME}") - hunter_test_string_not_empty("${HUNTER_TOOLCHAIN_ID_PATH}") + hunter_test_string_not_empty("${HUNTER_CONFIG_ID_PATH}") hunter_test_string_not_empty("${HUNTER_CACHE_FILE}") string(COMPARE NOTEQUAL "${HUNTER_BINARY_DIR}" "" hunter_has_binary_dir) @@ -147,7 +147,7 @@ function(hunter_download) set(HUNTER_PACKAGE_SETUP_DIR "${HUNTER_SELF}/cmake/projects/${HUNTER_PACKAGE_NAME}") set(HUNTER_GLOBAL_SCRIPT_DIR "${HUNTER_SELF}/scripts") set(HUNTER_PACKAGE_SCRIPT_DIR "${HUNTER_PACKAGE_SETUP_DIR}/scripts/") - set(HUNTER_PACKAGE_HOME_DIR "${HUNTER_TOOLCHAIN_ID_PATH}/Build") + set(HUNTER_PACKAGE_HOME_DIR "${HUNTER_CONFIG_ID_PATH}/Build") set( HUNTER_PACKAGE_HOME_DIR "${HUNTER_PACKAGE_HOME_DIR}/${HUNTER_PACKAGE_NAME}" @@ -277,7 +277,7 @@ function(hunter_download) "${HUNTER_PACKAGE_DOWNLOAD_DIR}" HUNTER_ALREADY_LOCKED_DIRECTORIES ) hunter_lock_directory( - "${HUNTER_TOOLCHAIN_ID_PATH}" HUNTER_ALREADY_LOCKED_DIRECTORIES + "${HUNTER_CONFIG_ID_PATH}" HUNTER_ALREADY_LOCKED_DIRECTORIES ) if(hunter_has_binary_dir) hunter_lock_directory( diff --git a/cmake/modules/hunter_finalize.cmake b/cmake/modules/hunter_finalize.cmake index c650eaa75c..e28b13a5dd 100644 --- a/cmake/modules/hunter_finalize.cmake +++ b/cmake/modules/hunter_finalize.cmake @@ -63,20 +63,16 @@ macro(hunter_finalize) # * Read HUNTER_GATE_* variables # * Check cache HUNTER_* variables is up-to-date # * Update cache if needed + # * define HUNTER_ID_PATH + # * define HUNTER_TOOLCHAIN_ID_PATH + # * define HUNTER_CONFIG_ID_PATH hunter_apply_gate_settings() string(SUBSTRING "${HUNTER_SHA1}" 0 7 HUNTER_ID) string(SUBSTRING "${HUNTER_CONFIG_SHA1}" 0 7 HUNTER_CONFIG_ID) string(SUBSTRING "${HUNTER_TOOLCHAIN_SHA1}" 0 7 HUNTER_TOOLCHAIN_ID) - set(HUNTER_ID_PATH "${HUNTER_CACHED_ROOT}/_Base/${HUNTER_ID}") - set(HUNTER_CONFIG_ID_PATH "${HUNTER_ID_PATH}/${HUNTER_CONFIG_ID}") - set( - HUNTER_TOOLCHAIN_ID_PATH - "${HUNTER_CONFIG_ID_PATH}/${HUNTER_TOOLCHAIN_ID}" - ) - - set(HUNTER_INSTALL_PREFIX "${HUNTER_TOOLCHAIN_ID_PATH}/Install") + set(HUNTER_INSTALL_PREFIX "${HUNTER_CONFIG_ID_PATH}/Install") list(APPEND CMAKE_PREFIX_PATH "${HUNTER_INSTALL_PREFIX}") # Override pkg-config default search path @@ -106,7 +102,7 @@ macro(hunter_finalize) hunter_status_print("${_id_info}") - set(HUNTER_CACHE_FILE "${HUNTER_TOOLCHAIN_ID_PATH}/cache.cmake") + set(HUNTER_CACHE_FILE "${HUNTER_CONFIG_ID_PATH}/cache.cmake") hunter_create_cache_file("${HUNTER_CACHE_FILE}") if(MSVC) diff --git a/cmake/modules/hunter_get_package_deps.cmake b/cmake/modules/hunter_get_package_deps.cmake index 096b516895..9fa2c5a407 100644 --- a/cmake/modules/hunter_get_package_deps.cmake +++ b/cmake/modules/hunter_get_package_deps.cmake @@ -36,11 +36,11 @@ function(hunter_get_package_deps) hunter_test_string_not_empty("${x_PACKAGE}") hunter_test_string_not_empty("${x_RESULT}") - hunter_test_string_not_empty("${HUNTER_TOOLCHAIN_ID_PATH}") + hunter_test_string_not_empty("${HUNTER_CONFIG_ID_PATH}") # Go to directory '/Build//__/Dependencies' # and find all `__dep` files. - set(dep_dir "${HUNTER_TOOLCHAIN_ID_PATH}/Build/${x_PACKAGE}") + set(dep_dir "${HUNTER_CONFIG_ID_PATH}/Build/${x_PACKAGE}") if(has_component) set(dep_dir "${dep_dir}/__${x_COMPONENT}") endif() diff --git a/cmake/modules/hunter_register_dependency.cmake b/cmake/modules/hunter_register_dependency.cmake index d28584e7aa..978c3a0c2c 100644 --- a/cmake/modules/hunter_register_dependency.cmake +++ b/cmake/modules/hunter_register_dependency.cmake @@ -51,10 +51,10 @@ function(hunter_register_dependency) endif() hunter_test_string_not_empty("${hunter_PACKAGE_NAME}") - hunter_test_string_not_empty("${HUNTER_TOOLCHAIN_ID_PATH}") + hunter_test_string_not_empty("${HUNTER_CONFIG_ID_PATH}") set( dependencies_dir - "${HUNTER_TOOLCHAIN_ID_PATH}/Build/${hunter_PACKAGE_NAME}" + "${HUNTER_CONFIG_ID_PATH}/Build/${hunter_PACKAGE_NAME}" ) if(has_package_component) set( From c88b938ba5e3844113b491c1a88e023ef5ef5d0c Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Mon, 7 Aug 2017 13:42:52 +0200 Subject: [PATCH 313/612] docs: fix for reordering of config/toolchain - update overview: first toolchain, than config - update deployed: toolchain/config order - update faq: fix TOOLCHAIN_ID path --- .../faq/why-binaries-from-server-not-used.rst | 6 +-- docs/overview/customization.rst | 2 +- docs/overview/customization/config-id.rst | 54 +++++++++---------- docs/overview/customization/toolchain-id.rst | 40 +++++++------- docs/reference/layouts/deployed.rst | 16 +++--- 5 files changed, 59 insertions(+), 59 deletions(-) diff --git a/docs/faq/why-binaries-from-server-not-used.rst b/docs/faq/why-binaries-from-server-not-used.rst index 49184f7c66..bb7bdf15a8 100644 --- a/docs/faq/why-binaries-from-server-not-used.rst +++ b/docs/faq/why-binaries-from-server-not-used.rst @@ -133,11 +133,11 @@ in logs: .. code-block:: none - -- [hunter *** DEBUG *** ...] HUNTER_TOOLCHAIN_ID_PATH: /.../_Base/86b1bc9/cef4daf/aa85dd8 + -- [hunter *** DEBUG *** ...] HUNTER_TOOLCHAIN_ID_PATH: /.../_Base/86b1bc9/aa85dd8 .. code-block:: shell - > openssl sha1 /.../_Base/86b1bc9/cef4daf/aa85dd8/toolchain.info + > openssl sha1 /.../_Base/86b1bc9/aa85dd8/toolchain.info SHA1(toolchain.info)= aa85dd86f2feefe76397d7b624ccb6c09d971fe5 You can see that there is no ``aa85dd8`` entry in cache: @@ -159,7 +159,7 @@ Compare both files to figure out what's wrong: .. code-block:: shell - > diff hunter-cache/8928885/toolchain.info /.../_Base/86b1bc9/cef4daf/aa85dd8/toolchain.info + > diff hunter-cache/8928885/toolchain.info /.../_Base/86b1bc9/aa85dd8/toolchain.info ... < #define __GNUC_MINOR__ 8 < #define __GNUC_PATCHLEVEL__ 1 diff --git a/docs/overview/customization.rst b/docs/overview/customization.rst index a53f2d0362..9539f03e55 100644 --- a/docs/overview/customization.rst +++ b/docs/overview/customization.rst @@ -12,6 +12,6 @@ new build option to external package. :maxdepth: 1 Hunter-ID - Config-ID Toolchain-ID + Config-ID Build types diff --git a/docs/overview/customization/config-id.rst b/docs/overview/customization/config-id.rst index 243c59166d..fc1a6e90eb 100644 --- a/docs/overview/customization/config-id.rst +++ b/docs/overview/customization/config-id.rst @@ -10,8 +10,8 @@ Config-ID .. _config-id: -Second level of customization. Set version of package to build and build -options. +Third level of customization. Set version of package to build and +its build options. ``Config-ID`` is the first 7 digits of ``SHA1`` of the file with ``hunter_config`` commands (internal unified representation). This level can @@ -19,37 +19,37 @@ be customized with `HunterGate options`_: ``GLOBAL``, ``LOCAL`` and ``FILEPATH``. Packages from ``Hunter-ID 1eae623`` can be built using different versions and different CMake arguments: -+-------------------+ -| Hunter-ID 1eae623 | -+-------------------+ - -+-------------+----------------------------------------------------------------------+ -| Config-ID | | -+=============+===================+==================================================+ -| ``0fa873a`` | Working directory | ``${HUNTER_ROOT}/_Base/1eae623/0fa873a/...`` | -| +-------------------+---------+-----------+----------------------------+ -| | Packages | Name | Version | Options | -| | +---------+-----------+----------------------------+ -| | | ``Foo`` | ``1.0.0`` | | -| | +---------+-----------+----------------------------+ -| | | ``Boo`` | ``2.0.0`` | ``BOO_WITH_SOMETHING=YES`` | -+-------------+-------------------+---------+-----------+----------------------------+ -| ``e9da39c`` | Working directory | ``${HUNTER_ROOT}/_Base/1eae623/e9da39c/...`` | -| +-------------------+---------+-----------+----------------------------+ -| | Packages | Name | Version | Options | -| | +---------+-----------+----------------------------+ -| | | ``Foo`` | ``2.1.0`` | ``FOO_SUPER_MODE=YES`` | -| | +---------+-----------+----------------------------+ -| | | ``Boo`` | ``3.0.0`` | ``BUILD_SHARED_LIBS=ON`` | -+-------------+-------------------+---------+-----------+----------------------------+ ++-------------------+----------------------+ +| Hunter-ID 1eae623 | Toolchain-ID d46ea0b | ++-------------------+----------------------+ + ++-------------+--------------------------------------------------------------------------+ +| Config-ID | | ++=============+===================+======================================================+ +| ``0fa873a`` | Working directory | ``${HUNTER_ROOT}/_Base/1eae623/d46ea0b/0fa873a/...`` | +| +-------------------+---------+-----------+--------------------------------+ +| | Packages | Name | Version | Options | +| | +---------+-----------+--------------------------------+ +| | | ``Foo`` | ``1.0.0`` | | +| | +---------+-----------+--------------------------------+ +| | | ``Boo`` | ``2.0.0`` | ``BOO_WITH_SOMETHING=YES`` | ++-------------+-------------------+---------+-----------+--------------------------------+ +| ``e9da39c`` | Working directory | ``${HUNTER_ROOT}/_Base/1eae623/d46ea0b/e9da39c/...`` | +| +-------------------+---------+-----------+--------------------------------+ +| | Packages | Name | Version | Options | +| | +---------+-----------+--------------------------------+ +| | | ``Foo`` | ``2.1.0`` | ``FOO_SUPER_MODE=YES`` | +| | +---------+-----------+--------------------------------+ +| | | ``Boo`` | ``3.0.0`` | ``BUILD_SHARED_LIBS=ON`` | ++-------------+-------------------+---------+-----------+--------------------------------+ Message in logs: :: - -- [hunter] [ Hunter-ID: 1eae623 | Config-ID: 0fa873a | Toolchain-ID: ... ] - -- [hunter] [ Hunter-ID: 1eae623 | Config-ID: e9da39c | Toolchain-ID: ... ] + -- [hunter] [ Hunter-ID: 1eae623 | Config-ID: 0fa873a | Toolchain-ID: d46ea0b ] + -- [hunter] [ Hunter-ID: 1eae623 | Config-ID: e9da39c | Toolchain-ID: d46ea0b ] .. seealso:: diff --git a/docs/overview/customization/toolchain-id.rst b/docs/overview/customization/toolchain-id.rst index 942f58bc11..dffe1994a0 100644 --- a/docs/overview/customization/toolchain-id.rst +++ b/docs/overview/customization/toolchain-id.rst @@ -8,60 +8,60 @@ Toolchain-ID ------------ -Third level of customization. Compiler and flags. +Second level of customization. Compiler and flags. Each build can be run with different toolchains. In general the result is -completely different root ``lib``/``include`` directories. For example on +a completely different root directory (containing (``lib``/``include``). For example on Windows you can simultaneously build Visual Studio (32/64), NMake, Cygwin and MinGW projects, on Linux GCC/Clang, on Mac Xcode, Makefile, iOS. Or choose various clang tools like static analyzer/sanitizers and other platforms like -Android/Raspberry Pi. Each toolchain file will be forwarded to external project -so if you create toolchain with compiler ``g++`` and flag ``-std=c++11`` all +Android/Raspberry Pi. Each toolchain file will be forwarded to external project. +This means, if you create a toolchain with compiler ``g++`` and flag ``-std=c++11`` all dependent projects will be built by ``g++ -std=c++11``. Information about -toolchain has some internal representation (``toolchain.info``) and user can -see first 7 digits (ID) of ``SHA1`` hash of this file. +toolchain has some internal representation (``toolchain.info``). As identifier +(ID) the first 7 digits of the ``SHA1`` hash of this file are used. -Toolchain file is the only way to apply global settings for 3rd party projects +The toolchain file is the only way to apply global settings for 3rd party projects in Hunter. Only CMAKE_TOOLCHAIN_FILE will be forwarded for all packages, neither standard CMAKE_CXX_COMPILER/CMAKE_CXX_FLAGS nor custom variables like ANDROID_FOO=boo will be applied globally. First reason is the simplicity of forwarding logic, second reason is about distinguishing local and global -settings. E.g. if user want to set ``-Wall`` only for local project he can use -CMAKE_CXX_FLAGS. If user want to set ``-Wall`` globally then he can use +settings. E.g. if a user wants to set ``-Wall`` only for the local project he can use +CMAKE_CXX_FLAGS. If user wants to set ``-Wall`` globally then he can use CMAKE_TOOLCHAIN_FILE. -+-------------------+-------------------+ -| Hunter-ID 1eae623 | Config-ID 0fa873a | -+-------------------+-------------------+ ++-------------------+ +| Hunter-ID 1eae623 | ++-------------------+ +--------------+--------------------------------------------------------------------------+ | Toolchain-ID | | +==============+===================+======================================================+ -| ``d46ea0b`` | Working directory | ``${HUNTER_ROOT}/_Base/1eae623/0fa873a/d46ea0b/...`` | +| ``d46ea0b`` | Working directory | ``${HUNTER_ROOT}/_Base/1eae623/d46ea0b/...`` | | +-------------------+-------------------------------+----------------------+ | | | Compiler | Flags | | +-------------------+-------------------------------+----------------------+ | | | ``gcc`` | | +--------------+-------------------+-------------------------------+----------------------+ -| ``c018e63`` | Working directory | ``${HUNTER_ROOT}/_Base/1eae623/0fa873a/c018e63/...`` | +| ``c018e63`` | Working directory | ``${HUNTER_ROOT}/_Base/1eae623/c018e63/...`` | | +-------------------+-------------------------------+----------------------+ | | | Compiler | Flags | | +-------------------+-------------------------------+----------------------+ | | | ``clang`` | | +--------------+-------------------+-------------------------------+----------------------+ -| ``c39da39`` | Working directory | ``${HUNTER_ROOT}/_Base/1eae623/0fa873a/c39da39/...`` | +| ``c39da39`` | Working directory | ``${HUNTER_ROOT}/_Base/1eae623/c39da39/...`` | | +-------------------+-------------------------------+----------------------+ | | | Compiler | Flags | | +-------------------+-------------------------------+----------------------+ | | | ``clang`` | ``-std=c++11`` | +--------------+-------------------+-------------------------------+----------------------+ -| ``7450099`` | Working directory | ``${HUNTER_ROOT}/_Base/1eae623/0fa873a/7450099/...`` | +| ``7450099`` | Working directory | ``${HUNTER_ROOT}/_Base/1eae623/7450099/...`` | | +-------------------+-------------------------------+----------------------+ | | | Compiler | Flags | | +-------------------+-------------------------------+----------------------+ | | | ``arm-linux-androideabi-g++`` | ``-march=armv7-a`` | +--------------+-------------------+-------------------------------+----------------------+ -| ``2d935ea`` | Working directory | ``${HUNTER_ROOT}/_Base/1eae623/0fa873a/2d935ea/...`` | +| ``2d935ea`` | Working directory | ``${HUNTER_ROOT}/_Base/1eae623/2d935ea/...`` | | +-------------------+-------------------------------+----------------------+ | | | Compiler | Flags | | +-------------------+-------------------------------+----------------------+ @@ -74,9 +74,9 @@ Message in logs: .. code-block:: none - -- [hunter] [ Hunter-ID: 1eae623 | Config-ID: 0fa873a | Toolchain-ID: d46ea0b ] - -- [hunter] [ Hunter-ID: 1eae623 | Config-ID: 0fa873a | Toolchain-ID: c018e63 ] - -- [hunter] [ Hunter-ID: 1eae623 | Config-ID: 0fa873a | Toolchain-ID: c39da39 ] + -- [hunter] [ Hunter-ID: 1eae623 | Config-ID: ... | Toolchain-ID: d46ea0b ] + -- [hunter] [ Hunter-ID: 1eae623 | Config-ID: ... | Toolchain-ID: c018e63 ] + -- [hunter] [ Hunter-ID: 1eae623 | Config-ID: ... | Toolchain-ID: c39da39 ] .. admonition:: Examples on GitHub diff --git a/docs/reference/layouts/deployed.rst b/docs/reference/layouts/deployed.rst index f5aaf57f53..a967143677 100644 --- a/docs/reference/layouts/deployed.rst +++ b/docs/reference/layouts/deployed.rst @@ -68,16 +68,16 @@ for development. │ ├── cmake.lock │ ├── SHA1 # SHA1 of Hunter archive │ ├── DONE - │ └── / + │ └── / │ ├── cmake.lock - │ ├── SHA1 # SHA1 of 'config.cmake' + │ ├── SHA1 # SHA1 of 'toolchain.info' │ ├── DONE - │ ├── config.cmake # CMake file with unified hunter_config commands - │ └── / + │ ├── toolchain.info + │ └── / │ ├── cmake.lock - │ ├── SHA1 # SHA1 of 'toolchain.info' + │ ├── SHA1 # SHA1 of 'config.cmake' │ ├── DONE - │ ├── toolchain.info + │ ├── config.cmake # CMake file with unified hunter_config commands │ ├── cache.cmake │ ├── Install/ # Main directory with installed packages (global) │ │ ├── include/ @@ -120,9 +120,9 @@ Download ======== Directory for storing archives with sources. Sources will be unpacked to -``///Build//Source`` directory. +``///Build//Source`` directory. One exception is archives with Hunter itself since we have no information -about ``/`` part (we have to calculate them using +about ``/`` part (we have to calculate them using Hunter code). .. code-block:: none From 042e6f6414e24cf6d8516fc2d3e62749ba099492 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Tue, 8 Aug 2017 11:33:01 +0200 Subject: [PATCH 314/612] fix tests expecting TOOLCHAIN_ID_PATH as top dir - fix test create_dependency_entry - fix test create_deps_info - fix test get_package_deps - fix test get_package_deps_recurse - fix test register_dependency --- .../CMakeLists.txt | 14 +++++------ tests/hunter_create_deps_info/CMakeLists.txt | 24 +++++++++---------- tests/hunter_get_package_deps/CMakeLists.txt | 6 ++--- .../CMakeLists.txt | 24 +++++++++---------- .../hunter_register_dependency/CMakeLists.txt | 20 ++++++++-------- 5 files changed, 44 insertions(+), 44 deletions(-) diff --git a/tests/hunter_create_dependency_entry/CMakeLists.txt b/tests/hunter_create_dependency_entry/CMakeLists.txt index 27224f0344..2a7c4041eb 100644 --- a/tests/hunter_create_dependency_entry/CMakeLists.txt +++ b/tests/hunter_create_dependency_entry/CMakeLists.txt @@ -8,11 +8,11 @@ project(TestModuleHunterCreateDependencyEntry) include(hunter_create_dependency_entry) -set(toolchain_id "${CMAKE_CURRENT_BINARY_DIR}/toolchain-id") -set(HUNTER_TOOLCHAIN_ID_PATH "${toolchain_id}") +set(config_id "${CMAKE_CURRENT_BINARY_DIR}/config-id") +set(HUNTER_CONFIG_ID_PATH "${config_id}") ### No cache -file(REMOVE_RECURSE "${toolchain_id}") +file(REMOVE_RECURSE "${config_id}") hunter_create_dependency_entry(PACKAGE "Foo" COMPONENT "" RESULT result) if(NOT result STREQUAL "") @@ -20,9 +20,9 @@ if(NOT result STREQUAL "") endif() ### Cache for package -file(REMOVE_RECURSE "${toolchain_id}") +file(REMOVE_RECURSE "${config_id}") -set(foo_home "${toolchain_id}/Build/Foo") +set(foo_home "${config_id}/Build/Foo") file(WRITE "${foo_home}/cache.sha1" "Foo-SHA1") hunter_create_dependency_entry(PACKAGE "Foo" COMPONENT "" RESULT result) @@ -31,9 +31,9 @@ if(NOT result STREQUAL "Foo Foo-SHA1") endif() ### Cache for package with component -file(REMOVE_RECURSE "${toolchain_id}") +file(REMOVE_RECURSE "${config_id}") -set(foo_home "${toolchain_id}/Build/Foo/__Boo") +set(foo_home "${config_id}/Build/Foo/__Boo") file(WRITE "${foo_home}/cache.sha1" "Foo-Boo-SHA1") hunter_create_dependency_entry(PACKAGE "Foo" COMPONENT "Boo" RESULT result) diff --git a/tests/hunter_create_deps_info/CMakeLists.txt b/tests/hunter_create_deps_info/CMakeLists.txt index 85128e2699..18083a6106 100644 --- a/tests/hunter_create_deps_info/CMakeLists.txt +++ b/tests/hunter_create_deps_info/CMakeLists.txt @@ -25,14 +25,14 @@ function(run_check file1) endfunction() ### Test empty -set(toolchain_id "${CMAKE_CURRENT_BINARY_DIR}/toolchain-id") +set(config_id "${CMAKE_CURRENT_BINARY_DIR}/config-id") set(package_name "Foo") set(temp_deps_info "${CMAKE_CURRENT_BINARY_DIR}/deps.info-TEMP") -set(HUNTER_TOOLCHAIN_ID_PATH "${toolchain_id}") +set(HUNTER_CONFIG_ID_PATH "${config_id}") set(HUNTER_PACKAGE_NAME "${package_name}") -set(home "${toolchain_id}/Build/${package_name}") +set(home "${config_id}/Build/${package_name}") file(WRITE "${home}/cache.sha1" "abc") hunter_create_deps_info("${temp_deps_info}") @@ -40,19 +40,19 @@ run_check("${CMAKE_CURRENT_LIST_DIR}/empty.txt") ### Complex -file(REMOVE_RECURSE "${toolchain_id}") +file(REMOVE_RECURSE "${config_id}") set(package_name "J") set(HUNTER_PACKAGE_NAME "${package_name}") -file(WRITE "${toolchain_id}/Build/A/cache.sha1" "A-SHA1") -file(WRITE "${toolchain_id}/Build/B/cache.sha1" "B-SHA1") -file(WRITE "${toolchain_id}/Build/C/cache.sha1" "C-SHA1") -file(WRITE "${toolchain_id}/Build/D/__E/cache.sha1" "D-E-SHA1") -file(WRITE "${toolchain_id}/Build/F/__G/cache.sha1" "F-G-SHA1") -file(WRITE "${toolchain_id}/Build/H/cache.sha1" "H-SHA1") -file(WRITE "${toolchain_id}/Build/I/cache.sha1" "I-SHA1") -file(WRITE "${toolchain_id}/Build/J/cache.sha1" "J-SHA1") +file(WRITE "${config_id}/Build/A/cache.sha1" "A-SHA1") +file(WRITE "${config_id}/Build/B/cache.sha1" "B-SHA1") +file(WRITE "${config_id}/Build/C/cache.sha1" "C-SHA1") +file(WRITE "${config_id}/Build/D/__E/cache.sha1" "D-E-SHA1") +file(WRITE "${config_id}/Build/F/__G/cache.sha1" "F-G-SHA1") +file(WRITE "${config_id}/Build/H/cache.sha1" "H-SHA1") +file(WRITE "${config_id}/Build/I/cache.sha1" "I-SHA1") +file(WRITE "${config_id}/Build/J/cache.sha1" "J-SHA1") hunter_register_dependency( PACKAGE "J" diff --git a/tests/hunter_get_package_deps/CMakeLists.txt b/tests/hunter_get_package_deps/CMakeLists.txt index e006394624..0bad92935d 100644 --- a/tests/hunter_get_package_deps/CMakeLists.txt +++ b/tests/hunter_get_package_deps/CMakeLists.txt @@ -9,11 +9,11 @@ project(TestModuleHunterGetPackageDeps) include(hunter_get_package_deps) set(package_name "Foo") -set(toolchain_id "${CMAKE_CURRENT_BINARY_DIR}/toolchain-id") +set(config_id "${CMAKE_CURRENT_BINARY_DIR}/config-id") -set(HUNTER_TOOLCHAIN_ID_PATH "${toolchain_id}") +set(HUNTER_CONFIG_ID_PATH "${config_id}") -set(home_dir "${toolchain_id}/Build/${package_name}") +set(home_dir "${config_id}/Build/${package_name}") set(dependencies_dir "${home_dir}/Dependencies") function(cleanup) diff --git a/tests/hunter_get_package_deps_recurse/CMakeLists.txt b/tests/hunter_get_package_deps_recurse/CMakeLists.txt index 0afd19bb05..83291c52fb 100644 --- a/tests/hunter_get_package_deps_recurse/CMakeLists.txt +++ b/tests/hunter_get_package_deps_recurse/CMakeLists.txt @@ -9,18 +9,18 @@ project(TestModuleHunterGetPackageDepsRecurse) include(hunter_get_package_deps_recurse) include(hunter_register_dependency) -set(toolchain_id "${CMAKE_CURRENT_BINARY_DIR}/toolchain-id") - -set(HUNTER_TOOLCHAIN_ID_PATH "${toolchain_id}") - -file(MAKE_DIRECTORY "${toolchain_id}/Build/A") -file(MAKE_DIRECTORY "${toolchain_id}/Build/B") -file(MAKE_DIRECTORY "${toolchain_id}/Build/C") -file(MAKE_DIRECTORY "${toolchain_id}/Build/D/__E") -file(MAKE_DIRECTORY "${toolchain_id}/Build/F/__G") -file(MAKE_DIRECTORY "${toolchain_id}/Build/H") -file(MAKE_DIRECTORY "${toolchain_id}/Build/I") -file(MAKE_DIRECTORY "${toolchain_id}/Build/J") +set(config_id "${CMAKE_CURRENT_BINARY_DIR}/config-id") + +set(HUNTER_CONFIG_ID_PATH "${config_id}") + +file(MAKE_DIRECTORY "${config_id}/Build/A") +file(MAKE_DIRECTORY "${config_id}/Build/B") +file(MAKE_DIRECTORY "${config_id}/Build/C") +file(MAKE_DIRECTORY "${config_id}/Build/D/__E") +file(MAKE_DIRECTORY "${config_id}/Build/F/__G") +file(MAKE_DIRECTORY "${config_id}/Build/H") +file(MAKE_DIRECTORY "${config_id}/Build/I") +file(MAKE_DIRECTORY "${config_id}/Build/J") hunter_register_dependency( PACKAGE "J" diff --git a/tests/hunter_register_dependency/CMakeLists.txt b/tests/hunter_register_dependency/CMakeLists.txt index cca19d00c2..ec03f4558a 100644 --- a/tests/hunter_register_dependency/CMakeLists.txt +++ b/tests/hunter_register_dependency/CMakeLists.txt @@ -8,11 +8,11 @@ project(TestModuleHunterRegisterDependency) include(hunter_register_dependency) -set(toolchain_id "${CMAKE_CURRENT_BINARY_DIR}/toolchain-id") -set(HUNTER_TOOLCHAIN_ID_PATH "${toolchain_id}") +set(config_id "${CMAKE_CURRENT_BINARY_DIR}/config-id") +set(HUNTER_CONFIG_ID_PATH "${config_id}") -set(expected "${toolchain_id}/Build/Foo/Dependencies/Boo/__dep") -file(REMOVE_RECURSE "${toolchain_id}") +set(expected "${config_id}/Build/Foo/Dependencies/Boo/__dep") +file(REMOVE_RECURSE "${config_id}") if(EXISTS "${expected}") message(FATAL_ERROR "Exists") endif() @@ -25,8 +25,8 @@ if(NOT EXISTS "${expected}") message(FATAL_ERROR "Not exists") endif() -set(expected "${toolchain_id}/Build/Foo/__Boo/Dependencies/Bar/__dep") -file(REMOVE_RECURSE "${toolchain_id}") +set(expected "${config_id}/Build/Foo/__Boo/Dependencies/Bar/__dep") +file(REMOVE_RECURSE "${config_id}") if(EXISTS "${expected}") message(FATAL_ERROR "Exists") endif() @@ -39,8 +39,8 @@ if(NOT EXISTS "${expected}") message(FATAL_ERROR "Not exists") endif() -set(expected "${toolchain_id}/Build/Foo/Dependencies/Boo/Bar/__dep") -file(REMOVE_RECURSE "${toolchain_id}") +set(expected "${config_id}/Build/Foo/Dependencies/Boo/Bar/__dep") +file(REMOVE_RECURSE "${config_id}") if(EXISTS "${expected}") message(FATAL_ERROR "Exists") endif() @@ -53,8 +53,8 @@ if(NOT EXISTS "${expected}") message(FATAL_ERROR "Not exists") endif() -set(expected "${toolchain_id}/Build/Foo/__Boo/Dependencies/Bar/Baz/__dep") -file(REMOVE_RECURSE "${toolchain_id}") +set(expected "${config_id}/Build/Foo/__Boo/Dependencies/Bar/Baz/__dep") +file(REMOVE_RECURSE "${config_id}") if(EXISTS "${expected}") message(FATAL_ERROR "Exists") endif() From 1b5e9273dccd0924e3305291d1ac4cd5197c0131 Mon Sep 17 00:00:00 2001 From: rusdevops Date: Tue, 8 Aug 2017 12:58:12 +0300 Subject: [PATCH 315/612] updated WDC version --- cmake/configs/default.cmake | 2 +- cmake/projects/WDC/hunter.cmake | 7 +++++++ examples/WDC/init.cpp | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 605d7c075c..aaf3ad4fb2 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -114,7 +114,7 @@ hunter_config(TIFF VERSION 4.0.2-p3) hunter_config(tommath VERSION 1.0-p2) hunter_config(tomcrypt VERSION 1.17-p2) hunter_config(WTL VERSION 9.1.5321) -hunter_config(WDC VERSION 1.0.9) +hunter_config(WDC VERSION 1.1.0) hunter_config(Washer VERSION 0.1.2) hunter_config(WinSparkle VERSION 0.4.0) hunter_config(ZLIB VERSION 1.2.8-p3) diff --git a/cmake/projects/WDC/hunter.cmake b/cmake/projects/WDC/hunter.cmake index 2823fc42b7..cea45f1f25 100644 --- a/cmake/projects/WDC/hunter.cmake +++ b/cmake/projects/WDC/hunter.cmake @@ -6,6 +6,13 @@ include(hunter_cmake_args) include(hunter_download) include(hunter_pick_scheme) +hunter_add_version( + PACKAGE_NAME WDC + VERSION "1.1.0" + URL "https://github.com/CloudPolis/webdav-client-cpp/archive/v1.1.0.tar.gz" + SHA1 cc0923530fd1ce13fe927592bad3999db4f22d5e +) + hunter_add_version( PACKAGE_NAME WDC VERSION "1.0.9" diff --git a/examples/WDC/init.cpp b/examples/WDC/init.cpp index 6eabeff8f2..67e1cb8bed 100644 --- a/examples/WDC/init.cpp +++ b/examples/WDC/init.cpp @@ -42,7 +42,7 @@ int main() { }; for (auto options : various_options) { - std::unique_ptr client(WebDAV::Client::Init(options)); + std::unique_ptr client{ new WebDAV::Client{ options }}; bool is_connected = client->check(); std::cout << "Client with options: " << std::endl; std::cout << options_to_string(options); From cb59cc5221e9725e9f14d360b7f28d01c96035db Mon Sep 17 00:00:00 2001 From: shekharhimanshu Date: Tue, 16 May 2017 22:35:18 +0900 Subject: [PATCH 316/612] Bump PocoCpp to 1.7.8-p0 --- cmake/configs/default.cmake | 2 +- cmake/projects/PocoCpp/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 605d7c075c..2eac18f27d 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -95,7 +95,7 @@ else() hunter_config(OpenSSL VERSION 1.1.0f) endif() hunter_config(PNG VERSION 1.6.26-p1) -hunter_config(PocoCpp VERSION 1.7.6-p0) +hunter_config(PocoCpp VERSION 1.7.8-p0) hunter_config(PostgreSQL VERSION 9.6.3) hunter_config(Protobuf VERSION 3.0.0-p1) hunter_config(Qt VERSION 5.5.1-cvpixelbuffer-2-p9) diff --git a/cmake/projects/PocoCpp/hunter.cmake b/cmake/projects/PocoCpp/hunter.cmake index 136b69b6fb..e847256476 100644 --- a/cmake/projects/PocoCpp/hunter.cmake +++ b/cmake/projects/PocoCpp/hunter.cmake @@ -4,6 +4,17 @@ include(hunter_pick_scheme) include(hunter_cacheable) include(hunter_download) +hunter_add_version( + PACKAGE_NAME + PocoCpp + VERSION + 1.7.8-p0 + URL + "https://github.com/hunter-packages/poco/archive/v1.7.8-p0.zip" + SHA1 + 229dd0f6c3696c2ab0c7b4449b664a75c2211188 +) + hunter_add_version( PACKAGE_NAME PocoCpp From 2e7f3bd8f6b39621a8e21e568c5ce3b9a3749470 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Tue, 8 Aug 2017 14:37:33 +0200 Subject: [PATCH 317/612] add scripts to display hunter-module dependencies - scripts are in `maintenance/graphs` - scripts work with paths - scripts can be called from anywhere - create `_dot` and `_png` folders in working directory --- maintenance/graphs/module_dependencies2dot.sh | 154 ++++++++++++++++++ maintenance/graphs/modules2dot.sh | 116 +++++++++++++ 2 files changed, 270 insertions(+) create mode 100755 maintenance/graphs/module_dependencies2dot.sh create mode 100755 maintenance/graphs/modules2dot.sh diff --git a/maintenance/graphs/module_dependencies2dot.sh b/maintenance/graphs/module_dependencies2dot.sh new file mode 100755 index 0000000000..3e97db0f7a --- /dev/null +++ b/maintenance/graphs/module_dependencies2dot.sh @@ -0,0 +1,154 @@ +#!/bin/bash +set -e + +#################### +# global variables # +#################### + +# to keep the graph simple the following modules are omited +excluded_modules=( + hunter_status_print + hunter_status_debug + hunter_user_error + hunter_internal_error + hunter_fatal_error + hunter_wiki + hunter_test_string_not_empty +) + +# array of already processed modules +processed_modules=() + + +############# +# functions # +############# + +# function to print usage message +function print_usage() { + echo "Usage:" + echo "${1} module-file" + echo " module-file ... module file to parse (assumed to end with .cmake)" +} + + +# check if a given module is already processed +function is_processed_module { + local _mod="$1" + local is_processed=1 #false + for proc_mod in "${processed_modules[@]}" + do + #echo "compare ${proc_mod} with ${_mod}" + if [ "$proc_mod" == "${_mod}" ]; then + local is_processed=0 #true + break + fi + done + return $is_processed +} + +# check if a given module is one of the excluded ones +function is_excluded_module { + #return 1 + local _mod="$1" + local is_excluded=1 #false + for excluded in "${excluded_modules[@]}" + do + if [ "$excluded" == "${_mod}" ]; then + local is_excluded=0 #true + break + fi + done + return $is_excluded +} + +# recursively (DFS) print module dependencies +function print_dependencies { + local _mod="$1" + local _mod_dir="$2" + local _mod_file="${_mod_dir}/${_mod}.cmake" + #echo "processing: ${_mod}" + + # don't print excluded modules + if is_excluded_module ${_mod} ; then + return + fi + + # stop recursion if module was printed before + if is_processed_module ${_mod} ; then + return + fi + + # add current module to proccessed modules + processed_modules+=($_mod) + + # list of included hunter modules + local all_deps=$(awk -F'[()]' '/^include\(hunter_/ {print $2;}' "${_mod_file}") + + # print module dependencies + local dep_printed=false + for dep in ${all_deps[@]} + do + if ! is_excluded_module ${dep} ; then + echo " ${_mod} -> ${dep}" + local dep_printed=true + # recurse deeper + print_dependencies ${dep} "${_mod_dir}" + fi + done + # if module is a leaf (no dependencies) just print the node itself + if [ "${dep_printed}" = false ]; then + echo " ${_mod}" + fi +} + + +######## +# main # +######## + +# module file is mandatory +if [ -z "$1" ]; then + echo "argument error: module-file is mandatory!" + print_usage $0 + exit 1 +fi + +# modules dir +modules_dir=$(dirname "$1") +# module filename +root_module_file=$(basename "$1") + +# module to process +root_module="${root_module_file%.cmake}" + +# subdirectories to keep working dir clean +DOT_DIR="_dot" +PNG_DIR="_png" +# base name of files to create +dot_basename="dep_graph_${root_module}" +# name of dot-file to create +DOT_FILE="${DOT_DIR}/${dot_basename}.dot" +# name of png-file to create +PNG_FILE="${PNG_DIR}/${dot_basename}.png" + +# create subdirs if needed +if [ ! -d "${DOT_DIR}" ]; then + mkdir "${DOT_DIR}" +fi +if [ ! -d "${PNG_DIR}" ]; then + mkdir "${PNG_DIR}" +fi + +# process root module and print output into dot-file +( +echo "digraph dep_graph_${root_module} {" +print_dependencies ${root_module} "${modules_dir}" +echo "}" +) > "${DOT_FILE}" + +# convert created dot-file to png +echo "convert dotfile to png" +dot -Tpng ${DOT_FILE} -o ${PNG_FILE} +echo "done" + diff --git a/maintenance/graphs/modules2dot.sh b/maintenance/graphs/modules2dot.sh new file mode 100755 index 0000000000..de2dac34cc --- /dev/null +++ b/maintenance/graphs/modules2dot.sh @@ -0,0 +1,116 @@ +#!/bin/bash +set -e + +#################### +# global variables # +#################### + +# subdirectories to keep working dir clean +DOT_DIR="_dot" +PNG_DIR="_png" +# base name of files to create +dot_basename="modules" +# name of dot-file to create +DOT_FILE="${DOT_DIR}/${dot_basename}.dot" +# name of png-file to create +PNG_FILE="${PNG_DIR}/${dot_basename}.png" + +# to keep the graph simple the following modules are omited +excluded_modules=( + hunter_status_print + hunter_status_debug + hunter_user_error + hunter_internal_error + hunter_fatal_error + hunter_wiki + hunter_test_string_not_empty +) + + +############# +# functions # +############# + +# function to print usage message +function print_usage() { + echo "Usage:" + echo "${1} module-dir" + echo " module-dir ... path to folder which contains hunter module files (for example ../../cmake/modules)" +} + +# check if a given module is one of the excluded ones +function is_excluded_module { + #return 1 + local _mod="$1" + local is_excluded=1 #false + for excluded in "${excluded_modules[@]}" + do + if [ "$excluded" == "${_mod}" ]; then + local is_excluded=0 #true + break + fi + done + return $is_excluded +} + + +######## +# main # +######## + +# module directory is mandatory +if [ -z "$1" ]; then + echo "argument error: module-dir is mandatory!" + print_usage $0 + exit 1 +fi + +# modules dir +modules_dir="$1" + +# create subdirs if needed +if [ ! -d "${DOT_DIR}" ]; then + mkdir "${DOT_DIR}" +fi +if [ ! -d "${PNG_DIR}" ]; then + mkdir "${PNG_DIR}" +fi + +echo "digraph hunter_modules {" > ${DOT_FILE} +hunter_modules="${modules_dir}/hunter_*.cmake" +echo "expanding ${hunter_modules}" +for mod_file_full in $hunter_modules +do + # module filename + mod_file=$(basename "$mod_file_full") + # module name + module="${mod_file%.cmake}" + echo "process module: ${module}" + + # don't draw excluded modules + if is_excluded_module ${module} ; then + continue + fi + + # list of included hunter modules + all_deps=$(awk -F'[()]' '/^include\(hunter_/ {print $2;}' "${modules_dir}/${mod_file}") + + # print module dependencies + dep_printed=false + for dep in ${all_deps[@]} + do + if ! is_excluded_module ${dep} ; then + echo " ${module} -> ${dep}" >> "${DOT_FILE}" + dep_printed=true + fi + done + # if module has no dependencies just print the module itself + if [ "${dep_printed}" = false ]; then + echo " ${module}" >> "${DOT_FILE}" + fi +done +echo "}" >> ${DOT_FILE} + +echo "convert dotfile to png" +dot -Tpng ${DOT_FILE} -o ${PNG_FILE} +echo "done" From a4d2ebe9bdefc502d9308801298db107359c03ea Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Tue, 8 Aug 2017 17:02:52 +0200 Subject: [PATCH 318/612] set *_ID_PATH variables when gate_finished is set --- cmake/modules/hunter_apply_gate_settings.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmake/modules/hunter_apply_gate_settings.cmake b/cmake/modules/hunter_apply_gate_settings.cmake index bb5c86082d..ec8b770bcb 100644 --- a/cmake/modules/hunter_apply_gate_settings.cmake +++ b/cmake/modules/hunter_apply_gate_settings.cmake @@ -53,6 +53,16 @@ function(hunter_apply_gate_settings) if(gate_done) if(cache_init) + # set *_ID_PATH variables in parent scope + string(SUBSTRING "${HUNTER_SHA1}" 0 7 HUNTER_ID) + string(SUBSTRING "${HUNTER_CONFIG_SHA1}" 0 7 HUNTER_CONFIG_ID) + string(SUBSTRING "${HUNTER_TOOLCHAIN_SHA1}" 0 7 HUNTER_TOOLCHAIN_ID) + set(HUNTER_ID_PATH "${HUNTER_CACHED_ROOT}/_Base/${HUNTER_ID}") + set(HUNTER_TOOLCHAIN_ID_PATH "${HUNTER_ID_PATH}/${HUNTER_TOOLCHAIN_ID}") + set(HUNTER_CONFIG_ID_PATH "${HUNTER_TOOLCHAIN_ID_PATH}/${HUNTER_CONFIG_ID}") + set(HUNTER_ID_PATH "${HUNTER_ID_PATH}" PARENT_SCOPE) + set(HUNTER_TOOLCHAIN_ID_PATH "${HUNTER_TOOLCHAIN_ID_PATH}" PARENT_SCOPE) + set(HUNTER_CONFIG_ID_PATH "${HUNTER_CONFIG_ID_PATH}" PARENT_SCOPE) hunter_status_debug("Reuse cached values") return() endif() From 9967a1cc5be64eb8fbbb7365033b08199ce7bd93 Mon Sep 17 00:00:00 2001 From: dvirtz Date: Wed, 9 Aug 2017 09:38:38 +0300 Subject: [PATCH 319/612] set build type differently on single and multi configuration generators --- cmake/schemes/url_sha1_cmake.cmake.in | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cmake/schemes/url_sha1_cmake.cmake.in b/cmake/schemes/url_sha1_cmake.cmake.in index 762f324108..ea2f112fd0 100644 --- a/cmake/schemes/url_sha1_cmake.cmake.in +++ b/cmake/schemes/url_sha1_cmake.cmake.in @@ -97,6 +97,8 @@ else() set(make_args "") endif() +string(COMPARE EQUAL "${CMAKE_CFG_INTDIR}" "." is_single) + foreach(configuration @HUNTER_PACKAGE_CONFIGURATION_TYPES@) # All configurations use the same URL which will be downloaded only once # i.e. overhead only for unpacking archive + no files from the previous @@ -111,6 +113,12 @@ foreach(configuration @HUNTER_PACKAGE_CONFIGURATION_TYPES@) endif() set(current_project "@HUNTER_EP_NAME@-${configuration}") + + if(is_single) + set(build_type_opts "-DCMAKE_BUILD_TYPE=${configuration}") + else() + set(build_type_opts "-DCMAKE_CONFIGURATION_TYPES=${configuration}") + endif() ExternalProject_Add( "${current_project}" @@ -139,8 +147,7 @@ foreach(configuration @HUNTER_PACKAGE_CONFIGURATION_TYPES@) "-C@HUNTER_CACHE_FILE@" "-C@HUNTER_ARGS_FILE@" "-D${postfix_name}=${${postfix_name}}" - "-DCMAKE_BUILD_TYPE=${configuration}" - "-DCMAKE_CONFIGURATION_TYPES=${configuration}" + "${build_type_opts}" "-DCMAKE_INSTALL_PREFIX=@HUNTER_PACKAGE_INSTALL_PREFIX@" "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}" "${make_args}" From e02e10b04f8ad3af6d9b3f42c6966ee133e73dc7 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 9 Aug 2017 20:48:55 +0300 Subject: [PATCH 320/612] x11: produce x11Config.cmake --- cmake/projects/x11/hunter.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/projects/x11/hunter.cmake b/cmake/projects/x11/hunter.cmake index dbe5e9a778..1c62cd0f19 100644 --- a/cmake/projects/x11/hunter.cmake +++ b/cmake/projects/x11/hunter.cmake @@ -36,6 +36,7 @@ hunter_cmake_args( x11 CMAKE_ARGS # do not use double quotes on CMAKE_ARGS DEPENDS_ON_PACKAGES=${x11_dependencies} + PKGCONFIG_EXPORT_TARGETS=x11-xcb;x11 ) hunter_cacheable(x11) hunter_download( From 3bc6e2a77d4957e140864e28774382746e58a29a Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 9 Aug 2017 20:49:41 +0300 Subject: [PATCH 321/612] xau: produce xauConfig.cmake --- cmake/projects/xau/hunter.cmake | 1 + examples/xau/CMakeLists.txt | 4 ++++ examples/xau/foo.cpp | 2 ++ 3 files changed, 7 insertions(+) create mode 100644 examples/xau/foo.cpp diff --git a/cmake/projects/xau/hunter.cmake b/cmake/projects/xau/hunter.cmake index fdde98992c..086186200f 100644 --- a/cmake/projects/xau/hunter.cmake +++ b/cmake/projects/xau/hunter.cmake @@ -32,6 +32,7 @@ hunter_cmake_args( xau CMAKE_ARGS # do not use double quotes on CMAKE_ARGS DEPENDS_ON_PACKAGES=${xau_dependencies} + PKGCONFIG_EXPORT_TARGETS=xau ) hunter_cacheable(xau) hunter_download( diff --git a/examples/xau/CMakeLists.txt b/examples/xau/CMakeLists.txt index 130b0af28d..fc415064d1 100644 --- a/examples/xau/CMakeLists.txt +++ b/examples/xau/CMakeLists.txt @@ -11,3 +11,7 @@ project(download-xau) # download xau hunter_add_package(xau) +find_package(xau CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo PUBLIC PkgConfig::xau) diff --git a/examples/xau/foo.cpp b/examples/xau/foo.cpp new file mode 100644 index 0000000000..b2f997621b --- /dev/null +++ b/examples/xau/foo.cpp @@ -0,0 +1,2 @@ +int main() { +} From ac81192c84659b89a2c8aee4f01d57b651f2b8ba Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 9 Aug 2017 20:50:16 +0300 Subject: [PATCH 322/612] xcb: produce xcbConfig.cmake --- cmake/projects/xcb/hunter.cmake | 2 +- cmake/projects/xcb/schemes/xcb.cmake.in | 7 +++++++ examples/xcb/CMakeLists.txt | 4 ++++ examples/xcb/foo.cpp | 2 ++ scripts/pkgconfig-xcb-export-targets.cmake.in | 19 +++++++++++++++++++ 5 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 examples/xcb/foo.cpp create mode 100644 scripts/pkgconfig-xcb-export-targets.cmake.in diff --git a/cmake/projects/xcb/hunter.cmake b/cmake/projects/xcb/hunter.cmake index f139840b55..4850f50efd 100644 --- a/cmake/projects/xcb/hunter.cmake +++ b/cmake/projects/xcb/hunter.cmake @@ -46,6 +46,6 @@ hunter_pick_scheme(DEFAULT xcb) hunter_cacheable(xcb) hunter_download( PACKAGE_NAME xcb - PACKAGE_INTERNAL_DEPS_ID "2" + PACKAGE_INTERNAL_DEPS_ID "3" PACKAGE_UNRELOCATABLE_TEXT_FILES "${_xcb_text_files}" ) diff --git a/cmake/projects/xcb/schemes/xcb.cmake.in b/cmake/projects/xcb/schemes/xcb.cmake.in index 654dc62e01..6d83daf1d7 100644 --- a/cmake/projects/xcb/schemes/xcb.cmake.in +++ b/cmake/projects/xcb/schemes/xcb.cmake.in @@ -31,6 +31,7 @@ hunter_test_string_not_empty("@HUNTER_PACKAGE_SOURCE_DIR@") hunter_test_string_not_empty("@HUNTER_PACKAGE_BUILD_DIR@") hunter_test_string_not_empty("@HUNTER_PACKAGE_INSTALL_PREFIX@") hunter_test_string_not_empty("@HUNTER_INSTALL_PREFIX@") +hunter_test_string_not_empty("@HUNTER_GLOBAL_SCRIPT_DIR@") hunter_autotools_project( "@HUNTER_EP_NAME@" @@ -58,3 +59,9 @@ hunter_autotools_project( --without-doxygen --disable-devel-docs ) + +set(PKG_CONFIG_MODULE xcb) +configure_file( + "@HUNTER_GLOBAL_SCRIPT_DIR@/pkgconfig-xcb-export-targets.cmake.in" + "@HUNTER_PACKAGE_INSTALL_PREFIX@/lib/cmake/${PKG_CONFIG_MODULE}/${PKG_CONFIG_MODULE}Config.cmake" +) diff --git a/examples/xcb/CMakeLists.txt b/examples/xcb/CMakeLists.txt index 9d3913e0ac..4626e499b5 100644 --- a/examples/xcb/CMakeLists.txt +++ b/examples/xcb/CMakeLists.txt @@ -11,3 +11,7 @@ project(download-xcb) # download xcb hunter_add_package(xcb) +find_package(xcb CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo PUBLIC PkgConfig::xcb) diff --git a/examples/xcb/foo.cpp b/examples/xcb/foo.cpp new file mode 100644 index 0000000000..b2f997621b --- /dev/null +++ b/examples/xcb/foo.cpp @@ -0,0 +1,2 @@ +int main() { +} diff --git a/scripts/pkgconfig-xcb-export-targets.cmake.in b/scripts/pkgconfig-xcb-export-targets.cmake.in new file mode 100644 index 0000000000..fc3de16a2e --- /dev/null +++ b/scripts/pkgconfig-xcb-export-targets.cmake.in @@ -0,0 +1,19 @@ +# ---------------------------------------------------------------------- +# Auto creation of CMake targets from pkg-config +# +# Copyright (C) 2017 Alexandre Pretyman. All rights reserved. +# +# ---------------------------------------------------------------------- + +include(hunter_pkgconfig_export_target) + +hunter_pkgconfig_export_target(xcb) + +find_package(xau CONFIG REQUIRED) +set_property( + TARGET + PkgConfig::xcb + APPEND + PROPERTY + INTERFACE_LINK_LIBRARIES PkgConfig::xau +) From 21613c1c5c28979f8daec6624fb0d9d87131f288 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 9 Aug 2017 20:52:55 +0300 Subject: [PATCH 323/612] qt-widgets: Fix cyclic dependency --- examples/qt-widgets/CMakeLists.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/examples/qt-widgets/CMakeLists.txt b/examples/qt-widgets/CMakeLists.txt index 310c0788bc..fea457ace0 100644 --- a/examples/qt-widgets/CMakeLists.txt +++ b/examples/qt-widgets/CMakeLists.txt @@ -38,3 +38,28 @@ if(APPLE) find_package(Qt5PrintSupport REQUIRED) target_link_libraries(helloworld Qt5::PrintSupport) endif() + +set(fix_cyclic FALSE) +if(APPLE) + set(fix_cyclic FALSE) +elseif(CMAKE_COMPILER_IS_GNUCXX) + # MinGW included + set(fix_cyclic TRUE) +elseif(NOT UNIX) + set(fix_cyclic FALSE) +elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + # Linux Clang + set(fix_cyclic TRUE) +endif() + +# Workaround for Linux's linker problems (*_MULTIPLICITY doesn't help, TODO) -- +if(fix_cyclic) + string( + REPLACE + "" + " -Wl,--start-group -Wl,--end-group " + CMAKE_CXX_LINK_EXECUTABLE + "${CMAKE_CXX_LINK_EXECUTABLE}" + ) +endif() +# -- From 1fb740666d81ea831be655f51eff806297cdce9c Mon Sep 17 00:00:00 2001 From: dvirtz Date: Tue, 8 Aug 2017 09:29:42 +0300 Subject: [PATCH 324/612] add LLVM 4.0.1 --- cmake/configs/default.cmake | 8 ++++---- cmake/projects/Clang/hunter.cmake | 11 +++++++++++ cmake/projects/ClangToolsExtra/hunter.cmake | 11 +++++++++++ cmake/projects/LLVM/hunter.cmake | 13 ++++++++++++- cmake/projects/LLVMCompilerRT/hunter.cmake | 11 +++++++++++ 5 files changed, 49 insertions(+), 5 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 6426ecad7e..c05f028240 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -46,8 +46,8 @@ hunter_config(BoostProcess VERSION 0.5) hunter_config(CapnProto VERSION 0.6.1) hunter_config(CLAPACK VERSION 3.2.1) hunter_config(CURL VERSION 7.49.1-DEV-v5) -hunter_config(Clang VERSION 3.6.2-p0) -hunter_config(ClangToolsExtra VERSION 3.6.2) # Clang +hunter_config(Clang VERSION 4.0.1-p0) +hunter_config(ClangToolsExtra VERSION 4.0.1) # Clang hunter_config(Comet VERSION 4.0.2) hunter_config(CppNetlib VERSION 0.10.1-hunter-3) hunter_config(CppNetlibUri VERSION 1.0.4-hunter) @@ -71,8 +71,8 @@ else() hunter_config(jsoncpp VERSION 1.8.0) endif() hunter_config(LAPACK VERSION 3.7.1) -hunter_config(LLVM VERSION 3.6.2-p0) # Clang -hunter_config(LLVMCompilerRT VERSION 3.6.0) # Clang +hunter_config(LLVM VERSION 4.0.1-p0) # Clang +hunter_config(LLVMCompilerRT VERSION 4.0.1-patched) # Clang hunter_config(Leathers VERSION 0.1.6) hunter_config(Leptonica VERSION 1.74.2-p4) hunter_config(Libcxx VERSION 3.6.2) # Clang diff --git a/cmake/projects/Clang/hunter.cmake b/cmake/projects/Clang/hunter.cmake index 4c85e65c8a..5f78e87363 100644 --- a/cmake/projects/Clang/hunter.cmake +++ b/cmake/projects/Clang/hunter.cmake @@ -7,6 +7,17 @@ include(hunter_add_version) include(hunter_download) include(hunter_pick_scheme) +hunter_add_version( + PACKAGE_NAME + Clang + VERSION + "4.0.1-p0" + URL + "https://github.com/hunter-packages/clang/archive/v4.0.1-p0.tar.gz" + SHA1 + cc2e74c852f57c946a4337812c73ce1bc97d639f +) + hunter_add_version( PACKAGE_NAME Clang diff --git a/cmake/projects/ClangToolsExtra/hunter.cmake b/cmake/projects/ClangToolsExtra/hunter.cmake index ff4544e3f2..353eeb9a6d 100644 --- a/cmake/projects/ClangToolsExtra/hunter.cmake +++ b/cmake/projects/ClangToolsExtra/hunter.cmake @@ -7,6 +7,17 @@ include(hunter_add_version) include(hunter_download) include(hunter_pick_scheme) +hunter_add_version( + PACKAGE_NAME + ClangToolsExtra + VERSION + "4.0.1" + URL + "http://llvm.org/releases/4.0.1/clang-tools-extra-4.0.1.src.tar.xz" + SHA1 + 414ccbadc4ba0658b34421a3855784af4e767796 +) + hunter_add_version( PACKAGE_NAME ClangToolsExtra diff --git a/cmake/projects/LLVM/hunter.cmake b/cmake/projects/LLVM/hunter.cmake index 8d91895e9b..9dbf7ad16a 100644 --- a/cmake/projects/LLVM/hunter.cmake +++ b/cmake/projects/LLVM/hunter.cmake @@ -11,6 +11,17 @@ include(hunter_download) include(hunter_pick_scheme) include(hunter_report_broken_package) +hunter_add_version( + PACKAGE_NAME + LLVM + VERSION + "4.0.1-p0" + URL + "https://github.com/hunter-packages/llvm/archive/v4.0.1-p0.tar.gz" + SHA1 + fd70af82551d3a693c4270d71e994b810f33f593 +) + hunter_add_version( PACKAGE_NAME LLVM @@ -77,7 +88,7 @@ hunter_cmake_args( hunter_configuration_types(LLVM CONFIGURATION_TYPES Release) hunter_pick_scheme(DEFAULT url_sha1_cmake) -if(MSVC_IDE) +if(MSVC_IDE AND HUNTER_LLVM_VERSION VERSION_LESS 4.0.1) hunter_report_broken_package( "LLVM build broken on Visual Studio, see:" "http://llvm.1065342.n5.nabble.com/Install-Problem-of-Compiler-rt-with-Visual-Studio-Express-2013-for-Windows-Desktop-td66575.html" diff --git a/cmake/projects/LLVMCompilerRT/hunter.cmake b/cmake/projects/LLVMCompilerRT/hunter.cmake index dd751ccf29..b98c003c68 100644 --- a/cmake/projects/LLVMCompilerRT/hunter.cmake +++ b/cmake/projects/LLVMCompilerRT/hunter.cmake @@ -7,6 +7,17 @@ include(hunter_add_version) include(hunter_download) include(hunter_pick_scheme) +hunter_add_version( + PACKAGE_NAME + LLVMCompilerRT + VERSION + "4.0.1-patched" + URL + "https://github.com/hunter-packages/LLVMCompilerRT/archive/v4.0.1-p0.tar.gz" + SHA1 + 561c29f1595c29f1d083567a7e669fec30cdfa44 +) + hunter_add_version( PACKAGE_NAME LLVMCompilerRT From 221bf7fd0c83714be871c45aef39af0953ac770d Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 9 Aug 2017 22:18:46 +0300 Subject: [PATCH 325/612] nlohmann_json 2.1.1-p1 --- cmake/configs/default.cmake | 2 +- cmake/projects/nlohmann_json/hunter.cmake | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 6426ecad7e..bfa1f72667 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -186,7 +186,7 @@ hunter_config(mpark_variant VERSION 1.0.0) hunter_config(msgpack VERSION 1.4.1-p2) hunter_config(mtplz VERSION 0.1-p3) hunter_config(nanoflann VERSION 1.2.3-p0) -hunter_config(nlohmann_json VERSION 2.1.1-p0) +hunter_config(nlohmann_json VERSION 2.1.1-p1) hunter_config(odb VERSION 2.4.0) hunter_config(odb-boost VERSION 2.4.0) hunter_config(odb-compiler VERSION 2.4.0) diff --git a/cmake/projects/nlohmann_json/hunter.cmake b/cmake/projects/nlohmann_json/hunter.cmake index 61ca93f6fb..2d67fc7c85 100644 --- a/cmake/projects/nlohmann_json/hunter.cmake +++ b/cmake/projects/nlohmann_json/hunter.cmake @@ -13,6 +13,13 @@ hunter_add_version( SHA1 baf11b83387a7c4b2b6eb1e280f69084185813c0 ) +hunter_add_version( + PACKAGE_NAME nlohmann_json + VERSION "2.1.1-p1" + URL "https://github.com/hunter-packages/json/archive/v2.1.1-p1.tar.gz" + SHA1 28ec11ef2596d38a11a2f4b3dfd63c3255c76f57 +) + hunter_cmake_args(nlohmann_json CMAKE_ARGS JSON_BuildTests=OFF) hunter_pick_scheme(DEFAULT url_sha1_cmake) From d5f0a3ecf6cdab4f4fd28f4ab0f190c402d73b33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 9 Aug 2017 21:54:25 +0200 Subject: [PATCH 326/612] Add Snappy package --- cmake/configs/default.cmake | 1 + cmake/projects/Snappy/hunter.cmake | 31 ++++++++++++++++++++++++++++++ examples/Snappy/CMakeLists.txt | 13 +++++++++++++ examples/Snappy/main.cpp | 15 +++++++++++++++ 4 files changed, 60 insertions(+) create mode 100644 cmake/projects/Snappy/hunter.cmake create mode 100644 examples/Snappy/CMakeLists.txt create mode 100644 examples/Snappy/main.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 6426ecad7e..c54184a9cc 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -206,6 +206,7 @@ hunter_config(rabbitmq-c VERSION 0.7.0-p1) hunter_config(randrproto VERSION 1.3.2) hunter_config(renderproto VERSION 0.11.1) hunter_config(sm VERSION 1.2.1) +hunter_config(Snappy VERSION 1.1.6-p0) hunter_config(sse2neon VERSION 1.0.0-p0) hunter_config(sparsehash VERSION 2.0.2) if(MSVC_VERSION LESS 1800) diff --git a/cmake/projects/Snappy/hunter.cmake b/cmake/projects/Snappy/hunter.cmake new file mode 100644 index 0000000000..2a16e5a471 --- /dev/null +++ b/cmake/projects/Snappy/hunter.cmake @@ -0,0 +1,31 @@ +# Copyright (c) 2017, Pawel Bylica +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + Snappy + VERSION + 1.1.6-p0 + URL + "https://github.com/google/snappy/archive/77c12adc192ac6620a0f0d340c99149ec56a97a3.tar.gz" + SHA1 + 5f26e7130061e41faa0b7d500a132d8c08a92a48 +) + +hunter_cmake_args( + Snappy + CMAKE_ARGS + SNAPPY_BUILD_TESTS=OFF +) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(Snappy) +hunter_download(PACKAGE_NAME Snappy) diff --git a/examples/Snappy/CMakeLists.txt b/examples/Snappy/CMakeLists.txt new file mode 100644 index 0000000000..a56f6fe8b2 --- /dev/null +++ b/examples/Snappy/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.2) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-snappy) + +hunter_add_package(Snappy) +find_package(Snappy CONFIG REQUIRED) + +add_executable(snappy_compress_test main.cpp) +target_link_libraries(snappy_compress_test Snappy::snappy) diff --git a/examples/Snappy/main.cpp b/examples/Snappy/main.cpp new file mode 100644 index 0000000000..97e33b5051 --- /dev/null +++ b/examples/Snappy/main.cpp @@ -0,0 +1,15 @@ +#include + +int main() +{ + const char input[] = "Hunter is great!"; + std::string output; + size_t size = snappy::Compress(input, sizeof(input), &output); + if (size == 0) + return 2; + + if (!snappy::IsValidCompressedBuffer(output.data(), output.size())) + return 1; + + return 0; +} From 620d7c50f69dbcdef8677290cbdb3999f0f9798b Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 10 Aug 2017 15:20:16 +0300 Subject: [PATCH 327/612] Windows LLVM upload script [skip ci] --- .../local-upload/llvm/win/run-win-vs-14-2015-sdk-8-1.bat | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 maintenance/local-upload/llvm/win/run-win-vs-14-2015-sdk-8-1.bat diff --git a/maintenance/local-upload/llvm/win/run-win-vs-14-2015-sdk-8-1.bat b/maintenance/local-upload/llvm/win/run-win-vs-14-2015-sdk-8-1.bat new file mode 100644 index 0000000000..9e38d635bb --- /dev/null +++ b/maintenance/local-upload/llvm/win/run-win-vs-14-2015-sdk-8-1.bat @@ -0,0 +1,5 @@ +REM { +set TOOLCHAIN=vs-14-2015-sdk-8-1 +set PROJECT_DIR=examples/LLVM +.\jenkins.py --verbose --upload --clear-except-download || exit /b 1 +REM } From 6d052758ef54e2efaece55bcbc588afd72cd9df0 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Thu, 10 Aug 2017 16:31:02 +0200 Subject: [PATCH 328/612] fix pack_git_submodule with subdir - `git archive HEAD:subdir -o archive.tar.gz` creates a different archive (different SHA1) each time - calling `git archive HEAD -o archive.tar.gz` with the right working directory produces the same archive (same SHA1) each time --- cmake/modules/hunter_pack_git_submodule.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/modules/hunter_pack_git_submodule.cmake b/cmake/modules/hunter_pack_git_submodule.cmake index 841e4607ee..602b477f57 100644 --- a/cmake/modules/hunter_pack_git_submodule.cmake +++ b/cmake/modules/hunter_pack_git_submodule.cmake @@ -201,13 +201,13 @@ function(hunter_pack_git_submodule) set(source_flag) else() hunter_status_debug("SUBMODULE_SOURCE_SUBDIR specified, only archive subfolder: ${x_SUBMODULE_SOURCE_SUBDIR}") - set(source_flag ":${x_SUBMODULE_SOURCE_SUBDIR}") + set(source_flag "/${x_SUBMODULE_SOURCE_SUBDIR}") endif() - set(cmd "${GIT_EXECUTABLE}" archive HEAD${source_flag} -o "${archive}") + set(cmd "${GIT_EXECUTABLE}" archive HEAD -o "${archive}") execute_process( COMMAND ${cmd} - WORKING_DIRECTORY "${submodule_dir}" + WORKING_DIRECTORY "${submodule_dir}${source_flag}" RESULT_VARIABLE result OUTPUT_VARIABLE output ERROR_VARIABLE error From 2ffde7309804c581d83fb87193828fb1248597cf Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 10 Aug 2017 18:47:28 +0300 Subject: [PATCH 329/612] LLVM upload script for Linux [skip ci] --- maintenance/local-upload/llvm/linux/gcc.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 maintenance/local-upload/llvm/linux/gcc.sh diff --git a/maintenance/local-upload/llvm/linux/gcc.sh b/maintenance/local-upload/llvm/linux/gcc.sh new file mode 100755 index 0000000000..e6b53caaf0 --- /dev/null +++ b/maintenance/local-upload/llvm/linux/gcc.sh @@ -0,0 +1,18 @@ +#!/bin/bash -e + +set -x + +[ "${GITHUB_USER_PASSWORD}" = "" ] && { echo "GITHUB_USER_PASSWORD is not set"; exit 1; } + +export GITHUB_USER_PASSWORD + +THIS_SCRIPT_DIR=`dirname "${BASH_SOURCE[0]}"` + +cd "${THIS_SCRIPT_DIR}/../../../.." + +# { +export TOOLCHAIN=gcc +PROJECT_DIR=examples/LLVM ./jenkins.py --verbose --clear-except-download --upload +# } + +echo "Done" From 0b875a1dc2695d5f1240e946b9ee06ddf5b8114c Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 10 Aug 2017 23:33:58 +0300 Subject: [PATCH 330/612] Qt build directory based on HUNTER_CONFIG_ID_PATH --- cmake/projects/Qt/schemes/url_sha1_qt.cmake.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/projects/Qt/schemes/url_sha1_qt.cmake.in b/cmake/projects/Qt/schemes/url_sha1_qt.cmake.in index 45208f7455..39cd98c810 100644 --- a/cmake/projects/Qt/schemes/url_sha1_qt.cmake.in +++ b/cmake/projects/Qt/schemes/url_sha1_qt.cmake.in @@ -24,7 +24,7 @@ hunter_test_string_not_empty("@HUNTER_PACKAGE_COMPONENT@") hunter_test_string_not_empty("@HUNTER_PACKAGE_DOWNLOAD_DIR@") hunter_test_string_not_empty("@HUNTER_PACKAGE_BUILD_DIR@") hunter_test_string_not_empty("@HUNTER_PACKAGE_CONFIGURATION_TYPES@") -hunter_test_string_not_empty("@HUNTER_TOOLCHAIN_ID_PATH@") +hunter_test_string_not_empty("@HUNTER_CONFIG_ID_PATH@") hunter_test_string_not_empty("@HUNTER_INSTALL_PREFIX@") hunter_test_string_not_empty("@HUNTER_PACKAGE_INSTALL_PREFIX@") hunter_test_string_not_empty("@HUNTER_PACKAGE_LICENSE_DIR@") @@ -316,7 +316,7 @@ endif() # lose some extra HDD space. Example: Qt base + 2 components + sources ~ 4.4G set( qt_source_dir - "@HUNTER_TOOLCHAIN_ID_PATH@/QtBuild/@HUNTER_PACKAGE_INTERNAL_DEPS_ID@" + "@HUNTER_CONFIG_ID_PATH@/QtBuild/@HUNTER_PACKAGE_INTERNAL_DEPS_ID@" ) # We are building only one component "qt_component". To skip all other From 1a2b1c05002e18e251b066d2768d7efa5719f88d Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 10 Aug 2017 23:48:13 +0300 Subject: [PATCH 331/612] Change print order of IDs --- cmake/modules/hunter_finalize.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/modules/hunter_finalize.cmake b/cmake/modules/hunter_finalize.cmake index e28b13a5dd..20d15aed02 100644 --- a/cmake/modules/hunter_finalize.cmake +++ b/cmake/modules/hunter_finalize.cmake @@ -97,8 +97,8 @@ macro(hunter_finalize) ) set(_id_info "[ Hunter-ID: ${HUNTER_ID} |") - set(_id_info "${_id_info} Config-ID: ${HUNTER_CONFIG_ID} |") - set(_id_info "${_id_info} Toolchain-ID: ${HUNTER_TOOLCHAIN_ID} ]") + set(_id_info "${_id_info} Toolchain-ID: ${HUNTER_TOOLCHAIN_ID} |") + set(_id_info "${_id_info} Config-ID: ${HUNTER_CONFIG_ID} ]") hunter_status_print("${_id_info}") From f8de23500af59cbc657092df4648f97b8ef494d6 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 11 Aug 2017 00:05:19 +0300 Subject: [PATCH 332/612] Docs: change order of IDs --- docs/creating-new/cmake.rst | 10 +++++----- docs/overview/customization/config-id.rst | 6 +++--- docs/overview/customization/hunter-id.rst | 6 +++--- docs/overview/customization/toolchain-id.rst | 6 +++--- docs/reference/user-modules/hunter_cacheable.rst | 4 ++-- docs/user-guides/hunter-user/git-submodule.rst | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/creating-new/cmake.rst b/docs/creating-new/cmake.rst index ece72dcfac..f3379c9f60 100644 --- a/docs/creating-new/cmake.rst +++ b/docs/creating-new/cmake.rst @@ -213,13 +213,13 @@ Test Let's test it (see `how to do it nicely `__): -.. code-block:: bash +.. code-block:: none > cmake -H. -B_builds -- [hunter] HUNTER_ROOT: /.../Hunter - -- [hunter] [ Hunter-ID: 7912489 | Config-ID: f1ec619 | Toolchain-ID: f8714ae ] + -- [hunter] [ Hunter-ID: 7912489 | Toolchain-ID: f8714ae | Config-ID: f1ec619 ] ... - -- [hunter] EXAMPLE_ROOT: /.../Hunter/_Base/7912489/f1ec619/f8714ae/Install (ver.: 1.0.1) + -- [hunter] EXAMPLE_ROOT: /.../Hunter/_Base/7912489/f8714ae/f1ec619/Install (ver.: 1.0.1) -- [hunter] Building Example ... -- downloading... @@ -231,8 +231,8 @@ Let's test it (see `how to do it nicely //`` directory can be +Usually each root ``//`` directory can be shared between unlimited number of projects but need to build from scratch every time. Binary cache allow to save builds in cache directory and share this -cache between several ``//`` roots. Note +cache between several ``//`` roots. Note that all dependencies of this package and the package itself must be `relocatable `__. diff --git a/docs/user-guides/hunter-user/git-submodule.rst b/docs/user-guides/hunter-user/git-submodule.rst index b69ee75eb4..c1da893e6c 100644 --- a/docs/user-guides/hunter-user/git-submodule.rst +++ b/docs/user-guides/hunter-user/git-submodule.rst @@ -204,7 +204,7 @@ Config-ID is ``f743b0b``: timeout='none' -- Using src='https://github.com/hunter-packages/zlib/archive/v1.2.8-p3.tar.gz' ... - /usr/bin/cc ... -isystem ~/.hunter/_Base/3b39eff/f743b0b/e1266bb/Install/include ... /.../tif_zip.c + /usr/bin/cc ... -isystem ~/.hunter/_Base/3b39eff/e1266bb/f743b0b/Install/include ... /.../tif_zip.c Now let's add ``LOCAL`` back and run build again: @@ -252,7 +252,7 @@ And **rebuilding** TIFF with newly installed ZLIB, Config-ID changed from .. code-block:: none - /usr/bin/cc ... -isystem ~/.hunter/_Base/3b39eff/817c9cb/e1266bb/Install/include ... /.../tif_zip.c + /usr/bin/cc ... -isystem ~/.hunter/_Base/3b39eff/e1266bb/817c9cb/Install/include ... /.../tif_zip.c To achieve the same with ``add_subdirectory`` you have to clone TIFF package too. Then you have to be sure that TIFF supports external ZLIB targets configuration, From 9fbb07f07b8bd28a079a954fb9c0af37079d479b Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 11 Aug 2017 15:00:35 +0300 Subject: [PATCH 333/612] LLVM upload script (OSX) [skip ci] --- .../llvm/osx/run-osx-10-11-make.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 maintenance/local-upload/llvm/osx/run-osx-10-11-make.sh diff --git a/maintenance/local-upload/llvm/osx/run-osx-10-11-make.sh b/maintenance/local-upload/llvm/osx/run-osx-10-11-make.sh new file mode 100755 index 0000000000..419ed0ef5d --- /dev/null +++ b/maintenance/local-upload/llvm/osx/run-osx-10-11-make.sh @@ -0,0 +1,18 @@ +#!/bin/bash -e + +set -x + +[ "${GITHUB_USER_PASSWORD}" = "" ] && { echo "GITHUB_USER_PASSWORD is not set"; exit 1; } + +export GITHUB_USER_PASSWORD + +THIS_SCRIPT_DIR=`dirname "${BASH_SOURCE[0]}"` + +cd "${THIS_SCRIPT_DIR}/../../../.." + +# { +export TOOLCHAIN=osx-10-11-make # same as 'libcxx' on Travis +PROJECT_DIR=examples/LLVM ./jenkins.py --verbose --clear-except-download --upload +# } + +echo "Done" From bd84b0b74dd0b661aa4caa3a9ee17d4206387327 Mon Sep 17 00:00:00 2001 From: Ihar Kliashchou Date: Sat, 12 Aug 2017 13:42:04 +0300 Subject: [PATCH 334/612] OpenCV-Extra: 3.2.0 + examples --- cmake/configs/default.cmake | 2 +- cmake/projects/OpenCV-Extra/hunter.cmake | 23 +++++++++++++++++++++ examples/OpenCV-extra/CMakeLists.txt | 20 ++++++++++++++++++ examples/OpenCV-extra/config.cmake | 9 ++++++++ examples/OpenCV-extra/foo.cpp | 26 ++++++++++++++++++++++++ 5 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 examples/OpenCV-extra/CMakeLists.txt create mode 100644 examples/OpenCV-extra/config.cmake create mode 100644 examples/OpenCV-extra/foo.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index bfa1f72667..45056c2452 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -86,7 +86,7 @@ hunter_config(OpenBLAS VERSION 0.2.20-p0) hunter_config(OpenCL VERSION 2.1-p3) hunter_config(OpenCL-cpp VERSION 2.0.10-p0) hunter_config(OpenCV VERSION 3.2.0-p2) -hunter_config(OpenCV-Extra VERSION 3.0.0) +hunter_config(OpenCV-Extra VERSION 3.2.0) hunter_config(OpenNMTTokenizer VERSION 0.2.0-p1) if(MSVC) # FIXME: https://ci.appveyor.com/project/ingenue/hunter/build/1.0.1470 diff --git a/cmake/projects/OpenCV-Extra/hunter.cmake b/cmake/projects/OpenCV-Extra/hunter.cmake index d7b2a73bac..68f0c883bf 100644 --- a/cmake/projects/OpenCV-Extra/hunter.cmake +++ b/cmake/projects/OpenCV-Extra/hunter.cmake @@ -7,6 +7,29 @@ include(hunter_add_version) include(hunter_download) include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + OpenCV-Extra + VERSION + "3.3.0" + URL + "https://github.com/opencv/opencv_contrib/archive/3.3.0.tar.gz" + SHA1 + d97d80f8887416f4d8353f10fc4812a21909f84a +) + +hunter_add_version( + PACKAGE_NAME + OpenCV-Extra + VERSION + "3.2.0" + URL + "https://github.com/Itseez/opencv_contrib/archive/3.2.0.tar.gz" + SHA1 + fa8ac06b8f6ad0a290106077f64b2a886055fd53 +) + hunter_add_version( PACKAGE_NAME OpenCV-Extra diff --git a/examples/OpenCV-extra/CMakeLists.txt b/examples/OpenCV-extra/CMakeLists.txt new file mode 100644 index 0000000000..99caa95e3d --- /dev/null +++ b/examples/OpenCV-extra/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (c) 2015, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) +set(TESTING_CONFIG_OPT FILEPATH ${CMAKE_CURRENT_LIST_DIR}/config.cmake) +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-opencvextra) + +hunter_add_package(OpenCV) +find_package(OpenCV REQUIRED) + +message("OpenCV_DIR: ${OpenCV_DIR}") +message("OpenCV_CONFIG: ${OpenCV_CONFIG}") +message("OpenCV_LIBS: ${OpenCV_LIBS}") + +add_executable(foo foo.cpp) +target_link_libraries(foo PRIVATE ${OpenCV_LIBS}) diff --git a/examples/OpenCV-extra/config.cmake b/examples/OpenCV-extra/config.cmake new file mode 100644 index 0000000000..5c73e385bf --- /dev/null +++ b/examples/OpenCV-extra/config.cmake @@ -0,0 +1,9 @@ +hunter_config(OpenCV + VERSION ${HUNTER_OpenCV_VERSION} + CMAKE_ARGS + OPENCV_WITH_EXTRA_MODULES=YES + #disabled because of incorrect cmake install for ios + BUILD_opencv_dnn=OFF + #disabled because of incorrect cmake install for osx/ios + BUILD_opencv_xobjdetect=OFF +) diff --git a/examples/OpenCV-extra/foo.cpp b/examples/OpenCV-extra/foo.cpp new file mode 100644 index 0000000000..7f6cf9c124 --- /dev/null +++ b/examples/OpenCV-extra/foo.cpp @@ -0,0 +1,26 @@ +// http://docs.opencv.org/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.html + +#include +#include +#include + +int main(int argc, char** argv) { + if (argc != 2) { + printf("usage: DisplayImage.out \n"); + return -1; + } + + cv::Mat image; + image = cv::imread(argv[1], 1); + + if (!image.data) { + printf("No image data \n"); + return EXIT_FAILURE; + } + cv::namedWindow("Display Image", cv::WINDOW_AUTOSIZE); + cv::imshow("Display Image", image); + + cv::waitKey(0); + + return EXIT_SUCCESS; +} From c3872d629997f4c5770df1ed94ba0bd080edca43 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Sun, 13 Aug 2017 18:29:21 -0400 Subject: [PATCH 335/612] add v0.40-p6 --- cmake/configs/default.cmake | 2 +- cmake/projects/xgboost/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 49feb8a4e2..7abcaf9add 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -232,7 +232,7 @@ hunter_config(xext VERSION 1.3.1) hunter_config(xextproto VERSION 7.2.1) hunter_config(xf86vidmodeproto VERSION 2.3.1) hunter_config(xfixes VERSION 5.0.1) -hunter_config(xgboost VERSION 0.40-p5) +hunter_config(xgboost VERSION 0.40-p6) hunter_config(xi VERSION 1.6.1) hunter_config(xinerama VERSION 1.1.2) hunter_config(xineramaproto VERSION 1.1.2) diff --git a/cmake/projects/xgboost/hunter.cmake b/cmake/projects/xgboost/hunter.cmake index fd520ba648..7054ef85fa 100644 --- a/cmake/projects/xgboost/hunter.cmake +++ b/cmake/projects/xgboost/hunter.cmake @@ -8,6 +8,17 @@ include(hunter_cacheable) include(hunter_download) include(hunter_pick_scheme) +hunter_add_version( + PACKAGE_NAME + xgboost + VERSION + 0.40-p6 + URL + "https://github.com/hunter-packages/xgboost/archive/v0.40-p6.tar.gz" + SHA1 + 5da1a7bad5f517dc8bf4d478f177de1ffe2cb599 +) + hunter_add_version( PACKAGE_NAME xgboost From 1adf98ab216b4cb8800e397a56883fb320c7765a Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Sun, 13 Aug 2017 18:35:24 -0400 Subject: [PATCH 336/612] create github release for latest thread-pool-cpp --- cmake/configs/default.cmake | 2 +- cmake/projects/thread-pool-cpp/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 49feb8a4e2..40aabf6455 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -217,7 +217,7 @@ else() endif() hunter_config(szip VERSION 2.1.0-p1) hunter_config(Tesseract VERSION 3.05.01-hunter-3) -hunter_config(thread-pool-cpp VERSION 1.0.0-p3) +hunter_config(thread-pool-cpp VERSION 1.1.0) hunter_config(tinydir VERSION 1.2-p0) hunter_config(websocketpp VERSION 0.7.0-p2) hunter_config(wxWidgets VERSION 3.0.2) diff --git a/cmake/projects/thread-pool-cpp/hunter.cmake b/cmake/projects/thread-pool-cpp/hunter.cmake index 4866336022..b80d0d66ce 100644 --- a/cmake/projects/thread-pool-cpp/hunter.cmake +++ b/cmake/projects/thread-pool-cpp/hunter.cmake @@ -8,6 +8,17 @@ include(hunter_cacheable) include(hunter_download) include(hunter_pick_scheme) +hunter_add_version( + PACKAGE_NAME + thread-pool-cpp + VERSION + 1.1.0 + URL + "https://github.com/hunter-packages/thread-pool-cpp/archive/v1.1.0.tar.gz" + SHA1 + 52c345cb9f0f3e43d0c4760462784b0180f5efe8 +) + hunter_add_version( PACKAGE_NAME thread-pool-cpp From 7997765918010a48f3010b88f808b162bde83c3d Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Sun, 13 Aug 2017 18:48:22 -0400 Subject: [PATCH 337/612] add aglet 1.2.0 --- cmake/configs/default.cmake | 2 +- cmake/projects/aglet/hunter.cmake | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 49feb8a4e2..ba3283142b 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -123,7 +123,7 @@ hunter_config(ZeroMQ VERSION 4.1.4-p2) hunter_config(caffe VERSION rc3-p2) hunter_config(Catch VERSION 1.8.2-p0) hunter_config(aes VERSION 0.0.1-p1) -hunter_config(aglet VERSION 1.1.0) +hunter_config(aglet VERSION 1.2.0) hunter_config(autobahn-cpp VERSION 0.2.0) hunter_config(boost-pba VERSION 1.0.0-p0) hunter_config(ccv VERSION 0.7-p6) diff --git a/cmake/projects/aglet/hunter.cmake b/cmake/projects/aglet/hunter.cmake index a4c369d680..e9ca5afe41 100644 --- a/cmake/projects/aglet/hunter.cmake +++ b/cmake/projects/aglet/hunter.cmake @@ -29,7 +29,18 @@ hunter_add_version( "https://github.com/elucideye/aglet/archive/v1.1.0.tar.gz" SHA1 1857a8d99c0224688d7131a09f295f48723209aa -) +) + +hunter_add_version( + PACKAGE_NAME + aglet + VERSION + 1.2.0 + URL + "https://github.com/elucideye/aglet/archive/v1.2.0.tar.gz" + SHA1 + 65d910c63e0c030a20ca4da9473753ce284c49de +) hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(aglet) From d7dfc0a0f70d14b2d057248616551d20ba4026d5 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Sun, 13 Aug 2017 19:00:44 -0400 Subject: [PATCH 338/612] add ogles_gpgpu v0.2.1 --- cmake/configs/default.cmake | 2 +- cmake/projects/ogles_gpgpu/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 49feb8a4e2..eb57bd1949 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -193,7 +193,7 @@ hunter_config(odb-compiler VERSION 2.4.0) hunter_config(odb-mysql VERSION 2.4.0) hunter_config(odb-pgsql VERSION 2.4.0) hunter_config(odb-sqlite VERSION 2.4.0) -hunter_config(ogles_gpgpu VERSION 0.1.6-p3) +hunter_config(ogles_gpgpu VERSION 0.2.1) hunter_config(onmt VERSION 0.4.1-p2) hunter_config(openddlparser VERSION 0.1.0-p2) hunter_config(pciaccess VERSION 0.13.4) diff --git a/cmake/projects/ogles_gpgpu/hunter.cmake b/cmake/projects/ogles_gpgpu/hunter.cmake index f8979b0ab8..94529db182 100644 --- a/cmake/projects/ogles_gpgpu/hunter.cmake +++ b/cmake/projects/ogles_gpgpu/hunter.cmake @@ -97,6 +97,17 @@ hunter_add_version( 3b9b76a5af9e8eb206cfaa4503b954ec87cb5c7c ) +hunter_add_version( + PACKAGE_NAME + ogles_gpgpu + VERSION + 0.2.1 + URL + "https://github.com/hunter-packages/ogles_gpgpu/archive/v0.2.1.tar.gz" + SHA1 + 373a66b1149b1b563f65195c6767ba4ee7a0b9ed +) + hunter_cmake_args(ogles_gpgpu CMAKE_ARGS OGLES_GPGPU_INSTALL=ON) hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(ogles_gpgpu) From 7ecac7a74db9b595f37f008c960007228f3e1c4e Mon Sep 17 00:00:00 2001 From: Carlos Augusto Date: Mon, 10 Jul 2017 16:40:29 -0600 Subject: [PATCH 339/612] Boost building conflicts on gentoo On Gentoo systems with their own boost-build installed (dev-util/boost-build), trying to build hunter generates an error, solvable by issuing ./b2 --ignore-site-config This patch adds the flag to cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in Signed-off-by: Carlos Augusto --- cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in b/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in index b83c2b3900..ba06bf4e69 100644 --- a/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in +++ b/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in @@ -400,6 +400,7 @@ ExternalProject_Add( ${b2_cmd} ${verbose_output} ${build_opts} + --ignore-site-config # Ignore Gentoo specific optimization "none" in site config that only the patched bjam of Gentoo can understand. BUILD_IN_SOURCE 1 INSTALL_COMMAND @@ -408,6 +409,7 @@ ExternalProject_Add( ${build_opts} stage # install only libraries, headers installed in `url_sha1_boost` "--stagedir=@HUNTER_PACKAGE_INSTALL_PREFIX@" + --ignore-site-config # Ignore Gentoo specific optimization "none" in site config that only the patched bjam of Gentoo can understand. ${log_opts} ) From f082e87e8297ee1859a999f890530030527b4374 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Sun, 13 Aug 2017 06:45:35 +0300 Subject: [PATCH 340/612] Boost ++PACKAGE_INTERNAL_DEPS_ID --- cmake/projects/Boost/atomic/hunter.cmake | 2 +- cmake/projects/Boost/chrono/hunter.cmake | 2 +- cmake/projects/Boost/context/hunter.cmake | 2 +- cmake/projects/Boost/coroutine/hunter.cmake | 2 +- cmake/projects/Boost/date_time/hunter.cmake | 2 +- cmake/projects/Boost/exception/hunter.cmake | 2 +- cmake/projects/Boost/filesystem/hunter.cmake | 2 +- cmake/projects/Boost/graph/hunter.cmake | 2 +- cmake/projects/Boost/graph_parallel/hunter.cmake | 2 +- cmake/projects/Boost/hunter.cmake | 2 +- cmake/projects/Boost/hunter.cmake.in | 2 +- cmake/projects/Boost/iostreams/hunter.cmake | 2 +- cmake/projects/Boost/locale/hunter.cmake | 2 +- cmake/projects/Boost/log/hunter.cmake | 2 +- cmake/projects/Boost/math/hunter.cmake | 2 +- cmake/projects/Boost/mpi/hunter.cmake | 2 +- cmake/projects/Boost/program_options/hunter.cmake | 2 +- cmake/projects/Boost/python/hunter.cmake | 2 +- cmake/projects/Boost/random/hunter.cmake | 2 +- cmake/projects/Boost/regex/hunter.cmake | 2 +- cmake/projects/Boost/serialization/hunter.cmake | 2 +- cmake/projects/Boost/signals/hunter.cmake | 2 +- cmake/projects/Boost/system/hunter.cmake | 2 +- cmake/projects/Boost/test/hunter.cmake | 2 +- cmake/projects/Boost/thread/hunter.cmake | 2 +- cmake/projects/Boost/timer/hunter.cmake | 2 +- cmake/projects/Boost/wave/hunter.cmake | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/cmake/projects/Boost/atomic/hunter.cmake b/cmake/projects/Boost/atomic/hunter.cmake index 87970ff1ed..de03a2f676 100644 --- a/cmake/projects/Boost/atomic/hunter.cmake +++ b/cmake/projects/Boost/atomic/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT atomic - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/chrono/hunter.cmake b/cmake/projects/Boost/chrono/hunter.cmake index e53095b8b5..5e57637428 100644 --- a/cmake/projects/Boost/chrono/hunter.cmake +++ b/cmake/projects/Boost/chrono/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT chrono - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/context/hunter.cmake b/cmake/projects/Boost/context/hunter.cmake index a254721d0d..c020c02e95 100644 --- a/cmake/projects/Boost/context/hunter.cmake +++ b/cmake/projects/Boost/context/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT context - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/coroutine/hunter.cmake b/cmake/projects/Boost/coroutine/hunter.cmake index 8facb44117..c1bd3bedaa 100644 --- a/cmake/projects/Boost/coroutine/hunter.cmake +++ b/cmake/projects/Boost/coroutine/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT coroutine - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/date_time/hunter.cmake b/cmake/projects/Boost/date_time/hunter.cmake index 659d1c1a3c..de8daead9b 100644 --- a/cmake/projects/Boost/date_time/hunter.cmake +++ b/cmake/projects/Boost/date_time/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT date_time - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/exception/hunter.cmake b/cmake/projects/Boost/exception/hunter.cmake index e7c65addaf..497c94a3b5 100644 --- a/cmake/projects/Boost/exception/hunter.cmake +++ b/cmake/projects/Boost/exception/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT exception - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/filesystem/hunter.cmake b/cmake/projects/Boost/filesystem/hunter.cmake index 354e594520..d62ffc2b4b 100644 --- a/cmake/projects/Boost/filesystem/hunter.cmake +++ b/cmake/projects/Boost/filesystem/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT filesystem - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/graph/hunter.cmake b/cmake/projects/Boost/graph/hunter.cmake index 4e8da3489b..c2d8d1be38 100644 --- a/cmake/projects/Boost/graph/hunter.cmake +++ b/cmake/projects/Boost/graph/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT graph - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/graph_parallel/hunter.cmake b/cmake/projects/Boost/graph_parallel/hunter.cmake index aaa507539f..54e8293dba 100644 --- a/cmake/projects/Boost/graph_parallel/hunter.cmake +++ b/cmake/projects/Boost/graph_parallel/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT graph_parallel - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/hunter.cmake b/cmake/projects/Boost/hunter.cmake index b7f4931ac7..b816974654 100644 --- a/cmake/projects/Boost/hunter.cmake +++ b/cmake/projects/Boost/hunter.cmake @@ -256,4 +256,4 @@ hunter_add_version( hunter_pick_scheme(DEFAULT url_sha1_boost) hunter_cacheable(Boost) -hunter_download(PACKAGE_NAME Boost PACKAGE_INTERNAL_DEPS_ID "16") +hunter_download(PACKAGE_NAME Boost PACKAGE_INTERNAL_DEPS_ID "17") diff --git a/cmake/projects/Boost/hunter.cmake.in b/cmake/projects/Boost/hunter.cmake.in index 7be014639e..596630111d 100644 --- a/cmake/projects/Boost/hunter.cmake.in +++ b/cmake/projects/Boost/hunter.cmake.in @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT boost_component - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/iostreams/hunter.cmake b/cmake/projects/Boost/iostreams/hunter.cmake index 7547d0722d..38549ff56d 100644 --- a/cmake/projects/Boost/iostreams/hunter.cmake +++ b/cmake/projects/Boost/iostreams/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT iostreams - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/locale/hunter.cmake b/cmake/projects/Boost/locale/hunter.cmake index 9665eb6d48..57921e0bfe 100644 --- a/cmake/projects/Boost/locale/hunter.cmake +++ b/cmake/projects/Boost/locale/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT locale - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/log/hunter.cmake b/cmake/projects/Boost/log/hunter.cmake index 7465426b2f..f5432ba683 100644 --- a/cmake/projects/Boost/log/hunter.cmake +++ b/cmake/projects/Boost/log/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT log - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/math/hunter.cmake b/cmake/projects/Boost/math/hunter.cmake index 8022115503..dec95b8229 100644 --- a/cmake/projects/Boost/math/hunter.cmake +++ b/cmake/projects/Boost/math/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT math - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/mpi/hunter.cmake b/cmake/projects/Boost/mpi/hunter.cmake index 896c68cf6d..4c4c6e0d2f 100644 --- a/cmake/projects/Boost/mpi/hunter.cmake +++ b/cmake/projects/Boost/mpi/hunter.cmake @@ -26,5 +26,5 @@ hunter_download( Boost PACKAGE_COMPONENT mpi - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/program_options/hunter.cmake b/cmake/projects/Boost/program_options/hunter.cmake index ecbfc9baba..f036ae7565 100644 --- a/cmake/projects/Boost/program_options/hunter.cmake +++ b/cmake/projects/Boost/program_options/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT program_options - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/python/hunter.cmake b/cmake/projects/Boost/python/hunter.cmake index 357e39f366..06c786cdd6 100644 --- a/cmake/projects/Boost/python/hunter.cmake +++ b/cmake/projects/Boost/python/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT python - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/random/hunter.cmake b/cmake/projects/Boost/random/hunter.cmake index d3e1688f11..2f87231580 100644 --- a/cmake/projects/Boost/random/hunter.cmake +++ b/cmake/projects/Boost/random/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT random - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/regex/hunter.cmake b/cmake/projects/Boost/regex/hunter.cmake index f581036001..2808a0e80f 100644 --- a/cmake/projects/Boost/regex/hunter.cmake +++ b/cmake/projects/Boost/regex/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT regex - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/serialization/hunter.cmake b/cmake/projects/Boost/serialization/hunter.cmake index ef062ca6e7..bb6d45db6d 100644 --- a/cmake/projects/Boost/serialization/hunter.cmake +++ b/cmake/projects/Boost/serialization/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT serialization - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/signals/hunter.cmake b/cmake/projects/Boost/signals/hunter.cmake index d1bb08e8f3..534a253f21 100644 --- a/cmake/projects/Boost/signals/hunter.cmake +++ b/cmake/projects/Boost/signals/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT signals - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/system/hunter.cmake b/cmake/projects/Boost/system/hunter.cmake index 3ff095a1f3..caf7bc0774 100644 --- a/cmake/projects/Boost/system/hunter.cmake +++ b/cmake/projects/Boost/system/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT system - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/test/hunter.cmake b/cmake/projects/Boost/test/hunter.cmake index c37461b067..25b1c4505c 100644 --- a/cmake/projects/Boost/test/hunter.cmake +++ b/cmake/projects/Boost/test/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT test - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/thread/hunter.cmake b/cmake/projects/Boost/thread/hunter.cmake index 4fd484d819..6671820baf 100644 --- a/cmake/projects/Boost/thread/hunter.cmake +++ b/cmake/projects/Boost/thread/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT thread - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/timer/hunter.cmake b/cmake/projects/Boost/timer/hunter.cmake index 5febc22a0e..6b893c2665 100644 --- a/cmake/projects/Boost/timer/hunter.cmake +++ b/cmake/projects/Boost/timer/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT timer - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) diff --git a/cmake/projects/Boost/wave/hunter.cmake b/cmake/projects/Boost/wave/hunter.cmake index b22b59f2d2..54e80626f7 100644 --- a/cmake/projects/Boost/wave/hunter.cmake +++ b/cmake/projects/Boost/wave/hunter.cmake @@ -18,5 +18,5 @@ hunter_download( Boost PACKAGE_COMPONENT wave - PACKAGE_INTERNAL_DEPS_ID "16" + PACKAGE_INTERNAL_DEPS_ID "17" ) From 5c9c314ec166ccf7e2c23c46c7be204b077fb625 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Mon, 14 Aug 2017 11:11:18 -0400 Subject: [PATCH 341/612] fix cmake logic for std::to_string compiler check --- cmake/configs/default.cmake | 2 +- cmake/projects/xgboost/hunter.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 7abcaf9add..5fd6257f59 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -232,7 +232,7 @@ hunter_config(xext VERSION 1.3.1) hunter_config(xextproto VERSION 7.2.1) hunter_config(xf86vidmodeproto VERSION 2.3.1) hunter_config(xfixes VERSION 5.0.1) -hunter_config(xgboost VERSION 0.40-p6) +hunter_config(xgboost VERSION 0.40-p7) hunter_config(xi VERSION 1.6.1) hunter_config(xinerama VERSION 1.1.2) hunter_config(xineramaproto VERSION 1.1.2) diff --git a/cmake/projects/xgboost/hunter.cmake b/cmake/projects/xgboost/hunter.cmake index 7054ef85fa..5b448213df 100644 --- a/cmake/projects/xgboost/hunter.cmake +++ b/cmake/projects/xgboost/hunter.cmake @@ -12,11 +12,11 @@ hunter_add_version( PACKAGE_NAME xgboost VERSION - 0.40-p6 + 0.40-p7 URL - "https://github.com/hunter-packages/xgboost/archive/v0.40-p6.tar.gz" + "https://github.com/hunter-packages/xgboost/archive/v0.40-p7.tar.gz" SHA1 - 5da1a7bad5f517dc8bf4d478f177de1ffe2cb599 + 1afa2dc816eef04719d53dc287a4939f6fdf1e01 ) hunter_add_version( From ae51df7f2bdddb37c4b271ed7f0271137ff583c1 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Mon, 14 Aug 2017 11:47:44 -0400 Subject: [PATCH 342/612] update drishti-assets to v1.7 --- cmake/configs/default.cmake | 2 +- cmake/projects/drishti_assets/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 004e519e19..f8249c7ab7 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -143,7 +143,7 @@ hunter_config(dlib VERSION 19.4-p2) hunter_config(doctest VERSION 1.2.0) hunter_config(dri2proto VERSION 2.8) hunter_config(dri3proto VERSION 1.0) -hunter_config(drishti_assets VERSION 1.6) +hunter_config(drishti_assets VERSION 1.7) hunter_config(drishti_faces VERSION 1.1) hunter_config(drm VERSION 2.4.67) hunter_config(eigen3-nnls VERSION 1.0.0) diff --git a/cmake/projects/drishti_assets/hunter.cmake b/cmake/projects/drishti_assets/hunter.cmake index 6b1e57ce1f..488aff3c75 100644 --- a/cmake/projects/drishti_assets/hunter.cmake +++ b/cmake/projects/drishti_assets/hunter.cmake @@ -19,6 +19,17 @@ hunter_add_version( 7787ba57e30146c979780c79ae62e8299cfe3cfd ) +hunter_add_version( + PACKAGE_NAME + drishti_assets + VERSION + 1.7 + URL + "https://github.com/elucideye/drishti-assets/archive/v1.7.tar.gz" + SHA1 + 1c35ca176e4b30111eed44fd607d8a5ac0c71585 +) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(drishti_assets) hunter_download(PACKAGE_NAME drishti_assets) From 8d5c396ae67d7723c0744cb6047a24fa65bc1e31 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Mon, 14 Aug 2017 11:58:32 -0400 Subject: [PATCH 343/612] drishti-faces 1.2 updated ground truth for testing --- cmake/configs/default.cmake | 2 +- cmake/projects/drishti_faces/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 004e519e19..056042424e 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -144,7 +144,7 @@ hunter_config(doctest VERSION 1.2.0) hunter_config(dri2proto VERSION 2.8) hunter_config(dri3proto VERSION 1.0) hunter_config(drishti_assets VERSION 1.6) -hunter_config(drishti_faces VERSION 1.1) +hunter_config(drishti_faces VERSION 1.2) hunter_config(drm VERSION 2.4.67) hunter_config(eigen3-nnls VERSION 1.0.0) hunter_config(eos VERSION 0.12.1) diff --git a/cmake/projects/drishti_faces/hunter.cmake b/cmake/projects/drishti_faces/hunter.cmake index a40d04d7da..a17f47f7e3 100644 --- a/cmake/projects/drishti_faces/hunter.cmake +++ b/cmake/projects/drishti_faces/hunter.cmake @@ -19,6 +19,17 @@ hunter_add_version( 2518ff034bd4c2967cbab4fc7a69d30cf0de057a ) +hunter_add_version( + PACKAGE_NAME + drishti_faces + VERSION + 1.2 + URL + "https://github.com/elucideye/drishti-faces/archive/v1.2.tar.gz" + SHA1 + 61cf9e459856a06d2da83f84f43f1a0e43955d7a +) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(drishti_faces) hunter_download(PACKAGE_NAME drishti_faces) From c1ad4bf02ed6fd5d2db1320de26003aa71785c39 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Mon, 14 Aug 2017 14:47:47 -0400 Subject: [PATCH 344/612] 0.40-p7 -> 0.40-p8 fix package config --- cmake/configs/default.cmake | 2 +- cmake/projects/xgboost/hunter.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 5fd6257f59..a074c16c84 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -232,7 +232,7 @@ hunter_config(xext VERSION 1.3.1) hunter_config(xextproto VERSION 7.2.1) hunter_config(xf86vidmodeproto VERSION 2.3.1) hunter_config(xfixes VERSION 5.0.1) -hunter_config(xgboost VERSION 0.40-p7) +hunter_config(xgboost VERSION 0.40-p8) hunter_config(xi VERSION 1.6.1) hunter_config(xinerama VERSION 1.1.2) hunter_config(xineramaproto VERSION 1.1.2) diff --git a/cmake/projects/xgboost/hunter.cmake b/cmake/projects/xgboost/hunter.cmake index 5b448213df..933cb89e52 100644 --- a/cmake/projects/xgboost/hunter.cmake +++ b/cmake/projects/xgboost/hunter.cmake @@ -12,11 +12,11 @@ hunter_add_version( PACKAGE_NAME xgboost VERSION - 0.40-p7 + 0.40-p8 URL - "https://github.com/hunter-packages/xgboost/archive/v0.40-p7.tar.gz" + "https://github.com/hunter-packages/xgboost/archive/v0.40-p8.tar.gz" SHA1 - 1afa2dc816eef04719d53dc287a4939f6fdf1e01 + 1a4168dd40cc4a4cffeddd33bfe5952a3dd94af4 ) hunter_add_version( From b96b9920b1a6f86e6009fce5efaa154b6ff0312b Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Mon, 14 Aug 2017 18:06:26 -0400 Subject: [PATCH 345/612] v0.40-p9 fix config include path --- cmake/projects/xgboost/hunter.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/projects/xgboost/hunter.cmake b/cmake/projects/xgboost/hunter.cmake index 933cb89e52..44624759fa 100644 --- a/cmake/projects/xgboost/hunter.cmake +++ b/cmake/projects/xgboost/hunter.cmake @@ -12,11 +12,11 @@ hunter_add_version( PACKAGE_NAME xgboost VERSION - 0.40-p8 + 0.40-p9 URL - "https://github.com/hunter-packages/xgboost/archive/v0.40-p8.tar.gz" + "https://github.com/hunter-packages/xgboost/archive/v0.40-p9.tar.gz" SHA1 - 1a4168dd40cc4a4cffeddd33bfe5952a3dd94af4 + 040000efe20018fcfcd2acc318cf36eb5dcb1b1d ) hunter_add_version( From d6eb9d593d4b0fab16d6721d4b8f4268aa78978a Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Mon, 14 Aug 2017 18:07:20 -0400 Subject: [PATCH 346/612] update default to v0.40-p9 --- cmake/configs/default.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index a074c16c84..0e4eef5965 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -232,7 +232,7 @@ hunter_config(xext VERSION 1.3.1) hunter_config(xextproto VERSION 7.2.1) hunter_config(xf86vidmodeproto VERSION 2.3.1) hunter_config(xfixes VERSION 5.0.1) -hunter_config(xgboost VERSION 0.40-p8) +hunter_config(xgboost VERSION 0.40-p9) hunter_config(xi VERSION 1.6.1) hunter_config(xinerama VERSION 1.1.2) hunter_config(xineramaproto VERSION 1.1.2) From 3daafbafbd1ea284302bb09811fe5fead4c7309d Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Tue, 15 Aug 2017 10:28:35 -0400 Subject: [PATCH 347/612] add version 1.2.2 (HEAD) General update to 1.2.2 from HEAD to include fix for libcxx toolchain on some platforms. See: https://github.com/USCiLab/cereal/issues/339#issuecomment-322452566 --- cmake/configs/default.cmake | 2 +- cmake/projects/cereal/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 206c5e5fb5..4ae8c5a42e 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -127,7 +127,7 @@ hunter_config(aglet VERSION 1.2.0) hunter_config(autobahn-cpp VERSION 0.2.0) hunter_config(boost-pba VERSION 1.0.0-p0) hunter_config(ccv VERSION 0.7-p6) -hunter_config(cereal VERSION 1.2.1-p1) +hunter_config(cereal VERSION 1.2.2) hunter_config(ceres-solver VERSION 1.12.0-p1) hunter_config(clBLAS VERSION 2.10.0-p0) hunter_config(convertutf VERSION 1.0.1) diff --git a/cmake/projects/cereal/hunter.cmake b/cmake/projects/cereal/hunter.cmake index 3085a9bcfa..f660b6e79f 100644 --- a/cmake/projects/cereal/hunter.cmake +++ b/cmake/projects/cereal/hunter.cmake @@ -12,6 +12,17 @@ include(hunter_cacheable) hunter_cacheable(cereal) +hunter_add_version( + PACKAGE_NAME + cereal + VERSION + "1.2.2" + URL + "https://github.com/headupinclouds/cereal/archive/v1.2.2.tar.gz" + SHA1 + d0f0ac5daa244cb5c193d4de889a416fdeac9dc5 + ) + hunter_add_version( PACKAGE_NAME cereal From 3630a914173e06ca965cc544880083a0198fbb34 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 15 Aug 2017 18:49:45 +0300 Subject: [PATCH 348/612] Add Findappkit [skip ci] --- cmake/find/Findappkit.cmake | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 cmake/find/Findappkit.cmake diff --git a/cmake/find/Findappkit.cmake b/cmake/find/Findappkit.cmake new file mode 100644 index 0000000000..0d171d6820 --- /dev/null +++ b/cmake/find/Findappkit.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "AppKit") From 23c14e673d12b38ad54c49c78f194e0bfb5805f9 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Tue, 15 Aug 2017 12:45:02 -0400 Subject: [PATCH 349/612] use cereal v.1.2.2-p0 from hunter-packages/cereal --- cmake/configs/default.cmake | 2 +- cmake/projects/cereal/hunter.cmake | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 4ae8c5a42e..1ea23c5567 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -127,7 +127,7 @@ hunter_config(aglet VERSION 1.2.0) hunter_config(autobahn-cpp VERSION 0.2.0) hunter_config(boost-pba VERSION 1.0.0-p0) hunter_config(ccv VERSION 0.7-p6) -hunter_config(cereal VERSION 1.2.2) +hunter_config(cereal VERSION 1.2.2-p0) hunter_config(ceres-solver VERSION 1.12.0-p1) hunter_config(clBLAS VERSION 2.10.0-p0) hunter_config(convertutf VERSION 1.0.1) diff --git a/cmake/projects/cereal/hunter.cmake b/cmake/projects/cereal/hunter.cmake index f660b6e79f..85c5670eda 100644 --- a/cmake/projects/cereal/hunter.cmake +++ b/cmake/projects/cereal/hunter.cmake @@ -16,11 +16,11 @@ hunter_add_version( PACKAGE_NAME cereal VERSION - "1.2.2" + "1.2.2-p0" URL - "https://github.com/headupinclouds/cereal/archive/v1.2.2.tar.gz" + "https://github.com/hunter-packages/cereal/archive/v1.2.2-p0.tar.gz" SHA1 - d0f0ac5daa244cb5c193d4de889a416fdeac9dc5 + 7325d29644654c16f066a8c887665c2cf78226c2 ) hunter_add_version( From 9c95ff3069440d089d26077a88133731a33b5e6c Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 15 Aug 2017 20:53:29 +0300 Subject: [PATCH 350/612] Qt QML example: optional Qt5::QTcpServerConnection target [skip ci] --- examples/qt-qml/CMakeLists.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 examples/qt-qml/CMakeLists.txt diff --git a/examples/qt-qml/CMakeLists.txt b/examples/qt-qml/CMakeLists.txt old mode 100644 new mode 100755 From ac7dc58ef3b25cd133e75fa718fee1a749e24847 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 16 Aug 2017 00:51:34 +0300 Subject: [PATCH 351/612] Qt camera example: Qt 5.9 minimal version for SDK should be 16 [skip ci] --- examples/qt-camera/AndroidManifest.xml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/qt-camera/AndroidManifest.xml.in b/examples/qt-camera/AndroidManifest.xml.in index 6862455869..d4759f22d1 100644 --- a/examples/qt-camera/AndroidManifest.xml.in +++ b/examples/qt-camera/AndroidManifest.xml.in @@ -96,7 +96,7 @@ android:smallScreens="true" android:largeScreens="true" /> - + From 703fa2f09f205871108b1e0de89ac4e802c3bb58 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 16 Aug 2017 00:52:49 +0300 Subject: [PATCH 352/612] Qt QML example: optional Qt5::QTcpServerConnection target [skip ci] --- examples/qt-qml/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/qt-qml/CMakeLists.txt b/examples/qt-qml/CMakeLists.txt index 69b42c5ac9..48eebd809f 100755 --- a/examples/qt-qml/CMakeLists.txt +++ b/examples/qt-qml/CMakeLists.txt @@ -30,9 +30,11 @@ else() endif() add_executable(qmlexample main.cpp) -target_link_libraries( - qmlexample Qt5::Widgets Qt5::Quick Qt5::QTcpServerConnection ${plugins} -) +target_link_libraries(qmlexample PUBLIC Qt5::Widgets Qt5::Quick ${plugins}) + +if(TARGET Qt5::QTcpServerConnection) + target_link_libraries(qmlexample PUBLIC Qt5::QTcpServerConnection) +endif() # Workaround for Linux's linker problems (*_MULTIPLICITY doesn't help, TODO) -- set(fix_cyclic FALSE) From b35f39d59d6386e3c735e79836847008066d5331 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 16 Aug 2017 15:56:07 +0300 Subject: [PATCH 353/612] Rename IntSizeof --- cmake/projects/{IntSizeof => intsizeof}/hunter.cmake | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename cmake/projects/{IntSizeof => intsizeof}/hunter.cmake (100%) diff --git a/cmake/projects/IntSizeof/hunter.cmake b/cmake/projects/intsizeof/hunter.cmake similarity index 100% rename from cmake/projects/IntSizeof/hunter.cmake rename to cmake/projects/intsizeof/hunter.cmake From 78f7c5162a6f00ce45b76a424866ce8a6928eec9 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 16 Aug 2017 15:56:25 +0300 Subject: [PATCH 354/612] Add 'intsizeof' example --- examples/intsizeof/CMakeLists.txt | 16 ++++++++++++++++ examples/intsizeof/foo.cpp | 6 ++++++ 2 files changed, 22 insertions(+) create mode 100644 examples/intsizeof/CMakeLists.txt create mode 100644 examples/intsizeof/foo.cpp diff --git a/examples/intsizeof/CMakeLists.txt b/examples/intsizeof/CMakeLists.txt new file mode 100644 index 0000000000..33adec539b --- /dev/null +++ b/examples/intsizeof/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright (c) 2016-2017, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-intsizeof) + +hunter_add_package(intsizeof) +find_package(intsizeof CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo intsizeof::intsizeof) diff --git a/examples/intsizeof/foo.cpp b/examples/intsizeof/foo.cpp new file mode 100644 index 0000000000..99028b5a86 --- /dev/null +++ b/examples/intsizeof/foo.cpp @@ -0,0 +1,6 @@ +#include // INTSIZEOF_PTRDIFF +#include // ptrdiff_t + +int main() { + static_assert(INTSIZEOF_PTRDIFF == sizeof(ptrdiff_t), ""); +} From 9b080bcf2477b53e8b00ca3d407efa5488176760 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 16 Aug 2017 18:48:20 +0300 Subject: [PATCH 355/612] intsizeof 2.0.0 --- cmake/configs/default.cmake | 2 +- cmake/projects/intsizeof/hunter.cmake | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 1ea23c5567..4a6380954b 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -61,7 +61,7 @@ endif() hunter_config(GPUImage VERSION 0.1.6-p6) hunter_config(GSL VERSION 2.1.0-p2) hunter_config(Igloo VERSION 1.1.1-hunter) -hunter_config(IntSizeof VERSION 1.0.0) +hunter_config(intsizeof VERSION 2.0.0) hunter_config(Jpeg VERSION 9b-p1) hunter_config(JsonSpirit VERSION 0.0.4-hunter) if(MSVC_VERSION LESS 1600) diff --git a/cmake/projects/intsizeof/hunter.cmake b/cmake/projects/intsizeof/hunter.cmake index 82f66348c7..94e0f393a7 100644 --- a/cmake/projects/intsizeof/hunter.cmake +++ b/cmake/projects/intsizeof/hunter.cmake @@ -1,15 +1,16 @@ -# Copyright (c) 2014, Ruslan Baratov +# Copyright (c) 2014-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! include(hunter_add_version) +include(hunter_cacheable) include(hunter_download) include(hunter_pick_scheme) hunter_add_version( PACKAGE_NAME - IntSizeof + intsizeof VERSION "1.0.0" URL @@ -18,5 +19,17 @@ hunter_add_version( 9959e0e29c88fe414ba082fb28a722e411682bb3 ) +hunter_add_version( + PACKAGE_NAME + intsizeof + VERSION + "2.0.0" + URL + "https://github.com/ruslo/intsizeof/archive/v2.0.0.tar.gz" + SHA1 + 35b954c7180bce95f491951a87a49098bb074595 +) + +hunter_cacheable(intsizeof) hunter_pick_scheme(DEFAULT url_sha1_cmake) -hunter_download(PACKAGE_NAME IntSizeof) +hunter_download(PACKAGE_NAME intsizeof) From e69dd661cc31010f2c098bbfbcf8fe883372c698 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 16 Aug 2017 20:29:04 +0300 Subject: [PATCH 356/612] Rename package --- docs/packages/all.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/packages/all.rst b/docs/packages/all.rst index 6943570b71..82a5959852 100644 --- a/docs/packages/all.rst +++ b/docs/packages/all.rst @@ -31,7 +31,6 @@ All packages * `GSL `__ * `GTest `__ * `Igloo `__ -* `IntSizeof `__ * `Jpeg `__ * `JsonSpirit `__ * `LLVM (Clang) `__ @@ -83,6 +82,7 @@ All packages * `half `__ * `hdf5 `__ * `imshow `__ +* `intsizeof `__ * `ios_sim `__ * `irrXML `__ * `libuv `__ From e89452a70d434080353051ba0f72751ca66eab94 Mon Sep 17 00:00:00 2001 From: Richard Hodges Date: Thu, 17 Aug 2017 06:36:35 +0200 Subject: [PATCH 357/612] updated .gitignore to prevent inclusion of JetBrains CLion artifacts --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 24fed3ba03..920eb2be1b 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,7 @@ _Base # emacs junk *.*~ *~ + +# Clion +.idea/ + From fa168aad36f0d18b186f7dee48e2422a88e33dd1 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 17 Aug 2017 14:50:57 +0300 Subject: [PATCH 358/612] intsizeof 2.0.1 --- cmake/configs/default.cmake | 2 +- cmake/projects/intsizeof/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 4a6380954b..d956b5d060 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -61,7 +61,7 @@ endif() hunter_config(GPUImage VERSION 0.1.6-p6) hunter_config(GSL VERSION 2.1.0-p2) hunter_config(Igloo VERSION 1.1.1-hunter) -hunter_config(intsizeof VERSION 2.0.0) +hunter_config(intsizeof VERSION 2.0.1) hunter_config(Jpeg VERSION 9b-p1) hunter_config(JsonSpirit VERSION 0.0.4-hunter) if(MSVC_VERSION LESS 1600) diff --git a/cmake/projects/intsizeof/hunter.cmake b/cmake/projects/intsizeof/hunter.cmake index 94e0f393a7..cad30ef7d9 100644 --- a/cmake/projects/intsizeof/hunter.cmake +++ b/cmake/projects/intsizeof/hunter.cmake @@ -30,6 +30,17 @@ hunter_add_version( 35b954c7180bce95f491951a87a49098bb074595 ) +hunter_add_version( + PACKAGE_NAME + intsizeof + VERSION + "2.0.1" + URL + "https://github.com/ruslo/intsizeof/archive/v2.0.1.tar.gz" + SHA1 + e897f9c32cbd87130ac6b0e88106d06a8b0ada42 +) + hunter_cacheable(intsizeof) hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_download(PACKAGE_NAME intsizeof) From 871c72942128e2bd50fd28909207a42a5e21af45 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 17 Aug 2017 16:24:08 +0300 Subject: [PATCH 359/612] CURL 7.49.1-DEV-v8 --- cmake/configs/default.cmake | 2 +- cmake/projects/CURL/hunter.cmake | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index d956b5d060..a6e7f5fae1 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -45,7 +45,7 @@ hunter_config(BoostCompute VERSION 0.5-p0) hunter_config(BoostProcess VERSION 0.5) hunter_config(CapnProto VERSION 0.6.1) hunter_config(CLAPACK VERSION 3.2.1) -hunter_config(CURL VERSION 7.49.1-DEV-v5) +hunter_config(CURL VERSION 7.49.1-DEV-v8) hunter_config(Clang VERSION 4.0.1-p0) hunter_config(ClangToolsExtra VERSION 4.0.1) # Clang hunter_config(Comet VERSION 4.0.2) diff --git a/cmake/projects/CURL/hunter.cmake b/cmake/projects/CURL/hunter.cmake index de334cdc51..1b834ffe35 100644 --- a/cmake/projects/CURL/hunter.cmake +++ b/cmake/projects/CURL/hunter.cmake @@ -1,20 +1,15 @@ # Copyright (c) 2015, Steve Brain +# Copyright (c) 2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! -# Load used modules - - - include(hunter_add_version) include(hunter_cacheable) include(hunter_cmake_args) include(hunter_download) include(hunter_pick_scheme) -# List of versions here... - hunter_add_version( PACKAGE_NAME CURL @@ -37,6 +32,16 @@ hunter_add_version( 159d73e83f6cde54469c838234d32ed917ec9b80 ) +hunter_add_version( + PACKAGE_NAME + CURL + VERSION + "7.49.1-DEV-v8" + URL + "https://github.com/hunter-packages/curl/archive/hunter-7.49.1-v8.tar.gz" + SHA1 + 3ac2684e3274c17ca209731e121e9a0acc79e4a5 +) if (ANDROID OR IOS) set(_curl_cmake_args @@ -60,9 +65,6 @@ hunter_cmake_args( ${_curl_cmake_args} ) - - -# Pick a download scheme hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(CURL) hunter_download(PACKAGE_NAME CURL) From b6beaccf0d9488418ed5304a2bdaece230389f42 Mon Sep 17 00:00:00 2001 From: Sacha Refshauge Date: Fri, 18 Aug 2017 10:27:23 +1000 Subject: [PATCH 360/612] Add OpenCV 3.3.0 --- cmake/configs/default.cmake | 10 ++++++++-- cmake/projects/OpenCV/hunter.cmake | 11 +++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index a6e7f5fae1..9e1dac8189 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -85,8 +85,14 @@ hunter_config(NASM VERSION 2.12.02) hunter_config(OpenBLAS VERSION 0.2.20-p0) hunter_config(OpenCL VERSION 2.1-p3) hunter_config(OpenCL-cpp VERSION 2.0.10-p0) -hunter_config(OpenCV VERSION 3.2.0-p2) -hunter_config(OpenCV-Extra VERSION 3.2.0) +if(IOS) + # FIXME: Multi-arch issues regarding ARM detection + hunter_config(OpenCV VERSION 3.2.0-p2) + hunter_config(OpenCV-Extra VERSION 3.2.0) +else() + hunter_config(OpenCV VERSION 3.3.0-p0) + hunter_config(OpenCV-Extra VERSION 3.3.0) +endif() hunter_config(OpenNMTTokenizer VERSION 0.2.0-p1) if(MSVC) # FIXME: https://ci.appveyor.com/project/ingenue/hunter/build/1.0.1470 diff --git a/cmake/projects/OpenCV/hunter.cmake b/cmake/projects/OpenCV/hunter.cmake index 58ddb0745b..9dcbb0357f 100644 --- a/cmake/projects/OpenCV/hunter.cmake +++ b/cmake/projects/OpenCV/hunter.cmake @@ -13,6 +13,17 @@ include(hunter_pick_scheme) # List of versions here... +hunter_add_version( + PACKAGE_NAME + OpenCV + VERSION + "3.3.0-p0" + URL + "https://github.com/hunter-packages/opencv/archive/v3.3.0-p0.tar.gz" + SHA1 + fc351142139be71b366458fa1572ab004c871774 +) + hunter_add_version( PACKAGE_NAME OpenCV From 931dd2aa937486126d2c735b17e45408f1c3da0e Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 17 Aug 2017 16:38:16 +0300 Subject: [PATCH 361/612] QtCMakeExtra 1.0.23 --- cmake/configs/default.cmake | 2 +- cmake/projects/QtCMakeExtra/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index a6e7f5fae1..2cdffa5bda 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -100,7 +100,7 @@ hunter_config(PostgreSQL VERSION 9.6.3) hunter_config(Protobuf VERSION 3.0.0-p1) hunter_config(Qt VERSION 5.5.1-cvpixelbuffer-2-p9) hunter_config(QtAndroidCMake VERSION 1.0.9) -hunter_config(QtCMakeExtra VERSION 1.0.22) +hunter_config(QtCMakeExtra VERSION 1.0.23) hunter_config(QtQmlManager VERSION 1.0.0) hunter_config(RapidJSON VERSION 1.0.2-p2) hunter_config(RapidXML VERSION 1.13) diff --git a/cmake/projects/QtCMakeExtra/hunter.cmake b/cmake/projects/QtCMakeExtra/hunter.cmake index 87335457bb..aa4c84eac7 100644 --- a/cmake/projects/QtCMakeExtra/hunter.cmake +++ b/cmake/projects/QtCMakeExtra/hunter.cmake @@ -261,6 +261,17 @@ hunter_add_version( a5dadedaa53f2c44e3207fd5c7edc8211cae3f83 ) +hunter_add_version( + PACKAGE_NAME + QtCMakeExtra + VERSION + "1.0.23" + URL + "https://github.com/hunter-packages/QtCMakeExtra/archive/v1.0.23.tar.gz" + SHA1 + a05102ed3f68cb79da70751c9e89e54daa64c0be +) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(QtCMakeExtra) hunter_download(PACKAGE_NAME QtCMakeExtra) From f2fbfed77e2d3f2d810d018d0c684363f3b5810c Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 16 Aug 2017 22:37:19 +0300 Subject: [PATCH 362/612] Add Findmobilecoreservices.cmake [skip ci] --- cmake/find/Findmobilecoreservices.cmake | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 cmake/find/Findmobilecoreservices.cmake diff --git a/cmake/find/Findmobilecoreservices.cmake b/cmake/find/Findmobilecoreservices.cmake new file mode 100644 index 0000000000..1143c56d55 --- /dev/null +++ b/cmake/find/Findmobilecoreservices.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "MobileCoreServices") From 764dee2de45bc47307c6b38789e719b5a491fbaf Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Wed, 16 Aug 2017 23:14:22 +0300 Subject: [PATCH 363/612] Add Findaudiotoolbox [skip ci] --- cmake/find/Findaudiotoolbox.cmake | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 cmake/find/Findaudiotoolbox.cmake diff --git a/cmake/find/Findaudiotoolbox.cmake b/cmake/find/Findaudiotoolbox.cmake new file mode 100644 index 0000000000..d9f8613258 --- /dev/null +++ b/cmake/find/Findaudiotoolbox.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "AudioToolbox") From 02d65c23c176c80aa1edc129bc46a55f46003068 Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Fri, 18 Aug 2017 20:04:56 -0400 Subject: [PATCH 364/612] drishti-assets @ 1.8 --- cmake/configs/default.cmake | 2 +- cmake/projects/drishti_assets/hunter.cmake | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 2cdffa5bda..7b7677c5da 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -143,7 +143,7 @@ hunter_config(dlib VERSION 19.4-p2) hunter_config(doctest VERSION 1.2.0) hunter_config(dri2proto VERSION 2.8) hunter_config(dri3proto VERSION 1.0) -hunter_config(drishti_assets VERSION 1.7) +hunter_config(drishti_assets VERSION 1.8) hunter_config(drishti_faces VERSION 1.2) hunter_config(drm VERSION 2.4.67) hunter_config(eigen3-nnls VERSION 1.0.0) diff --git a/cmake/projects/drishti_assets/hunter.cmake b/cmake/projects/drishti_assets/hunter.cmake index 488aff3c75..9898ea7ddb 100644 --- a/cmake/projects/drishti_assets/hunter.cmake +++ b/cmake/projects/drishti_assets/hunter.cmake @@ -1,4 +1,5 @@ # Copyright (c) 2017, Ruslan Baratov +# Copyright (c) 2017, David Hirvonen # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -30,6 +31,17 @@ hunter_add_version( 1c35ca176e4b30111eed44fd607d8a5ac0c71585 ) +hunter_add_version( + PACKAGE_NAME + drishti_assets + VERSION + 1.8 + URL + "https://github.com/elucideye/drishti-assets/archive/v1.8.tar.gz" + SHA1 + 1667a5209e83902a46251632dab25cf114d75c96 +) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(drishti_assets) hunter_download(PACKAGE_NAME drishti_assets) From f9cb98dc74658a9ddf32e38389b5091e387e0b79 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 18 Aug 2017 18:01:31 +0300 Subject: [PATCH 365/612] QtCMakeExtra 1.0.24 --- cmake/configs/default.cmake | 2 +- cmake/projects/QtCMakeExtra/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 7b7677c5da..1421c7ebf9 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -100,7 +100,7 @@ hunter_config(PostgreSQL VERSION 9.6.3) hunter_config(Protobuf VERSION 3.0.0-p1) hunter_config(Qt VERSION 5.5.1-cvpixelbuffer-2-p9) hunter_config(QtAndroidCMake VERSION 1.0.9) -hunter_config(QtCMakeExtra VERSION 1.0.23) +hunter_config(QtCMakeExtra VERSION 1.0.24) hunter_config(QtQmlManager VERSION 1.0.0) hunter_config(RapidJSON VERSION 1.0.2-p2) hunter_config(RapidXML VERSION 1.13) diff --git a/cmake/projects/QtCMakeExtra/hunter.cmake b/cmake/projects/QtCMakeExtra/hunter.cmake index aa4c84eac7..459cdb93bf 100644 --- a/cmake/projects/QtCMakeExtra/hunter.cmake +++ b/cmake/projects/QtCMakeExtra/hunter.cmake @@ -272,6 +272,17 @@ hunter_add_version( a05102ed3f68cb79da70751c9e89e54daa64c0be ) +hunter_add_version( + PACKAGE_NAME + QtCMakeExtra + VERSION + "1.0.24" + URL + "https://github.com/hunter-packages/QtCMakeExtra/archive/v1.0.24.tar.gz" + SHA1 + d2aced482704a11ff5c5029750b2fb6f9671f622 +) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(QtCMakeExtra) hunter_download(PACKAGE_NAME QtCMakeExtra) From f9987c5acef3f28e279626cb385bc6183a4e51b9 Mon Sep 17 00:00:00 2001 From: Tom Mason Date: Sat, 19 Aug 2017 15:19:19 +0100 Subject: [PATCH 366/612] workaround for nasty osx linker bug in libtomcrypt see https://github.com/ruslo/hunter/pull/877#issuecomment-319945897 --- cmake/configs/default.cmake | 2 +- cmake/projects/tomcrypt/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 7b7677c5da..76e40eacd0 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -112,7 +112,7 @@ hunter_config(Sugar VERSION 1.2.2) hunter_config(SuiteSparse VERSION 4.5.1-p0) hunter_config(TIFF VERSION 4.0.2-p3) hunter_config(tommath VERSION 1.0-p2) -hunter_config(tomcrypt VERSION 1.17-p2) +hunter_config(tomcrypt VERSION 1.17-p3) hunter_config(WTL VERSION 9.1.5321) hunter_config(WDC VERSION 1.1.0) hunter_config(Washer VERSION 0.1.2) diff --git a/cmake/projects/tomcrypt/hunter.cmake b/cmake/projects/tomcrypt/hunter.cmake index e01d941099..d2d87000a6 100644 --- a/cmake/projects/tomcrypt/hunter.cmake +++ b/cmake/projects/tomcrypt/hunter.cmake @@ -31,6 +31,17 @@ hunter_add_version( 90a3796bddd319fe12529d4b58e2ab23c15b7f1b ) +hunter_add_version( + PACKAGE_NAME + tomcrypt + VERSION + "1.17-p3" + URL + "https://github.com/hunter-packages/libtomcrypt/archive/1.17-p3.tar.gz" + SHA1 + 69b882eff5bf69a5a4e0e9169cc9b9c0ea5b9d71 +) + # Pick a download scheme hunter_pick_scheme(DEFAULT url_sha1_cmake) # use scheme for cmake projects From a7bc5203bd6a4c7f28be65a6392247278f1307bc Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 3 Aug 2017 19:18:57 +0300 Subject: [PATCH 367/612] CMake 3.6 is minimum for Qt --- cmake/projects/Qt/hunter.cmake | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cmake/projects/Qt/hunter.cmake b/cmake/projects/Qt/hunter.cmake index 6c8bea5b82..b7c977049d 100644 --- a/cmake/projects/Qt/hunter.cmake +++ b/cmake/projects/Qt/hunter.cmake @@ -236,6 +236,21 @@ if(IOS) endif() endif() +if(CMAKE_VERSION VERSION_LESS 3.6) + # QtCMakeExtra modules (https://github.com/hunter-packages/QtCMakeExtra) installed + # near the Qt CMake modules and loaded by `file(GLOB)`: + # * https://github.com/qt/qtbase/blob/441ad9b938d453ccf5bff8867e7d3e6e432f9eba/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in#L352 + # + # Before CMake 3.6 file(GLOB) order is not predictable and QtCMakeExtra will not work + # because they are expected to load last. + # + # file(GLOB) sorted since CMake 3.6: + # * https://gitlab.kitware.com/cmake/cmake/commit/edcccde7d65944b3744c4567bd1d452211829702 + hunter_report_broken_package( + "CMake 3.6+ expected for Qt package (current version is ${CMAKE_VERSION}." + ) +endif() + include("${CMAKE_CURRENT_LIST_DIR}/qtbase/hunter.cmake") hunter_add_package(QtCMakeExtra) From e1673bb2e100aa1b4dcc37c3394138f7689efb51 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 3 Aug 2017 19:27:18 +0300 Subject: [PATCH 368/612] Qt 5.9.1 --- cmake/configs/default.cmake | 2 +- cmake/projects/Qt/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 53ce2f93be..d1f2426018 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -98,7 +98,7 @@ hunter_config(PNG VERSION 1.6.26-p1) hunter_config(PocoCpp VERSION 1.7.8-p0) hunter_config(PostgreSQL VERSION 9.6.3) hunter_config(Protobuf VERSION 3.0.0-p1) -hunter_config(Qt VERSION 5.5.1-cvpixelbuffer-2-p9) +hunter_config(Qt VERSION 5.9.1) hunter_config(QtAndroidCMake VERSION 1.0.9) hunter_config(QtCMakeExtra VERSION 1.0.24) hunter_config(QtQmlManager VERSION 1.0.0) diff --git a/cmake/projects/Qt/hunter.cmake b/cmake/projects/Qt/hunter.cmake index b7c977049d..7fb9d2003f 100644 --- a/cmake/projects/Qt/hunter.cmake +++ b/cmake/projects/Qt/hunter.cmake @@ -215,6 +215,17 @@ hunter_add_version( d902b7df94219d2ed2f5c868839c85ce9daa056a ) +hunter_add_version( + PACKAGE_NAME + Qt + VERSION + "5.9.1" + URL + "http://download.qt.io/official_releases/qt/5.9/5.9.1/single/qt-everywhere-opensource-src-5.9.1.zip" + SHA1 + bdac47fdcf6dd502a123eb403bb4260542f91034 +) + hunter_cacheable(Qt) if(NOT APPLE AND NOT WIN32) From 25bace92265f61f6a78a2e8b90936f5b8078686e Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 3 Aug 2017 20:05:46 +0300 Subject: [PATCH 369/612] Add 'hunter_generate_qt_5_9_info' module --- .../modules/hunter_generate_qt_5_9_info.cmake | 171 ++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 cmake/modules/hunter_generate_qt_5_9_info.cmake diff --git a/cmake/modules/hunter_generate_qt_5_9_info.cmake b/cmake/modules/hunter_generate_qt_5_9_info.cmake new file mode 100644 index 0000000000..f3c299b8c3 --- /dev/null +++ b/cmake/modules/hunter_generate_qt_5_9_info.cmake @@ -0,0 +1,171 @@ +# Copyright (c) 2015-2017, Ruslan Baratov +# All rights reserved. + +include(hunter_internal_error) +include(hunter_qt_add_module) +include(hunter_test_string_not_empty) + +# See cmake/projects/Qt/generate.sh + +# This function will be used in build scheme too so it's better to set +# regular CMake variables like WIN32 or ANDROID explicitly by is_{android,win32} + +function( + hunter_generate_qt_5_9_info + component_name + skip_components_varname + component_depends_on_varname + is_android + is_win32 +) + hunter_test_string_not_empty("${component_name}") + hunter_test_string_not_empty("${skip_components_varname}") + hunter_test_string_not_empty("${component_depends_on_varname}") + + string(COMPARE NOTEQUAL "${ARGN}" "" has_unparsed) + if(has_unparsed) + hunter_internal_error("Unparsed argument: ${ARGN}") + endif() + + set( + all_components + qt3d + qtactiveqt + qtandroidextras + qtbase + qtcanvas3d + qtconnectivity + qtdeclarative + qtdoc + qtenginio + qtgraphicaleffects + qtimageformats + qtlocation + qtmacextras + qtmultimedia + qtquickcontrols + qtquickcontrols2 + qtscript + qtsensors + qtserialport + qtsvg + qttools + qttranslations + qtwayland + qtwebchannel + qtwebengine + qtwebsockets + qtwebview + qtwinextras + qtx11extras + qtxmlpatterns + ) + + # This is modified copy/paste code from /qt.pro + + if(is_android) + set(ANDROID_EXTRAS qtandroidextras) + else() + set(ANDROID_EXTRAS "") + endif() + + if(is_win32) + set(ACTIVE_QT qtactiveqt) + else() + # Project MESSAGE: ActiveQt is a Windows Desktop-only module. Will just generate a docs target. + set(ACTIVE_QT "") + endif() + + # Order is important. Component of each section should not depends on entry + # from section below. + + # Components are in list but not exists in fact: + # * qtdocgallery + # * qtfeedback + # * qtpim + # * qtsystems + + # Depends on nothing + hunter_qt_add_module(NAME qtbase) + # -- + + # Depends only on qtbase + hunter_qt_add_module(NAME qtandroidextras COMPONENTS qtbase) + hunter_qt_add_module(NAME qtmacextras COMPONENTS qtbase) + hunter_qt_add_module(NAME qtx11extras COMPONENTS qtbase) + hunter_qt_add_module(NAME qtsvg COMPONENTS qtbase) + hunter_qt_add_module(NAME qtxmlpatterns COMPONENTS qtbase) + hunter_qt_add_module(NAME ${ACTIVE_QT} COMPONENTS qtbase) + hunter_qt_add_module(NAME qtimageformats COMPONENTS qtbase) + hunter_qt_add_module(NAME qtserialport COMPONENTS qtbase) + # -- + + # -- + hunter_qt_add_module(NAME qtdeclarative COMPONENTS qtbase qtsvg qtxmlpatterns) + # -- + + # Depends only on qtbase/qtdeclarative + hunter_qt_add_module(NAME qtcanvas3d COMPONENTS qtdeclarative) + hunter_qt_add_module(NAME qtdoc COMPONENTS qtdeclarative) + hunter_qt_add_module(NAME qtenginio COMPONENTS qtdeclarative) + hunter_qt_add_module(NAME qtgraphicaleffects COMPONENTS qtdeclarative) + hunter_qt_add_module(NAME qtmultimedia COMPONENTS qtbase qtdeclarative) + hunter_qt_add_module(NAME qtsensors COMPONENTS qtbase qtdeclarative) + hunter_qt_add_module(NAME qtwayland COMPONENTS qtbase qtdeclarative) + hunter_qt_add_module(NAME qtwebsockets COMPONENTS qtbase qtdeclarative) + # -- + + # -- + hunter_qt_add_module(NAME qtquickcontrols COMPONENTS qtdeclarative qtgraphicaleffects) + hunter_qt_add_module(NAME qtwinextras COMPONENTS qtbase qtdeclarative qtmultimedia) + hunter_qt_add_module(NAME qtconnectivity COMPONENTS qtbase ${ANDROID_EXTRAS} qtdeclarative) + hunter_qt_add_module(NAME qtwebchannel COMPONENTS qtbase qtdeclarative qtwebsockets) + hunter_qt_add_module(NAME qt3d COMPONENTS qtdeclarative qtimageformats) + # -- + + # -- + hunter_qt_add_module(NAME qtlocation COMPONENTS qtbase qtdeclarative qtquickcontrols) + hunter_qt_add_module(NAME qtquickcontrols2 COMPONENTS qtquickcontrols) + # -- + + # -- + hunter_qt_add_module(NAME qttools COMPONENTS qtbase qtdeclarative ${ACTIVE_QT}) + hunter_qt_add_module(NAME qtwebengine COMPONENTS qtquickcontrols qtwebchannel qtlocation) + # -- + + # -- + hunter_qt_add_module(NAME qtwebview COMPONENTS qtdeclarative qtwebengine) + hunter_qt_add_module(NAME qtscript COMPONENTS qtbase qttools) + hunter_qt_add_module(NAME qttranslations COMPONENTS qttools) + # -- + + string(COMPARE EQUAL "${component_name}" "qtbase" is_qtbase) + string(COMPARE EQUAL "${component_${component_name}_depends_on}" "" depends_on_nothing) + if(is_qtbase) + if(NOT depends_on_nothing) + hunter_internal_error("qtbase should not depends on anything") + endif() + else() + if(depends_on_nothing) + hunter_internal_error( + "component `${component_name}` should have at least one dependency:" + " qtbase" + ) + endif() + endif() + + set( + "${component_depends_on_varname}" + "${component_${component_name}_depends_on}" + PARENT_SCOPE + ) + + set(skip_list ${all_components}) + list( + REMOVE_ITEM + skip_list + "${component_name}" + ${component_${component_name}_depends_on} + ) + set("${skip_components_varname}" "${skip_list}" PARENT_SCOPE) +endfunction() From a77f02ba311fa3fdb234b8afa9d49c808fbdedd3 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 3 Aug 2017 20:06:50 +0300 Subject: [PATCH 370/612] Qt 5.9 sources for Linux --- cmake/projects/Qt/hunter.cmake | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/cmake/projects/Qt/hunter.cmake b/cmake/projects/Qt/hunter.cmake index 7fb9d2003f..584f546ee3 100644 --- a/cmake/projects/Qt/hunter.cmake +++ b/cmake/projects/Qt/hunter.cmake @@ -215,16 +215,29 @@ hunter_add_version( d902b7df94219d2ed2f5c868839c85ce9daa056a ) -hunter_add_version( - PACKAGE_NAME - Qt - VERSION - "5.9.1" - URL - "http://download.qt.io/official_releases/qt/5.9/5.9.1/single/qt-everywhere-opensource-src-5.9.1.zip" - SHA1 - bdac47fdcf6dd502a123eb403bb4260542f91034 -) +if(WIN32) + hunter_add_version( + PACKAGE_NAME + Qt + VERSION + "5.9.1" + URL + "http://download.qt.io/official_releases/qt/5.9/5.9.1/single/qt-everywhere-opensource-src-5.9.1.zip" + SHA1 + bdac47fdcf6dd502a123eb403bb4260542f91034 + ) +else() + hunter_add_version( + PACKAGE_NAME + Qt + VERSION + "5.9.1" + URL + "http://download.qt.io/official_releases/qt/5.9/5.9.1/single/qt-everywhere-opensource-src-5.9.1.tar.xz" + SHA1 + 8b9900cece0a18cf23d53a42379a628a1c1330ae + ) +endif() hunter_cacheable(Qt) From 0aeb1275a2bb30402e7327d3f5c7de9492708b33 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 3 Aug 2017 20:07:21 +0300 Subject: [PATCH 371/612] Qt 5.9 build fixes --- cmake/modules/hunter_generate_qt_info.cmake | 9 +++++++++ cmake/projects/Qt/schemes/url_sha1_qt.cmake.in | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/modules/hunter_generate_qt_info.cmake b/cmake/modules/hunter_generate_qt_info.cmake index 7104daa941..e93f077894 100644 --- a/cmake/modules/hunter_generate_qt_info.cmake +++ b/cmake/modules/hunter_generate_qt_info.cmake @@ -3,6 +3,7 @@ include(hunter_generate_qt_5_5_info) include(hunter_generate_qt_5_6_info) +include(hunter_generate_qt_5_9_info) include(hunter_test_string_not_empty) include(hunter_user_error) @@ -44,6 +45,14 @@ function( "${is_android}" "${is_win32}" ) + elseif(qt_version MATCHES "^5\\.9\\.") + hunter_generate_qt_5_9_info( + "${component_name}" + toskip + depends_on + "${is_android}" + "${is_win32}" + ) else() hunter_user_error("Unexpected Qt version") endif() diff --git a/cmake/projects/Qt/schemes/url_sha1_qt.cmake.in b/cmake/projects/Qt/schemes/url_sha1_qt.cmake.in index 39cd98c810..26bb100a9d 100644 --- a/cmake/projects/Qt/schemes/url_sha1_qt.cmake.in +++ b/cmake/projects/Qt/schemes/url_sha1_qt.cmake.in @@ -236,7 +236,9 @@ list(APPEND configure_opts "-no-fontconfig") list(APPEND configure_opts "-no-gif") if(NOT WIN32) list(APPEND configure_opts "-no-glib") - list(APPEND configure_opts "-no-gtkstyle") + if(HUNTER_Qt_VERSION VERSION_LESS 5.9) + list(APPEND configure_opts "-no-gtkstyle") + endif() list(APPEND configure_opts "-no-xinput2") endif() list(APPEND configure_opts "-no-icu") From aa57f47fee0f9bdb0cdf86a34f89e046cce13ba1 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Thu, 10 Aug 2017 23:32:12 +0300 Subject: [PATCH 372/612] New Qt 5.9 components --- .../modules/hunter_generate_qt_5_9_info.cmake | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/cmake/modules/hunter_generate_qt_5_9_info.cmake b/cmake/modules/hunter_generate_qt_5_9_info.cmake index f3c299b8c3..3c256fd006 100644 --- a/cmake/modules/hunter_generate_qt_5_9_info.cmake +++ b/cmake/modules/hunter_generate_qt_5_9_info.cmake @@ -34,26 +34,45 @@ function( qtandroidextras qtbase qtcanvas3d + qtcharts qtconnectivity + qtdatavis3d qtdeclarative qtdoc + qtdocgallery qtenginio + qtfeedback + qtgamepad qtgraphicaleffects qtimageformats qtlocation qtmacextras qtmultimedia + qtnetworkauth + qtpim + qtpurchasing + qtqa + qtquick1 qtquickcontrols qtquickcontrols2 + qtremoteobjects + qtrepotools qtscript + qtscxml qtsensors + qtserialbus qtserialport + qtspeech qtsvg + qtsystems qttools qttranslations + qtvirtualkeyboard qtwayland qtwebchannel qtwebengine + qtwebkit + qtwebkit-examples qtwebsockets qtwebview qtwinextras From 8c4072762b65041c970516a34771039627bfa766 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 14 Aug 2017 20:05:08 +0300 Subject: [PATCH 373/612] Qt generate.sh: New components from 5.9 --- cmake/projects/Qt/generate.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cmake/projects/Qt/generate.sh b/cmake/projects/Qt/generate.sh index 78e123257e..aca126c7a3 100755 --- a/cmake/projects/Qt/generate.sh +++ b/cmake/projects/Qt/generate.sh @@ -15,24 +15,40 @@ QT_LIBS=" qtandroidextras qtbase qtcanvas3d + qtcharts qtconnectivity + qtdatavis3d qtdeclarative qtdoc + qtdocgallery qtenginio + qtfeedback + qtgamepad qtgraphicaleffects qtimageformats qtlocation qtmacextras qtmultimedia + qtnetworkauth + qtpim + qtpurchasing + qtqa qtquick1 qtquickcontrols qtquickcontrols2 + qtremoteobjects + qtrepotools qtscript + qtscxml qtsensors + qtserialbus qtserialport + qtspeech qtsvg + qtsystems qttools qttranslations + qtvirtualkeyboard qtwayland qtwebchannel qtwebengine From 7ce338c5ea3a65295f72034b47004d84271fa443 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 14 Aug 2017 20:10:02 +0300 Subject: [PATCH 374/612] Qt template: Add components from 5.9 --- cmake/projects/Qt/hunter.cmake.in | 52 +++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/cmake/projects/Qt/hunter.cmake.in b/cmake/projects/Qt/hunter.cmake.in index f7e02d73ae..a70977740c 100644 --- a/cmake/projects/Qt/hunter.cmake.in +++ b/cmake/projects/Qt/hunter.cmake.in @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "@qt_component@" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "@qt_component@" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "@qt_component@" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "@qt_component@" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "@qt_component@" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "@qt_component@" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "@qt_component@" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "@qt_component@" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "@qt_component@" "qtpim" _is_qtpim) +string(COMPARE EQUAL "@qt_component@" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "@qt_component@" "qtqa" _is_qtqa) +string(COMPARE EQUAL "@qt_component@" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "@qt_component@" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "@qt_component@" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "@qt_component@" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "@qt_component@" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "@qt_component@" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "@qt_component@" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() From 0e8a1caa30cad44c08e50c53da34576c82e0c167 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 14 Aug 2017 20:11:40 +0300 Subject: [PATCH 375/612] Qt: Update hunter.cmake --- cmake/projects/Qt/qt3d/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtactiveqt/hunter.cmake | 52 ++++++- .../projects/Qt/qtandroidextras/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtbase/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtcanvas3d/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtcharts/hunter.cmake | 138 ++++++++++++++++++ cmake/projects/Qt/qtconnectivity/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtdatavis3d/hunter.cmake | 138 ++++++++++++++++++ cmake/projects/Qt/qtdeclarative/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtdoc/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtdocgallery/hunter.cmake | 138 ++++++++++++++++++ cmake/projects/Qt/qtenginio/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtfeedback/hunter.cmake | 138 ++++++++++++++++++ cmake/projects/Qt/qtgamepad/hunter.cmake | 138 ++++++++++++++++++ .../Qt/qtgraphicaleffects/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtimageformats/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtlocation/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtmacextras/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtmultimedia/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtnetworkauth/hunter.cmake | 138 ++++++++++++++++++ cmake/projects/Qt/qtpim/hunter.cmake | 138 ++++++++++++++++++ cmake/projects/Qt/qtpurchasing/hunter.cmake | 138 ++++++++++++++++++ cmake/projects/Qt/qtqa/hunter.cmake | 138 ++++++++++++++++++ cmake/projects/Qt/qtquick1/hunter.cmake | 52 ++++++- .../projects/Qt/qtquickcontrols/hunter.cmake | 52 ++++++- .../projects/Qt/qtquickcontrols2/hunter.cmake | 52 ++++++- .../projects/Qt/qtremoteobjects/hunter.cmake | 138 ++++++++++++++++++ cmake/projects/Qt/qtrepotools/hunter.cmake | 138 ++++++++++++++++++ cmake/projects/Qt/qtscript/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtscxml/hunter.cmake | 138 ++++++++++++++++++ cmake/projects/Qt/qtsensors/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtserialbus/hunter.cmake | 138 ++++++++++++++++++ cmake/projects/Qt/qtserialport/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtspeech/hunter.cmake | 138 ++++++++++++++++++ cmake/projects/Qt/qtsvg/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtsystems/hunter.cmake | 138 ++++++++++++++++++ cmake/projects/Qt/qttools/hunter.cmake | 52 ++++++- cmake/projects/Qt/qttranslations/hunter.cmake | 52 ++++++- .../Qt/qtvirtualkeyboard/hunter.cmake | 138 ++++++++++++++++++ cmake/projects/Qt/qtwayland/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtwebchannel/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtwebengine/hunter.cmake | 52 ++++++- .../Qt/qtwebkit-examples/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtwebkit/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtwebsockets/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtwebview/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtwinextras/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtx11extras/hunter.cmake | 52 ++++++- cmake/projects/Qt/qtxmlpatterns/hunter.cmake | 52 ++++++- 49 files changed, 3825 insertions(+), 99 deletions(-) create mode 100644 cmake/projects/Qt/qtcharts/hunter.cmake create mode 100644 cmake/projects/Qt/qtdatavis3d/hunter.cmake create mode 100644 cmake/projects/Qt/qtdocgallery/hunter.cmake create mode 100644 cmake/projects/Qt/qtfeedback/hunter.cmake create mode 100644 cmake/projects/Qt/qtgamepad/hunter.cmake create mode 100644 cmake/projects/Qt/qtnetworkauth/hunter.cmake create mode 100644 cmake/projects/Qt/qtpim/hunter.cmake create mode 100644 cmake/projects/Qt/qtpurchasing/hunter.cmake create mode 100644 cmake/projects/Qt/qtqa/hunter.cmake create mode 100644 cmake/projects/Qt/qtremoteobjects/hunter.cmake create mode 100644 cmake/projects/Qt/qtrepotools/hunter.cmake create mode 100644 cmake/projects/Qt/qtscxml/hunter.cmake create mode 100644 cmake/projects/Qt/qtserialbus/hunter.cmake create mode 100644 cmake/projects/Qt/qtspeech/hunter.cmake create mode 100644 cmake/projects/Qt/qtsystems/hunter.cmake create mode 100644 cmake/projects/Qt/qtvirtualkeyboard/hunter.cmake diff --git a/cmake/projects/Qt/qt3d/hunter.cmake b/cmake/projects/Qt/qt3d/hunter.cmake index fa8d10cc66..66d4a31119 100644 --- a/cmake/projects/Qt/qt3d/hunter.cmake +++ b/cmake/projects/Qt/qt3d/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qt3d" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qt3d" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qt3d" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qt3d" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qt3d" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qt3d" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qt3d" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qt3d" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qt3d" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qt3d" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qt3d" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qt3d" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qt3d" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qt3d" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qt3d" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qt3d" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qt3d" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qt3d" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtactiveqt/hunter.cmake b/cmake/projects/Qt/qtactiveqt/hunter.cmake index e63b2f7e92..6d6770bb8a 100644 --- a/cmake/projects/Qt/qtactiveqt/hunter.cmake +++ b/cmake/projects/Qt/qtactiveqt/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtactiveqt" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtactiveqt" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtactiveqt" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtactiveqt" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtactiveqt" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtactiveqt" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtactiveqt" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtactiveqt" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtactiveqt" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtactiveqt" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtactiveqt" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtactiveqt" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtactiveqt" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtactiveqt" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtactiveqt" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtactiveqt" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtactiveqt" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtactiveqt" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtandroidextras/hunter.cmake b/cmake/projects/Qt/qtandroidextras/hunter.cmake index e744caaa2a..f1c0e7a91c 100644 --- a/cmake/projects/Qt/qtandroidextras/hunter.cmake +++ b/cmake/projects/Qt/qtandroidextras/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtandroidextras" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtandroidextras" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtandroidextras" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtandroidextras" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtandroidextras" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtandroidextras" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtandroidextras" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtandroidextras" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtandroidextras" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtandroidextras" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtandroidextras" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtandroidextras" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtandroidextras" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtandroidextras" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtandroidextras" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtandroidextras" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtandroidextras" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtandroidextras" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtbase/hunter.cmake b/cmake/projects/Qt/qtbase/hunter.cmake index aa7f456466..bb0d328cac 100644 --- a/cmake/projects/Qt/qtbase/hunter.cmake +++ b/cmake/projects/Qt/qtbase/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtbase" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtbase" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtbase" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtbase" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtbase" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtbase" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtbase" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtbase" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtbase" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtbase" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtbase" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtbase" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtbase" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtbase" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtbase" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtbase" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtbase" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtbase" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtcanvas3d/hunter.cmake b/cmake/projects/Qt/qtcanvas3d/hunter.cmake index a25101ff93..92644e7b38 100644 --- a/cmake/projects/Qt/qtcanvas3d/hunter.cmake +++ b/cmake/projects/Qt/qtcanvas3d/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtcanvas3d" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtcanvas3d" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtcanvas3d" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtcanvas3d" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtcanvas3d" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtcanvas3d" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtcanvas3d" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtcanvas3d" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtcanvas3d" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtcanvas3d" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtcanvas3d" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtcanvas3d" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtcanvas3d" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtcanvas3d" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtcanvas3d" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtcanvas3d" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtcanvas3d" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtcanvas3d" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtcharts/hunter.cmake b/cmake/projects/Qt/qtcharts/hunter.cmake new file mode 100644 index 0000000000..5f0bb0a8e0 --- /dev/null +++ b/cmake/projects/Qt/qtcharts/hunter.cmake @@ -0,0 +1,138 @@ +# Copyright (c) 2015-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_package) +include(hunter_download) +include(hunter_generate_qt_info) +include(hunter_pick_scheme) +include(hunter_status_debug) + +## 5.5 only -- +string(COMPARE EQUAL "qtcharts" "qtquick1" _is_qtquick1) +string(COMPARE EQUAL "qtcharts" "qtwebkit" _is_qtwebkit) +string(COMPARE EQUAL "qtcharts" "qtwebkit-examples" _is_qtwebkit_examples) + +if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.5\\.") + return() + endif() +endif() +## -- end + +## 5.6+ only -- +string(COMPARE EQUAL "qtcharts" "qtquickcontrol2" _is_qtquickcontrols2) +string(COMPARE EQUAL "qtcharts" "qtwebview" _is_qtwebview) + +if(_is_qtquickcontrols2 OR _is_qtwebview) + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtcharts" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtcharts" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtcharts" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtcharts" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtcharts" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtcharts" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtcharts" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtcharts" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtcharts" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtcharts" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtcharts" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtcharts" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtcharts" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtcharts" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtcharts" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtcharts" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + return() + endif() +endif() +## -- end + +if(NOT _HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES) + # '_depends_on' will return **all** dependencies of the component so there is + # no need to traverse them recursively (optimization) + hunter_generate_qt_info( + "qtcharts" + _unused_toskip + _depends_on + _unused_nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" + ) + + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES TRUE) + foreach(_x ${_depends_on}) + hunter_add_package(Qt COMPONENTS ${_x}) + endforeach() + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES FALSE) +endif() + +# We should call this function again since hunter_add_package is include-like +# instruction, i.e. will overwrite variable values (foreach's _x will survive) +hunter_generate_qt_info( + "qtcharts" + _unused_toskip + _unused_depends_on + _nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" +) + +list(FIND _nobuild "qtcharts" _dont_build_it) +if(NOT _dont_build_it EQUAL -1) + hunter_status_debug( + "Qt component doesn't install anything and will be skipped: qtcharts" + ) + return() +endif() + +string(COMPARE EQUAL "qtcharts" "qtdeclarative" _is_qtdeclarative) +if(WIN32 AND _is_qtdeclarative) + find_program(_python_path NAME "python" PATHS ENV PATH) + if(NOT _python_path) + hunter_user_error( + "Python not found in PATH:\n $ENV{PATH}\n" + "Python required for building Qt component (qtdeclarative):\n" + " http://doc.qt.io/qt-5/windows-requirements.html" + ) + endif() +endif() + +hunter_pick_scheme(DEFAULT url_sha1_qt) +hunter_download( + PACKAGE_NAME Qt + PACKAGE_COMPONENT "qtcharts" + PACKAGE_INTERNAL_DEPS_ID "10" +) diff --git a/cmake/projects/Qt/qtconnectivity/hunter.cmake b/cmake/projects/Qt/qtconnectivity/hunter.cmake index ac12020bc3..a55ce1963d 100644 --- a/cmake/projects/Qt/qtconnectivity/hunter.cmake +++ b/cmake/projects/Qt/qtconnectivity/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtconnectivity" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtconnectivity" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtconnectivity" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtconnectivity" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtconnectivity" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtconnectivity" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtconnectivity" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtconnectivity" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtconnectivity" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtconnectivity" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtconnectivity" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtconnectivity" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtconnectivity" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtconnectivity" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtconnectivity" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtconnectivity" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtconnectivity" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtconnectivity" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtdatavis3d/hunter.cmake b/cmake/projects/Qt/qtdatavis3d/hunter.cmake new file mode 100644 index 0000000000..2fe8d601e4 --- /dev/null +++ b/cmake/projects/Qt/qtdatavis3d/hunter.cmake @@ -0,0 +1,138 @@ +# Copyright (c) 2015-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_package) +include(hunter_download) +include(hunter_generate_qt_info) +include(hunter_pick_scheme) +include(hunter_status_debug) + +## 5.5 only -- +string(COMPARE EQUAL "qtdatavis3d" "qtquick1" _is_qtquick1) +string(COMPARE EQUAL "qtdatavis3d" "qtwebkit" _is_qtwebkit) +string(COMPARE EQUAL "qtdatavis3d" "qtwebkit-examples" _is_qtwebkit_examples) + +if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.5\\.") + return() + endif() +endif() +## -- end + +## 5.6+ only -- +string(COMPARE EQUAL "qtdatavis3d" "qtquickcontrol2" _is_qtquickcontrols2) +string(COMPARE EQUAL "qtdatavis3d" "qtwebview" _is_qtwebview) + +if(_is_qtquickcontrols2 OR _is_qtwebview) + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtdatavis3d" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtdatavis3d" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtdatavis3d" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtdatavis3d" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtdatavis3d" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtdatavis3d" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtdatavis3d" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtdatavis3d" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtdatavis3d" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtdatavis3d" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtdatavis3d" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtdatavis3d" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtdatavis3d" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtdatavis3d" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtdatavis3d" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtdatavis3d" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + return() + endif() +endif() +## -- end + +if(NOT _HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES) + # '_depends_on' will return **all** dependencies of the component so there is + # no need to traverse them recursively (optimization) + hunter_generate_qt_info( + "qtdatavis3d" + _unused_toskip + _depends_on + _unused_nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" + ) + + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES TRUE) + foreach(_x ${_depends_on}) + hunter_add_package(Qt COMPONENTS ${_x}) + endforeach() + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES FALSE) +endif() + +# We should call this function again since hunter_add_package is include-like +# instruction, i.e. will overwrite variable values (foreach's _x will survive) +hunter_generate_qt_info( + "qtdatavis3d" + _unused_toskip + _unused_depends_on + _nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" +) + +list(FIND _nobuild "qtdatavis3d" _dont_build_it) +if(NOT _dont_build_it EQUAL -1) + hunter_status_debug( + "Qt component doesn't install anything and will be skipped: qtdatavis3d" + ) + return() +endif() + +string(COMPARE EQUAL "qtdatavis3d" "qtdeclarative" _is_qtdeclarative) +if(WIN32 AND _is_qtdeclarative) + find_program(_python_path NAME "python" PATHS ENV PATH) + if(NOT _python_path) + hunter_user_error( + "Python not found in PATH:\n $ENV{PATH}\n" + "Python required for building Qt component (qtdeclarative):\n" + " http://doc.qt.io/qt-5/windows-requirements.html" + ) + endif() +endif() + +hunter_pick_scheme(DEFAULT url_sha1_qt) +hunter_download( + PACKAGE_NAME Qt + PACKAGE_COMPONENT "qtdatavis3d" + PACKAGE_INTERNAL_DEPS_ID "10" +) diff --git a/cmake/projects/Qt/qtdeclarative/hunter.cmake b/cmake/projects/Qt/qtdeclarative/hunter.cmake index 445a9c0d71..6a7b73fb14 100644 --- a/cmake/projects/Qt/qtdeclarative/hunter.cmake +++ b/cmake/projects/Qt/qtdeclarative/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtdeclarative" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtdeclarative" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtdeclarative" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtdeclarative" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtdeclarative" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtdeclarative" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtdeclarative" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtdeclarative" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtdeclarative" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtdeclarative" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtdeclarative" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtdeclarative" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtdeclarative" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtdeclarative" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtdeclarative" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtdeclarative" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtdeclarative" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtdeclarative" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtdoc/hunter.cmake b/cmake/projects/Qt/qtdoc/hunter.cmake index cdb7664a65..38c3b2def7 100644 --- a/cmake/projects/Qt/qtdoc/hunter.cmake +++ b/cmake/projects/Qt/qtdoc/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtdoc" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtdoc" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtdoc" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtdoc" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtdoc" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtdoc" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtdoc" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtdoc" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtdoc" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtdoc" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtdoc" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtdoc" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtdoc" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtdoc" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtdoc" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtdoc" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtdoc" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtdoc" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtdocgallery/hunter.cmake b/cmake/projects/Qt/qtdocgallery/hunter.cmake new file mode 100644 index 0000000000..429eb755e2 --- /dev/null +++ b/cmake/projects/Qt/qtdocgallery/hunter.cmake @@ -0,0 +1,138 @@ +# Copyright (c) 2015-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_package) +include(hunter_download) +include(hunter_generate_qt_info) +include(hunter_pick_scheme) +include(hunter_status_debug) + +## 5.5 only -- +string(COMPARE EQUAL "qtdocgallery" "qtquick1" _is_qtquick1) +string(COMPARE EQUAL "qtdocgallery" "qtwebkit" _is_qtwebkit) +string(COMPARE EQUAL "qtdocgallery" "qtwebkit-examples" _is_qtwebkit_examples) + +if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.5\\.") + return() + endif() +endif() +## -- end + +## 5.6+ only -- +string(COMPARE EQUAL "qtdocgallery" "qtquickcontrol2" _is_qtquickcontrols2) +string(COMPARE EQUAL "qtdocgallery" "qtwebview" _is_qtwebview) + +if(_is_qtquickcontrols2 OR _is_qtwebview) + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtdocgallery" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtdocgallery" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtdocgallery" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtdocgallery" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtdocgallery" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtdocgallery" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtdocgallery" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtdocgallery" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtdocgallery" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtdocgallery" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtdocgallery" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtdocgallery" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtdocgallery" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtdocgallery" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtdocgallery" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtdocgallery" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + return() + endif() +endif() +## -- end + +if(NOT _HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES) + # '_depends_on' will return **all** dependencies of the component so there is + # no need to traverse them recursively (optimization) + hunter_generate_qt_info( + "qtdocgallery" + _unused_toskip + _depends_on + _unused_nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" + ) + + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES TRUE) + foreach(_x ${_depends_on}) + hunter_add_package(Qt COMPONENTS ${_x}) + endforeach() + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES FALSE) +endif() + +# We should call this function again since hunter_add_package is include-like +# instruction, i.e. will overwrite variable values (foreach's _x will survive) +hunter_generate_qt_info( + "qtdocgallery" + _unused_toskip + _unused_depends_on + _nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" +) + +list(FIND _nobuild "qtdocgallery" _dont_build_it) +if(NOT _dont_build_it EQUAL -1) + hunter_status_debug( + "Qt component doesn't install anything and will be skipped: qtdocgallery" + ) + return() +endif() + +string(COMPARE EQUAL "qtdocgallery" "qtdeclarative" _is_qtdeclarative) +if(WIN32 AND _is_qtdeclarative) + find_program(_python_path NAME "python" PATHS ENV PATH) + if(NOT _python_path) + hunter_user_error( + "Python not found in PATH:\n $ENV{PATH}\n" + "Python required for building Qt component (qtdeclarative):\n" + " http://doc.qt.io/qt-5/windows-requirements.html" + ) + endif() +endif() + +hunter_pick_scheme(DEFAULT url_sha1_qt) +hunter_download( + PACKAGE_NAME Qt + PACKAGE_COMPONENT "qtdocgallery" + PACKAGE_INTERNAL_DEPS_ID "10" +) diff --git a/cmake/projects/Qt/qtenginio/hunter.cmake b/cmake/projects/Qt/qtenginio/hunter.cmake index 6c1c1e6b6c..b95dc91990 100644 --- a/cmake/projects/Qt/qtenginio/hunter.cmake +++ b/cmake/projects/Qt/qtenginio/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtenginio" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtenginio" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtenginio" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtenginio" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtenginio" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtenginio" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtenginio" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtenginio" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtenginio" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtenginio" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtenginio" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtenginio" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtenginio" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtenginio" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtenginio" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtenginio" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtenginio" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtenginio" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtfeedback/hunter.cmake b/cmake/projects/Qt/qtfeedback/hunter.cmake new file mode 100644 index 0000000000..a3d845a1a2 --- /dev/null +++ b/cmake/projects/Qt/qtfeedback/hunter.cmake @@ -0,0 +1,138 @@ +# Copyright (c) 2015-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_package) +include(hunter_download) +include(hunter_generate_qt_info) +include(hunter_pick_scheme) +include(hunter_status_debug) + +## 5.5 only -- +string(COMPARE EQUAL "qtfeedback" "qtquick1" _is_qtquick1) +string(COMPARE EQUAL "qtfeedback" "qtwebkit" _is_qtwebkit) +string(COMPARE EQUAL "qtfeedback" "qtwebkit-examples" _is_qtwebkit_examples) + +if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.5\\.") + return() + endif() +endif() +## -- end + +## 5.6+ only -- +string(COMPARE EQUAL "qtfeedback" "qtquickcontrol2" _is_qtquickcontrols2) +string(COMPARE EQUAL "qtfeedback" "qtwebview" _is_qtwebview) + +if(_is_qtquickcontrols2 OR _is_qtwebview) + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtfeedback" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtfeedback" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtfeedback" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtfeedback" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtfeedback" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtfeedback" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtfeedback" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtfeedback" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtfeedback" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtfeedback" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtfeedback" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtfeedback" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtfeedback" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtfeedback" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtfeedback" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtfeedback" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + return() + endif() +endif() +## -- end + +if(NOT _HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES) + # '_depends_on' will return **all** dependencies of the component so there is + # no need to traverse them recursively (optimization) + hunter_generate_qt_info( + "qtfeedback" + _unused_toskip + _depends_on + _unused_nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" + ) + + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES TRUE) + foreach(_x ${_depends_on}) + hunter_add_package(Qt COMPONENTS ${_x}) + endforeach() + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES FALSE) +endif() + +# We should call this function again since hunter_add_package is include-like +# instruction, i.e. will overwrite variable values (foreach's _x will survive) +hunter_generate_qt_info( + "qtfeedback" + _unused_toskip + _unused_depends_on + _nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" +) + +list(FIND _nobuild "qtfeedback" _dont_build_it) +if(NOT _dont_build_it EQUAL -1) + hunter_status_debug( + "Qt component doesn't install anything and will be skipped: qtfeedback" + ) + return() +endif() + +string(COMPARE EQUAL "qtfeedback" "qtdeclarative" _is_qtdeclarative) +if(WIN32 AND _is_qtdeclarative) + find_program(_python_path NAME "python" PATHS ENV PATH) + if(NOT _python_path) + hunter_user_error( + "Python not found in PATH:\n $ENV{PATH}\n" + "Python required for building Qt component (qtdeclarative):\n" + " http://doc.qt.io/qt-5/windows-requirements.html" + ) + endif() +endif() + +hunter_pick_scheme(DEFAULT url_sha1_qt) +hunter_download( + PACKAGE_NAME Qt + PACKAGE_COMPONENT "qtfeedback" + PACKAGE_INTERNAL_DEPS_ID "10" +) diff --git a/cmake/projects/Qt/qtgamepad/hunter.cmake b/cmake/projects/Qt/qtgamepad/hunter.cmake new file mode 100644 index 0000000000..bdcc9784f5 --- /dev/null +++ b/cmake/projects/Qt/qtgamepad/hunter.cmake @@ -0,0 +1,138 @@ +# Copyright (c) 2015-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_package) +include(hunter_download) +include(hunter_generate_qt_info) +include(hunter_pick_scheme) +include(hunter_status_debug) + +## 5.5 only -- +string(COMPARE EQUAL "qtgamepad" "qtquick1" _is_qtquick1) +string(COMPARE EQUAL "qtgamepad" "qtwebkit" _is_qtwebkit) +string(COMPARE EQUAL "qtgamepad" "qtwebkit-examples" _is_qtwebkit_examples) + +if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.5\\.") + return() + endif() +endif() +## -- end + +## 5.6+ only -- +string(COMPARE EQUAL "qtgamepad" "qtquickcontrol2" _is_qtquickcontrols2) +string(COMPARE EQUAL "qtgamepad" "qtwebview" _is_qtwebview) + +if(_is_qtquickcontrols2 OR _is_qtwebview) + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtgamepad" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtgamepad" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtgamepad" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtgamepad" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtgamepad" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtgamepad" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtgamepad" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtgamepad" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtgamepad" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtgamepad" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtgamepad" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtgamepad" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtgamepad" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtgamepad" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtgamepad" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtgamepad" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + return() + endif() +endif() +## -- end + +if(NOT _HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES) + # '_depends_on' will return **all** dependencies of the component so there is + # no need to traverse them recursively (optimization) + hunter_generate_qt_info( + "qtgamepad" + _unused_toskip + _depends_on + _unused_nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" + ) + + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES TRUE) + foreach(_x ${_depends_on}) + hunter_add_package(Qt COMPONENTS ${_x}) + endforeach() + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES FALSE) +endif() + +# We should call this function again since hunter_add_package is include-like +# instruction, i.e. will overwrite variable values (foreach's _x will survive) +hunter_generate_qt_info( + "qtgamepad" + _unused_toskip + _unused_depends_on + _nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" +) + +list(FIND _nobuild "qtgamepad" _dont_build_it) +if(NOT _dont_build_it EQUAL -1) + hunter_status_debug( + "Qt component doesn't install anything and will be skipped: qtgamepad" + ) + return() +endif() + +string(COMPARE EQUAL "qtgamepad" "qtdeclarative" _is_qtdeclarative) +if(WIN32 AND _is_qtdeclarative) + find_program(_python_path NAME "python" PATHS ENV PATH) + if(NOT _python_path) + hunter_user_error( + "Python not found in PATH:\n $ENV{PATH}\n" + "Python required for building Qt component (qtdeclarative):\n" + " http://doc.qt.io/qt-5/windows-requirements.html" + ) + endif() +endif() + +hunter_pick_scheme(DEFAULT url_sha1_qt) +hunter_download( + PACKAGE_NAME Qt + PACKAGE_COMPONENT "qtgamepad" + PACKAGE_INTERNAL_DEPS_ID "10" +) diff --git a/cmake/projects/Qt/qtgraphicaleffects/hunter.cmake b/cmake/projects/Qt/qtgraphicaleffects/hunter.cmake index bffef6463d..2155ed6402 100644 --- a/cmake/projects/Qt/qtgraphicaleffects/hunter.cmake +++ b/cmake/projects/Qt/qtgraphicaleffects/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtgraphicaleffects" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtgraphicaleffects" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtgraphicaleffects" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtgraphicaleffects" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtgraphicaleffects" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtgraphicaleffects" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtgraphicaleffects" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtgraphicaleffects" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtgraphicaleffects" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtgraphicaleffects" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtgraphicaleffects" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtgraphicaleffects" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtgraphicaleffects" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtgraphicaleffects" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtgraphicaleffects" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtgraphicaleffects" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtgraphicaleffects" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtgraphicaleffects" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtimageformats/hunter.cmake b/cmake/projects/Qt/qtimageformats/hunter.cmake index d89de88571..dc6c84f4e0 100644 --- a/cmake/projects/Qt/qtimageformats/hunter.cmake +++ b/cmake/projects/Qt/qtimageformats/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtimageformats" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtimageformats" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtimageformats" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtimageformats" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtimageformats" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtimageformats" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtimageformats" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtimageformats" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtimageformats" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtimageformats" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtimageformats" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtimageformats" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtimageformats" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtimageformats" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtimageformats" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtimageformats" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtimageformats" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtimageformats" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtlocation/hunter.cmake b/cmake/projects/Qt/qtlocation/hunter.cmake index ab263a50ea..7d49d66e7a 100644 --- a/cmake/projects/Qt/qtlocation/hunter.cmake +++ b/cmake/projects/Qt/qtlocation/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtlocation" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtlocation" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtlocation" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtlocation" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtlocation" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtlocation" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtlocation" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtlocation" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtlocation" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtlocation" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtlocation" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtlocation" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtlocation" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtlocation" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtlocation" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtlocation" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtlocation" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtlocation" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtmacextras/hunter.cmake b/cmake/projects/Qt/qtmacextras/hunter.cmake index 7d2918bec6..c388df61d7 100644 --- a/cmake/projects/Qt/qtmacextras/hunter.cmake +++ b/cmake/projects/Qt/qtmacextras/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtmacextras" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtmacextras" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtmacextras" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtmacextras" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtmacextras" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtmacextras" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtmacextras" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtmacextras" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtmacextras" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtmacextras" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtmacextras" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtmacextras" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtmacextras" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtmacextras" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtmacextras" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtmacextras" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtmacextras" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtmacextras" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtmultimedia/hunter.cmake b/cmake/projects/Qt/qtmultimedia/hunter.cmake index bf109fa94a..8eaccb2f7f 100644 --- a/cmake/projects/Qt/qtmultimedia/hunter.cmake +++ b/cmake/projects/Qt/qtmultimedia/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtmultimedia" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtmultimedia" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtmultimedia" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtmultimedia" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtmultimedia" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtmultimedia" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtmultimedia" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtmultimedia" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtmultimedia" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtmultimedia" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtmultimedia" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtmultimedia" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtmultimedia" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtmultimedia" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtmultimedia" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtmultimedia" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtmultimedia" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtmultimedia" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtnetworkauth/hunter.cmake b/cmake/projects/Qt/qtnetworkauth/hunter.cmake new file mode 100644 index 0000000000..c1da3e90a0 --- /dev/null +++ b/cmake/projects/Qt/qtnetworkauth/hunter.cmake @@ -0,0 +1,138 @@ +# Copyright (c) 2015-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_package) +include(hunter_download) +include(hunter_generate_qt_info) +include(hunter_pick_scheme) +include(hunter_status_debug) + +## 5.5 only -- +string(COMPARE EQUAL "qtnetworkauth" "qtquick1" _is_qtquick1) +string(COMPARE EQUAL "qtnetworkauth" "qtwebkit" _is_qtwebkit) +string(COMPARE EQUAL "qtnetworkauth" "qtwebkit-examples" _is_qtwebkit_examples) + +if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.5\\.") + return() + endif() +endif() +## -- end + +## 5.6+ only -- +string(COMPARE EQUAL "qtnetworkauth" "qtquickcontrol2" _is_qtquickcontrols2) +string(COMPARE EQUAL "qtnetworkauth" "qtwebview" _is_qtwebview) + +if(_is_qtquickcontrols2 OR _is_qtwebview) + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtnetworkauth" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtnetworkauth" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtnetworkauth" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtnetworkauth" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtnetworkauth" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtnetworkauth" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtnetworkauth" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtnetworkauth" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtnetworkauth" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtnetworkauth" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtnetworkauth" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtnetworkauth" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtnetworkauth" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtnetworkauth" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtnetworkauth" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtnetworkauth" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + return() + endif() +endif() +## -- end + +if(NOT _HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES) + # '_depends_on' will return **all** dependencies of the component so there is + # no need to traverse them recursively (optimization) + hunter_generate_qt_info( + "qtnetworkauth" + _unused_toskip + _depends_on + _unused_nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" + ) + + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES TRUE) + foreach(_x ${_depends_on}) + hunter_add_package(Qt COMPONENTS ${_x}) + endforeach() + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES FALSE) +endif() + +# We should call this function again since hunter_add_package is include-like +# instruction, i.e. will overwrite variable values (foreach's _x will survive) +hunter_generate_qt_info( + "qtnetworkauth" + _unused_toskip + _unused_depends_on + _nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" +) + +list(FIND _nobuild "qtnetworkauth" _dont_build_it) +if(NOT _dont_build_it EQUAL -1) + hunter_status_debug( + "Qt component doesn't install anything and will be skipped: qtnetworkauth" + ) + return() +endif() + +string(COMPARE EQUAL "qtnetworkauth" "qtdeclarative" _is_qtdeclarative) +if(WIN32 AND _is_qtdeclarative) + find_program(_python_path NAME "python" PATHS ENV PATH) + if(NOT _python_path) + hunter_user_error( + "Python not found in PATH:\n $ENV{PATH}\n" + "Python required for building Qt component (qtdeclarative):\n" + " http://doc.qt.io/qt-5/windows-requirements.html" + ) + endif() +endif() + +hunter_pick_scheme(DEFAULT url_sha1_qt) +hunter_download( + PACKAGE_NAME Qt + PACKAGE_COMPONENT "qtnetworkauth" + PACKAGE_INTERNAL_DEPS_ID "10" +) diff --git a/cmake/projects/Qt/qtpim/hunter.cmake b/cmake/projects/Qt/qtpim/hunter.cmake new file mode 100644 index 0000000000..c2858397c8 --- /dev/null +++ b/cmake/projects/Qt/qtpim/hunter.cmake @@ -0,0 +1,138 @@ +# Copyright (c) 2015-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_package) +include(hunter_download) +include(hunter_generate_qt_info) +include(hunter_pick_scheme) +include(hunter_status_debug) + +## 5.5 only -- +string(COMPARE EQUAL "qtpim" "qtquick1" _is_qtquick1) +string(COMPARE EQUAL "qtpim" "qtwebkit" _is_qtwebkit) +string(COMPARE EQUAL "qtpim" "qtwebkit-examples" _is_qtwebkit_examples) + +if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.5\\.") + return() + endif() +endif() +## -- end + +## 5.6+ only -- +string(COMPARE EQUAL "qtpim" "qtquickcontrol2" _is_qtquickcontrols2) +string(COMPARE EQUAL "qtpim" "qtwebview" _is_qtwebview) + +if(_is_qtquickcontrols2 OR _is_qtwebview) + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtpim" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtpim" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtpim" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtpim" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtpim" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtpim" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtpim" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtpim" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtpim" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtpim" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtpim" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtpim" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtpim" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtpim" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtpim" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtpim" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + return() + endif() +endif() +## -- end + +if(NOT _HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES) + # '_depends_on' will return **all** dependencies of the component so there is + # no need to traverse them recursively (optimization) + hunter_generate_qt_info( + "qtpim" + _unused_toskip + _depends_on + _unused_nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" + ) + + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES TRUE) + foreach(_x ${_depends_on}) + hunter_add_package(Qt COMPONENTS ${_x}) + endforeach() + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES FALSE) +endif() + +# We should call this function again since hunter_add_package is include-like +# instruction, i.e. will overwrite variable values (foreach's _x will survive) +hunter_generate_qt_info( + "qtpim" + _unused_toskip + _unused_depends_on + _nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" +) + +list(FIND _nobuild "qtpim" _dont_build_it) +if(NOT _dont_build_it EQUAL -1) + hunter_status_debug( + "Qt component doesn't install anything and will be skipped: qtpim" + ) + return() +endif() + +string(COMPARE EQUAL "qtpim" "qtdeclarative" _is_qtdeclarative) +if(WIN32 AND _is_qtdeclarative) + find_program(_python_path NAME "python" PATHS ENV PATH) + if(NOT _python_path) + hunter_user_error( + "Python not found in PATH:\n $ENV{PATH}\n" + "Python required for building Qt component (qtdeclarative):\n" + " http://doc.qt.io/qt-5/windows-requirements.html" + ) + endif() +endif() + +hunter_pick_scheme(DEFAULT url_sha1_qt) +hunter_download( + PACKAGE_NAME Qt + PACKAGE_COMPONENT "qtpim" + PACKAGE_INTERNAL_DEPS_ID "10" +) diff --git a/cmake/projects/Qt/qtpurchasing/hunter.cmake b/cmake/projects/Qt/qtpurchasing/hunter.cmake new file mode 100644 index 0000000000..e289d55370 --- /dev/null +++ b/cmake/projects/Qt/qtpurchasing/hunter.cmake @@ -0,0 +1,138 @@ +# Copyright (c) 2015-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_package) +include(hunter_download) +include(hunter_generate_qt_info) +include(hunter_pick_scheme) +include(hunter_status_debug) + +## 5.5 only -- +string(COMPARE EQUAL "qtpurchasing" "qtquick1" _is_qtquick1) +string(COMPARE EQUAL "qtpurchasing" "qtwebkit" _is_qtwebkit) +string(COMPARE EQUAL "qtpurchasing" "qtwebkit-examples" _is_qtwebkit_examples) + +if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.5\\.") + return() + endif() +endif() +## -- end + +## 5.6+ only -- +string(COMPARE EQUAL "qtpurchasing" "qtquickcontrol2" _is_qtquickcontrols2) +string(COMPARE EQUAL "qtpurchasing" "qtwebview" _is_qtwebview) + +if(_is_qtquickcontrols2 OR _is_qtwebview) + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtpurchasing" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtpurchasing" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtpurchasing" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtpurchasing" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtpurchasing" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtpurchasing" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtpurchasing" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtpurchasing" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtpurchasing" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtpurchasing" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtpurchasing" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtpurchasing" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtpurchasing" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtpurchasing" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtpurchasing" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtpurchasing" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + return() + endif() +endif() +## -- end + +if(NOT _HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES) + # '_depends_on' will return **all** dependencies of the component so there is + # no need to traverse them recursively (optimization) + hunter_generate_qt_info( + "qtpurchasing" + _unused_toskip + _depends_on + _unused_nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" + ) + + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES TRUE) + foreach(_x ${_depends_on}) + hunter_add_package(Qt COMPONENTS ${_x}) + endforeach() + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES FALSE) +endif() + +# We should call this function again since hunter_add_package is include-like +# instruction, i.e. will overwrite variable values (foreach's _x will survive) +hunter_generate_qt_info( + "qtpurchasing" + _unused_toskip + _unused_depends_on + _nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" +) + +list(FIND _nobuild "qtpurchasing" _dont_build_it) +if(NOT _dont_build_it EQUAL -1) + hunter_status_debug( + "Qt component doesn't install anything and will be skipped: qtpurchasing" + ) + return() +endif() + +string(COMPARE EQUAL "qtpurchasing" "qtdeclarative" _is_qtdeclarative) +if(WIN32 AND _is_qtdeclarative) + find_program(_python_path NAME "python" PATHS ENV PATH) + if(NOT _python_path) + hunter_user_error( + "Python not found in PATH:\n $ENV{PATH}\n" + "Python required for building Qt component (qtdeclarative):\n" + " http://doc.qt.io/qt-5/windows-requirements.html" + ) + endif() +endif() + +hunter_pick_scheme(DEFAULT url_sha1_qt) +hunter_download( + PACKAGE_NAME Qt + PACKAGE_COMPONENT "qtpurchasing" + PACKAGE_INTERNAL_DEPS_ID "10" +) diff --git a/cmake/projects/Qt/qtqa/hunter.cmake b/cmake/projects/Qt/qtqa/hunter.cmake new file mode 100644 index 0000000000..e40c07b118 --- /dev/null +++ b/cmake/projects/Qt/qtqa/hunter.cmake @@ -0,0 +1,138 @@ +# Copyright (c) 2015-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_package) +include(hunter_download) +include(hunter_generate_qt_info) +include(hunter_pick_scheme) +include(hunter_status_debug) + +## 5.5 only -- +string(COMPARE EQUAL "qtqa" "qtquick1" _is_qtquick1) +string(COMPARE EQUAL "qtqa" "qtwebkit" _is_qtwebkit) +string(COMPARE EQUAL "qtqa" "qtwebkit-examples" _is_qtwebkit_examples) + +if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.5\\.") + return() + endif() +endif() +## -- end + +## 5.6+ only -- +string(COMPARE EQUAL "qtqa" "qtquickcontrol2" _is_qtquickcontrols2) +string(COMPARE EQUAL "qtqa" "qtwebview" _is_qtwebview) + +if(_is_qtquickcontrols2 OR _is_qtwebview) + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtqa" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtqa" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtqa" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtqa" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtqa" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtqa" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtqa" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtqa" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtqa" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtqa" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtqa" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtqa" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtqa" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtqa" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtqa" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtqa" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + return() + endif() +endif() +## -- end + +if(NOT _HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES) + # '_depends_on' will return **all** dependencies of the component so there is + # no need to traverse them recursively (optimization) + hunter_generate_qt_info( + "qtqa" + _unused_toskip + _depends_on + _unused_nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" + ) + + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES TRUE) + foreach(_x ${_depends_on}) + hunter_add_package(Qt COMPONENTS ${_x}) + endforeach() + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES FALSE) +endif() + +# We should call this function again since hunter_add_package is include-like +# instruction, i.e. will overwrite variable values (foreach's _x will survive) +hunter_generate_qt_info( + "qtqa" + _unused_toskip + _unused_depends_on + _nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" +) + +list(FIND _nobuild "qtqa" _dont_build_it) +if(NOT _dont_build_it EQUAL -1) + hunter_status_debug( + "Qt component doesn't install anything and will be skipped: qtqa" + ) + return() +endif() + +string(COMPARE EQUAL "qtqa" "qtdeclarative" _is_qtdeclarative) +if(WIN32 AND _is_qtdeclarative) + find_program(_python_path NAME "python" PATHS ENV PATH) + if(NOT _python_path) + hunter_user_error( + "Python not found in PATH:\n $ENV{PATH}\n" + "Python required for building Qt component (qtdeclarative):\n" + " http://doc.qt.io/qt-5/windows-requirements.html" + ) + endif() +endif() + +hunter_pick_scheme(DEFAULT url_sha1_qt) +hunter_download( + PACKAGE_NAME Qt + PACKAGE_COMPONENT "qtqa" + PACKAGE_INTERNAL_DEPS_ID "10" +) diff --git a/cmake/projects/Qt/qtquick1/hunter.cmake b/cmake/projects/Qt/qtquick1/hunter.cmake index c13c290932..a0c2346edb 100644 --- a/cmake/projects/Qt/qtquick1/hunter.cmake +++ b/cmake/projects/Qt/qtquick1/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtquick1" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtquick1" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtquick1" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtquick1" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtquick1" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtquick1" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtquick1" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtquick1" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtquick1" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtquick1" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtquick1" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtquick1" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtquick1" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtquick1" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtquick1" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtquick1" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtquick1" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtquick1" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtquickcontrols/hunter.cmake b/cmake/projects/Qt/qtquickcontrols/hunter.cmake index 8db9b3aebb..6446c25805 100644 --- a/cmake/projects/Qt/qtquickcontrols/hunter.cmake +++ b/cmake/projects/Qt/qtquickcontrols/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtquickcontrols" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtquickcontrols" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtquickcontrols" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtquickcontrols" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtquickcontrols" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtquickcontrols" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtquickcontrols" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtquickcontrols" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtquickcontrols" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtquickcontrols" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtquickcontrols" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtquickcontrols" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtquickcontrols" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtquickcontrols" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtquickcontrols" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtquickcontrols" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtquickcontrols" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtquickcontrols" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtquickcontrols2/hunter.cmake b/cmake/projects/Qt/qtquickcontrols2/hunter.cmake index 165fddc983..bbefe35dc5 100644 --- a/cmake/projects/Qt/qtquickcontrols2/hunter.cmake +++ b/cmake/projects/Qt/qtquickcontrols2/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtquickcontrols2" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtquickcontrols2" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtquickcontrols2" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtquickcontrols2" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtquickcontrols2" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtquickcontrols2" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtquickcontrols2" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtquickcontrols2" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtquickcontrols2" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtquickcontrols2" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtquickcontrols2" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtquickcontrols2" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtquickcontrols2" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtquickcontrols2" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtquickcontrols2" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtquickcontrols2" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtquickcontrols2" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtquickcontrols2" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtremoteobjects/hunter.cmake b/cmake/projects/Qt/qtremoteobjects/hunter.cmake new file mode 100644 index 0000000000..f5fd98402b --- /dev/null +++ b/cmake/projects/Qt/qtremoteobjects/hunter.cmake @@ -0,0 +1,138 @@ +# Copyright (c) 2015-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_package) +include(hunter_download) +include(hunter_generate_qt_info) +include(hunter_pick_scheme) +include(hunter_status_debug) + +## 5.5 only -- +string(COMPARE EQUAL "qtremoteobjects" "qtquick1" _is_qtquick1) +string(COMPARE EQUAL "qtremoteobjects" "qtwebkit" _is_qtwebkit) +string(COMPARE EQUAL "qtremoteobjects" "qtwebkit-examples" _is_qtwebkit_examples) + +if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.5\\.") + return() + endif() +endif() +## -- end + +## 5.6+ only -- +string(COMPARE EQUAL "qtremoteobjects" "qtquickcontrol2" _is_qtquickcontrols2) +string(COMPARE EQUAL "qtremoteobjects" "qtwebview" _is_qtwebview) + +if(_is_qtquickcontrols2 OR _is_qtwebview) + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtremoteobjects" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtremoteobjects" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtremoteobjects" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtremoteobjects" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtremoteobjects" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtremoteobjects" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtremoteobjects" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtremoteobjects" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtremoteobjects" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtremoteobjects" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtremoteobjects" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtremoteobjects" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtremoteobjects" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtremoteobjects" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtremoteobjects" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtremoteobjects" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + return() + endif() +endif() +## -- end + +if(NOT _HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES) + # '_depends_on' will return **all** dependencies of the component so there is + # no need to traverse them recursively (optimization) + hunter_generate_qt_info( + "qtremoteobjects" + _unused_toskip + _depends_on + _unused_nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" + ) + + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES TRUE) + foreach(_x ${_depends_on}) + hunter_add_package(Qt COMPONENTS ${_x}) + endforeach() + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES FALSE) +endif() + +# We should call this function again since hunter_add_package is include-like +# instruction, i.e. will overwrite variable values (foreach's _x will survive) +hunter_generate_qt_info( + "qtremoteobjects" + _unused_toskip + _unused_depends_on + _nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" +) + +list(FIND _nobuild "qtremoteobjects" _dont_build_it) +if(NOT _dont_build_it EQUAL -1) + hunter_status_debug( + "Qt component doesn't install anything and will be skipped: qtremoteobjects" + ) + return() +endif() + +string(COMPARE EQUAL "qtremoteobjects" "qtdeclarative" _is_qtdeclarative) +if(WIN32 AND _is_qtdeclarative) + find_program(_python_path NAME "python" PATHS ENV PATH) + if(NOT _python_path) + hunter_user_error( + "Python not found in PATH:\n $ENV{PATH}\n" + "Python required for building Qt component (qtdeclarative):\n" + " http://doc.qt.io/qt-5/windows-requirements.html" + ) + endif() +endif() + +hunter_pick_scheme(DEFAULT url_sha1_qt) +hunter_download( + PACKAGE_NAME Qt + PACKAGE_COMPONENT "qtremoteobjects" + PACKAGE_INTERNAL_DEPS_ID "10" +) diff --git a/cmake/projects/Qt/qtrepotools/hunter.cmake b/cmake/projects/Qt/qtrepotools/hunter.cmake new file mode 100644 index 0000000000..8ab1fc9bff --- /dev/null +++ b/cmake/projects/Qt/qtrepotools/hunter.cmake @@ -0,0 +1,138 @@ +# Copyright (c) 2015-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_package) +include(hunter_download) +include(hunter_generate_qt_info) +include(hunter_pick_scheme) +include(hunter_status_debug) + +## 5.5 only -- +string(COMPARE EQUAL "qtrepotools" "qtquick1" _is_qtquick1) +string(COMPARE EQUAL "qtrepotools" "qtwebkit" _is_qtwebkit) +string(COMPARE EQUAL "qtrepotools" "qtwebkit-examples" _is_qtwebkit_examples) + +if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.5\\.") + return() + endif() +endif() +## -- end + +## 5.6+ only -- +string(COMPARE EQUAL "qtrepotools" "qtquickcontrol2" _is_qtquickcontrols2) +string(COMPARE EQUAL "qtrepotools" "qtwebview" _is_qtwebview) + +if(_is_qtquickcontrols2 OR _is_qtwebview) + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtrepotools" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtrepotools" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtrepotools" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtrepotools" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtrepotools" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtrepotools" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtrepotools" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtrepotools" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtrepotools" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtrepotools" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtrepotools" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtrepotools" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtrepotools" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtrepotools" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtrepotools" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtrepotools" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + return() + endif() +endif() +## -- end + +if(NOT _HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES) + # '_depends_on' will return **all** dependencies of the component so there is + # no need to traverse them recursively (optimization) + hunter_generate_qt_info( + "qtrepotools" + _unused_toskip + _depends_on + _unused_nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" + ) + + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES TRUE) + foreach(_x ${_depends_on}) + hunter_add_package(Qt COMPONENTS ${_x}) + endforeach() + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES FALSE) +endif() + +# We should call this function again since hunter_add_package is include-like +# instruction, i.e. will overwrite variable values (foreach's _x will survive) +hunter_generate_qt_info( + "qtrepotools" + _unused_toskip + _unused_depends_on + _nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" +) + +list(FIND _nobuild "qtrepotools" _dont_build_it) +if(NOT _dont_build_it EQUAL -1) + hunter_status_debug( + "Qt component doesn't install anything and will be skipped: qtrepotools" + ) + return() +endif() + +string(COMPARE EQUAL "qtrepotools" "qtdeclarative" _is_qtdeclarative) +if(WIN32 AND _is_qtdeclarative) + find_program(_python_path NAME "python" PATHS ENV PATH) + if(NOT _python_path) + hunter_user_error( + "Python not found in PATH:\n $ENV{PATH}\n" + "Python required for building Qt component (qtdeclarative):\n" + " http://doc.qt.io/qt-5/windows-requirements.html" + ) + endif() +endif() + +hunter_pick_scheme(DEFAULT url_sha1_qt) +hunter_download( + PACKAGE_NAME Qt + PACKAGE_COMPONENT "qtrepotools" + PACKAGE_INTERNAL_DEPS_ID "10" +) diff --git a/cmake/projects/Qt/qtscript/hunter.cmake b/cmake/projects/Qt/qtscript/hunter.cmake index c31e885579..135d3eacdf 100644 --- a/cmake/projects/Qt/qtscript/hunter.cmake +++ b/cmake/projects/Qt/qtscript/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtscript" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtscript" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtscript" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtscript" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtscript" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtscript" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtscript" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtscript" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtscript" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtscript" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtscript" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtscript" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtscript" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtscript" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtscript" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtscript" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtscript" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtscript" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtscxml/hunter.cmake b/cmake/projects/Qt/qtscxml/hunter.cmake new file mode 100644 index 0000000000..2554447d76 --- /dev/null +++ b/cmake/projects/Qt/qtscxml/hunter.cmake @@ -0,0 +1,138 @@ +# Copyright (c) 2015-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_package) +include(hunter_download) +include(hunter_generate_qt_info) +include(hunter_pick_scheme) +include(hunter_status_debug) + +## 5.5 only -- +string(COMPARE EQUAL "qtscxml" "qtquick1" _is_qtquick1) +string(COMPARE EQUAL "qtscxml" "qtwebkit" _is_qtwebkit) +string(COMPARE EQUAL "qtscxml" "qtwebkit-examples" _is_qtwebkit_examples) + +if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.5\\.") + return() + endif() +endif() +## -- end + +## 5.6+ only -- +string(COMPARE EQUAL "qtscxml" "qtquickcontrol2" _is_qtquickcontrols2) +string(COMPARE EQUAL "qtscxml" "qtwebview" _is_qtwebview) + +if(_is_qtquickcontrols2 OR _is_qtwebview) + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtscxml" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtscxml" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtscxml" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtscxml" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtscxml" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtscxml" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtscxml" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtscxml" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtscxml" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtscxml" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtscxml" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtscxml" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtscxml" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtscxml" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtscxml" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtscxml" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + return() + endif() +endif() +## -- end + +if(NOT _HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES) + # '_depends_on' will return **all** dependencies of the component so there is + # no need to traverse them recursively (optimization) + hunter_generate_qt_info( + "qtscxml" + _unused_toskip + _depends_on + _unused_nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" + ) + + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES TRUE) + foreach(_x ${_depends_on}) + hunter_add_package(Qt COMPONENTS ${_x}) + endforeach() + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES FALSE) +endif() + +# We should call this function again since hunter_add_package is include-like +# instruction, i.e. will overwrite variable values (foreach's _x will survive) +hunter_generate_qt_info( + "qtscxml" + _unused_toskip + _unused_depends_on + _nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" +) + +list(FIND _nobuild "qtscxml" _dont_build_it) +if(NOT _dont_build_it EQUAL -1) + hunter_status_debug( + "Qt component doesn't install anything and will be skipped: qtscxml" + ) + return() +endif() + +string(COMPARE EQUAL "qtscxml" "qtdeclarative" _is_qtdeclarative) +if(WIN32 AND _is_qtdeclarative) + find_program(_python_path NAME "python" PATHS ENV PATH) + if(NOT _python_path) + hunter_user_error( + "Python not found in PATH:\n $ENV{PATH}\n" + "Python required for building Qt component (qtdeclarative):\n" + " http://doc.qt.io/qt-5/windows-requirements.html" + ) + endif() +endif() + +hunter_pick_scheme(DEFAULT url_sha1_qt) +hunter_download( + PACKAGE_NAME Qt + PACKAGE_COMPONENT "qtscxml" + PACKAGE_INTERNAL_DEPS_ID "10" +) diff --git a/cmake/projects/Qt/qtsensors/hunter.cmake b/cmake/projects/Qt/qtsensors/hunter.cmake index a44e94d1ed..2cb2405de4 100644 --- a/cmake/projects/Qt/qtsensors/hunter.cmake +++ b/cmake/projects/Qt/qtsensors/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtsensors" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtsensors" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtsensors" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtsensors" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtsensors" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtsensors" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtsensors" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtsensors" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtsensors" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtsensors" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtsensors" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtsensors" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtsensors" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtsensors" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtsensors" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtsensors" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtsensors" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtsensors" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtserialbus/hunter.cmake b/cmake/projects/Qt/qtserialbus/hunter.cmake new file mode 100644 index 0000000000..ddf26103eb --- /dev/null +++ b/cmake/projects/Qt/qtserialbus/hunter.cmake @@ -0,0 +1,138 @@ +# Copyright (c) 2015-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_package) +include(hunter_download) +include(hunter_generate_qt_info) +include(hunter_pick_scheme) +include(hunter_status_debug) + +## 5.5 only -- +string(COMPARE EQUAL "qtserialbus" "qtquick1" _is_qtquick1) +string(COMPARE EQUAL "qtserialbus" "qtwebkit" _is_qtwebkit) +string(COMPARE EQUAL "qtserialbus" "qtwebkit-examples" _is_qtwebkit_examples) + +if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.5\\.") + return() + endif() +endif() +## -- end + +## 5.6+ only -- +string(COMPARE EQUAL "qtserialbus" "qtquickcontrol2" _is_qtquickcontrols2) +string(COMPARE EQUAL "qtserialbus" "qtwebview" _is_qtwebview) + +if(_is_qtquickcontrols2 OR _is_qtwebview) + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtserialbus" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtserialbus" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtserialbus" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtserialbus" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtserialbus" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtserialbus" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtserialbus" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtserialbus" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtserialbus" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtserialbus" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtserialbus" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtserialbus" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtserialbus" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtserialbus" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtserialbus" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtserialbus" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + return() + endif() +endif() +## -- end + +if(NOT _HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES) + # '_depends_on' will return **all** dependencies of the component so there is + # no need to traverse them recursively (optimization) + hunter_generate_qt_info( + "qtserialbus" + _unused_toskip + _depends_on + _unused_nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" + ) + + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES TRUE) + foreach(_x ${_depends_on}) + hunter_add_package(Qt COMPONENTS ${_x}) + endforeach() + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES FALSE) +endif() + +# We should call this function again since hunter_add_package is include-like +# instruction, i.e. will overwrite variable values (foreach's _x will survive) +hunter_generate_qt_info( + "qtserialbus" + _unused_toskip + _unused_depends_on + _nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" +) + +list(FIND _nobuild "qtserialbus" _dont_build_it) +if(NOT _dont_build_it EQUAL -1) + hunter_status_debug( + "Qt component doesn't install anything and will be skipped: qtserialbus" + ) + return() +endif() + +string(COMPARE EQUAL "qtserialbus" "qtdeclarative" _is_qtdeclarative) +if(WIN32 AND _is_qtdeclarative) + find_program(_python_path NAME "python" PATHS ENV PATH) + if(NOT _python_path) + hunter_user_error( + "Python not found in PATH:\n $ENV{PATH}\n" + "Python required for building Qt component (qtdeclarative):\n" + " http://doc.qt.io/qt-5/windows-requirements.html" + ) + endif() +endif() + +hunter_pick_scheme(DEFAULT url_sha1_qt) +hunter_download( + PACKAGE_NAME Qt + PACKAGE_COMPONENT "qtserialbus" + PACKAGE_INTERNAL_DEPS_ID "10" +) diff --git a/cmake/projects/Qt/qtserialport/hunter.cmake b/cmake/projects/Qt/qtserialport/hunter.cmake index 703f461de3..6ee79d4f64 100644 --- a/cmake/projects/Qt/qtserialport/hunter.cmake +++ b/cmake/projects/Qt/qtserialport/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtserialport" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtserialport" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtserialport" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtserialport" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtserialport" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtserialport" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtserialport" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtserialport" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtserialport" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtserialport" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtserialport" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtserialport" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtserialport" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtserialport" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtserialport" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtserialport" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtserialport" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtserialport" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtspeech/hunter.cmake b/cmake/projects/Qt/qtspeech/hunter.cmake new file mode 100644 index 0000000000..6cd623cc6a --- /dev/null +++ b/cmake/projects/Qt/qtspeech/hunter.cmake @@ -0,0 +1,138 @@ +# Copyright (c) 2015-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_package) +include(hunter_download) +include(hunter_generate_qt_info) +include(hunter_pick_scheme) +include(hunter_status_debug) + +## 5.5 only -- +string(COMPARE EQUAL "qtspeech" "qtquick1" _is_qtquick1) +string(COMPARE EQUAL "qtspeech" "qtwebkit" _is_qtwebkit) +string(COMPARE EQUAL "qtspeech" "qtwebkit-examples" _is_qtwebkit_examples) + +if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.5\\.") + return() + endif() +endif() +## -- end + +## 5.6+ only -- +string(COMPARE EQUAL "qtspeech" "qtquickcontrol2" _is_qtquickcontrols2) +string(COMPARE EQUAL "qtspeech" "qtwebview" _is_qtwebview) + +if(_is_qtquickcontrols2 OR _is_qtwebview) + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtspeech" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtspeech" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtspeech" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtspeech" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtspeech" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtspeech" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtspeech" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtspeech" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtspeech" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtspeech" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtspeech" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtspeech" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtspeech" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtspeech" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtspeech" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtspeech" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + return() + endif() +endif() +## -- end + +if(NOT _HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES) + # '_depends_on' will return **all** dependencies of the component so there is + # no need to traverse them recursively (optimization) + hunter_generate_qt_info( + "qtspeech" + _unused_toskip + _depends_on + _unused_nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" + ) + + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES TRUE) + foreach(_x ${_depends_on}) + hunter_add_package(Qt COMPONENTS ${_x}) + endforeach() + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES FALSE) +endif() + +# We should call this function again since hunter_add_package is include-like +# instruction, i.e. will overwrite variable values (foreach's _x will survive) +hunter_generate_qt_info( + "qtspeech" + _unused_toskip + _unused_depends_on + _nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" +) + +list(FIND _nobuild "qtspeech" _dont_build_it) +if(NOT _dont_build_it EQUAL -1) + hunter_status_debug( + "Qt component doesn't install anything and will be skipped: qtspeech" + ) + return() +endif() + +string(COMPARE EQUAL "qtspeech" "qtdeclarative" _is_qtdeclarative) +if(WIN32 AND _is_qtdeclarative) + find_program(_python_path NAME "python" PATHS ENV PATH) + if(NOT _python_path) + hunter_user_error( + "Python not found in PATH:\n $ENV{PATH}\n" + "Python required for building Qt component (qtdeclarative):\n" + " http://doc.qt.io/qt-5/windows-requirements.html" + ) + endif() +endif() + +hunter_pick_scheme(DEFAULT url_sha1_qt) +hunter_download( + PACKAGE_NAME Qt + PACKAGE_COMPONENT "qtspeech" + PACKAGE_INTERNAL_DEPS_ID "10" +) diff --git a/cmake/projects/Qt/qtsvg/hunter.cmake b/cmake/projects/Qt/qtsvg/hunter.cmake index 32e4e798c1..a204d699db 100644 --- a/cmake/projects/Qt/qtsvg/hunter.cmake +++ b/cmake/projects/Qt/qtsvg/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtsvg" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtsvg" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtsvg" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtsvg" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtsvg" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtsvg" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtsvg" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtsvg" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtsvg" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtsvg" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtsvg" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtsvg" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtsvg" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtsvg" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtsvg" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtsvg" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtsvg" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtsvg" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtsystems/hunter.cmake b/cmake/projects/Qt/qtsystems/hunter.cmake new file mode 100644 index 0000000000..9e9a7fbfab --- /dev/null +++ b/cmake/projects/Qt/qtsystems/hunter.cmake @@ -0,0 +1,138 @@ +# Copyright (c) 2015-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_package) +include(hunter_download) +include(hunter_generate_qt_info) +include(hunter_pick_scheme) +include(hunter_status_debug) + +## 5.5 only -- +string(COMPARE EQUAL "qtsystems" "qtquick1" _is_qtquick1) +string(COMPARE EQUAL "qtsystems" "qtwebkit" _is_qtwebkit) +string(COMPARE EQUAL "qtsystems" "qtwebkit-examples" _is_qtwebkit_examples) + +if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.5\\.") + return() + endif() +endif() +## -- end + +## 5.6+ only -- +string(COMPARE EQUAL "qtsystems" "qtquickcontrol2" _is_qtquickcontrols2) +string(COMPARE EQUAL "qtsystems" "qtwebview" _is_qtwebview) + +if(_is_qtquickcontrols2 OR _is_qtwebview) + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtsystems" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtsystems" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtsystems" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtsystems" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtsystems" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtsystems" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtsystems" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtsystems" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtsystems" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtsystems" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtsystems" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtsystems" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtsystems" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtsystems" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtsystems" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtsystems" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + return() + endif() +endif() +## -- end + +if(NOT _HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES) + # '_depends_on' will return **all** dependencies of the component so there is + # no need to traverse them recursively (optimization) + hunter_generate_qt_info( + "qtsystems" + _unused_toskip + _depends_on + _unused_nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" + ) + + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES TRUE) + foreach(_x ${_depends_on}) + hunter_add_package(Qt COMPONENTS ${_x}) + endforeach() + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES FALSE) +endif() + +# We should call this function again since hunter_add_package is include-like +# instruction, i.e. will overwrite variable values (foreach's _x will survive) +hunter_generate_qt_info( + "qtsystems" + _unused_toskip + _unused_depends_on + _nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" +) + +list(FIND _nobuild "qtsystems" _dont_build_it) +if(NOT _dont_build_it EQUAL -1) + hunter_status_debug( + "Qt component doesn't install anything and will be skipped: qtsystems" + ) + return() +endif() + +string(COMPARE EQUAL "qtsystems" "qtdeclarative" _is_qtdeclarative) +if(WIN32 AND _is_qtdeclarative) + find_program(_python_path NAME "python" PATHS ENV PATH) + if(NOT _python_path) + hunter_user_error( + "Python not found in PATH:\n $ENV{PATH}\n" + "Python required for building Qt component (qtdeclarative):\n" + " http://doc.qt.io/qt-5/windows-requirements.html" + ) + endif() +endif() + +hunter_pick_scheme(DEFAULT url_sha1_qt) +hunter_download( + PACKAGE_NAME Qt + PACKAGE_COMPONENT "qtsystems" + PACKAGE_INTERNAL_DEPS_ID "10" +) diff --git a/cmake/projects/Qt/qttools/hunter.cmake b/cmake/projects/Qt/qttools/hunter.cmake index 041b91c86b..54dd87e6c4 100644 --- a/cmake/projects/Qt/qttools/hunter.cmake +++ b/cmake/projects/Qt/qttools/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qttools" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qttools" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qttools" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qttools" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qttools" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qttools" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qttools" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qttools" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qttools" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qttools" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qttools" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qttools" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qttools" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qttools" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qttools" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qttools" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qttools" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qttools" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qttranslations/hunter.cmake b/cmake/projects/Qt/qttranslations/hunter.cmake index 2e1cf01531..c77bf83ab6 100644 --- a/cmake/projects/Qt/qttranslations/hunter.cmake +++ b/cmake/projects/Qt/qttranslations/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qttranslations" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qttranslations" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qttranslations" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qttranslations" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qttranslations" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qttranslations" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qttranslations" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qttranslations" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qttranslations" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qttranslations" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qttranslations" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qttranslations" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qttranslations" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qttranslations" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qttranslations" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qttranslations" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qttranslations" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qttranslations" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtvirtualkeyboard/hunter.cmake b/cmake/projects/Qt/qtvirtualkeyboard/hunter.cmake new file mode 100644 index 0000000000..8048f8a572 --- /dev/null +++ b/cmake/projects/Qt/qtvirtualkeyboard/hunter.cmake @@ -0,0 +1,138 @@ +# Copyright (c) 2015-2017, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_package) +include(hunter_download) +include(hunter_generate_qt_info) +include(hunter_pick_scheme) +include(hunter_status_debug) + +## 5.5 only -- +string(COMPARE EQUAL "qtvirtualkeyboard" "qtquick1" _is_qtquick1) +string(COMPARE EQUAL "qtvirtualkeyboard" "qtwebkit" _is_qtwebkit) +string(COMPARE EQUAL "qtvirtualkeyboard" "qtwebkit-examples" _is_qtwebkit_examples) + +if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.5\\.") + return() + endif() +endif() +## -- end + +## 5.6+ only -- +string(COMPARE EQUAL "qtvirtualkeyboard" "qtquickcontrol2" _is_qtquickcontrols2) +string(COMPARE EQUAL "qtvirtualkeyboard" "qtwebview" _is_qtwebview) + +if(_is_qtquickcontrols2 OR _is_qtwebview) + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtvirtualkeyboard" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtvirtualkeyboard" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtvirtualkeyboard" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtvirtualkeyboard" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtvirtualkeyboard" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtvirtualkeyboard" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtvirtualkeyboard" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtvirtualkeyboard" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtvirtualkeyboard" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtvirtualkeyboard" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtvirtualkeyboard" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtvirtualkeyboard" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtvirtualkeyboard" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtvirtualkeyboard" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtvirtualkeyboard" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtvirtualkeyboard" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + return() + endif() +endif() +## -- end + +if(NOT _HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES) + # '_depends_on' will return **all** dependencies of the component so there is + # no need to traverse them recursively (optimization) + hunter_generate_qt_info( + "qtvirtualkeyboard" + _unused_toskip + _depends_on + _unused_nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" + ) + + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES TRUE) + foreach(_x ${_depends_on}) + hunter_add_package(Qt COMPONENTS ${_x}) + endforeach() + set(_HUNTER_INTERNAL_LOADING_QT_DEPENDENCIES FALSE) +endif() + +# We should call this function again since hunter_add_package is include-like +# instruction, i.e. will overwrite variable values (foreach's _x will survive) +hunter_generate_qt_info( + "qtvirtualkeyboard" + _unused_toskip + _unused_depends_on + _nobuild + "${HUNTER_Qt_VERSION}" + "${ANDROID}" + "${WIN32}" +) + +list(FIND _nobuild "qtvirtualkeyboard" _dont_build_it) +if(NOT _dont_build_it EQUAL -1) + hunter_status_debug( + "Qt component doesn't install anything and will be skipped: qtvirtualkeyboard" + ) + return() +endif() + +string(COMPARE EQUAL "qtvirtualkeyboard" "qtdeclarative" _is_qtdeclarative) +if(WIN32 AND _is_qtdeclarative) + find_program(_python_path NAME "python" PATHS ENV PATH) + if(NOT _python_path) + hunter_user_error( + "Python not found in PATH:\n $ENV{PATH}\n" + "Python required for building Qt component (qtdeclarative):\n" + " http://doc.qt.io/qt-5/windows-requirements.html" + ) + endif() +endif() + +hunter_pick_scheme(DEFAULT url_sha1_qt) +hunter_download( + PACKAGE_NAME Qt + PACKAGE_COMPONENT "qtvirtualkeyboard" + PACKAGE_INTERNAL_DEPS_ID "10" +) diff --git a/cmake/projects/Qt/qtwayland/hunter.cmake b/cmake/projects/Qt/qtwayland/hunter.cmake index 5c884426e9..48d1251c9f 100644 --- a/cmake/projects/Qt/qtwayland/hunter.cmake +++ b/cmake/projects/Qt/qtwayland/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtwayland" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtwayland" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtwayland" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtwayland" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtwayland" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtwayland" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtwayland" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtwayland" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtwayland" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtwayland" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtwayland" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtwayland" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtwayland" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtwayland" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtwayland" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtwayland" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtwayland" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtwayland" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtwebchannel/hunter.cmake b/cmake/projects/Qt/qtwebchannel/hunter.cmake index c6b6e8fc53..dbb4861839 100644 --- a/cmake/projects/Qt/qtwebchannel/hunter.cmake +++ b/cmake/projects/Qt/qtwebchannel/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtwebchannel" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtwebchannel" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtwebchannel" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtwebchannel" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtwebchannel" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtwebchannel" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtwebchannel" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtwebchannel" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtwebchannel" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtwebchannel" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtwebchannel" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtwebchannel" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtwebchannel" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtwebchannel" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtwebchannel" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtwebchannel" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtwebchannel" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtwebchannel" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtwebengine/hunter.cmake b/cmake/projects/Qt/qtwebengine/hunter.cmake index 97bf6d6c9b..bcc02d895f 100644 --- a/cmake/projects/Qt/qtwebengine/hunter.cmake +++ b/cmake/projects/Qt/qtwebengine/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtwebengine" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtwebengine" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtwebengine" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtwebengine" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtwebengine" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtwebengine" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtwebengine" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtwebengine" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtwebengine" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtwebengine" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtwebengine" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtwebengine" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtwebengine" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtwebengine" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtwebengine" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtwebengine" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtwebengine" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtwebengine" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtwebkit-examples/hunter.cmake b/cmake/projects/Qt/qtwebkit-examples/hunter.cmake index 06db0bdc73..6d225f0090 100644 --- a/cmake/projects/Qt/qtwebkit-examples/hunter.cmake +++ b/cmake/projects/Qt/qtwebkit-examples/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtwebkit-examples" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtwebkit-examples" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtwebkit-examples" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtwebkit-examples" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtwebkit-examples" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtwebkit-examples" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtwebkit-examples" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtwebkit-examples" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtwebkit-examples" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtwebkit-examples" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtwebkit-examples" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtwebkit-examples" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtwebkit-examples" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtwebkit-examples" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtwebkit-examples" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtwebkit-examples" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtwebkit-examples" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtwebkit-examples" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtwebkit/hunter.cmake b/cmake/projects/Qt/qtwebkit/hunter.cmake index 0cce0e761a..383ca68e3d 100644 --- a/cmake/projects/Qt/qtwebkit/hunter.cmake +++ b/cmake/projects/Qt/qtwebkit/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtwebkit" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtwebkit" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtwebkit" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtwebkit" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtwebkit" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtwebkit" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtwebkit" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtwebkit" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtwebkit" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtwebkit" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtwebkit" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtwebkit" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtwebkit" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtwebkit" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtwebkit" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtwebkit" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtwebkit" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtwebkit" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtwebsockets/hunter.cmake b/cmake/projects/Qt/qtwebsockets/hunter.cmake index 10abfa1b3c..a7f85f89f6 100644 --- a/cmake/projects/Qt/qtwebsockets/hunter.cmake +++ b/cmake/projects/Qt/qtwebsockets/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtwebsockets" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtwebsockets" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtwebsockets" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtwebsockets" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtwebsockets" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtwebsockets" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtwebsockets" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtwebsockets" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtwebsockets" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtwebsockets" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtwebsockets" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtwebsockets" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtwebsockets" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtwebsockets" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtwebsockets" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtwebsockets" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtwebsockets" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtwebsockets" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtwebview/hunter.cmake b/cmake/projects/Qt/qtwebview/hunter.cmake index 12bf4d1a44..c0fda093ce 100644 --- a/cmake/projects/Qt/qtwebview/hunter.cmake +++ b/cmake/projects/Qt/qtwebview/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtwebview" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtwebview" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtwebview" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtwebview" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtwebview" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtwebview" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtwebview" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtwebview" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtwebview" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtwebview" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtwebview" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtwebview" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtwebview" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtwebview" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtwebview" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtwebview" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtwebview" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtwebview" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtwinextras/hunter.cmake b/cmake/projects/Qt/qtwinextras/hunter.cmake index 5c476c1a7e..79876bc91a 100644 --- a/cmake/projects/Qt/qtwinextras/hunter.cmake +++ b/cmake/projects/Qt/qtwinextras/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtwinextras" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtwinextras" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtwinextras" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtwinextras" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtwinextras" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtwinextras" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtwinextras" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtwinextras" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtwinextras" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtwinextras" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtwinextras" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtwinextras" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtwinextras" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtwinextras" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtwinextras" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtwinextras" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtwinextras" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtwinextras" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtx11extras/hunter.cmake b/cmake/projects/Qt/qtx11extras/hunter.cmake index 4bf9bca095..39effa55ba 100644 --- a/cmake/projects/Qt/qtx11extras/hunter.cmake +++ b/cmake/projects/Qt/qtx11extras/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtx11extras" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtx11extras" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtx11extras" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtx11extras" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtx11extras" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtx11extras" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtx11extras" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtx11extras" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtx11extras" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtx11extras" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtx11extras" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtx11extras" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtx11extras" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtx11extras" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtx11extras" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtx11extras" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtx11extras" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtx11extras" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() diff --git a/cmake/projects/Qt/qtxmlpatterns/hunter.cmake b/cmake/projects/Qt/qtxmlpatterns/hunter.cmake index 6ba6f995d8..09e62f4b81 100644 --- a/cmake/projects/Qt/qtxmlpatterns/hunter.cmake +++ b/cmake/projects/Qt/qtxmlpatterns/hunter.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Ruslan Baratov +# Copyright (c) 2015-2017, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! @@ -21,12 +21,58 @@ if(_is_qtquick1 OR _is_qtwebkit OR _is_qtwebkit_examples) endif() ## -- end -## 5.6 only -- +## 5.6+ only -- string(COMPARE EQUAL "qtxmlpatterns" "qtquickcontrol2" _is_qtquickcontrols2) string(COMPARE EQUAL "qtxmlpatterns" "qtwebview" _is_qtwebview) if(_is_qtquickcontrols2 OR _is_qtwebview) - if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + if(HUNTER_Qt_VERSION MATCHES "^5\\.6\\.") + # Qt 5.6.* + elseif(HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") + # Qt 5.6.* + else() + return() + endif() +endif() +## -- end + +## 5.9 only -- +string(COMPARE EQUAL "qtxmlpatterns" "qtcharts" _is_qtcharts) +string(COMPARE EQUAL "qtxmlpatterns" "qtdatavis3d" _is_qtdatavis3d) +string(COMPARE EQUAL "qtxmlpatterns" "qtdocgallery" _is_qtdocgallery) +string(COMPARE EQUAL "qtxmlpatterns" "qtfeedback" _is_qtfeedback) +string(COMPARE EQUAL "qtxmlpatterns" "qtgamepad" _is_qtgamepad) +string(COMPARE EQUAL "qtxmlpatterns" "qtnetworkauth" _is_qtnetworkauth) +string(COMPARE EQUAL "qtxmlpatterns" "qtpim" _is_qtpim) +string(COMPARE EQUAL "qtxmlpatterns" "qtpurchasing" _is_qtpurchasing) +string(COMPARE EQUAL "qtxmlpatterns" "qtqa" _is_qtqa) +string(COMPARE EQUAL "qtxmlpatterns" "qtremoteobjects" _is_qtremoteobjects) +string(COMPARE EQUAL "qtxmlpatterns" "qtrepotools" _is_qtrepotools) +string(COMPARE EQUAL "qtxmlpatterns" "qtscxml" _is_qtscxml) +string(COMPARE EQUAL "qtxmlpatterns" "qtserialbus" _is_qtserialbus) +string(COMPARE EQUAL "qtxmlpatterns" "qtspeech" _is_qtspeech) +string(COMPARE EQUAL "qtxmlpatterns" "qtsystems" _is_qtsystems) +string(COMPARE EQUAL "qtxmlpatterns" "qtvirtualkeyboard" _is_qtvirtualkeyboard) + +if( + _is_qtcharts OR + _is_qtdatavis3d OR + _is_qtdocgallery OR + _is_qtfeedback OR + _is_qtgamepad OR + _is_qtnetworkauth OR + _is_qtpim OR + _is_qtpurchasing OR + _is_qtqa OR + _is_qtremoteobjects OR + _is_qtrepotools OR + _is_qtscxml OR + _is_qtserialbus OR + _is_qtspeech OR + _is_qtsystems OR + _is_qtvirtualkeyboard +) + if(NOT HUNTER_Qt_VERSION MATCHES "^5\\.9\\.") return() endif() endif() From 3910721033b6e514bfa49385044fa023131a518c Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 18 Aug 2017 14:23:40 +0300 Subject: [PATCH 376/612] Qt 5.9 fix iOS examples --- examples/qt-camera/main.cpp | 4 ---- examples/qt-core/CMakeLists.txt | 5 +++++ examples/qt-core/main.cpp | 4 ---- examples/qt-qml/main.cpp | 5 +---- examples/qt-widgets/main.cpp | 4 ---- 5 files changed, 6 insertions(+), 16 deletions(-) diff --git a/examples/qt-camera/main.cpp b/examples/qt-camera/main.cpp index 727349b149..bd183d2306 100644 --- a/examples/qt-camera/main.cpp +++ b/examples/qt-camera/main.cpp @@ -42,11 +42,7 @@ #include "camera.h" // Camera -#if defined(Q_OS_IOS) -extern "C" int qtmn(int argc, char** argv) { -#else int main(int argc, char **argv) { -#endif QApplication app(argc, argv); Camera camera; diff --git a/examples/qt-core/CMakeLists.txt b/examples/qt-core/CMakeLists.txt index a12b30c596..51a125b075 100644 --- a/examples/qt-core/CMakeLists.txt +++ b/examples/qt-core/CMakeLists.txt @@ -11,3 +11,8 @@ find_package(Qt5Core REQUIRED) # Qt5::Core add_executable(helloworld main.cpp) target_link_libraries(helloworld Qt5::Core) + +if(IOS) + find_package(Qt5Gui REQUIRED) # Qt5::QIOSIntegrationPlugin + target_link_libraries(helloworld Qt5::QIOSIntegrationPlugin) +endif() diff --git a/examples/qt-core/main.cpp b/examples/qt-core/main.cpp index 86284f1904..aa4e083af1 100644 --- a/examples/qt-core/main.cpp +++ b/examples/qt-core/main.cpp @@ -1,10 +1,6 @@ #include -#if defined(Q_OS_IOS) -extern "C" int qtmn(int argc, char** argv) { -#else int main(int argc, char **argv) { -#endif QCoreApplication a(argc, argv); return a.exec(); } diff --git a/examples/qt-qml/main.cpp b/examples/qt-qml/main.cpp index ab4070222e..13d5f9d9fb 100644 --- a/examples/qt-qml/main.cpp +++ b/examples/qt-qml/main.cpp @@ -18,11 +18,8 @@ #include #define QT_QML_NO_DEBUGGER -#if defined(Q_OS_IOS) -extern "C" int qtmn(int argc, char** argv) { -#else + int main(int argc, char **argv) { -#endif QApplication application(argc, argv); QQuickView view; diff --git a/examples/qt-widgets/main.cpp b/examples/qt-widgets/main.cpp index 40845e5a08..2dfa86303a 100644 --- a/examples/qt-widgets/main.cpp +++ b/examples/qt-widgets/main.cpp @@ -1,11 +1,7 @@ #include "MainWindow.h" #include -#if defined(Q_OS_IOS) -extern "C" int qtmn(int argc, char** argv) { -#else int main(int argc, char **argv) { -#endif QApplication a(argc, argv); MainWindow w; w.show(); From ecb58d8a68ccff7ca9dd0385f9fff6f28fdf0c73 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 18 Aug 2017 14:47:41 +0300 Subject: [PATCH 377/612] Qt 5.9.1-p0 --- cmake/configs/default.cmake | 2 +- cmake/projects/Qt/hunter.cmake | 33 ++++++++++----------------------- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index d1f2426018..70fb7fff29 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -98,7 +98,7 @@ hunter_config(PNG VERSION 1.6.26-p1) hunter_config(PocoCpp VERSION 1.7.8-p0) hunter_config(PostgreSQL VERSION 9.6.3) hunter_config(Protobuf VERSION 3.0.0-p1) -hunter_config(Qt VERSION 5.9.1) +hunter_config(Qt VERSION 5.9.1-p0) hunter_config(QtAndroidCMake VERSION 1.0.9) hunter_config(QtCMakeExtra VERSION 1.0.24) hunter_config(QtQmlManager VERSION 1.0.0) diff --git a/cmake/projects/Qt/hunter.cmake b/cmake/projects/Qt/hunter.cmake index 584f546ee3..ec182d85dc 100644 --- a/cmake/projects/Qt/hunter.cmake +++ b/cmake/projects/Qt/hunter.cmake @@ -215,29 +215,16 @@ hunter_add_version( d902b7df94219d2ed2f5c868839c85ce9daa056a ) -if(WIN32) - hunter_add_version( - PACKAGE_NAME - Qt - VERSION - "5.9.1" - URL - "http://download.qt.io/official_releases/qt/5.9/5.9.1/single/qt-everywhere-opensource-src-5.9.1.zip" - SHA1 - bdac47fdcf6dd502a123eb403bb4260542f91034 - ) -else() - hunter_add_version( - PACKAGE_NAME - Qt - VERSION - "5.9.1" - URL - "http://download.qt.io/official_releases/qt/5.9/5.9.1/single/qt-everywhere-opensource-src-5.9.1.tar.xz" - SHA1 - 8b9900cece0a18cf23d53a42379a628a1c1330ae - ) -endif() +hunter_add_version( + PACKAGE_NAME + Qt + VERSION + "5.9.1" + URL + "https://github.com/hunter-packages/Qt/releases/download/v5.9.1-p0/hunter-5.9.1.7z" + SHA1 + b1bc254e688426316b55115adddd13e4a10115b2 +) hunter_cacheable(Qt) From ece731bcd79b54042ab787c067db0b37f22db8f1 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 18 Aug 2017 14:57:09 +0300 Subject: [PATCH 378/612] Qt: Use old version on Linux --- cmake/configs/default.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 70fb7fff29..a9a58acc87 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -98,7 +98,15 @@ hunter_config(PNG VERSION 1.6.26-p1) hunter_config(PocoCpp VERSION 1.7.8-p0) hunter_config(PostgreSQL VERSION 9.6.3) hunter_config(Protobuf VERSION 3.0.0-p1) -hunter_config(Qt VERSION 5.9.1-p0) + +string(COMPARE EQUAL "${CMAKE_SYSTEM_NAME}" "Linux" _is_linux) +if(_is_linux) + # qt-qml example is broken on Linux + hunter_config(Qt VERSION 5.5.1-cvpixelbuffer-2-p9) +else() + hunter_config(Qt VERSION 5.9.1-p0) +endif() + hunter_config(QtAndroidCMake VERSION 1.0.9) hunter_config(QtCMakeExtra VERSION 1.0.24) hunter_config(QtQmlManager VERSION 1.0.0) From 993c9b270af8d2abc5e8d598b6a2e3d6ff046cf6 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 18 Aug 2017 15:00:52 +0300 Subject: [PATCH 379/612] Qt: Fix version --- cmake/projects/Qt/hunter.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/projects/Qt/hunter.cmake b/cmake/projects/Qt/hunter.cmake index ec182d85dc..3f1dedf47b 100644 --- a/cmake/projects/Qt/hunter.cmake +++ b/cmake/projects/Qt/hunter.cmake @@ -219,7 +219,7 @@ hunter_add_version( PACKAGE_NAME Qt VERSION - "5.9.1" + "5.9.1-p0" URL "https://github.com/hunter-packages/Qt/releases/download/v5.9.1-p0/hunter-5.9.1.7z" SHA1 From 212b7718d40524cb2e71f98d8fe12cb2c6291ace Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Fri, 18 Aug 2017 16:29:00 +0300 Subject: [PATCH 380/612] MinGW: Do not use Qt 5.9 --- cmake/configs/default.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index a9a58acc87..f4029ba383 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -100,8 +100,9 @@ hunter_config(PostgreSQL VERSION 9.6.3) hunter_config(Protobuf VERSION 3.0.0-p1) string(COMPARE EQUAL "${CMAKE_SYSTEM_NAME}" "Linux" _is_linux) -if(_is_linux) +if(_is_linux OR MINGW) # qt-qml example is broken on Linux + # qt-core example is broken on MinGW hunter_config(Qt VERSION 5.5.1-cvpixelbuffer-2-p9) else() hunter_config(Qt VERSION 5.9.1-p0) From 851b1a44987a43220970e3287ba0e7308a21e0bb Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 21 Aug 2017 13:17:19 +0300 Subject: [PATCH 381/612] Docs: Update HUNTER_JOBS_NUMBER --- docs/reference/user-variables.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/user-variables.rst b/docs/reference/user-variables.rst index e9a001a289..0e546f0f77 100644 --- a/docs/reference/user-variables.rst +++ b/docs/reference/user-variables.rst @@ -80,7 +80,7 @@ HUNTER_JOBS_NUMBER ================== * Number of parallel builds that will be used in such native tools like ``make -jN`` or ``xcodebuild -jobs N`` -* For Visual Studio flag ``/MP`` will be used +* For Visual Studio >= 12 2013 flag ``/maxcpucount:N`` will be added to ``MSBuild`` * Set variable to ``0`` to disable adding any flags: ``HUNTER_JOBS_NUMBER=0`` * Default: `NUMBER_OF_LOGICAL_CORES `__ From 6ed97289139c49a95619feaee339cd6f63bfea11 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 21 Aug 2017 20:19:50 +0300 Subject: [PATCH 382/612] Add 'Findmetal' module [skip ci] --- cmake/find/Findmetal.cmake | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 cmake/find/Findmetal.cmake diff --git a/cmake/find/Findmetal.cmake b/cmake/find/Findmetal.cmake new file mode 100644 index 0000000000..949aa7825e --- /dev/null +++ b/cmake/find/Findmetal.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "Metal") From b44a21b4f70b8815ccf512f193cc9ea9c4c34c68 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Mon, 21 Aug 2017 20:37:27 +0300 Subject: [PATCH 383/612] Add 'Findiokit' module [skip ci] --- cmake/find/Findiokit.cmake | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 cmake/find/Findiokit.cmake diff --git a/cmake/find/Findiokit.cmake b/cmake/find/Findiokit.cmake new file mode 100644 index 0000000000..65ea2258cc --- /dev/null +++ b/cmake/find/Findiokit.cmake @@ -0,0 +1,5 @@ +# Copyright (c) 2017, Ruslan Baratov +# All rights reserved. + +include(hunter_find_helper_framework) +hunter_find_helper_framework(FRAMEWORK "IOKit") From e08f556f8756ec0296e5ebd4af35c00baf07d8f7 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 22 Aug 2017 15:34:57 +0300 Subject: [PATCH 384/612] PkgConfig dependencies --- cmake/schemes/url_sha1_autotools.cmake.in | 3 +++ scripts/pkgconfig-export-targets.cmake.in | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/cmake/schemes/url_sha1_autotools.cmake.in b/cmake/schemes/url_sha1_autotools.cmake.in index fa62334732..cc53317d7f 100644 --- a/cmake/schemes/url_sha1_autotools.cmake.in +++ b/cmake/schemes/url_sha1_autotools.cmake.in @@ -60,8 +60,11 @@ hunter_autotools_project("@HUNTER_EP_NAME@" ) foreach(PKG_CONFIG_MODULE ${PKGCONFIG_EXPORT_TARGETS}) + # Use: + # * DEPENDS_ON_PACKAGES configure_file( "@HUNTER_GLOBAL_SCRIPT_DIR@/pkgconfig-export-targets.cmake.in" "@HUNTER_PACKAGE_INSTALL_PREFIX@/lib/cmake/${PKG_CONFIG_MODULE}/${PKG_CONFIG_MODULE}Config.cmake" + @ONLY ) endforeach() diff --git a/scripts/pkgconfig-export-targets.cmake.in b/scripts/pkgconfig-export-targets.cmake.in index 0f4c60daee..9eb2267baf 100644 --- a/scripts/pkgconfig-export-targets.cmake.in +++ b/scripts/pkgconfig-export-targets.cmake.in @@ -9,3 +9,14 @@ include(hunter_pkgconfig_export_target) hunter_pkgconfig_export_target("@PKG_CONFIG_MODULE@") +foreach(_hunter_deps @DEPENDS_ON_PACKAGES@) + find_package("${_hunter_deps}" CONFIG REQUIRED) + + set_property( + TARGET + "PkgConfig::@PKG_CONFIG_MODULE@" + APPEND + PROPERTY + INTERFACE_LINK_LIBRARIES "PkgConfig::${_hunter_deps}" + ) +endforeach() From a3e9c21d8b1bbe4b4afe3aa74604689bdb956774 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 22 Aug 2017 19:18:48 +0300 Subject: [PATCH 385/612] x11: Generate imported targets --- cmake/projects/fixesproto/hunter.cmake | 6 ++++++ cmake/projects/inputproto/hunter.cmake | 6 ++++++ cmake/projects/kbproto/hunter.cmake | 6 ++++++ cmake/projects/pthread-stubs/hunter.cmake | 6 ++++++ cmake/projects/randrproto/hunter.cmake | 1 + cmake/projects/renderproto/hunter.cmake | 6 ++++++ cmake/projects/x11/hunter.cmake | 2 +- cmake/projects/xau/hunter.cmake | 2 +- cmake/projects/xcb-proto/hunter.cmake | 6 ++++++ cmake/projects/xcursor/hunter.cmake | 1 + cmake/projects/xext/hunter.cmake | 1 + cmake/projects/xextproto/hunter.cmake | 6 ++++++ cmake/projects/xfixes/hunter.cmake | 1 + cmake/projects/xinerama/hunter.cmake | 1 + cmake/projects/xineramaproto/hunter.cmake | 1 + cmake/projects/xorg-macros/hunter.cmake | 6 ++++++ cmake/projects/xproto/hunter.cmake | 1 + cmake/projects/xrandr/hunter.cmake | 1 + cmake/projects/xrender/hunter.cmake | 1 + cmake/projects/xtrans/hunter.cmake | 6 ++++++ 20 files changed, 65 insertions(+), 2 deletions(-) diff --git a/cmake/projects/fixesproto/hunter.cmake b/cmake/projects/fixesproto/hunter.cmake index a7fb76920c..0afd66cb61 100644 --- a/cmake/projects/fixesproto/hunter.cmake +++ b/cmake/projects/fixesproto/hunter.cmake @@ -5,6 +5,7 @@ include(hunter_add_version) include(hunter_cacheable) +include(hunter_cmake_args) include(hunter_configuration_types) include(hunter_download) include(hunter_pick_scheme) @@ -23,6 +24,11 @@ hunter_add_version( hunter_configuration_types(fixesproto CONFIGURATION_TYPES Release) hunter_pick_scheme(DEFAULT url_sha1_autotools) +hunter_cmake_args( + fixesproto + CMAKE_ARGS + PKGCONFIG_EXPORT_TARGETS=fixesproto +) hunter_cacheable(fixesproto) hunter_download( PACKAGE_NAME fixesproto diff --git a/cmake/projects/inputproto/hunter.cmake b/cmake/projects/inputproto/hunter.cmake index 4bc91b2db8..b1d6aa1c33 100644 --- a/cmake/projects/inputproto/hunter.cmake +++ b/cmake/projects/inputproto/hunter.cmake @@ -5,6 +5,7 @@ include(hunter_add_version) include(hunter_cacheable) +include(hunter_cmake_args) include(hunter_configuration_types) include(hunter_download) include(hunter_pick_scheme) @@ -24,6 +25,11 @@ hunter_add_version( hunter_configuration_types(inputproto CONFIGURATION_TYPES Release) hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(inputproto) +hunter_cmake_args( + inputproto + CMAKE_ARGS + PKGCONFIG_EXPORT_TARGETS=inputproto +) hunter_download( PACKAGE_NAME inputproto PACKAGE_INTERNAL_DEPS_ID "2" diff --git a/cmake/projects/kbproto/hunter.cmake b/cmake/projects/kbproto/hunter.cmake index 311edb6c1e..97ffae46cb 100644 --- a/cmake/projects/kbproto/hunter.cmake +++ b/cmake/projects/kbproto/hunter.cmake @@ -5,6 +5,7 @@ include(hunter_add_version) include(hunter_cacheable) +include(hunter_cmake_args) include(hunter_configuration_types) include(hunter_download) include(hunter_pick_scheme) @@ -23,6 +24,11 @@ hunter_add_version( hunter_configuration_types(kbproto CONFIGURATION_TYPES Release) hunter_pick_scheme(DEFAULT url_sha1_autotools) +hunter_cmake_args( + kbproto + CMAKE_ARGS + PKGCONFIG_EXPORT_TARGETS=kbproto +) hunter_cacheable(kbproto) hunter_download( PACKAGE_NAME kbproto diff --git a/cmake/projects/pthread-stubs/hunter.cmake b/cmake/projects/pthread-stubs/hunter.cmake index 456bdbcd99..7958d64631 100644 --- a/cmake/projects/pthread-stubs/hunter.cmake +++ b/cmake/projects/pthread-stubs/hunter.cmake @@ -5,6 +5,7 @@ include(hunter_add_version) include(hunter_cacheable) +include(hunter_cmake_args) include(hunter_configuration_types) include(hunter_download) include(hunter_pick_scheme) @@ -24,6 +25,11 @@ hunter_add_version( hunter_configuration_types(pthread-stubs CONFIGURATION_TYPES Release) hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(pthread-stubs) +hunter_cmake_args( + pthread-stubs + CMAKE_ARGS + PKGCONFIG_EXPORT_TARGETS=pthread-stubs +) hunter_download( PACKAGE_NAME pthread-stubs PACKAGE_INTERNAL_DEPS_ID "2" diff --git a/cmake/projects/randrproto/hunter.cmake b/cmake/projects/randrproto/hunter.cmake index 39ce137380..69428203ec 100644 --- a/cmake/projects/randrproto/hunter.cmake +++ b/cmake/projects/randrproto/hunter.cmake @@ -31,6 +31,7 @@ hunter_cmake_args( randrproto CMAKE_ARGS # do not use double quotes on CMAKE_ARGS DEPENDS_ON_PACKAGES=${randrproto_dependencies} + PKGCONFIG_EXPORT_TARGETS=randrproto ) hunter_cacheable(randrproto) hunter_download( diff --git a/cmake/projects/renderproto/hunter.cmake b/cmake/projects/renderproto/hunter.cmake index f3e557e44f..12b0f5b57f 100644 --- a/cmake/projects/renderproto/hunter.cmake +++ b/cmake/projects/renderproto/hunter.cmake @@ -5,6 +5,7 @@ include(hunter_add_version) include(hunter_cacheable) +include(hunter_cmake_args) include(hunter_configuration_types) include(hunter_download) include(hunter_pick_scheme) @@ -23,6 +24,11 @@ hunter_add_version( hunter_configuration_types(renderproto CONFIGURATION_TYPES Release) hunter_pick_scheme(DEFAULT url_sha1_autotools) +hunter_cmake_args( + renderproto + CMAKE_ARGS + PKGCONFIG_EXPORT_TARGETS=renderproto +) hunter_cacheable(renderproto) hunter_download( PACKAGE_NAME renderproto diff --git a/cmake/projects/x11/hunter.cmake b/cmake/projects/x11/hunter.cmake index 1c62cd0f19..74db2902fb 100644 --- a/cmake/projects/x11/hunter.cmake +++ b/cmake/projects/x11/hunter.cmake @@ -41,7 +41,7 @@ hunter_cmake_args( hunter_cacheable(x11) hunter_download( PACKAGE_NAME x11 - PACKAGE_INTERNAL_DEPS_ID "3" + PACKAGE_INTERNAL_DEPS_ID "4" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libX11-xcb.la" "lib/libX11.la" diff --git a/cmake/projects/xau/hunter.cmake b/cmake/projects/xau/hunter.cmake index 086186200f..155a886421 100644 --- a/cmake/projects/xau/hunter.cmake +++ b/cmake/projects/xau/hunter.cmake @@ -37,6 +37,6 @@ hunter_cmake_args( hunter_cacheable(xau) hunter_download( PACKAGE_NAME xau - PACKAGE_INTERNAL_DEPS_ID "3" + PACKAGE_INTERNAL_DEPS_ID "4" PACKAGE_UNRELOCATABLE_TEXT_FILES "lib/libXau.la;lib/pkgconfig/xau.pc" ) diff --git a/cmake/projects/xcb-proto/hunter.cmake b/cmake/projects/xcb-proto/hunter.cmake index b33b3d1156..b62b450a45 100644 --- a/cmake/projects/xcb-proto/hunter.cmake +++ b/cmake/projects/xcb-proto/hunter.cmake @@ -5,6 +5,7 @@ include(hunter_add_version) include(hunter_cacheable) +include(hunter_cmake_args) include(hunter_configuration_types) include(hunter_download) include(hunter_pick_scheme) @@ -35,6 +36,11 @@ hunter_add_version( hunter_configuration_types(xcb-proto CONFIGURATION_TYPES Release) hunter_pick_scheme(DEFAULT url_sha1_autotools) +hunter_cmake_args( + xcb-proto + CMAKE_ARGS + PKGCONFIG_EXPORT_TARGETS=xcb-proto +) hunter_cacheable(xcb-proto) hunter_download( PACKAGE_NAME xcb-proto diff --git a/cmake/projects/xcursor/hunter.cmake b/cmake/projects/xcursor/hunter.cmake index 808cd16c7a..9ad45084f2 100644 --- a/cmake/projects/xcursor/hunter.cmake +++ b/cmake/projects/xcursor/hunter.cmake @@ -35,6 +35,7 @@ hunter_cmake_args( xcursor CMAKE_ARGS # do not use double quotes on CMAKE_ARGS DEPENDS_ON_PACKAGES=${xcursor_dependencies} + PKGCONFIG_EXPORT_TARGETS=xcursor ) hunter_cacheable(xcursor) hunter_download( diff --git a/cmake/projects/xext/hunter.cmake b/cmake/projects/xext/hunter.cmake index 4fa8c3d56b..3564f61213 100644 --- a/cmake/projects/xext/hunter.cmake +++ b/cmake/projects/xext/hunter.cmake @@ -33,6 +33,7 @@ hunter_cmake_args( xext CMAKE_ARGS # do not use double quotes on CMAKE_ARGS DEPENDS_ON_PACKAGES=${xext_dependencies} + PKGCONFIG_EXPORT_TARGETS=xext ) hunter_cacheable(xext) hunter_download( diff --git a/cmake/projects/xextproto/hunter.cmake b/cmake/projects/xextproto/hunter.cmake index 8c0f406022..c56d7ff5f2 100644 --- a/cmake/projects/xextproto/hunter.cmake +++ b/cmake/projects/xextproto/hunter.cmake @@ -5,6 +5,7 @@ include(hunter_add_version) include(hunter_cacheable) +include(hunter_cmake_args) include(hunter_configuration_types) include(hunter_download) include(hunter_pick_scheme) @@ -23,6 +24,11 @@ hunter_add_version( hunter_configuration_types(xextproto CONFIGURATION_TYPES Release) hunter_pick_scheme(DEFAULT url_sha1_autotools) +hunter_cmake_args( + xextproto + CMAKE_ARGS + PKGCONFIG_EXPORT_TARGETS=xextproto +) hunter_cacheable(xextproto) hunter_download( PACKAGE_NAME xextproto diff --git a/cmake/projects/xfixes/hunter.cmake b/cmake/projects/xfixes/hunter.cmake index 048ef42dda..06eacb9433 100644 --- a/cmake/projects/xfixes/hunter.cmake +++ b/cmake/projects/xfixes/hunter.cmake @@ -34,6 +34,7 @@ hunter_cmake_args( xfixes CMAKE_ARGS # do not use double quotes on CMAKE_ARGS DEPENDS_ON_PACKAGES=${xfixes_dependencies} + PKGCONFIG_EXPORT_TARGETS=xfixes ) hunter_cacheable(xfixes) diff --git a/cmake/projects/xinerama/hunter.cmake b/cmake/projects/xinerama/hunter.cmake index afd792154b..400e54c330 100644 --- a/cmake/projects/xinerama/hunter.cmake +++ b/cmake/projects/xinerama/hunter.cmake @@ -34,6 +34,7 @@ hunter_cmake_args( xinerama CMAKE_ARGS # do not use double quotes on CMAKE_ARGS DEPENDS_ON_PACKAGES=${xinerama_dependencies} + PKGCONFIG_EXPORT_TARGETS=xinerama ) hunter_cacheable(xinerama) hunter_download( diff --git a/cmake/projects/xineramaproto/hunter.cmake b/cmake/projects/xineramaproto/hunter.cmake index 7af90f4d1b..47beb81605 100644 --- a/cmake/projects/xineramaproto/hunter.cmake +++ b/cmake/projects/xineramaproto/hunter.cmake @@ -31,6 +31,7 @@ hunter_cmake_args( xineramaproto CMAKE_ARGS # do not use double quotes on CMAKE_ARGS DEPENDS_ON_PACKAGES=${xineramaproto_dependencies} + PKGCONFIG_EXPORT_TARGETS=xineramaproto ) hunter_cacheable(xineramaproto) hunter_download( diff --git a/cmake/projects/xorg-macros/hunter.cmake b/cmake/projects/xorg-macros/hunter.cmake index 14dc80d688..1701be38e2 100644 --- a/cmake/projects/xorg-macros/hunter.cmake +++ b/cmake/projects/xorg-macros/hunter.cmake @@ -5,6 +5,7 @@ include(hunter_add_version) include(hunter_cacheable) +include(hunter_cmake_args) include(hunter_configuration_types) include(hunter_download) include(hunter_pick_scheme) @@ -24,6 +25,11 @@ hunter_add_version( hunter_configuration_types(xorg-macros CONFIGURATION_TYPES Release) hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(xorg-macros) +hunter_cmake_args( + xorg-macros + CMAKE_ARGS + PKGCONFIG_EXPORT_TARGETS=xorg-macros +) hunter_download( PACKAGE_NAME xorg-macros PACKAGE_INTERNAL_DEPS_ID "2" diff --git a/cmake/projects/xproto/hunter.cmake b/cmake/projects/xproto/hunter.cmake index a0c29211e7..7dcd28b09a 100644 --- a/cmake/projects/xproto/hunter.cmake +++ b/cmake/projects/xproto/hunter.cmake @@ -28,6 +28,7 @@ hunter_cmake_args( xproto CMAKE_ARGS DEPENDS_ON_PACKAGES=xorg-macros + PKGCONFIG_EXPORT_TARGETS=xproto ) hunter_cacheable(xproto) hunter_download( diff --git a/cmake/projects/xrandr/hunter.cmake b/cmake/projects/xrandr/hunter.cmake index f57e5493e0..f32d27a1fb 100644 --- a/cmake/projects/xrandr/hunter.cmake +++ b/cmake/projects/xrandr/hunter.cmake @@ -36,6 +36,7 @@ hunter_cmake_args( xrandr CMAKE_ARGS # do not use double quotes on CMAKE_ARGS DEPENDS_ON_PACKAGES=${xrandr_dependencies} + PKGCONFIG_EXPORT_TARGETS=xrandr ) hunter_cacheable(xrandr) hunter_download( diff --git a/cmake/projects/xrender/hunter.cmake b/cmake/projects/xrender/hunter.cmake index 2562afa804..a4780bc30f 100644 --- a/cmake/projects/xrender/hunter.cmake +++ b/cmake/projects/xrender/hunter.cmake @@ -32,6 +32,7 @@ hunter_cmake_args( xrender CMAKE_ARGS # do not use double quotes on CMAKE_ARGS DEPENDS_ON_PACKAGES=${xrender_dependencies} + PKGCONFIG_EXPORT_TARGETS=xrender ) hunter_cacheable(xrender) hunter_download( diff --git a/cmake/projects/xtrans/hunter.cmake b/cmake/projects/xtrans/hunter.cmake index 70a483731d..0bcf7c4001 100644 --- a/cmake/projects/xtrans/hunter.cmake +++ b/cmake/projects/xtrans/hunter.cmake @@ -5,6 +5,7 @@ include(hunter_add_version) include(hunter_cacheable) +include(hunter_cmake_args) include(hunter_configuration_types) include(hunter_download) include(hunter_pick_scheme) @@ -24,6 +25,11 @@ hunter_add_version( hunter_configuration_types(xtrans CONFIGURATION_TYPES Release) hunter_pick_scheme(DEFAULT url_sha1_autotools) hunter_cacheable(xtrans) +hunter_cmake_args( + xtrans + CMAKE_ARGS + PKGCONFIG_EXPORT_TARGETS=xtrans +) hunter_download( PACKAGE_NAME xtrans PACKAGE_INTERNAL_DEPS_ID "2" From 97a1729381b44d7852588856a4aabaece8cd5f68 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 22 Aug 2017 19:21:07 +0300 Subject: [PATCH 386/612] xcb: Use standard template to generate imported targets --- cmake/projects/xcb/schemes/xcb.cmake.in | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/cmake/projects/xcb/schemes/xcb.cmake.in b/cmake/projects/xcb/schemes/xcb.cmake.in index 6d83daf1d7..389b558f67 100644 --- a/cmake/projects/xcb/schemes/xcb.cmake.in +++ b/cmake/projects/xcb/schemes/xcb.cmake.in @@ -17,9 +17,16 @@ if("@MSVC@") hunter_fatal_error("Autotools scheme not supported with Visual Studio") endif() -hunter_add_package(xcb-proto) -hunter_add_package(pthread-stubs) -hunter_add_package(xau) +set( + DEPENDS_ON_PACKAGES + xcb-proto + pthread-stubs + xau +) + +foreach(x ${DEPENDS_ON_PACKAGES}) + hunter_add_package("${x}") +endforeach() # Check preconditions hunter_test_string_not_empty("@HUNTER_SELF@") @@ -61,7 +68,12 @@ hunter_autotools_project( ) set(PKG_CONFIG_MODULE xcb) + +# Use: +# * PKG_CONFIG_MODULE +# * DEPENDS_ON_PACKAGES configure_file( - "@HUNTER_GLOBAL_SCRIPT_DIR@/pkgconfig-xcb-export-targets.cmake.in" + "@HUNTER_GLOBAL_SCRIPT_DIR@/pkgconfig-export-targets.cmake.in" "@HUNTER_PACKAGE_INSTALL_PREFIX@/lib/cmake/${PKG_CONFIG_MODULE}/${PKG_CONFIG_MODULE}Config.cmake" + @ONLY ) From 89dfe8e8de376f53de1d675bd2a3f6387b19c494 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 22 Aug 2017 19:21:49 +0300 Subject: [PATCH 387/612] hunter_pkgconfig_export_target: GLOBAL imported target --- cmake/modules/hunter_pkgconfig_export_target.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/hunter_pkgconfig_export_target.cmake b/cmake/modules/hunter_pkgconfig_export_target.cmake index ac04739f44..21200476c4 100644 --- a/cmake/modules/hunter_pkgconfig_export_target.cmake +++ b/cmake/modules/hunter_pkgconfig_export_target.cmake @@ -23,7 +23,7 @@ function(hunter_pkgconfig_export_target PKG_CONFIG_MODULE) "Could not find pkg-config module: ${PKG_CONFIG_MODULE}" ) endif() - add_library("${target_name}" INTERFACE IMPORTED) + add_library("${target_name}" INTERFACE IMPORTED GLOBAL) # --- INTERFACE_INCLUDE_DIRECTORIES begin --- hunter_status_debug( From 25a11b69e2ff94b734dbef9c8275dddd27104261 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 22 Aug 2017 19:22:21 +0300 Subject: [PATCH 388/612] glfw example: Use CONFIG --- examples/glfw/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/glfw/CMakeLists.txt b/examples/glfw/CMakeLists.txt index 5798e5080d..4a99a4dbbf 100644 --- a/examples/glfw/CMakeLists.txt +++ b/examples/glfw/CMakeLists.txt @@ -8,7 +8,7 @@ include("../common.cmake") project(glfw-example) hunter_add_package(glfw) -find_package(glfw3 REQUIRED) +find_package(glfw3 CONFIG REQUIRED) set(${PROJECT_NAME}_SOURCES simple.c @@ -19,4 +19,3 @@ add_executable(${PROJECT_NAME} ) target_link_libraries(${PROJECT_NAME} glfw) - From a0ff393faf42924746a747fe1c6621e50ae98bdf Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 22 Aug 2017 19:22:45 +0300 Subject: [PATCH 389/612] Remove unused --- scripts/pkgconfig-xcb-export-targets.cmake.in | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 scripts/pkgconfig-xcb-export-targets.cmake.in diff --git a/scripts/pkgconfig-xcb-export-targets.cmake.in b/scripts/pkgconfig-xcb-export-targets.cmake.in deleted file mode 100644 index fc3de16a2e..0000000000 --- a/scripts/pkgconfig-xcb-export-targets.cmake.in +++ /dev/null @@ -1,19 +0,0 @@ -# ---------------------------------------------------------------------- -# Auto creation of CMake targets from pkg-config -# -# Copyright (C) 2017 Alexandre Pretyman. All rights reserved. -# -# ---------------------------------------------------------------------- - -include(hunter_pkgconfig_export_target) - -hunter_pkgconfig_export_target(xcb) - -find_package(xau CONFIG REQUIRED) -set_property( - TARGET - PkgConfig::xcb - APPEND - PROPERTY - INTERFACE_LINK_LIBRARIES PkgConfig::xau -) From abfca4f12d14011070f424612be285293b492a90 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 22 Aug 2017 19:23:14 +0300 Subject: [PATCH 390/612] Improve x11 example --- examples/x11/CMakeLists.txt | 5 ++++- examples/x11/foo.cpp | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 examples/x11/foo.cpp diff --git a/examples/x11/CMakeLists.txt b/examples/x11/CMakeLists.txt index 224b1ac058..b116fff7a4 100644 --- a/examples/x11/CMakeLists.txt +++ b/examples/x11/CMakeLists.txt @@ -9,5 +9,8 @@ include("../common.cmake") project(download-x11) -# download x11 hunter_add_package(x11) +find_package(x11 CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo PUBLIC PkgConfig::x11) diff --git a/examples/x11/foo.cpp b/examples/x11/foo.cpp new file mode 100644 index 0000000000..70c062b4f5 --- /dev/null +++ b/examples/x11/foo.cpp @@ -0,0 +1,4 @@ +#include + +int main() { +} From 7b361c491c1a9649851cbed2fe0926906e0405d8 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 22 Aug 2017 21:05:27 +0300 Subject: [PATCH 391/612] Generate 'xi' imported targets --- cmake/projects/xi/hunter.cmake | 1 + examples/xi/CMakeLists.txt | 5 +++++ examples/xi/foo.cpp | 4 ++++ 3 files changed, 10 insertions(+) create mode 100644 examples/xi/foo.cpp diff --git a/cmake/projects/xi/hunter.cmake b/cmake/projects/xi/hunter.cmake index 7c21e02bab..8d8cc887f2 100644 --- a/cmake/projects/xi/hunter.cmake +++ b/cmake/projects/xi/hunter.cmake @@ -39,6 +39,7 @@ hunter_cmake_args( xi CMAKE_ARGS DEPENDS_ON_PACKAGES=${_dependencies} + PKGCONFIG_EXPORT_TARGETS=xi ) hunter_cacheable(xi) diff --git a/examples/xi/CMakeLists.txt b/examples/xi/CMakeLists.txt index b87674eeeb..cc4d4f917a 100644 --- a/examples/xi/CMakeLists.txt +++ b/examples/xi/CMakeLists.txt @@ -8,4 +8,9 @@ cmake_minimum_required(VERSION 3.0) include("../common.cmake") project(download-xi) + hunter_add_package(xi) +find_package(xi CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo PUBLIC PkgConfig::xi) diff --git a/examples/xi/foo.cpp b/examples/xi/foo.cpp new file mode 100644 index 0000000000..7d046f9352 --- /dev/null +++ b/examples/xi/foo.cpp @@ -0,0 +1,4 @@ +#include + +int main() { +} From cb6cf7d325d5b2bace42bc74b6feca15c67135a8 Mon Sep 17 00:00:00 2001 From: rusdevops Date: Tue, 22 Aug 2017 22:56:59 +0300 Subject: [PATCH 392/612] update WDC version fixed sha1 fixed url --- cmake/configs/default.cmake | 2 +- cmake/projects/WDC/hunter.cmake | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index c859ed9279..4d386cea03 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -129,7 +129,7 @@ hunter_config(TIFF VERSION 4.0.2-p3) hunter_config(tommath VERSION 1.0-p2) hunter_config(tomcrypt VERSION 1.17-p3) hunter_config(WTL VERSION 9.1.5321) -hunter_config(WDC VERSION 1.1.0) +hunter_config(WDC VERSION 1.1.1) hunter_config(Washer VERSION 0.1.2) hunter_config(WinSparkle VERSION 0.4.0) hunter_config(ZLIB VERSION 1.2.8-p3) diff --git a/cmake/projects/WDC/hunter.cmake b/cmake/projects/WDC/hunter.cmake index cea45f1f25..74f7295e19 100644 --- a/cmake/projects/WDC/hunter.cmake +++ b/cmake/projects/WDC/hunter.cmake @@ -6,6 +6,13 @@ include(hunter_cmake_args) include(hunter_download) include(hunter_pick_scheme) +hunter_add_version( + PACKAGE_NAME WDC + VERSION "1.1.1" + URL "https://github.com/CloudPolis/webdav-client-cpp/archive/v1.1.1.tar.gz" + SHA1 ae111eee686c2f7d9091164ba270a6be11f8d4a8 +) + hunter_add_version( PACKAGE_NAME WDC VERSION "1.1.0" From 160506a267c27f3ebb373205973fb9a8d4c24323 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 22 Aug 2017 20:05:13 +0300 Subject: [PATCH 393/612] glfw 3.3.0-p3 --- cmake/configs/default.cmake | 2 +- cmake/projects/glfw/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index c859ed9279..5702071ab9 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -172,7 +172,7 @@ hunter_config(gauze VERSION 0.1.1) hunter_config(geos VERSION 3.4.2) hunter_config(gflags VERSION 2.2.1) hunter_config(glew VERSION 2.0.0) -hunter_config(glfw VERSION 3.3.0-p2) +hunter_config(glfw VERSION 3.3.0-p3) hunter_config(glm VERSION 0.9.8.5) hunter_config(glog VERSION 0.3.5-p0) hunter_config(glproto VERSION 1.4.17) diff --git a/cmake/projects/glfw/hunter.cmake b/cmake/projects/glfw/hunter.cmake index fdde670f83..aafec108c3 100644 --- a/cmake/projects/glfw/hunter.cmake +++ b/cmake/projects/glfw/hunter.cmake @@ -56,6 +56,17 @@ hunter_add_version( 980c5b788849da9e8429e8f57a10569620b2fa07 ) +hunter_add_version( + PACKAGE_NAME + glfw + VERSION + "3.3.0-p3" + URL + "https://github.com/hunter-packages/glfw/archive/3.3.0-p3.tar.gz" + SHA1 + 76b9d007591ac1464c443066f4e9db1a0b973efc +) + hunter_cmake_args( glfw CMAKE_ARGS From 92c06ac60b4c5c254c8e965e3adf84dcdd7e5308 Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 22 Aug 2017 21:21:41 +0300 Subject: [PATCH 394/612] glfw 3.3.0-p4 --- cmake/configs/default.cmake | 2 +- cmake/projects/glfw/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 5702071ab9..04da526b2d 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -172,7 +172,7 @@ hunter_config(gauze VERSION 0.1.1) hunter_config(geos VERSION 3.4.2) hunter_config(gflags VERSION 2.2.1) hunter_config(glew VERSION 2.0.0) -hunter_config(glfw VERSION 3.3.0-p3) +hunter_config(glfw VERSION 3.3.0-p4) hunter_config(glm VERSION 0.9.8.5) hunter_config(glog VERSION 0.3.5-p0) hunter_config(glproto VERSION 1.4.17) diff --git a/cmake/projects/glfw/hunter.cmake b/cmake/projects/glfw/hunter.cmake index aafec108c3..e0fc0bc04f 100644 --- a/cmake/projects/glfw/hunter.cmake +++ b/cmake/projects/glfw/hunter.cmake @@ -67,6 +67,17 @@ hunter_add_version( 76b9d007591ac1464c443066f4e9db1a0b973efc ) +hunter_add_version( + PACKAGE_NAME + glfw + VERSION + "3.3.0-p4" + URL + "https://github.com/hunter-packages/glfw/archive/3.3.0-p4.tar.gz" + SHA1 + 455c97ea01a1b78ae39a72d00d86eb1c455e0dca +) + hunter_cmake_args( glfw CMAKE_ARGS From fa1b22319800afba3205faef2cda9b3763c9caa1 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Tue, 22 Aug 2017 14:01:41 +0200 Subject: [PATCH 395/612] Boost: add link to 1.65.0 - don't update old download links (1.64.0) --- cmake/projects/Boost/hunter.cmake | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/cmake/projects/Boost/hunter.cmake b/cmake/projects/Boost/hunter.cmake index b816974654..3e733723af 100644 --- a/cmake/projects/Boost/hunter.cmake +++ b/cmake/projects/Boost/hunter.cmake @@ -13,8 +13,21 @@ include(hunter_pick_scheme) set(Boost_NO_SYSTEM_PATHS ON) # use base url for official boost releases -set(_hunter_boost_base_url "https://downloads.sourceforge.net/project/boost/boost/") +set(_hunter_boost_base_url "https://dl.bintray.com/boostorg/release") + +hunter_add_version( + PACKAGE_NAME + Boost + VERSION + "1.65.0" + URL + "${_hunter_boost_base_url}/1.65.0/source/boost_1_65_0.tar.bz2" + SHA1 + f9260074ecfb31f3e65322fae9c15cc423c0ad59 +) +# up until 1.63 sourcefourge was used +set(_hunter_boost_base_url "https://downloads.sourceforge.net/project/boost/boost/") hunter_add_version( PACKAGE_NAME Boost From b762443d9ea304fd2d162275f70d7493999cd5c7 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Tue, 22 Aug 2017 14:02:40 +0200 Subject: [PATCH 396/612] use Boost 1.65.0 as default --- cmake/configs/default.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index c859ed9279..bedbf2f518 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -40,7 +40,7 @@ hunter_config(Async++ VERSION 0.0.3-hunter) hunter_config(Avahi VERSION 0.6.31) hunter_config(Beast VERSION 1.0.0-b84-hunter-0) hunter_config(BZip2 VERSION 1.0.6-p3) -hunter_config(Boost VERSION 1.64.0) +hunter_config(Boost VERSION 1.65.0) hunter_config(BoostCompute VERSION 0.5-p0) hunter_config(BoostProcess VERSION 0.5) hunter_config(CapnProto VERSION 0.6.1) From 60c308465b768d50aae8e53e030b0cc99123516b Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Wed, 23 Aug 2017 10:07:43 +0200 Subject: [PATCH 397/612] add module hunter_get_boost_libs --- cmake/modules/hunter_get_boost_libs.cmake | 113 ++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 cmake/modules/hunter_get_boost_libs.cmake diff --git a/cmake/modules/hunter_get_boost_libs.cmake b/cmake/modules/hunter_get_boost_libs.cmake new file mode 100644 index 0000000000..af1e0f1f2b --- /dev/null +++ b/cmake/modules/hunter_get_boost_libs.cmake @@ -0,0 +1,113 @@ +# Copyright (c) 2017 NeroBurner +# All rights reserved. + +include(CMakeParseArguments) # cmake_parse_arguments + +include(hunter_test_string_not_empty) + +function(hunter_get_boost_libs) + set(function_name "hunter_get_boost_libs") + set(function_synopsis "${function_name}(VERSION requested_boost_version LIBS found_libs)") + + # parse arguments + set(one_value_args VERSION LIBS) + cmake_parse_arguments(x "" "${one_value_args}" "" ${ARGV}) + + # No free arguments allowed + list(LENGTH x_UNPARSED_ARGUMENTS x_len) + if(NOT x_len EQUAL 0) + hunter_internal_error( + "'${function_name}' incorrect usage," + " expected no free arguments '${x_UNPARSED_ARGUMENTS}'." + " Synopsis: ${function_synopsis}" + ) + endif() + + # check mandatory arguments + foreach(arg VERSION LIBS) + string(COMPARE EQUAL "${x_${arg}}" "" is_empty) + if(is_empty) + hunter_internal_error( + "'${function_name}' incorrect usage," + " option '${arg}' with one argument is mandatory." + " Synopsis: ${function_synopsis}" + ) + endif() + + string(FIND "${x_${arg}}" " " arg_whitespace_position) + if(NOT arg_whitespace_position EQUAL -1) + hunter_internal_error( + "'${function_name}' incorrect usage," + " argument '${arg}' with whitespaces not allowed." + " offending value '${x_${arg}}'" + ) + endif() + endforeach() + + # check boost component valid version range, add to 'boost_libs' if valid + # - version_since: first boost version the component is included + # - version_until: first boost version the component isn't included anymore + macro(boost_component) + # parse arguments + set(_one_value_args COMPONENT SINCE UNTIL) + cmake_parse_arguments(_y "" "${_one_value_args}" "" ${ARGV}) + + foreach(_arg COMPONENT SINCE) + string(COMPARE EQUAL "${_y_${_arg}}" "" _is_empty) + if(_is_empty) + hunter_internal_error( + "'boost_component' incorrect usage," + " option '${_arg}' with one argument is mandatory." + " Synopsis: boost_component(COMPONENT name SINCE version_since [UNTIL version_until])" + ) + endif() + endforeach() + + if(NOT x_VERSION VERSION_LESS _y_SINCE) + # check until only if set + string(COMPARE EQUAL "${_y_UNTIL}" "" _is_empty) + if(_is_empty) + list(APPEND boost_libs ${_y_COMPONENT}) + elseif(x_VERSION VERSION_LESS _y_UNTIL) + list(APPEND boost_libs ${_y_COMPONENT}) + endif() + endif() + endmacro() + + # list of all boost components valid for given version + set(boost_libs) + boost_component(COMPONENT atomic SINCE 1.53.0) + boost_component(COMPONENT chrono SINCE 1.47.0) + boost_component(COMPONENT container SINCE 1.56.0) + boost_component(COMPONENT context SINCE 1.51.0) + boost_component(COMPONENT coroutine SINCE 1.53.0) + boost_component(COMPONENT coroutine2 SINCE 1.60.0 UNTIL 1.65.0) + boost_component(COMPONENT date_time SINCE 1.29.0) + boost_component(COMPONENT exception SINCE 1.36.0) + boost_component(COMPONENT fiber SINCE 1.62.0) + boost_component(COMPONENT filesystem SINCE 1.30.0) + boost_component(COMPONENT graph SINCE 1.18.0) + boost_component(COMPONENT graph_parallel SINCE 1.18.0) + boost_component(COMPONENT iostreams SINCE 1.33.0) + boost_component(COMPONENT locale SINCE 1.48.0) + boost_component(COMPONENT log SINCE 1.54.0) + boost_component(COMPONENT math SINCE 1.23.0) + boost_component(COMPONENT metaparse SINCE 1.61.0) + boost_component(COMPONENT mpi SINCE 1.35.0) + boost_component(COMPONENT program_options SINCE 1.32.0) + boost_component(COMPONENT python SINCE 1.19.0) + boost_component(COMPONENT random SINCE 1.15.0) + boost_component(COMPONENT regex SINCE 1.18.0) + boost_component(COMPONENT serialization SINCE 1.32.0) + boost_component(COMPONENT signals SINCE 1.29.0) + boost_component(COMPONENT stacktrace SINCE 1.65.0) + boost_component(COMPONENT system SINCE 1.35.0) + boost_component(COMPONENT test SINCE 1.21.0) + boost_component(COMPONENT thread SINCE 1.25.0) + boost_component(COMPONENT timer SINCE 1.9.0) + boost_component(COMPONENT type_erasure SINCE 1.60.0) + boost_component(COMPONENT wave SINCE 1.33.0) + + # set output_var to found definition + set(${x_LIBS} ${boost_libs} PARENT_SCOPE) +endfunction() From fecf5b8331f799a805b562007fd4fefd4716a744 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Tue, 22 Aug 2017 14:03:28 +0200 Subject: [PATCH 398/612] Boost: use new module hunter_get_boost_libs --- .../Boost/schemes/url_sha1_boost.cmake.in | 45 ++----------------- .../url_sha1_boost_ios_library.cmake.in | 45 ++----------------- .../schemes/url_sha1_boost_library.cmake.in | 45 ++----------------- 3 files changed, 9 insertions(+), 126 deletions(-) diff --git a/cmake/projects/Boost/schemes/url_sha1_boost.cmake.in b/cmake/projects/Boost/schemes/url_sha1_boost.cmake.in index 8b31ddd592..fea6f61422 100644 --- a/cmake/projects/Boost/schemes/url_sha1_boost.cmake.in +++ b/cmake/projects/Boost/schemes/url_sha1_boost.cmake.in @@ -15,6 +15,7 @@ include(hunter_report_broken_package) include(hunter_status_debug) include(hunter_status_print) include(hunter_test_string_not_empty) +include(hunter_get_boost_libs) hunter_status_debug("Scheme: url_sha1_boost") @@ -35,48 +36,8 @@ if("@MSVC@") hunter_test_string_not_empty("@HUNTER_MSVC_VCVARSALL@") endif() -# Same logic in all url_sha1_boost* schemes (TODO: DRY) -macro(BOOST_COMPONENT name version) - list(APPEND BOOST_COMPONENT_NAMES ${name}) - set(BOOST_COMPONENT_${name}_VERSION ${version}) -endmacro() - -boost_component(atomic 1.53.0) -boost_component(chrono 1.47.0) -boost_component(container 1.56.0) -boost_component(context 1.51.0) -boost_component(coroutine 1.53.0) -boost_component(coroutine2 1.60.0) -boost_component(date_time 1.29.0) -boost_component(exception 1.36.0) -boost_component(fiber 1.62.0) -boost_component(filesystem 1.30.0) -boost_component(graph 1.18.0) -boost_component(graph_parallel 1.18.0) -boost_component(iostreams 1.33.0) -boost_component(locale 1.48.0) -boost_component(log 1.54.0) -boost_component(math 1.23.0) -boost_component(metaparse 1.61.0) -boost_component(mpi 1.35.0) -boost_component(program_options 1.32.0) -boost_component(python 1.19.0) -boost_component(random 1.15.0) -boost_component(regex 1.18.0) -boost_component(serialization 1.32.0) -boost_component(signals 1.29.0) -boost_component(system 1.35.0) -boost_component(test 1.21.0) -boost_component(thread 1.25.0) -boost_component(timer 1.9.0) -boost_component(type_erasure 1.60.0) -boost_component(wave 1.33.0) - -foreach(name IN LISTS BOOST_COMPONENT_NAMES) - if(NOT @HUNTER_Boost_VERSION@ VERSION_LESS BOOST_COMPONENT_${name}_VERSION) - list(APPEND boost_libs ${name}) - endif() -endforeach() +# get list of boost components for given version +hunter_get_boost_libs(VERSION "@HUNTER_Boost_VERSION@" LIBS boost_libs) # MinGW 1.55 is broken string(REGEX MATCH "1.55.0*" version_1_55 "@HUNTER_Boost_VERSION@") diff --git a/cmake/projects/Boost/schemes/url_sha1_boost_ios_library.cmake.in b/cmake/projects/Boost/schemes/url_sha1_boost_ios_library.cmake.in index c2c5fef255..a01f7e56a8 100644 --- a/cmake/projects/Boost/schemes/url_sha1_boost_ios_library.cmake.in +++ b/cmake/projects/Boost/schemes/url_sha1_boost_ios_library.cmake.in @@ -17,6 +17,7 @@ include(hunter_internal_error) include(hunter_status_debug) include(hunter_test_string_not_empty) include(hunter_unsetvar) +include(hunter_get_boost_libs) hunter_status_debug("Scheme: url_sha1_boost_ios_library") @@ -41,48 +42,8 @@ hunter_test_string_not_empty("@IPHONEOS_SDK_ROOT@") hunter_test_string_not_empty("@IPHONESIMULATOR_SDK_ROOT@") hunter_test_string_not_empty("@HUNTER_Boost_VERSION@") -# Same logic in all url_sha1_boost* schemes (TODO: DRY) -macro(BOOST_COMPONENT name version) - list(APPEND BOOST_COMPONENT_NAMES ${name}) - set(BOOST_COMPONENT_${name}_VERSION ${version}) -endmacro() - -boost_component(atomic 1.53.0) -boost_component(chrono 1.47.0) -boost_component(container 1.56.0) -boost_component(context 1.51.0) -boost_component(coroutine 1.53.0) -boost_component(coroutine2 1.60.0) -boost_component(date_time 1.29.0) -boost_component(exception 1.36.0) -boost_component(fiber 1.62.0) -boost_component(filesystem 1.30.0) -boost_component(graph 1.18.0) -boost_component(graph_parallel 1.18.0) -boost_component(iostreams 1.33.0) -boost_component(locale 1.48.0) -boost_component(log 1.54.0) -boost_component(math 1.23.0) -boost_component(metaparse 1.61.0) -boost_component(mpi 1.35.0) -boost_component(program_options 1.32.0) -boost_component(python 1.19.0) -boost_component(random 1.15.0) -boost_component(regex 1.18.0) -boost_component(serialization 1.32.0) -boost_component(signals 1.29.0) -boost_component(system 1.35.0) -boost_component(test 1.21.0) -boost_component(thread 1.25.0) -boost_component(timer 1.9.0) -boost_component(type_erasure 1.60.0) -boost_component(wave 1.33.0) - -foreach(name IN LISTS BOOST_COMPONENT_NAMES) - if(NOT @HUNTER_Boost_VERSION@ VERSION_LESS BOOST_COMPONENT_${name}_VERSION) - list(APPEND boost_libs ${name}) - endif() -endforeach() +# get list of boost components for given version +hunter_get_boost_libs(VERSION "@HUNTER_Boost_VERSION@" LIBS boost_libs) set(libfound NO) foreach(x ${boost_libs}) diff --git a/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in b/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in index ba06bf4e69..24cb8cf5cf 100644 --- a/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in +++ b/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in @@ -21,6 +21,7 @@ include(hunter_pick_archiver) include(hunter_status_debug) include(hunter_status_print) include(hunter_test_string_not_empty) +include(hunter_get_boost_libs) hunter_status_debug("Scheme: url_sha1_boost_library") @@ -42,48 +43,8 @@ if("@MSVC@") hunter_test_string_not_empty("@HUNTER_MSVC_VCVARSALL@") endif() -# Same logic in all url_sha1_boost* schemes (TODO: DRY) -macro(BOOST_COMPONENT name version) - list(APPEND BOOST_COMPONENT_NAMES ${name}) - set(BOOST_COMPONENT_${name}_VERSION ${version}) -endmacro() - -boost_component(atomic 1.53.0) -boost_component(chrono 1.47.0) -boost_component(container 1.56.0) -boost_component(context 1.51.0) -boost_component(coroutine 1.53.0) -boost_component(coroutine2 1.60.0) -boost_component(date_time 1.29.0) -boost_component(exception 1.36.0) -boost_component(fiber 1.62.0) -boost_component(filesystem 1.30.0) -boost_component(graph 1.18.0) -boost_component(graph_parallel 1.18.0) -boost_component(iostreams 1.33.0) -boost_component(locale 1.48.0) -boost_component(log 1.54.0) -boost_component(math 1.23.0) -boost_component(metaparse 1.61.0) -boost_component(mpi 1.35.0) -boost_component(program_options 1.32.0) -boost_component(python 1.19.0) -boost_component(random 1.15.0) -boost_component(regex 1.18.0) -boost_component(serialization 1.32.0) -boost_component(signals 1.29.0) -boost_component(system 1.35.0) -boost_component(test 1.21.0) -boost_component(thread 1.25.0) -boost_component(timer 1.9.0) -boost_component(type_erasure 1.60.0) -boost_component(wave 1.33.0) - -foreach(name IN LISTS BOOST_COMPONENT_NAMES) - if(NOT @HUNTER_Boost_VERSION@ VERSION_LESS BOOST_COMPONENT_${name}_VERSION) - list(APPEND boost_libs ${name}) - endif() -endforeach() +# get list of boost components for given version +hunter_get_boost_libs(VERSION "@HUNTER_Boost_VERSION@" LIBS boost_libs) set(libfound NO) foreach(x ${boost_libs}) From 67ed61f1f0d142a23686d9d58a0ebfe0366c8d24 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Wed, 23 Aug 2017 16:43:16 +0200 Subject: [PATCH 399/612] add module hunter_append_component --- cmake/modules/hunter_append_component.cmake | 57 +++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 cmake/modules/hunter_append_component.cmake diff --git a/cmake/modules/hunter_append_component.cmake b/cmake/modules/hunter_append_component.cmake new file mode 100644 index 0000000000..b42468ffda --- /dev/null +++ b/cmake/modules/hunter_append_component.cmake @@ -0,0 +1,57 @@ +# Copyright (c) 2017 NeroBurner +# All rights reserved. + +include(CMakeParseArguments) # cmake_parse_arguments + +include(hunter_test_string_not_empty) + +# check if component is in specified version range, add to 'varname' if valid +# - varname: name of the variable of the list to append component names +# - name: name of the component to add to list if version is valid +# - given_version: version to check +# - version_since: first version the component is included +# - version_until: first version the component isn't included anymore +function(hunter_append_component) + set(function_name "hunter_append_component") + set(function_synopsis "${function_name}(LIST varname VERSION given-version COMPONENT name SINCE version_since [UNTIL version_until])") + + # parse arguments + set(one_value_args LIST VERSION COMPONENT SINCE UNTIL) + cmake_parse_arguments(x "" "${one_value_args}" "" ${ARGV}) + + # No free arguments allowed + list(LENGTH x_UNPARSED_ARGUMENTS x_len) + if(NOT x_len EQUAL 0) + hunter_internal_error( + "'${function_name}' incorrect usage," + " expected no free arguments '${x_UNPARSED_ARGUMENTS}'." + " Synopsis: ${function_synopsis}" + ) + endif() + + # check mandatory arguments + foreach(arg LIST VERSION COMPONENT SINCE) + string(COMPARE EQUAL "${x_${arg}}" "" is_empty) + if(is_empty) + hunter_internal_error( + "'${function_name}' incorrect usage," + " option '${arg}' with one argument is mandatory." + " Synopsis: ${function_synopsis}" + ) + endif() + endforeach() + + set(component_list ${${x_LIST}}) + if(NOT x_VERSION VERSION_LESS x_SINCE) + # check until only if set + string(COMPARE EQUAL "${x_UNTIL}" "" _is_empty) + if(_is_empty) + list(APPEND component_list ${x_COMPONENT}) + elseif(x_VERSION VERSION_LESS x_UNTIL) + list(APPEND component_list ${x_COMPONENT}) + endif() + endif() + + # set output_var to found definition + set(${x_LIST} ${component_list} PARENT_SCOPE) +endfunction() From f72338781f9229466c351f767f43086edc88acad Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Wed, 23 Aug 2017 16:43:38 +0200 Subject: [PATCH 400/612] use hunter_append_component instead of macro --- cmake/modules/hunter_get_boost_libs.cmake | 95 ++++++++--------------- 1 file changed, 34 insertions(+), 61 deletions(-) diff --git a/cmake/modules/hunter_get_boost_libs.cmake b/cmake/modules/hunter_get_boost_libs.cmake index af1e0f1f2b..cf02b2ab21 100644 --- a/cmake/modules/hunter_get_boost_libs.cmake +++ b/cmake/modules/hunter_get_boost_libs.cmake @@ -4,6 +4,7 @@ include(CMakeParseArguments) # cmake_parse_arguments include(hunter_test_string_not_empty) +include(hunter_append_component) function(hunter_get_boost_libs) set(function_name "hunter_get_boost_libs") @@ -44,69 +45,41 @@ function(hunter_get_boost_libs) endif() endforeach() - # check boost component valid version range, add to 'boost_libs' if valid - # - version_since: first boost version the component is included - # - version_until: first boost version the component isn't included anymore - macro(boost_component) - # parse arguments - set(_one_value_args COMPONENT SINCE UNTIL) - cmake_parse_arguments(_y "" "${_one_value_args}" "" ${ARGV}) - - foreach(_arg COMPONENT SINCE) - string(COMPARE EQUAL "${_y_${_arg}}" "" _is_empty) - if(_is_empty) - hunter_internal_error( - "'boost_component' incorrect usage," - " option '${_arg}' with one argument is mandatory." - " Synopsis: boost_component(COMPONENT name SINCE version_since [UNTIL version_until])" - ) - endif() - endforeach() - - if(NOT x_VERSION VERSION_LESS _y_SINCE) - # check until only if set - string(COMPARE EQUAL "${_y_UNTIL}" "" _is_empty) - if(_is_empty) - list(APPEND boost_libs ${_y_COMPONENT}) - elseif(x_VERSION VERSION_LESS _y_UNTIL) - list(APPEND boost_libs ${_y_COMPONENT}) - endif() - endif() - endmacro() - # list of all boost components valid for given version set(boost_libs) - boost_component(COMPONENT atomic SINCE 1.53.0) - boost_component(COMPONENT chrono SINCE 1.47.0) - boost_component(COMPONENT container SINCE 1.56.0) - boost_component(COMPONENT context SINCE 1.51.0) - boost_component(COMPONENT coroutine SINCE 1.53.0) - boost_component(COMPONENT coroutine2 SINCE 1.60.0 UNTIL 1.65.0) - boost_component(COMPONENT date_time SINCE 1.29.0) - boost_component(COMPONENT exception SINCE 1.36.0) - boost_component(COMPONENT fiber SINCE 1.62.0) - boost_component(COMPONENT filesystem SINCE 1.30.0) - boost_component(COMPONENT graph SINCE 1.18.0) - boost_component(COMPONENT graph_parallel SINCE 1.18.0) - boost_component(COMPONENT iostreams SINCE 1.33.0) - boost_component(COMPONENT locale SINCE 1.48.0) - boost_component(COMPONENT log SINCE 1.54.0) - boost_component(COMPONENT math SINCE 1.23.0) - boost_component(COMPONENT metaparse SINCE 1.61.0) - boost_component(COMPONENT mpi SINCE 1.35.0) - boost_component(COMPONENT program_options SINCE 1.32.0) - boost_component(COMPONENT python SINCE 1.19.0) - boost_component(COMPONENT random SINCE 1.15.0) - boost_component(COMPONENT regex SINCE 1.18.0) - boost_component(COMPONENT serialization SINCE 1.32.0) - boost_component(COMPONENT signals SINCE 1.29.0) - boost_component(COMPONENT stacktrace SINCE 1.65.0) - boost_component(COMPONENT system SINCE 1.35.0) - boost_component(COMPONENT test SINCE 1.21.0) - boost_component(COMPONENT thread SINCE 1.25.0) - boost_component(COMPONENT timer SINCE 1.9.0) - boost_component(COMPONENT type_erasure SINCE 1.60.0) - boost_component(COMPONENT wave SINCE 1.33.0) + # common arguments for hunter_append_component + set(common_args LIST boost_libs VERSION ${x_VERSION}) + hunter_append_component(${common_args} COMPONENT atomic SINCE 1.53.0) + hunter_append_component(${common_args} COMPONENT chrono SINCE 1.47.0) + hunter_append_component(${common_args} COMPONENT container SINCE 1.56.0) + hunter_append_component(${common_args} COMPONENT context SINCE 1.51.0) + hunter_append_component(${common_args} COMPONENT coroutine SINCE 1.53.0) + hunter_append_component(${common_args} COMPONENT coroutine2 SINCE 1.60.0 UNTIL 1.65.0) + hunter_append_component(${common_args} COMPONENT date_time SINCE 1.29.0) + hunter_append_component(${common_args} COMPONENT exception SINCE 1.36.0) + hunter_append_component(${common_args} COMPONENT fiber SINCE 1.62.0) + hunter_append_component(${common_args} COMPONENT filesystem SINCE 1.30.0) + hunter_append_component(${common_args} COMPONENT graph SINCE 1.18.0) + hunter_append_component(${common_args} COMPONENT graph_parallel SINCE 1.18.0) + hunter_append_component(${common_args} COMPONENT iostreams SINCE 1.33.0) + hunter_append_component(${common_args} COMPONENT locale SINCE 1.48.0) + hunter_append_component(${common_args} COMPONENT log SINCE 1.54.0) + hunter_append_component(${common_args} COMPONENT math SINCE 1.23.0) + hunter_append_component(${common_args} COMPONENT metaparse SINCE 1.61.0) + hunter_append_component(${common_args} COMPONENT mpi SINCE 1.35.0) + hunter_append_component(${common_args} COMPONENT program_options SINCE 1.32.0) + hunter_append_component(${common_args} COMPONENT python SINCE 1.19.0) + hunter_append_component(${common_args} COMPONENT random SINCE 1.15.0) + hunter_append_component(${common_args} COMPONENT regex SINCE 1.18.0) + hunter_append_component(${common_args} COMPONENT serialization SINCE 1.32.0) + hunter_append_component(${common_args} COMPONENT signals SINCE 1.29.0) + hunter_append_component(${common_args} COMPONENT stacktrace SINCE 1.65.0) + hunter_append_component(${common_args} COMPONENT system SINCE 1.35.0) + hunter_append_component(${common_args} COMPONENT test SINCE 1.21.0) + hunter_append_component(${common_args} COMPONENT thread SINCE 1.25.0) + hunter_append_component(${common_args} COMPONENT timer SINCE 1.9.0) + hunter_append_component(${common_args} COMPONENT type_erasure SINCE 1.60.0) + hunter_append_component(${common_args} COMPONENT wave SINCE 1.33.0) # set output_var to found definition set(${x_LIBS} ${boost_libs} PARENT_SCOPE) From 5bb3c14f86e3f7e1944d2be4e21e17fe1c3f7c3d Mon Sep 17 00:00:00 2001 From: Ruslan Baratov Date: Tue, 22 Aug 2017 21:48:54 +0300 Subject: [PATCH 401/612] QtCMakeExtra 1.0.25 --- cmake/configs/default.cmake | 2 +- cmake/projects/QtCMakeExtra/hunter.cmake | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 4e02433f6c..494af24768 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -115,7 +115,7 @@ else() endif() hunter_config(QtAndroidCMake VERSION 1.0.9) -hunter_config(QtCMakeExtra VERSION 1.0.24) +hunter_config(QtCMakeExtra VERSION 1.0.25) hunter_config(QtQmlManager VERSION 1.0.0) hunter_config(RapidJSON VERSION 1.0.2-p2) hunter_config(RapidXML VERSION 1.13) diff --git a/cmake/projects/QtCMakeExtra/hunter.cmake b/cmake/projects/QtCMakeExtra/hunter.cmake index 459cdb93bf..97e5814c8b 100644 --- a/cmake/projects/QtCMakeExtra/hunter.cmake +++ b/cmake/projects/QtCMakeExtra/hunter.cmake @@ -283,6 +283,17 @@ hunter_add_version( d2aced482704a11ff5c5029750b2fb6f9671f622 ) +hunter_add_version( + PACKAGE_NAME + QtCMakeExtra + VERSION + "1.0.25" + URL + "https://github.com/hunter-packages/QtCMakeExtra/archive/v1.0.25.tar.gz" + SHA1 + 23182e08840d09cb521c362aaa7e695b7c7e3d5b +) + hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(QtCMakeExtra) hunter_download(PACKAGE_NAME QtCMakeExtra) From a549cfb7e803cb8aa3b42c797fb1a656bbae131c Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Thu, 24 Aug 2017 15:27:40 +0200 Subject: [PATCH 402/612] Boost: use 1.64 on MINGW and MSVC, broken bootstrap --- cmake/configs/default.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index bedbf2f518..199bdf8984 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -40,7 +40,12 @@ hunter_config(Async++ VERSION 0.0.3-hunter) hunter_config(Avahi VERSION 0.6.31) hunter_config(Beast VERSION 1.0.0-b84-hunter-0) hunter_config(BZip2 VERSION 1.0.6-p3) -hunter_config(Boost VERSION 1.65.0) +if(MSVC OR MINGW) + # FIXME: https://ci.appveyor.com/project/ingenue/hunter/build/1.0.2229 + hunter_config(Boost VERSION 1.64.0) +else() + hunter_config(Boost VERSION 1.65.0) +endif() hunter_config(BoostCompute VERSION 0.5-p0) hunter_config(BoostProcess VERSION 0.5) hunter_config(CapnProto VERSION 0.6.1) From f4522c8b300be6ae66d340dde5ad1eb454936a16 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Thu, 24 Aug 2017 16:48:51 +0200 Subject: [PATCH 403/612] docs: add some package files - Boost - BZip2 - Eigen - glog - ZLIB --- docs/packages/pkg/BZip2.rst | 19 +++++++ docs/packages/pkg/Boost.rst | 103 ++++++++++++++++++++++++++++++++++++ docs/packages/pkg/Eigen.rst | 26 +++++++++ docs/packages/pkg/ZLIB.rst | 25 +++++++++ docs/packages/pkg/glog.rst | 28 ++++++++++ 5 files changed, 201 insertions(+) create mode 100644 docs/packages/pkg/BZip2.rst create mode 100644 docs/packages/pkg/Boost.rst create mode 100644 docs/packages/pkg/Eigen.rst create mode 100644 docs/packages/pkg/ZLIB.rst create mode 100644 docs/packages/pkg/glog.rst diff --git a/docs/packages/pkg/BZip2.rst b/docs/packages/pkg/BZip2.rst new file mode 100644 index 0000000000..64981d9e22 --- /dev/null +++ b/docs/packages/pkg/BZip2.rst @@ -0,0 +1,19 @@ +.. spelling:: + + BZip + +BZip2 +===== + +- `Official `__ +- `Hunterized `__ +- `Example `__ +- Available since + `v0.9.9 `__ + +.. code:: cmake + + hunter_add_package(BZip2) + + find_package(BZip2 CONFIG REQUIRED) + target_link_libraries(... BZip2::bz2) diff --git a/docs/packages/pkg/Boost.rst b/docs/packages/pkg/Boost.rst new file mode 100644 index 0000000000..74cae6e9e6 --- /dev/null +++ b/docs/packages/pkg/Boost.rst @@ -0,0 +1,103 @@ +Boost +===== + +.. code:: cmake + + # Header-only libraries + hunter_add_package(Boost) + find_package(Boost CONFIG REQUIRED) + target_link_libraries(... Boost::boost) + +- `Example `__ + +.. code:: cmake + + # Boost components (see list below) + hunter_add_package(Boost COMPONENTS system filesystem) + find_package(Boost CONFIG REQUIRED system filesystem) + target_link_libraries(... Boost::system Boost::filesystem) + +Examples: + +- `Boost-uuid `__ +- `Boost-system `__ +- `Boost-iostreams `__ +- `Boost-filesystem `__ + +List of components (other libraries are header-only): + +- ``atomic`` +- ``chrono`` +- ``context`` +- ``coroutine`` +- ``date_time`` +- ``exception`` +- ``filesystem`` +- ``graph`` +- ``graph_parallel`` +- ``iostreams`` +- ``locale`` +- ``log`` +- ``math`` +- ``mpi`` +- ``program_options`` +- ``python`` +- ``random`` +- ``regex`` +- ``serialization`` +- ``signals`` +- ``system`` +- ``test`` +- ``thread`` +- ``timer`` +- ``wave`` + +Compatibility mode +------------------ + +.. code:: cmake + + hunter_add_package(Boost COMPONENTS system filesystem) + set(Boost_USE_STATIC_LIBS ON) + find_package(Boost REQUIRED system filesystem) + if(MSVC) + add_definitions(-DBOOST_ALL_NO_LIB=1) + endif() + + include_directories(${Boost_INCLUDE_DIRS}) + target_link_libraries(... ${Boost_LIBRARIES}) + +CMake options +------------- + +CMake options can be passed to boost build using ``CMAKE_ARGS`` feature +(see +`customization `__). +Options of special form ``_