From afc4c02c742de4d32f853eb14b08a9c5f39150ef Mon Sep 17 00:00:00 2001 From: Mohammed Alyousef Date: Thu, 20 Sep 2018 16:54:32 +0200 Subject: [PATCH 01/12] Merge branch 'dev/roschuma/upgrades' --- .gitignore | 27 +++++++++++++++++++++++++++ ports/abseil/CONTROL | 2 +- ports/abseil/portfile.cmake | 4 ++-- ports/aws-sdk-cpp/CONTROL | 2 +- ports/aws-sdk-cpp/portfile.cmake | 4 ++-- ports/breakpad/CONTROL | 2 +- ports/breakpad/portfile.cmake | 4 ++-- ports/chakracore/CONTROL | 2 +- ports/chakracore/portfile.cmake | 4 ++-- ports/cimg/CONTROL | 2 +- ports/cimg/portfile.cmake | 4 ++-- ports/directxmesh/CONTROL | 2 +- ports/directxmesh/portfile.cmake | 4 ++-- ports/directxtex/CONTROL | 2 +- ports/directxtex/portfile.cmake | 4 ++-- ports/directxtk/CONTROL | 2 +- ports/directxtk/portfile.cmake | 4 ++-- ports/doctest/CONTROL | 2 +- ports/doctest/portfile.cmake | 4 ++-- ports/eastl/CONTROL | 2 +- ports/eastl/portfile.cmake | 4 ++-- ports/exiv2/CONTROL | 2 +- ports/exiv2/portfile.cmake | 4 ++-- ports/expat/CONTROL | 2 +- ports/expat/portfile.cmake | 4 ++-- ports/fmt/CONTROL | 2 +- ports/fmt/portfile.cmake | 4 ++-- ports/folly/CONTROL | 2 +- ports/folly/portfile.cmake | 4 ++-- ports/forest/CONTROL | 2 +- ports/forest/portfile.cmake | 4 ++-- ports/freetype-gl/CONTROL | 2 +- ports/freetype-gl/portfile.cmake | 10 +++------- ports/jsonnet/CONTROL | 2 +- ports/jsonnet/portfile.cmake | 4 ++-- ports/libuv/CONTROL | 2 +- ports/libuv/portfile.cmake | 4 ++-- ports/libwebsockets/CONTROL | 2 +- ports/libwebsockets/portfile.cmake | 10 +++------- ports/lodepng/CONTROL | 2 +- ports/lodepng/algorithm.patch | 12 ++++++++++++ ports/lodepng/portfile.cmake | 5 +++-- ports/luasocket/CONTROL | 2 +- ports/luasocket/portfile.cmake | 4 ++-- ports/lz4/CONTROL | 2 +- ports/lz4/portfile.cmake | 4 ++-- ports/mbedtls/CONTROL | 2 +- ports/mbedtls/portfile.cmake | 4 ++-- ports/ms-gsl/CONTROL | 2 +- ports/ms-gsl/portfile.cmake | 4 ++-- ports/nana/CONTROL | 2 +- ports/nana/portfile.cmake | 4 ++-- ports/nuklear/CONTROL | 2 +- ports/nuklear/portfile.cmake | 4 ++-- ports/openal-soft/CONTROL | 2 +- ports/openal-soft/portfile.cmake | 12 ++++-------- ports/parson/CONTROL | 2 +- ports/parson/portfile.cmake | 4 ++-- ports/pmdk/CONTROL | 2 +- ports/pmdk/portfile.cmake | 4 ++-- ports/re2/CONTROL | 2 +- ports/re2/portfile.cmake | 4 ++-- ports/rs-core-lib/CONTROL | 2 +- ports/rs-core-lib/portfile.cmake | 4 ++-- ports/thrift/CONTROL | 2 +- ports/thrift/portfile.cmake | 4 ++-- ports/tiny-dnn/CONTROL | 2 +- ports/tiny-dnn/portfile.cmake | 4 ++-- ports/unicorn-lib/CONTROL | 2 +- ports/unicorn-lib/portfile.cmake | 4 ++-- ports/unicorn/CONTROL | 2 +- ports/unicorn/portfile.cmake | 4 ++-- ports/wt/CONTROL | 2 +- ports/wt/portfile.cmake | 14 +++++--------- ports/zeromq/CONTROL | 2 +- ports/zeromq/portfile.cmake | 4 ++-- 76 files changed, 158 insertions(+), 134 deletions(-) create mode 100644 ports/lodepng/algorithm.patch diff --git a/.gitignore b/.gitignore index c223e6fcf842b5..85066d14378fd7 100644 --- a/.gitignore +++ b/.gitignore @@ -298,9 +298,36 @@ __pycache__/ !triplets/arm64-windows.cmake !triplets/x64-linux.cmake !triplets/x64-osx.cmake +!triplets/x86-wasm.cmake *.exe *.zip ############################################################ # vcpkg - End ############################################################ + + +############################################################ +# cmake and ninja - Start +############################################################ + +.DS_Store +*.o +**/build.* +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +.ninja_deps +.ninja_log +build.ninja +rules.ninja + +############################################################ +# cmake and ninja - End +############################################################ diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index ac5cb17f44a489..4a35f248bdbb43 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil -Version: 2018-08-03 +Version: 2018-09-18 Description: an open-source collection designed to augment the C++ standard library. Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives. In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 9a0bad50eec0fd..7894b565492e8e 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF 8f96be6ca60d967bd4b37f93d0a03bcff4145200 - SHA512 f50d0e5cdfc4798fdeacc3a8234137b01fb26797ecaaadff9c44eefe00100d5d733976ea45cdb4d4709eec03968037afb0bf6411b89b92bd90623bfe451d8314 + REF 8ff1374008259719b54a8cb128ef951c02da164c + SHA512 c8eaef8d3a829152bbe1a9adf60fad74858d10e78d2fd1ad8409a027add2f9e24df9994e4981960550b04845838ec6f5ac83b09d6a8850d129fb078d15c4b94f HEAD_REF master ) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index 56bac880d457bc..23d9e16e39e17b 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,5 +1,5 @@ Source: aws-sdk-cpp -Version: 1.5.7 +Version: 1.6.12 Description: AWS SDK for C++ Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows) Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index b6c05d4b5fbcb8..854e24fcbfd665 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.5.7 - SHA512 c392b6d08fedd9f3ecb58856c7b678193db7061fbf5771840487a0a6b993e3c3626007a4e780760ef5dc76ff237c373303c61fb0663375f1f8ca923294e3c541 + REF 1.6.12 + SHA512 37cd573ea354394c170a081572f63dfe604bf631d0129a53f066f121680b92c8f64b343a4d841de9a178679a322755a858a1148fbfc99c3f525a1f025fdfbd84 HEAD_REF master ) diff --git a/ports/breakpad/CONTROL b/ports/breakpad/CONTROL index 48164a0b75b005..55ca2a8c384a91 100644 --- a/ports/breakpad/CONTROL +++ b/ports/breakpad/CONTROL @@ -1,4 +1,4 @@ Source: breakpad -Version: 2018-08-03-1 +Version: 2018-09-18 Build-Depends: libdisasm Description: a set of client and server components which implement a crash-reporting system. diff --git a/ports/breakpad/portfile.cmake b/ports/breakpad/portfile.cmake index e79f5293ee394f..18b1b8152efacd 100644 --- a/ports/breakpad/portfile.cmake +++ b/ports/breakpad/portfile.cmake @@ -5,8 +5,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/breakpad - REF f12b6897897fb5b7e74437371fdf2b36a36f5661 - SHA512 b2322e2f043fff9f7aa9ff1aa99bc7eab2c98e0d0e2407bd35aa5eeab6e16e4a526d5a88544e3c13f0b41ee0c993f35eefce632ef8a3f183a877f98272ac7f19 + REF 54fa71efbe50fb2b58096d871575b59e12edba6d + SHA512 ecd1c6c5cc0e3984d05fe86ec11172e93b0e31c39ce0af9d0de08b8d03083686e2288e0cd787180c599446c277e58f48550ce4ab718019576c64fc403a592745 HEAD_REF master ) diff --git a/ports/chakracore/CONTROL b/ports/chakracore/CONTROL index 1939a4a64503ea..727f2826850ac0 100644 --- a/ports/chakracore/CONTROL +++ b/ports/chakracore/CONTROL @@ -1,3 +1,3 @@ Source: chakracore -Version: 1.10.1-1 +Version: 1.11.1 Description: Core part of the Chakra Javascript engine diff --git a/ports/chakracore/portfile.cmake b/ports/chakracore/portfile.cmake index ad5431267e7677..62801f00ae3b17 100644 --- a/ports/chakracore/portfile.cmake +++ b/ports/chakracore/portfile.cmake @@ -9,8 +9,8 @@ vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/ChakraCore - REF v1.10.1 - SHA512 e3a9a9e6506b603922e5a5ed1fb900d43dfd6c8e5e091e12bf902dbe58cd12753e6b7f59a895081cea880eb78bcc55571ee561fe03c96d6312608626a5b653f2 + REF v1.11.1 + SHA512 cabec836af505504ffff99050de79320fe32e7311842bc5c715dae18ae7e006b63bb56f4d071016708ddec05a2a07143677371a76a57def68fb7f428012452d3 HEAD_REF master ) diff --git a/ports/cimg/CONTROL b/ports/cimg/CONTROL index c3acc587cbe340..ecb4df9f994407 100644 --- a/ports/cimg/CONTROL +++ b/ports/cimg/CONTROL @@ -1,3 +1,3 @@ Source: cimg -Version: 2.3.3 +Version: 2.3.6 Description: The CImg Library is a small, open-source, and modern C++ toolkit for image processing diff --git a/ports/cimg/portfile.cmake b/ports/cimg/portfile.cmake index 8704f0f7bfa951..edf4839d3d9f5b 100644 --- a/ports/cimg/portfile.cmake +++ b/ports/cimg/portfile.cmake @@ -2,9 +2,9 @@ include(vcpkg_common_functions) vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH REPO "dtschump/CImg" - REF v.2.3.3 + REF v.2.3.6 HEAD_REF master - SHA512 506dd0e55ecab3a1c3b230c97050b302614f187e7ec8634d8499353b278c783cd58408211abd3815d34b4e2b748e4481ccea79d1253d1df511fd3d0723ae4568) + SHA512 b2214e6f72eee0dd4fd20739030c4082bfe67923a7f2efe74709b42e07d58552a6b7d1306f0fddf9478294e822313fe3bae0bff5c141e7dbb4453d08b3d9b05d) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/directxmesh/CONTROL b/ports/directxmesh/CONTROL index 427998eb416956..e625af354a01bc 100644 --- a/ports/directxmesh/CONTROL +++ b/ports/directxmesh/CONTROL @@ -1,3 +1,3 @@ Source: directxmesh -Version: jul2018 +Version: aug2018 Description: DirectXMesh geometry processing library \ No newline at end of file diff --git a/ports/directxmesh/portfile.cmake b/ports/directxmesh/portfile.cmake index e8d48d1c8ad267..4263b2aa87f571 100644 --- a/ports/directxmesh/portfile.cmake +++ b/ports/directxmesh/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXMesh - REF jul2018 - SHA512 080306d23153c5db6d84cf1df7700d89a25405064806ca9b8d07291ebe80d89793dfe540a98313afc137964e2fb900158d40feee6bb2a68ef9af2d872f0ebe3c + REF aug2018 + SHA512 5aaafd434024327b9ab59eab7f0247a5e0d439e5cad22929adc78edd41ac987c5da70e3ae26637beea923333651ceae3127f1ff274aad3497948508a1a8b1912 HEAD_REF master ) diff --git a/ports/directxtex/CONTROL b/ports/directxtex/CONTROL index 9340c9f3e95bea..3196c68b180392 100644 --- a/ports/directxtex/CONTROL +++ b/ports/directxtex/CONTROL @@ -1,3 +1,3 @@ Source: directxtex -Version: jul2018 +Version: aug2018b Description: DirectXTex texture processing library \ No newline at end of file diff --git a/ports/directxtex/portfile.cmake b/ports/directxtex/portfile.cmake index 4ea0216b0dc6c6..bcdeebfbda90ad 100644 --- a/ports/directxtex/portfile.cmake +++ b/ports/directxtex/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXTex - REF jul2018 - SHA512 83408840bf1fedef240c808c59b94d9b77133cf6bc1803c49a4faf5a319fa4b16c26c16240748fb4dd29fb907a4366c724171c64deeb71b0a15214ee74859b4d + REF aug2018b + SHA512 51ccd4855d399db4980a0f859da25e9473cf5b4ae44f2594b13ba7813d4fd3f4c424ce750ca0b096e40999c935269522fb6bfe2b2e1910f0f8a6c6c1ea76c399 HEAD_REF master ) diff --git a/ports/directxtk/CONTROL b/ports/directxtk/CONTROL index 254c613378a23e..1f0637c4479fc3 100644 --- a/ports/directxtk/CONTROL +++ b/ports/directxtk/CONTROL @@ -1,3 +1,3 @@ Source: directxtk -Version: jul2018 +Version: aug2018 Description: A collection of helper classes for writing DirectX 11.x code in C++. diff --git a/ports/directxtk/portfile.cmake b/ports/directxtk/portfile.cmake index 317831c9627654..5ef37d1f29012d 100644 --- a/ports/directxtk/portfile.cmake +++ b/ports/directxtk/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXTK - REF jul2018 - SHA512 1e962bc7f3ab730616bb7ec07d54904cbd636033ca0bba722170690dc906524968df66ad440e3423273120b9e4dc53a28ae7edb8a2568c58e5eed816d8e9a619 + REF aug2018 + SHA512 9408916864900a098bb77244144c71d1786b3fe76468c50a92fbf21f71407c7f7c6834d9e69a13b4b93161362252599ccb12f6a87b6ca7a8b23d12e6e73dd166 HEAD_REF master ) diff --git a/ports/doctest/CONTROL b/ports/doctest/CONTROL index 3de9dedb3d48d7..214950929782bd 100644 --- a/ports/doctest/CONTROL +++ b/ports/doctest/CONTROL @@ -1,3 +1,3 @@ Source: doctest -Version: 1.2.9 +Version: 2.0.0 Description: The fastest feature-rich C++ single-header testing framework for unit tests and TDD diff --git a/ports/doctest/portfile.cmake b/ports/doctest/portfile.cmake index 433a52f53c45a6..007b3a21d499d6 100644 --- a/ports/doctest/portfile.cmake +++ b/ports/doctest/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO onqtam/doctest - REF 1.2.9 - SHA512 9500570fb0ef7b06799fbe92b8f96eacf16eba630abe4f67a235901995192e31fafb812704f327f0a2582c8fe61c3bb458d2eaf3c4287f24c1ffbc04c46a2471 + REF 2.0.0 + SHA512 ad167201fa10890e868fab628d73588e66470fbf6d5bdf0cd4e4ce13510f0727411fa709eb748eb1b5de19307c75d2efbcd71cb678e3ef1d0632056d7af2f012 HEAD_REF master ) diff --git a/ports/eastl/CONTROL b/ports/eastl/CONTROL index 74ee1d5eb0831e..c45a2c74026391 100644 --- a/ports/eastl/CONTROL +++ b/ports/eastl/CONTROL @@ -1,4 +1,4 @@ Source: eastl -Version: 3.10.00 +Version: 3.12.01 Description: Electronic Arts Standard Template Library. It is a C++ template library of containers, algorithms, and iterators useful for runtime and tool development across multiple platforms. It is a fairly extensive and robust implementation of such a library and has an emphasis on high performance above all other considerations. diff --git a/ports/eastl/portfile.cmake b/ports/eastl/portfile.cmake index 491ce8581cb1ad..ddc5950b641ccb 100644 --- a/ports/eastl/portfile.cmake +++ b/ports/eastl/portfile.cmake @@ -8,8 +8,8 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/eastl) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO electronicarts/EASTL - REF 3.10.00 - SHA512 281a8d79d30a39136d9a9c6fd63ca712b450cd45019aab1ac3a219bb8704e094a5b8f461a7cd7ab8480f41beca94f1589162fe4899406869898a2e1ffc497b78 + REF 3.12.01 + SHA512 22053823299386337934abb473be5bad4766db571656ee8f93eb04f6079c1860fd598ae8b7a955ca5dcf26661370d558aaf35037c989ec5a976feae87a445aad HEAD_REF master ) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index eb3a22fb046b0d..a89b87f8e70247 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 2018-08-03 +Version: 2018-09-18 Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index 2efde477bc7455..4af8fb9863b00b 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF 8ba9422ba3cb326092b269f2752eb5ce88836115 - SHA512 08883aeb0ff6619ba28c457e11307d1f577c6a73dc09e3bd0463d46b45a7d5391445ff40a235869d3dabda824b6667bb11089c8bb48967672867ab493093d322 + REF 37b8725565f42c260f9773fe4cfb8fa39f566746 + SHA512 8be6079546099ac7267978ed3aa1c8e42215baa06b5da30c78918dac8193a725b3c38f6fb47fb50e7724580a964360163e2167b08c7e5929485fd3bd037338b0 HEAD_REF master PATCHES "${CMAKE_CURRENT_LIST_DIR}/iconv.patch" ) diff --git a/ports/expat/CONTROL b/ports/expat/CONTROL index edbcf232635620..4cdb03f6e5ff73 100644 --- a/ports/expat/CONTROL +++ b/ports/expat/CONTROL @@ -1,3 +1,3 @@ Source: expat -Version: 2.2.5 +Version: 2.2.6 Description: XML parser library written in C diff --git a/ports/expat/portfile.cmake b/ports/expat/portfile.cmake index 485320a8ba9657..b6db7b37474fc0 100644 --- a/ports/expat/portfile.cmake +++ b/ports/expat/portfile.cmake @@ -6,8 +6,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libexpat/libexpat - REF R_2_2_5 - SHA512 61ce2a479521412e0c56c352106c4adfb61a6bedb883921aba3ebccc29311ddd192646ac2c51b41572728d4de6ab4cb60a1dbc71515d742a80a8b59d89ca74d6 + REF R_2_2_6 + SHA512 727fbd24041c9af71b32353448583a6d8b38ddf93b10c97510e847939c2ad2be9b40ff6e6e27b725bff277982c2fc96c75f19c4a3ac4a246133eb62870c963d8 HEAD_REF master) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) diff --git a/ports/fmt/CONTROL b/ports/fmt/CONTROL index 64cdec4267a018..88f41b36e739c3 100644 --- a/ports/fmt/CONTROL +++ b/ports/fmt/CONTROL @@ -1,3 +1,3 @@ Source: fmt -Version: 5.1.0 +Version: 5.2.0 Description: Formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams. diff --git a/ports/fmt/portfile.cmake b/ports/fmt/portfile.cmake index 3cd23d8fee40a3..9389d2fbfb5e5a 100644 --- a/ports/fmt/portfile.cmake +++ b/ports/fmt/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO fmtlib/fmt - REF 5.1.0 - SHA512 b759a718353254fa8cd981e483bf01a45af0fc76901216404ace5e47f5d3edf43d42422184e5413c221e49832322fdf60d1860e8ec87349c674511064b31e5d6 + REF 5.2.0 + SHA512 75d53e6d8087288607f75fb891bb8812c7b9fe65e5ab7a20cdffeb5e56bd1f48e0de24c8cf1c2dd603fe3ed76f9fa067804ec5d3560f177db8f0a747c36f9d1c HEAD_REF master ) diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index 9dd27d1583b343..51a31ef8b1b190 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,5 +1,5 @@ Source: folly -Version: 2018.07.30.00 +Version: 2018.09.17.00 Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows Build-Depends: openssl, libevent, double-conversion, glog, gflags, boost-chrono, boost-context, boost-conversion, boost-crc, boost-date-time, boost-filesystem, boost-multi-index, boost-program-options, boost-regex, boost-system, boost-thread Default-Features: zlib diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 2112c928021548..e1ce597bf18103 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -17,8 +17,8 @@ vcpkg_add_to_path("${PYTHON3_DIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/folly - REF v2018.07.30.00 - SHA512 38e7b713572d4af0a6453d001eddc32c74b4ec100158300c0a3a61a88ec546b449f1973c2b624273da4278173782aa71695d981dba3c8f423f5b76ed1375d286 + REF v2018.09.17.00 + SHA512 fe1f5ff2b55262717cb0e923ee3d8b5a82c85432823911afc924c209fc7e97ab776a3820c4b17e003a7a55150c8e0061918eaee33bdf7ca12ec1090ed7537592 HEAD_REF master PATCHES find-gflags.patch diff --git a/ports/forest/CONTROL b/ports/forest/CONTROL index f4534c115d676e..e33353ee76e765 100644 --- a/ports/forest/CONTROL +++ b/ports/forest/CONTROL @@ -1,3 +1,3 @@ Source: forest -Version: 9.0.1 +Version: 9.0.5 Description: Template library of tree data structures diff --git a/ports/forest/portfile.cmake b/ports/forest/portfile.cmake index 52a891b695c2c9..3b3d5c889545dd 100644 --- a/ports/forest/portfile.cmake +++ b/ports/forest/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xorz57/forest - REF bc6b82ce436dfbf60d6e8882252c55cf923ad99e - SHA512 e711148025c40fb73e6ae221fe5a4416bea006994d9ff958d565cd3cefa75c9ee7241087c7470ecb6530be073ac9171fe724351898ecd33db61f5752c3a950bc + REF 9.0.5 + SHA512 1dd3ae568ea2ce66cab285f392b167a08eef29387fffef3e9283c3ddaf1d461e5f6408cbce17bbaa928ba773a7890ec31f2612e5a2280cc4fe4a02824fbcd4a3 HEAD_REF master ) diff --git a/ports/freetype-gl/CONTROL b/ports/freetype-gl/CONTROL index ba4db5391015b3..df88ab84f36889 100644 --- a/ports/freetype-gl/CONTROL +++ b/ports/freetype-gl/CONTROL @@ -1,4 +1,4 @@ Source: freetype-gl -Version: 2018-02-25 +Version: 2018-09-18 Description: OpenGL text using one vertex buffer, one texture and FreeType Build-Depends: glew, freetype diff --git a/ports/freetype-gl/portfile.cmake b/ports/freetype-gl/portfile.cmake index c627ad43ceef4c..2a811d714aa980 100644 --- a/ports/freetype-gl/portfile.cmake +++ b/ports/freetype-gl/portfile.cmake @@ -8,14 +8,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO rougier/freetype-gl - REF bcd2b5fb5d19f1ea5d384d0edbdda2f6d0590fa0 - SHA512 10bd8e874598e796c3123c8bc277ecb6f5d95c924c6d6bab1bec4700864c83e2f71bf9ac45c15eadba9e150660cbe9debe3509428b10264eb6a8ba64a80f3651 + REF 7a290ac372d2bd94137a9fed6b2f5a6ac4360ec2 + SHA512 bcdd34b7cee1ebe01ae83211e7b772742f9740aa713298f6fb72e7076f5fecdb3aea12f67a5fe04e8606d9533a0ceef7c1152368643dc51a7339b0e5dd307afa HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Use-external-Glew-and-Freetype.patch" + PATCHES 0001-Use-external-Glew-and-Freetype.patch ) # make sure that no "internal" libraries are used by removing them diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL index b8214fd9fac987..c89a34afc73267 100644 --- a/ports/jsonnet/CONTROL +++ b/ports/jsonnet/CONTROL @@ -1,3 +1,3 @@ Source: jsonnet -Version: 2018-07-30 +Version: 2018-09-18 Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake index 71cc4029e980c0..918a4de8db2399 100644 --- a/ports/jsonnet/portfile.cmake +++ b/ports/jsonnet/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/jsonnet - REF 467a62662cb700289cb9b2e6d841d6897a155774 - SHA512 a9b702c485bf8c9a87cfeee7612bb179bfec9153c25a1428277f07dd3b9d3f2508eb45cbd27b3533bed9a38d2b68bbabbde9702553ca7b90da0c1bd2411c83ee + REF 48df4a1007a88202495a30bf2fa65528335b35e6 + SHA512 46734d797499d51a79c1c63d653bc8e6496d385a57c7a83a45c3ab82fa4f106abdb67a57b9641d5c9e1cf286f4f0a66cfdbc5e1987bda234d614c91d7be79c94 HEAD_REF master ) diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index 29abd6bdf5f306..5d9f3607fa329f 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.22.0 +Version: 1.23.0 Description: libuv is a multi-platform support library with a focus on asynchronous I/O. diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index 29640eb6209345..29741433c58131 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libuv/libuv - REF v1.22.0 - SHA512 e79cae6aa1d9cf2c8f7c0262c866fea2858d7104ece7c556e537e7d1cf884f191d5cd3e56539bfe857fa15dc50b57fdcb33019824cd585a2ca250a77d923af73 + REF v1.23.0 + SHA512 d1622ea9c03661ce2dfa18e1725fc1bfdf3b16d7e40babc552dcc5b2f86d52f4dd81cac9bf89914024b11e4ed3671264dfcfba867cfa3b1a2206b89c59c95851 HEAD_REF v1.x ) diff --git a/ports/libwebsockets/CONTROL b/ports/libwebsockets/CONTROL index bf33021a26f916..fdc4e7a552fd09 100644 --- a/ports/libwebsockets/CONTROL +++ b/ports/libwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: libwebsockets -Version: 3.0.0 +Version: 3.0.1 Build-Depends: zlib, openssl Description: Libwebsockets is a lightweight pure C library built to use minimal CPU and memory resources, and provide fast throughput in both directions as client or server. diff --git a/ports/libwebsockets/portfile.cmake b/ports/libwebsockets/portfile.cmake index 79903c3a423b43..7d95b5addedef0 100644 --- a/ports/libwebsockets/portfile.cmake +++ b/ports/libwebsockets/portfile.cmake @@ -3,15 +3,11 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO warmcat/libwebsockets - REF v3.0.0 - SHA512 626edd00cc4f7559c67fc1663cbc4679a3c4e7a1b60944a7cf6968c6676073bbc15f9b90f4f2ea629394ebbcf84856663ae032a3557bae383bd0db54838d30e8 + REF v3.0.1 + SHA512 ba96af918dc53e5fe15792985892e726154ec6cd8b0e6b71ec133e1ac53792c42276fd6ae2c48c274acf4163579d8326e403201a8090fc58be29518c9c5b4304 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-UWP.patch + 0001-Fix-UWP.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LWS_WITH_STATIC) diff --git a/ports/lodepng/CONTROL b/ports/lodepng/CONTROL index 684e658f41b30f..e6c10c4746c529 100644 --- a/ports/lodepng/CONTROL +++ b/ports/lodepng/CONTROL @@ -1,3 +1,3 @@ Source: lodepng -Version: 2018-07-30 +Version: 2018-09-18-1 Description: PNG encoder and decoder in C and C++ diff --git a/ports/lodepng/algorithm.patch b/ports/lodepng/algorithm.patch new file mode 100644 index 00000000000000..796bdfc66c049a --- /dev/null +++ b/ports/lodepng/algorithm.patch @@ -0,0 +1,12 @@ +diff --git a/lodepng_util.cpp b/lodepng_util.cpp +index 4b571bb..58ba81a 100644 +--- a/lodepng_util.cpp ++++ b/lodepng_util.cpp +@@ -26,6 +26,7 @@ freely, subject to the following restrictions: + #include "lodepng_util.h" + #include + #include "math.h" ++#include + + namespace lodepng + { diff --git a/ports/lodepng/portfile.cmake b/ports/lodepng/portfile.cmake index 1d85c708480501..3677644560a205 100644 --- a/ports/lodepng/portfile.cmake +++ b/ports/lodepng/portfile.cmake @@ -3,9 +3,10 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lvandeve/lodepng - REF 955a04e517c1ec266f77f28a89a51d8041a4f1a0 - SHA512 97f516df220749f6a89b4621be23c419e83a439f8e2689fe9b4719a792909399aa2cf7294ce90f3ac28a13e31f703537e6c701ea032eab1d983093305ed04a5e + REF ceb6b482b5a16d2bb3d6b3c735ca2b16322780d5 + SHA512 5293f6c629ff006410c9180cabac5f4de7643f04ec6c3d7ff46c1b09317ff9156d28ed4344a46db0b3a06937349590aa8958722ba0432178a347da58736cbf41 HEAD_REF master + PATCHES algorithm.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/luasocket/CONTROL b/ports/luasocket/CONTROL index c46c2afd3deea9..ec478e62f86e21 100644 --- a/ports/luasocket/CONTROL +++ b/ports/luasocket/CONTROL @@ -1,4 +1,4 @@ Source: luasocket -Version: 2018-06-12 +Version: 2018-09-18 Description: LuaSocket is a Lua extension library that is composed by two parts: a C core that provides support for the TCP and UDP transport layers, and a set of Lua modules that add support for functionality commonly needed by applications that deal with the Internet. Build-Depends: lua diff --git a/ports/luasocket/portfile.cmake b/ports/luasocket/portfile.cmake index 650e1ca2e6a618..b7288fed123810 100644 --- a/ports/luasocket/portfile.cmake +++ b/ports/luasocket/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO diegonehab/luasocket - REF 4df569e9f867432f25f0bfbfa56b0962feb3326e - SHA512 ef4aa61f12822a6004096c422ba2ea4f109bee1cc2eb3847bd2b16f6ec2dd28b20a767bfd8b1ee73e355f7b0ced3c2f7c4cf5123e8d0472e25c193920c2d34a1 + REF 288219fd6b53ce2e709745c9918aa4c4b7f715c9 + SHA512 f7b1f90437655352ab69a733bc2b2a0080d116fb8b6896fce0eb8ba6c593e2e3f64684c956d387a198d5aa48c4a9208531ab5e96805d92f0d4ca3ed46179be0b HEAD_REF master) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/lz4/CONTROL b/ports/lz4/CONTROL index bf2dd6c0825e35..43911651949476 100644 --- a/ports/lz4/CONTROL +++ b/ports/lz4/CONTROL @@ -1,3 +1,3 @@ Source: lz4 -Version: 1.8.2 +Version: 1.8.3 Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core. diff --git a/ports/lz4/portfile.cmake b/ports/lz4/portfile.cmake index bbeee708f45c71..bf0d3d52e94d2e 100644 --- a/ports/lz4/portfile.cmake +++ b/ports/lz4/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lz4/lz4 - REF v1.8.2 - SHA512 5fadc79334d37739c947d6dfc24f48ce82989fc5ee4f2bb8201ccf7ee3230b9e6e7c8488beb64050a035369f4247161d258bdb539578bec224ccebfef1b8a763 + REF v1.8.3 + SHA512 5d284f75a0c4ad11ebc4abb4394d98c863436da0718d62f648ef2e2cda8e5adf47617a4b43594375f7b0b673541a9ccfaf73880a55fd240986594558214dbf9f HEAD_REF dev) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/mbedtls/CONTROL b/ports/mbedtls/CONTROL index ae9d78cc962312..04cb1003c1e932 100644 --- a/ports/mbedtls/CONTROL +++ b/ports/mbedtls/CONTROL @@ -1,3 +1,3 @@ Source: mbedtls -Version: 2.12.0 +Version: 2.13.1 Description: An open source, portable, easy to use, readable and flexible SSL library diff --git a/ports/mbedtls/portfile.cmake b/ports/mbedtls/portfile.cmake index 495dfb53c00fd6..59d067f11022d1 100644 --- a/ports/mbedtls/portfile.cmake +++ b/ports/mbedtls/portfile.cmake @@ -5,8 +5,8 @@ set(VCPKG_LIBRARY_LINKAGE static) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ARMmbed/mbedtls - REF mbedtls-2.12.0 - SHA512 c7c2aeb1717886ad87486af2dccb05b2f051372c69fc914f30e4ace1067f5be39ba04e093ad522f904e23a576c1ff430bd772e77823d0f4720f6fc5c1b8aa98c + REF mbedtls-2.13.1 + SHA512 1a70446b533534c075de38ce0839f7947077ffdddffa57172594b8f8a3c4a3fbdfa9b06d13c198008abad33633e509f06abe5362f603f63850d9ec44734b3c0b HEAD_REF master ) diff --git a/ports/ms-gsl/CONTROL b/ports/ms-gsl/CONTROL index 1336d92c27317d..37285222e1a52f 100644 --- a/ports/ms-gsl/CONTROL +++ b/ports/ms-gsl/CONTROL @@ -1,3 +1,3 @@ Source: ms-gsl -Version: 2018-08-03 +Version: 2018-09-18 Description: Microsoft implementation of the Guidelines Support Library \ No newline at end of file diff --git a/ports/ms-gsl/portfile.cmake b/ports/ms-gsl/portfile.cmake index 1e76d43b1d6888..22d6fc21e054fc 100644 --- a/ports/ms-gsl/portfile.cmake +++ b/ports/ms-gsl/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/GSL - REF b6c531f7c159a685eb71ad6a93d8308793a4f61b - SHA512 aa7d6e3f25285dcfea8b2037745e960821f66644a102e06a637b2f84317165a5a11e6a677d60b378fcccf6d00b32abed51fcf3661518830cd29ce36f2ff323bd + REF 1995e86d1ad70519465374fb4876c6ef7c9f8c61 + SHA512 00d512269f9f126c93882001704c2c1926556d72fd5e26f8ba223d92f09d9955194e7bf08b172483b5d649021b0b7b54eca3e3ea2337e16b4cd5a8313a85ba66 HEAD_REF master ) diff --git a/ports/nana/CONTROL b/ports/nana/CONTROL index 221a7e64347dfc..09b9cba0de5513 100644 --- a/ports/nana/CONTROL +++ b/ports/nana/CONTROL @@ -1,4 +1,4 @@ Source: nana -Version: 1.6.1 +Version: 1.6.2 Description: Cross-platform library for GUI programming in modern C++ style. Build-Depends: libpng, libjpeg-turbo, freetype (!uwp&&!windows), fontconfig (!uwp&&!windows) diff --git a/ports/nana/portfile.cmake b/ports/nana/portfile.cmake index 80c2d57f6fcf36..ff9f43145d4a37 100644 --- a/ports/nana/portfile.cmake +++ b/ports/nana/portfile.cmake @@ -11,8 +11,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cnjinhao/nana - REF v1.6.1 - SHA512 79a5176afe1ab88050ee0f3797615d20783acaf5b94688ae1efe61d08983865046af0cd3271969139c50ef23d927c1599bdb35e06760f717b508971d8531c882 + REF v1.6.2 + SHA512 95271764813e64126abf2941bfc13b399ffe093c570891f65f331505066ce0dcad7df4170b2616951b7e0234ea2d6d21219cdfd15b112ecf598a3afa992cceb4 HEAD_REF develop ) diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL index 8132c1ce82dc20..cfcacd03dcf75e 100644 --- a/ports/nuklear/CONTROL +++ b/ports/nuklear/CONTROL @@ -1,3 +1,3 @@ Source: nuklear -Version: 2018-07-01 +Version: 2018-09-18 Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/ports/nuklear/portfile.cmake b/ports/nuklear/portfile.cmake index b18e67fc78ebe3..e50f291f89330d 100644 --- a/ports/nuklear/portfile.cmake +++ b/ports/nuklear/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vurtun/nuklear - REF aeb18269131ab2c8d579aab935e15a8f4b040e38 - SHA512 174595cb9c196af2c7648b6f88d43f66585a97fd99e3147c2ab2e371821a1b56cf60178a1aef53ee09afb9213548993cff6be615a32c5c16dca1e0858c19e162 + REF 2a379bc03879dc22ceb3a03f957fdf4870716cc6 + SHA512 5425267abcd410cf0f2e6d9e7a685eb33289f054b90fc5a9ea9630b5f9c03056c3ca92d0ee00d884806b9b1911bb2b30ebea447278d1eebcdda29347dd547d07 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/openal-soft/CONTROL b/ports/openal-soft/CONTROL index cd7078c0899cdd..296608f0f85ce1 100644 --- a/ports/openal-soft/CONTROL +++ b/ports/openal-soft/CONTROL @@ -1,3 +1,3 @@ Source: openal-soft -Version: 1.18.2-2 +Version: 1.19.0 Description: OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API. diff --git a/ports/openal-soft/portfile.cmake b/ports/openal-soft/portfile.cmake index f35e81b4e925b0..0f1abb08ca0822 100644 --- a/ports/openal-soft/portfile.cmake +++ b/ports/openal-soft/portfile.cmake @@ -6,16 +6,12 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO kcat/openal-soft - REF openal-soft-1.18.2 - SHA512 85c62d3d16d2a371c1930310eed7219031203824289d9a30d60000f8e124ffa67e1bbfb15f1ba6841ef7346e88c000b9cca51c79d32c02e5dc9870392c536723 + REF openal-soft-1.19.0 + SHA512 59623792e560c9ef8069b7b4e4c12c67c9814433fc57d5b5650951f3adad338570ec785bbac8f7e1e7596220bab433e9f29161ced7d1a37da4f5418f6a3b7581 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/dont-export-symbols-in-static-build.patch - ${CMAKE_CURRENT_LIST_DIR}/cmake-3-11.patch + dont-export-symbols-in-static-build.patch + cmake-3-11.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") diff --git a/ports/parson/CONTROL b/ports/parson/CONTROL index dddf27ef3f5444..1210c7e2eda438 100644 --- a/ports/parson/CONTROL +++ b/ports/parson/CONTROL @@ -1,3 +1,3 @@ Source: parson -Version: 2018-08-03 +Version: 2018-09-18 Description: a lighweight json library written in C diff --git a/ports/parson/portfile.cmake b/ports/parson/portfile.cmake index c90370de0b00d7..cfc1d861ec5348 100644 --- a/ports/parson/portfile.cmake +++ b/ports/parson/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO kgabis/parson - REF b58ac757a89fe85468681dacd504190ef58d2d39 - SHA512 8cc9e7e94d3476e1d48411a9e97950008fae0e30646d929521f7202737974cb6075f54ba05399947d2524a118e01a08bbeb652aab057ce358614f4d17f14eace + REF 0a1896939faff5f69e179637fc49f678ff0128ba + SHA512 cb982ce7dbbe0b5a4d08a28a459e9dce5347f90d75b0a37c56698f5b79ad37aa0bd22fe6b6d5c8a6fda2dd83b072605486581360b8ed3591012ebaa1e1518fc6 HEAD_REF master ) diff --git a/ports/pmdk/CONTROL b/ports/pmdk/CONTROL index 16c6138cc0846d..4c667eac0885be 100644 --- a/ports/pmdk/CONTROL +++ b/ports/pmdk/CONTROL @@ -1,3 +1,3 @@ Source: pmdk -Version: 1.4.1-1 +Version: 1.4.2 Description: Persistent Memory Development Kit \ No newline at end of file diff --git a/ports/pmdk/portfile.cmake b/ports/pmdk/portfile.cmake index 302ce07bf421a0..330a8abeb90b85 100644 --- a/ports/pmdk/portfile.cmake +++ b/ports/pmdk/portfile.cmake @@ -18,8 +18,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pmem/pmdk - REF 1.4.1 - SHA512 a4bffb393f07e5e2ffbd2a7835b906148401abf0f3cff28262cf8607691fc2d567d153358a3fb3a15197db699519c7b3a4699b67a51c15fecd707bc30795c5c7 + REF 1.4.2 + SHA512 87aa226487046aba14f3a0b51d066f4498a6021580fd203df45f0900fc0c0c5cdb192156a4c730a5a7dc5826e204d688531e5680145161750057803cb24d088d HEAD_REF master PATCHES "${CMAKE_CURRENT_LIST_DIR}/addPowerShellExecutionPolicy.patch" diff --git a/ports/re2/CONTROL b/ports/re2/CONTROL index 8e271f5ca3ef7d..e35601ab50aac4 100644 --- a/ports/re2/CONTROL +++ b/ports/re2/CONTROL @@ -1,3 +1,3 @@ Source: re2 -Version: 2018-07-30 +Version: 2018-09-18 Description: RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library. \ No newline at end of file diff --git a/ports/re2/portfile.cmake b/ports/re2/portfile.cmake index 06ba4f581e14f1..48aa9e48d4fb4a 100644 --- a/ports/re2/portfile.cmake +++ b/ports/re2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/re2 - REF 3b4a3d57f3a0231cfb70ad649099c3aed0499555 - SHA512 3ff7ece9fafd595d5016d0ad1942dfc1747610cd93e505512179307f7abba2e16d1c830712f9b4a04278ad8bcdc182dc883bcdabad340f2d08264d34d8f08f92 + REF 4c916c947ab7f2ba2d280bb8c87540c365d30695 + SHA512 7f34073415b2afd36469a0ffedb5d6d38b0230a82d633f2b45538e66d00ff0e411ffff1e34f74747c68518b1fdf07f7a601c23d39b001a75bcf9dadfc1350f04 HEAD_REF master ) diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL index c86bfe250e8a18..33f0a1f6337118 100644 --- a/ports/rs-core-lib/CONTROL +++ b/ports/rs-core-lib/CONTROL @@ -1,4 +1,4 @@ Source: rs-core-lib -Version: 2018-07-30 +Version: 2018-09-18 Description: Minimal common utilities by Ross Smith diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake index feba9947dea3c7..927f34ea6dd50b 100644 --- a/ports/rs-core-lib/portfile.cmake +++ b/ports/rs-core-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/rs-core-lib - REF 989a68109c28c8a4c9352fd166809f63f2e92ce4 - SHA512 e4b0b0e20ffc67ed737fd26db9860d111f0a59e9d98b0350f5997225b0536768d9987f0fb75fdb08516b36e266ad11c1a0bd3bab7c14eb65ee18e5cd90ff03cb + REF 9ffa126a7ca1a717ffd2c055c5049a15e1507d54 + SHA512 cdb02c546ff4514b63b3467b3296b0e5353ddcce8b774fa8accfbfd6559ab4a258af4822c219a5ce005719216c0c8c8707d377d2ce3ddb7d7a45fd9501787b60 HEAD_REF master ) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 70369ce102fd5f..b654f4816e1ef4 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-08-03 +Version: 2018-09-18 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit Description: Apache Thrift is a software project spanning a variety of programming languages and use cases. Our goal is to make reliable, performant communication and data serialization across languages as efficient and seamless as possible. Originally developed at Facebook, Thrift was open sourced in April 2007 and entered the Apache Incubator in May, 2008. Thrift became an Apache TLP in October, 2010. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index daa697cf4f7035..88c74d6e10c6ed 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 0a2d4587c8cc0a54e4fa8fee9247d088d05b0d65 - SHA512 dd66b7c73b904dee9ceeb5e597203f493398da04de7204f8874718b7067c9da5603f462ca8d3183c6d0817ae070ffc16d81d6a6a9e0dbf6224c08b89a14541fa + REF 12f8b14fff9888dbfe6f5d6c64dc462254922a31 + SHA512 e067b1e5533f323c7f3f20365388ab4dfd796bca427ec5e087e5bac2ae74412536eec1dea4f694c58e1b9e91763d16a8a07c25daa03676ec33bf8b1107913e47 HEAD_REF master ) diff --git a/ports/tiny-dnn/CONTROL b/ports/tiny-dnn/CONTROL index f7f010bc27c1af..2ce2693ac2aca3 100644 --- a/ports/tiny-dnn/CONTROL +++ b/ports/tiny-dnn/CONTROL @@ -1,3 +1,3 @@ Source: tiny-dnn -Version: 2018-07-30 +Version: 2018-09-18 Description: A C++14 implementation of deep learning. It is suitable for deep learning on limited computational resource. diff --git a/ports/tiny-dnn/portfile.cmake b/ports/tiny-dnn/portfile.cmake index daf9457cc4cbdd..56946f95f8a19c 100644 --- a/ports/tiny-dnn/portfile.cmake +++ b/ports/tiny-dnn/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tiny-dnn/tiny-dnn - REF a8de26ad40d955908c5ec4fc946c3c67dd381c6c - SHA512 4dc89f038a4dd4bd706077f1c72afdd503fa41edc3b1eb0e8c459c55c9a658d17add98e66dac48914e253df121818da3d277b1a0fac945f22efe9d76d2f9476e + REF 1aec6a1ece0ba7a5e018a070bd52e045d49d1411 + SHA512 173607504cf4e6cc5f70febbfc305dd1fe7168bc6eff82c90d202caa342c3aecf13a3c3cc7f70f4f9674b5649d3a14180fb682742025c408e3e4ea9ec6b99f8a HEAD_REF master ) diff --git a/ports/unicorn-lib/CONTROL b/ports/unicorn-lib/CONTROL index e56491658e61c5..f6a3bc9c0beffd 100644 --- a/ports/unicorn-lib/CONTROL +++ b/ports/unicorn-lib/CONTROL @@ -1,4 +1,4 @@ Source: unicorn-lib -Version: 2018-08-03 +Version: 2018-09-18 Description: Unicode library for C++ by Ross Smith Build-Depends: rs-core-lib, pcre2, zlib, libiconv diff --git a/ports/unicorn-lib/portfile.cmake b/ports/unicorn-lib/portfile.cmake index ded178c3fa9945..3b97d3c014e03b 100644 --- a/ports/unicorn-lib/portfile.cmake +++ b/ports/unicorn-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/unicorn-lib - REF 9bde1537234a470699eb4d4c18bf7c9e1d179300 - SHA512 95f106c990eab53d94e03001dde69c9c6068d466a6419824f8b454b914c616006d05878a95dfcbfec83afd3530cccfb8b888ce56bd957d9d49be44eae33578f7 + REF 6456df41b6dfeecd35ec1d50eb86657512c76c40 + SHA512 04756035039b93905713e7c7f2fac66d545f3792d39b9c2c95946c4423a9e1bdef7fe736488764800f494570a3e9a83adc84b60a750bf62b2af4508671f76afe HEAD_REF master ) diff --git a/ports/unicorn/CONTROL b/ports/unicorn/CONTROL index 4951b2bf5a52bb..80d33202c4cd97 100644 --- a/ports/unicorn/CONTROL +++ b/ports/unicorn/CONTROL @@ -1,3 +1,3 @@ Source: unicorn -Version: 2018-08-03 +Version: 2018-09-18 Description: Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework diff --git a/ports/unicorn/portfile.cmake b/ports/unicorn/portfile.cmake index 9de7533c2a1089..2a52c6be6889bd 100644 --- a/ports/unicorn/portfile.cmake +++ b/ports/unicorn/portfile.cmake @@ -14,8 +14,8 @@ set(VCPKG_CRT_LINKAGE "static") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO unicorn-engine/unicorn - REF 84220d83601ba929c56b9e1fadd1686e02cbb93c - SHA512 36e7b54cafe94a07a975480428faab1cb627600a6e0f771de2984499760a24907be3d7fe054588687b89108706d111f55026379bdfb1ff747b00a11f4a1e836a + REF 46999575fb9e82ccd925e835d0d7db47200e010d + SHA512 9a93157266f2f6b7f5b6fabefda77b4d617648f0112ff6b575be8c92eea16ea6c96b0575f040fd5a893240907492335c53c03c840fee58ca8808b39762fefc34 HEAD_REF master ) diff --git a/ports/wt/CONTROL b/ports/wt/CONTROL index de121050a480ec..ff99b10b553887 100644 --- a/ports/wt/CONTROL +++ b/ports/wt/CONTROL @@ -1,4 +1,4 @@ Source: wt -Version: 4.0.3-1 +Version: 4.0.4 Description: Wt is a C++ library for developing web applications Build-Depends: openssl, sqlite3, libpq, pango, glew, boost-date-time, boost-regex, boost-program-options, boost-signals, boost-system, boost-filesystem, boost-thread, boost-random, boost-multi-index, boost-signals2, boost-asio, boost-ublas, boost-conversion, boost-array, boost-smart-ptr, boost-tuple, boost-algorithm, boost-logic, boost-interprocess diff --git a/ports/wt/portfile.cmake b/ports/wt/portfile.cmake index b33e9110b5c9ac..6144801684ace8 100644 --- a/ports/wt/portfile.cmake +++ b/ports/wt/portfile.cmake @@ -3,17 +3,13 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO emweb/wt - REF 4.0.3 - SHA512 5985f72cbd3065ac696aad4d11711f2d69e066ee17141b56fd7c2616c7f7353586ab8d13db2baa90fa8f3cb116aa7c9044ee3cc42e99e8f5c8704f886ac3b2b6 + REF 4.0.4 + SHA512 7f9fee9b1c145adb610bf9b0860867a2f09699a1c914418938955c5648b3207db361ec48b3afe9e6faa6cc0b5874bedd44481fdd8adb8fc558cfc3dc17369ee7 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-boost-1.66.patch - ${CMAKE_CURRENT_LIST_DIR}/0002-link-glew.patch - ${CMAKE_CURRENT_LIST_DIR}/0003-disable-boost-autolink.patch + 0001-boost-1.66.patch + 0002-link-glew.patch + 0003-disable-boost-autolink.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED_LIBS) diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index d2de1a29074d2f..ba419fb397b94d 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 2018-07-30 +Version: 2018-09-18 Description: The ZeroMQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products diff --git a/ports/zeromq/portfile.cmake b/ports/zeromq/portfile.cmake index 0f6add1a9b4f19..188eb09181e859 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/libzmq - REF da8024d3c9bb9ee5fa7f0f2e9d05f7e01db73cbf - SHA512 2585e784eeb9b79ec2e83eae302593f8da4542d28e53dc6975447d6e44532baedb7145569712e8c76ab3972a3d46585e017dfeb895a45954f20b979f485d9647 + REF ea517a28ff23cff24a3b2ead42e1f6a44e6fad0e + SHA512 11425b151192b39e770ece1df3139b99315a4647ec242e951b736cc232da79a0b80f635b071d87adaa7d3f6d4266ab67d31b8f95f31fe3ab278e53febc5ae796 HEAD_REF master ) From 133f5b5a587fc019fdca879434ff2041872b10d9 Mon Sep 17 00:00:00 2001 From: Mohammed Alyousef Date: Thu, 20 Sep 2018 17:19:04 +0200 Subject: [PATCH 02/12] Added emscripten support --- scripts/toolchains/emscripten.cmake | 354 ++++++++++++++++++++++++++++ triplets/x86-wasm.cmake | 4 + 2 files changed, 358 insertions(+) create mode 100644 scripts/toolchains/emscripten.cmake create mode 100644 triplets/x86-wasm.cmake diff --git a/scripts/toolchains/emscripten.cmake b/scripts/toolchains/emscripten.cmake new file mode 100644 index 00000000000000..fcf48b84a4e44d --- /dev/null +++ b/scripts/toolchains/emscripten.cmake @@ -0,0 +1,354 @@ +# This file is a 'toolchain description file' for CMake. + # It teaches CMake about the Emscripten compiler, so that CMake can generate makefiles + # from CMakeLists.txt that invoke emcc. + + # At the moment this required minimum version is not exact (i.e. we do not know of a feature that needs CMake 3.0.0 specifically) + # It is possible that CMake 3.0.0 is too old and will not actually work. If you do find such a case, please report it at Emscripten + # bug tracker to revise the minimum requirement. See also https://github.com/juj/emsdk/issues/108 + cmake_minimum_required(VERSION 3.0.0) + + # To use this toolchain file with CMake, invoke CMake with the following command line parameters + # cmake -DCMAKE_TOOLCHAIN_FILE=/cmake/Modules/Platform/Emscripten.cmake + # -DCMAKE_BUILD_TYPE= + # -G "Unix Makefiles" (Linux and OSX) + # -G "MinGW Makefiles" (Windows) + # # Note, pass in here ONLY the path to the file, not the filename 'CMakeLists.txt' itself. + + # After that, build the generated Makefile with the command 'make'. On Windows, you may download and use 'mingw32-make' instead. + + # The following variable describes the target OS we are building to. + +# set(ENV{EMSCRIPTEN} /Users/mohammedalyousef/emsdk/emscripten/1.38.12/) + + if(NOT DEFINED ENV{EMSCRIPTEN}) + message(FATAL_ERROR "you must define env emscripten root") + endif() + + set(CMAKE_SYSTEM_NAME Emscripten) + set(CMAKE_SYSTEM_VERSION 1) + + set(CMAKE_CROSSCOMPILING TRUE) + + # Advertise Emscripten as a 32-bit platform (as opposed to CMAKE_SYSTEM_PROCESSOR=x86_64 for 64-bit platform), + # since some projects (e.g. OpenCV) use this to detect bitness. + set(CMAKE_SYSTEM_PROCESSOR x86) + + # Tell CMake how it should instruct the compiler to generate multiple versions of an outputted .so library: e.g. "libfoo.so, libfoo.so.1, libfoo.so.1.4" etc. + # This feature is activated if a shared library project has the property SOVERSION defined. + set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,") + + # In CMake, CMAKE_HOST_WIN32 is set when we are cross-compiling from Win32 to Emscripten: http://www.cmake.org/cmake/help/v2.8.12/cmake.html#variable:CMAKE_HOST_WIN32 + # The variable WIN32 is set only when the target arch that will run the code will be WIN32, so unset WIN32 when cross-compiling. + set(WIN32) + + # The same logic as above applies for APPLE and CMAKE_HOST_APPLE, so unset APPLE. + set(APPLE) + + # And for UNIX and CMAKE_HOST_UNIX. However, Emscripten is often able to mimic being a Linux/Unix system, in which case a lot of existing CMakeLists.txt files can be configured for Emscripten while assuming UNIX build, so this is left enabled. + set(UNIX 1) + + # Do a no-op access on the CMAKE_TOOLCHAIN_FILE variable so that CMake will not issue a warning on it being unused. + if (CMAKE_TOOLCHAIN_FILE) + endif() + + # In order for check_function_exists() detection to work, we must signal it to pass an additional flag, which causes the compilation + # to abort if linking results in any undefined symbols. The CMake detection mechanism depends on the undefined symbol error to be raised. + # Disable wasm in cmake checks so that (1) we do not depend on wasm support just for configuration (perhaps the user does not intend + # to build to wasm; using asm.js only depends on js which we need anyhow), and (2) we don't have issues with a separate .wasm file + # on the side, async startup, etc.. + set(CMAKE_REQUIRED_FLAGS "-s ERROR_ON_UNDEFINED_SYMBOLS=1 -s WASM=0") + + # Locate where the Emscripten compiler resides in relative to this toolchain file. + if ("${EMSCRIPTEN_ROOT_PATH}" STREQUAL "") + get_filename_component(GUESS_EMSCRIPTEN_ROOT_PATH "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE) + if (EXISTS "${GUESS_EMSCRIPTEN_ROOT_PATH}/emranlib") + set(EMSCRIPTEN_ROOT_PATH "${GUESS_EMSCRIPTEN_ROOT_PATH}") + endif() + endif() + + # If not found by above search, locate using the EMSCRIPTEN environment variable. + if ("${EMSCRIPTEN_ROOT_PATH}" STREQUAL "") + set(EMSCRIPTEN_ROOT_PATH "$ENV{EMSCRIPTEN}") + endif() + + # Abort if not found. + if ("${EMSCRIPTEN_ROOT_PATH}" STREQUAL "") + message(FATAL_ERROR "Could not locate the Emscripten compiler toolchain directory! Either set the EMSCRIPTEN environment variable, or pass -DEMSCRIPTEN_ROOT_PATH=xxx to CMake to explicitly specify the location of the compiler!") + endif() + + # Normalize, convert Windows backslashes to forward slashes or CMake will crash. + get_filename_component(EMSCRIPTEN_ROOT_PATH "${EMSCRIPTEN_ROOT_PATH}" ABSOLUTE) + + list(APPEND CMAKE_MODULE_PATH "${EMSCRIPTEN_ROOT_PATH}/cmake/Modules") + + list(APPEND CMAKE_FIND_ROOT_PATH "${EMSCRIPTEN_ROOT_PATH}/system") + + if (CMAKE_HOST_WIN32) + set(EMCC_SUFFIX ".bat") + else() + set(EMCC_SUFFIX "") + endif() + + # Specify the compilers to use for C and C++ + if ("${CMAKE_C_COMPILER}" STREQUAL "") + set(CMAKE_C_COMPILER "${EMSCRIPTEN_ROOT_PATH}/emcc${EMCC_SUFFIX}") + endif() + if ("${CMAKE_CXX_COMPILER}" STREQUAL "") + set(CMAKE_CXX_COMPILER "${EMSCRIPTEN_ROOT_PATH}/em++${EMCC_SUFFIX}") + endif() + + if ("${CMAKE_AR}" STREQUAL "") + set(CMAKE_AR "${EMSCRIPTEN_ROOT_PATH}/emar${EMCC_SUFFIX}" CACHE FILEPATH "Emscripten ar") + endif() + + if ("${CMAKE_RANLIB}" STREQUAL "") + set(CMAKE_RANLIB "${EMSCRIPTEN_ROOT_PATH}/emranlib${EMCC_SUFFIX}" CACHE FILEPATH "Emscripten ranlib") + endif() + + # Don't allow CMake to autodetect the compiler, since it does not understand Emscripten. + # Pass -DEMSCRIPTEN_FORCE_COMPILERS=OFF to disable (sensible mostly only for testing/debugging purposes). + option(EMSCRIPTEN_FORCE_COMPILERS "Force C/C++ compiler" ON) + if (EMSCRIPTEN_FORCE_COMPILERS) + + # Detect version of the 'emcc' executable. Note that for CMake, we tell it the version of the Clang compiler and not the version of Emscripten, + # because CMake understands Clang better. + if (NOT CMAKE_C_COMPILER_VERSION) # Toolchain script is interpreted multiple times, so don't rerun the check if already done before. + execute_process(COMMAND "${CMAKE_C_COMPILER}" "-v" RESULT_VARIABLE _cmake_compiler_result ERROR_VARIABLE _cmake_compiler_output OUTPUT_QUIET) + if (NOT _cmake_compiler_result EQUAL 0) + message(FATAL_ERROR "Failed to fetch compiler version information with command \"'${CMAKE_C_COMPILER}' -v\"! Process returned with error code ${_cmake_compiler_result}.") + endif() + if (NOT "${_cmake_compiler_output}" MATCHES "[Ee]mscripten") + message(FATAL_ERROR "System LLVM compiler cannot be used to build with Emscripten! Check Emscripten's LLVM toolchain location in .emscripten configuration file, and make sure to point CMAKE_C_COMPILER to where emcc is located. (was pointing to \"${CMAKE_C_COMPILER}\")") + endif() + string(REGEX MATCH "clang version ([0-9\\.]+)" _dummy_unused "${_cmake_compiler_output}") + if (NOT CMAKE_MATCH_1) + message(FATAL_ERROR "Failed to regex parse Clang compiler version from version string: ${_cmake_compiler_output}") + endif() + + set(CMAKE_C_COMPILER_VERSION "${CMAKE_MATCH_1}") + set(CMAKE_CXX_COMPILER_VERSION "${CMAKE_MATCH_1}") + if (${CMAKE_C_COMPILER_VERSION} VERSION_LESS 3.9.0) + message(WARNING "CMAKE_C_COMPILER version looks too old. Was ${CMAKE_C_COMPILER_VERSION}, should be at least 3.9.0.") + endif() + endif() + + set(CMAKE_C_COMPILER_ID_RUN TRUE) + set(CMAKE_C_COMPILER_FORCED TRUE) + set(CMAKE_C_COMPILER_WORKS TRUE) + set(CMAKE_C_COMPILER_ID Clang) + set(CMAKE_C_STANDARD_COMPUTED_DEFAULT 11) + + set(CMAKE_CXX_COMPILER_ID_RUN TRUE) + set(CMAKE_CXX_COMPILER_FORCED TRUE) + set(CMAKE_CXX_COMPILER_WORKS TRUE) + set(CMAKE_CXX_COMPILER_ID Clang) + set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT 98) + + set(CMAKE_C_PLATFORM_ID "emscripten") + set(CMAKE_CXX_PLATFORM_ID "emscripten") + + if ("${CMAKE_VERSION}" VERSION_LESS "3.8") + set(CMAKE_C_COMPILE_FEATURES "c_function_prototypes;c_restrict;c_variadic_macros;c_static_assert") + set(CMAKE_C90_COMPILE_FEATURES "c_function_prototypes") + set(CMAKE_C99_COMPILE_FEATURES "c_restrict;c_variadic_macros") + set(CMAKE_C11_COMPILE_FEATURES "c_static_assert") + + set(CMAKE_CXX_COMPILE_FEATURES "cxx_template_template_parameters;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") + set(CMAKE_CXX98_COMPILE_FEATURES "cxx_template_template_parameters") + set(CMAKE_CXX11_COMPILE_FEATURES "cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") + set(CMAKE_CXX14_COMPILE_FEATURES "cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") + else() + set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert") + set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") + set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") + set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") + + set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17") + set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters") + set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") + set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") + endif() + endif() + + # To find programs to execute during CMake run time with find_program(), e.g. 'git' or so, we allow looking + # into system paths. + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + + # Since Emscripten is a cross-compiler, we should never look at the system-provided directories like /usr/include and so on. + # Therefore only CMAKE_FIND_ROOT_PATH should be used as a find directory. See http://www.cmake.org/cmake/help/v3.0/variable/CMAKE_FIND_ROOT_PATH_MODE_INCLUDE.html + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + + set(CMAKE_SYSTEM_INCLUDE_PATH "${EMSCRIPTEN_ROOT_PATH}/system/include") + + # We would prefer to specify a standard set of Clang+Emscripten-friendly common convention for suffix files, especially for CMake executable files, + # but if these are adjusted, ${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake will fail, since it depends on being able to compile output files with predefined names. + #SET(CMAKE_LINK_LIBRARY_SUFFIX "") + #SET(CMAKE_STATIC_LIBRARY_PREFIX "") + #SET(CMAKE_SHARED_LIBRARY_PREFIX "") + #SET(CMAKE_FIND_LIBRARY_PREFIXES "") + #SET(CMAKE_FIND_LIBRARY_SUFFIXES ".bc") + #SET(CMAKE_SHARED_LIBRARY_SUFFIX ".bc") + + option(EMSCRIPTEN_GENERATE_BITCODE_STATIC_LIBRARIES "If set, static library targets generate LLVM bitcode files (.bc). If disabled (default), UNIX ar archives (.a) are generated." OFF) + if (EMSCRIPTEN_GENERATE_BITCODE_STATIC_LIBRARIES) + SET(CMAKE_STATIC_LIBRARY_SUFFIX ".bc") + + SET(CMAKE_C_CREATE_STATIC_LIBRARY " -o ") + SET(CMAKE_CXX_CREATE_STATIC_LIBRARY " -o ") + else() + # Specify the program to use when building static libraries. Force Emscripten-related command line options to clang. + SET(CMAKE_C_CREATE_STATIC_LIBRARY " rc ") + SET(CMAKE_CXX_CREATE_STATIC_LIBRARY " rc ") + endif() + + SET(CMAKE_EXECUTABLE_SUFFIX ".js") + + SET(CMAKE_C_USE_RESPONSE_FILE_FOR_LIBRARIES 1) + SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES 1) + SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1) + SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1) + SET(CMAKE_C_USE_RESPONSE_FILE_FOR_INCLUDES 1) + SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES 1) + + set(CMAKE_C_RESPONSE_FILE_LINK_FLAG "@") + set(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "@") + + # Set a global EMSCRIPTEN variable that can be used in client CMakeLists.txt to detect when building using Emscripten. + set(EMSCRIPTEN 1 CACHE BOOL "If true, we are targeting Emscripten output.") + + # Hardwire support for cmake-2.8/Modules/CMakeBackwardsCompatibilityC.cmake without having CMake to try complex things + # to autodetect these: + set(CMAKE_SKIP_COMPATIBILITY_TESTS 1) + set(CMAKE_SIZEOF_CHAR 1) + set(CMAKE_SIZEOF_UNSIGNED_SHORT 2) + set(CMAKE_SIZEOF_SHORT 2) + set(CMAKE_SIZEOF_INT 4) + set(CMAKE_SIZEOF_UNSIGNED_LONG 4) + set(CMAKE_SIZEOF_UNSIGNED_INT 4) + set(CMAKE_SIZEOF_LONG 4) + set(CMAKE_SIZEOF_VOID_P 4) + set(CMAKE_SIZEOF_FLOAT 4) + set(CMAKE_SIZEOF_DOUBLE 8) + set(CMAKE_C_SIZEOF_DATA_PTR 4) + set(CMAKE_CXX_SIZEOF_DATA_PTR 4) + set(CMAKE_HAVE_LIMITS_H 1) + set(CMAKE_HAVE_UNISTD_H 1) + set(CMAKE_HAVE_PTHREAD_H 1) + set(CMAKE_HAVE_SYS_PRCTL_H 1) + set(CMAKE_WORDS_BIGENDIAN 0) + set(CMAKE_DL_LIBS) + + set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O2" CACHE STRING "Emscripten-overridden CMAKE_C_FLAGS_RELEASE") + set(CMAKE_C_FLAGS_MINSIZEREL "-DNDEBUG -Os" CACHE STRING "Emscripten-overridden CMAKE_C_FLAGS_MINSIZEREL") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2" CACHE STRING "Emscripten-overridden CMAKE_C_FLAGS_RELWITHDEBINFO") + set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O2" CACHE STRING "Emscripten-overridden CMAKE_CXX_FLAGS_RELEASE") + set(CMAKE_CXX_FLAGS_MINSIZEREL "-DNDEBUG -Os" CACHE STRING "Emscripten-overridden CMAKE_CXX_FLAGS_MINSIZEREL") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2" CACHE STRING "Emscripten-overridden CMAKE_CXX_FLAGS_RELWITHDEBINFO") + + set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-O2" CACHE STRING "Emscripten-overridden CMAKE_EXE_LINKER_FLAGS_RELEASE") + set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-Os" CACHE STRING "Emscripten-overridden CMAKE_EXE_LINKER_FLAGS_MINSIZEREL") + set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Emscripten-overridden CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO") + set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "-O2" CACHE STRING "Emscripten-overridden CMAKE_SHARED_LINKER_FLAGS_RELEASE") + set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "-Os" CACHE STRING "Emscripten-overridden CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL") + set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Emscripten-overridden CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO") + set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "-O2" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_RELEASE") + set(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL "-Os" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL") + set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO") + + function(em_validate_asmjs_after_build target) + add_custom_command(TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E echo Validating build output for asm.js... COMMAND "python" ARGS "${EMSCRIPTEN_ROOT_PATH}/tools/validate_asmjs.py" "$") + endfunction() + + # A global counter to guarantee unique names for js library files. + set(link_js_counter 1) + + # Internal function: Do not call from user CMakeLists.txt files. Use one of em_link_js_library()/em_link_pre_js()/em_link_post_js() instead. + function(em_add_tracked_link_flag target flagname) + + # User can input list of JS files either as a single list, or as variable arguments to this function, so iterate over varargs, and treat each + # item in varargs as a list itself, to support both syntax forms. + foreach(jsFileList ${ARGN}) + foreach(jsfile ${jsFileList}) + # If the user edits the JS file, we want to relink the emscripten application, but unfortunately it is not possible to make a link step + # depend directly on a source file. Instead, we must make a dummy no-op build target on that source file, and make the project depend on + # that target. + + # Sanitate the source .js filename to a good symbol name to use as a dummy filename. + get_filename_component(jsname "${jsfile}" NAME) + string(REGEX REPLACE "[/:\\\\.\ ]" "_" dummy_js_target ${jsname}) + set(dummy_lib_name ${target}_${link_js_counter}_${dummy_js_target}) + set(dummy_c_name "${CMAKE_BINARY_DIR}/${dummy_js_target}_tracker.c") + + # Create a new static library target that with a single dummy .c file. + add_library(${dummy_lib_name} STATIC ${dummy_c_name}) + # Make the dummy .c file depend on the .js file we are linking, so that if the .js file is edited, the dummy .c file, and hence the static library will be rebuild (no-op). This causes the main application to be relinked, which is what we want. + # This approach was recommended by http://www.cmake.org/pipermail/cmake/2010-May/037206.html + add_custom_command(OUTPUT ${dummy_c_name} COMMAND ${CMAKE_COMMAND} -E touch ${dummy_c_name} DEPENDS ${jsfile}) + target_link_libraries(${target} ${dummy_lib_name}) + + # Link the js-library to the target + # When a linked library starts with a "-" cmake will just add it to the linker command line as it is. + # The advantage of doing it this way is that the js-library will also be automatically linked to targets + # that depend on this target. + get_filename_component(js_file_absolute_path "${jsfile}" ABSOLUTE ) + target_link_libraries(${target} "${flagname} \"${js_file_absolute_path}\"") + + math(EXPR link_js_counter "${link_js_counter} + 1") + endforeach() + endforeach() + endfunction() + + # This function links a (list of ) .js library file(s) to the given CMake project. + # Example: em_link_js_library(my_executable "lib1.js" "lib2.js") + # will result in emcc passing --js-library lib1.js --js-library lib2.js to the emscripten linker, as well as + # tracking the modification timestamp between the linked .js files and the main project, so that editing the .js file + # will cause the target project to be relinked. + function(em_link_js_library target) + em_add_tracked_link_flag(${target} "--js-library" ${ARGN}) + endfunction() + + # This function is identical to em_link_js_library(), except the .js files will be added with '--pre-js file.js' command line flag, + # which is generally used to add some preamble .js code to a generated output file. + function(em_link_pre_js target) + em_add_tracked_link_flag(${target} "--pre-js" ${ARGN}) + endfunction() + + # This function is identical to em_link_js_library(), except the .js files will be added with '--post-js file.js' command line flag, + # which is generally used to add some postamble .js code to a generated output file. + function(em_link_post_js target) + em_add_tracked_link_flag(${target} "--post-js" ${ARGN}) + endfunction() + + # Experimental support for targeting generation of Visual Studio project files (vs-tool) of Emscripten projects for Windows. + # To use this, pass the combination -G "Visual Studio 10" -DCMAKE_TOOLCHAIN_FILE=Emscripten.cmake + if ("${CMAKE_GENERATOR}" MATCHES "^Visual Studio.*") + # By default, CMake generates VS project files with a true directive. + # This causes VS to attempt to invoke rc.exe during the build, which will fail since app manifests are meaningless for Emscripten. + # To disable this, add the following linker flag. This flag will not go to emcc, since the Visual Studio CMake generator will swallow it. + set(EMSCRIPTEN_VS_LINKER_FLAGS "/MANIFEST:NO") + # CMake is hardcoded to write a ClCompile directive $(IntDir) in all VS project files it generates. + # This makes VS pass emcc a -o param that points to a directory instead of a file, which causes emcc autogenerate the output filename. + # CMake is hardcoded to assume all object files have the suffix .obj, so adjust the emcc-autogenerated default suffix name to match. + set(EMSCRIPTEN_VS_LINKER_FLAGS "${EMSCRIPTEN_VS_LINKER_FLAGS} --default-obj-ext .obj") + # Also hint CMake that it should not hardcode generation. Requires a custom CMake build for this to work (ignored on others) + # See http://www.cmake.org/Bug/view.php?id=14673 and https://github.com/juj/CMake + set(CMAKE_VS_NO_DEFAULT_OBJECTFILENAME 1) + + # Apply and cache Emscripten Visual Studio IDE-specific linker flags. + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${EMSCRIPTEN_VS_LINKER_FLAGS}" CACHE STRING "") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${EMSCRIPTEN_VS_LINKER_FLAGS}" CACHE STRING "") + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${EMSCRIPTEN_VS_LINKER_FLAGS}" CACHE STRING "") + endif() + + if (NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR) + find_program(NODE_JS_EXECUTABLE NAMES nodejs node) + if(NODE_JS_EXECUTABLE) + set(CMAKE_CROSSCOMPILING_EMULATOR "${NODE_JS_EXECUTABLE}" CACHE FILEPATH "Path to the emulator for the target system.") + endif() + endif() + # No-op on CMAKE_CROSSCOMPILING_EMULATOR so older versions of cmake do not + # complain about unused CMake variable. + if(CMAKE_CROSSCOMPILING_EMULATOR) + endif() \ No newline at end of file diff --git a/triplets/x86-wasm.cmake b/triplets/x86-wasm.cmake new file mode 100644 index 00000000000000..f4d0737465644f --- /dev/null +++ b/triplets/x86-wasm.cmake @@ -0,0 +1,4 @@ +set(VCPKG_TARGET_ARCHITECTURE x86) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) +set(VCPKG_CMAKE_SYSTEM_NAME Emscripten) \ No newline at end of file From 1614773da74318ca6d81e53f0757f9791a416372 Mon Sep 17 00:00:00 2001 From: Mohammed Alyousef Date: Thu, 20 Sep 2018 17:20:51 +0200 Subject: [PATCH 03/12] added emscripten support --- scripts/buildsystems/vcpkg.cmake | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 91c196fb9f1783..2b75e482e8c50b 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -19,7 +19,11 @@ if(VCPKG_TARGET_TRIPLET) elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Xx]64$") + if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + set(_VCPKG_TARGET_TRIPLET_ARCH x86) + else() set(_VCPKG_TARGET_TRIPLET_ARCH x64) + endif() elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$") set(_VCPKG_TARGET_TRIPLET_ARCH arm) elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]64$") @@ -48,7 +52,11 @@ else() elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") - set(_VCPKG_TARGET_TRIPLET_ARCH x64) + if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + set(_VCPKG_TARGET_TRIPLET_ARCH x86) + else() + set(_VCPKG_TARGET_TRIPLET_ARCH x64) + endif() else() message(FATAL_ERROR "Unable to determine target architecture.") endif() @@ -65,6 +73,8 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_ set(_VCPKG_TARGET_TRIPLET_PLAT windows) elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")) set(_VCPKG_TARGET_TRIPLET_PLAT freebsd) +elseif (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + set(_VCPKG_TARGET_TRIPLET_PLAT wasm) endif() set(VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT} CACHE STRING "Vcpkg target triplet (ex. x86-windows)") From ec91fa75d769ee7d0fc8691dbf808d2dd992877b Mon Sep 17 00:00:00 2001 From: Mohammed Alyousef Date: Thu, 20 Sep 2018 17:39:48 +0200 Subject: [PATCH 04/12] Added emscripten support --- scripts/toolchains/ios.cmake | 436 +++++++++++++++++++++++++++++++++++ 1 file changed, 436 insertions(+) create mode 100644 scripts/toolchains/ios.cmake diff --git a/scripts/toolchains/ios.cmake b/scripts/toolchains/ios.cmake new file mode 100644 index 00000000000000..846038a35f3419 --- /dev/null +++ b/scripts/toolchains/ios.cmake @@ -0,0 +1,436 @@ +# This file is part of the ios-cmake project. It was retrieved from +# https://github.com/cristeab/ios-cmake.git, which is a fork of +# https://code.google.com/p/ios-cmake/. Which in turn is based off of +# the Platform/Darwin.cmake and Platform/UnixPaths.cmake files which +# are included with CMake 2.8.4 +# +# The ios-cmake project is licensed under the new BSD license. +# +# Copyright (c) 2014, Bogdan Cristea and LTE Engineering Software, +# Kitware, Inc., Insight Software Consortium. All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +# This file is based off of the Platform/Darwin.cmake and +# Platform/UnixPaths.cmake files which are included with CMake 2.8.4 +# It has been altered for iOS development. +# +# Updated by Alex Stewart (alexs.mac@gmail.com) +# +# ***************************************************************************** +# Now maintained by Alexander Widerberg (widerbergaren [at] gmail.com) +# under the BSD-3-Clause license +# https://github.com/leetal/ios-cmake +# ***************************************************************************** +# +# INFORMATION / HELP +# +# The following variables control the behaviour of this toolchain: +# +# IOS_PLATFORM: OS (default) or SIMULATOR or SIMULATOR64 or TVOS or SIMULATOR_TVOS +# OS = Build for iPhoneOS. +# SIMULATOR = Build for x86 i386 iPhone Simulator. +# SIMULATOR64 = Build for x86_64 iPhone Simulator. +# TVOS = Build for AppleTVOS. +# SIMULATOR_TVOS = Build for x86_64 AppleTV Simulator. +# CMAKE_OSX_SYSROOT: Path to the iOS SDK to use. By default this is +# automatically determined from IOS_PLATFORM and xcodebuild, but +# can also be manually specified (although this should not be required). +# CMAKE_IOS_DEVELOPER_ROOT: Path to the Developer directory for the iOS platform +# being compiled for. By default this is automatically determined from +# CMAKE_OSX_SYSROOT, but can also be manually specified (although this should +# not be required). +# ENABLE_BITCODE: (1|0) Enables or disables bitcode support. Default 1 (true) +# ENABLE_ARC: (1|0) Enables or disables ARC support. Default 1 (true, ARC enabled by default) +# ENABLE_VISIBILITY: (1|0) Enables or disables symbol visibility support. Default 0 (false, visibility hidden by default) +# IOS_ARCH: (armv7 armv7s arm64 i386 x86_64) If specified, will override the default architectures for the given IOS_PLATFORM +# OS = armv7 armv7s arm64 +# SIMULATOR = i386 +# SIMULATOR64 = x86_64 +# TVOS = arm64 +# SIMULATOR_TVOS = x86_64 +# +# This toolchain defines the following variables for use externally: +# +# XCODE_VERSION: Version number (not including Build version) of Xcode detected. +# IOS_SDK_VERSION: Version of iOS SDK being used. +# CMAKE_OSX_ARCHITECTURES: Architectures being compiled for (generated from +# IOS_PLATFORM). +# +# This toolchain defines the following macros for use externally: +# +# set_xcode_property (TARGET XCODE_PROPERTY XCODE_VALUE XCODE_VARIANT) +# A convenience macro for setting xcode specific properties on targets. +# Available variants are: All, Release, RelWithDebInfo, Debug, MinSizeRel +# example: set_xcode_property (myioslib IPHONEOS_DEPLOYMENT_TARGET "3.1" "all"). +# +# find_host_package (PROGRAM ARGS) +# A macro used to find executable programs on the host system, not within the +# iOS environment. Thanks to the android-cmake project for providing the +# command. + +# Fix for PThread library not in path +set(CMAKE_THREAD_LIBS_INIT "-lpthread") +set(CMAKE_HAVE_THREADS_LIBRARY 1) +set(CMAKE_USE_WIN32_THREADS_INIT 0) +set(CMAKE_USE_PTHREADS_INIT 1) + +# Get the Xcode version being used. +execute_process(COMMAND xcodebuild -version + OUTPUT_VARIABLE XCODE_VERSION + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) +string(REGEX MATCH "Xcode [0-9\\.]+" XCODE_VERSION "${XCODE_VERSION}") +string(REGEX REPLACE "Xcode ([0-9\\.]+)" "\\1" XCODE_VERSION "${XCODE_VERSION}") +message(STATUS "Building with Xcode version: ${XCODE_VERSION}") +# Default to building for iPhoneOS if not specified otherwise, and we cannot +# determine the platform from the CMAKE_OSX_ARCHITECTURES variable. The use +# of CMAKE_OSX_ARCHITECTURES is such that try_compile() projects can correctly +# determine the value of IOS_PLATFORM from the root project, as +# CMAKE_OSX_ARCHITECTURES is propagated to them by CMake. +if (NOT DEFINED IOS_PLATFORM) + if (CMAKE_OSX_ARCHITECTURES) + if (CMAKE_OSX_ARCHITECTURES MATCHES ".*arm.*") + set(IOS_PLATFORM "OS") + elseif (CMAKE_OSX_ARCHITECTURES MATCHES "i386") + set(IOS_PLATFORM "SIMULATOR") + elseif (CMAKE_OSX_ARCHITECTURES MATCHES "x86_64") + set(IOS_PLATFORM "SIMULATOR64") + endif() + endif() + if (NOT IOS_PLATFORM) + set(IOS_PLATFORM "OS") + endif() +endif() +set(IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING + "Type of iOS platform for which to build.") +# Determine the platform name and architectures for use in xcodebuild commands +# from the specified IOS_PLATFORM name. +if (IOS_PLATFORM STREQUAL "OS") + set(XCODE_IOS_PLATFORM iphoneos) + if(NOT IOS_ARCH) + set(IOS_ARCH armv7 armv7s arm64) + endif() +elseif (IOS_PLATFORM STREQUAL "SIMULATOR") + set(XCODE_IOS_PLATFORM iphonesimulator) + if(NOT IOS_ARCH) + set(IOS_ARCH i386) + endif() +elseif(IOS_PLATFORM STREQUAL "SIMULATOR64") + set(XCODE_IOS_PLATFORM iphonesimulator) + if(NOT IOS_ARCH) + set(IOS_ARCH x86_64) + endif() +elseif (IOS_PLATFORM STREQUAL "TVOS") + set(XCODE_IOS_PLATFORM appletvos) + if(NOT IOS_ARCH) + set(IOS_ARCH arm64) + endif() +elseif (IOS_PLATFORM STREQUAL "SIMULATOR_TVOS") + set(XCODE_IOS_PLATFORM appletvsimulator) + if(NOT IOS_ARCH) + set(IOS_ARCH x86_64) + endif() +else() + message(FATAL_ERROR "Invalid IOS_PLATFORM: ${IOS_PLATFORM}") +endif() +message(STATUS "Configuring iOS build for platform: ${IOS_PLATFORM}, " + "architecture(s): ${IOS_ARCH}") +# If user did not specify the SDK root to use, then query xcodebuild for it. +if (NOT CMAKE_OSX_SYSROOT) + execute_process(COMMAND xcodebuild -version -sdk ${XCODE_IOS_PLATFORM} Path + OUTPUT_VARIABLE CMAKE_OSX_SYSROOT + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + message(STATUS "Using SDK: ${CMAKE_OSX_SYSROOT} for platform: ${IOS_PLATFORM}") +endif() +if (NOT EXISTS ${CMAKE_OSX_SYSROOT}) + message(SEND_ERROR "Please make sure that Xcode is installed and that the toolchain" + "is pointing to the correct path. Please run:" + "sudo xcode-select -s /Applications/Xcode.app/Contents/Developer" + "and see if that fixes the problem for you.") + message(FATAL_ERROR "Invalid CMAKE_OSX_SYSROOT: ${CMAKE_OSX_SYSROOT} " + "does not exist.") +endif() +# Specify minimum version of deployment target. +if (NOT DEFINED IOS_DEPLOYMENT_TARGET) + # Unless specified, SDK version 8.0 is used by default as minimum target version. + set(IOS_DEPLOYMENT_TARGET "8.0" + CACHE STRING "Minimum iOS version to build for." ) + message(STATUS "Using the default min-version since IOS_DEPLOYMENT_TARGET not provided!") +endif() +# Use bitcode or not +if (NOT DEFINED ENABLE_BITCODE AND NOT IOS_ARCH MATCHES "((^|, )(i386|x86_64))+") + # Unless specified, enable bitcode support by default + set(ENABLE_BITCODE TRUE CACHE BOOL "Whether or not to enable bitcode") + message(STATUS "Enabling bitcode support by default. ENABLE_BITCODE not provided!") +endif() +if (NOT DEFINED ENABLE_BITCODE) + message(STATUS "Disabling bitcode support by default on simulators. ENABLE_BITCODE not provided for override!") +endif() +# Use ARC or not +if (NOT DEFINED ENABLE_ARC) + # Unless specified, enable ARC support by default + set(ENABLE_ARC TRUE CACHE BOOL "Whether or not to enable ARC") + message(STATUS "Enabling ARC support by default. ENABLE_ARC not provided!") +endif() +# Use hidden visibility or not +if (NOT DEFINED ENABLE_VISIBILITY) + # Unless specified, disable symbols visibility by default + set(ENABLE_VISIBILITY FALSE CACHE BOOL "Whether or not to hide symbols (-fvisibility=hidden)") + message(STATUS "Hiding symbols visibility by default. ENABLE_VISIBILITY not provided!") +endif() +# Get the SDK version information. +execute_process(COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version SDKVersion + OUTPUT_VARIABLE IOS_SDK_VERSION + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) +# Find the Developer root for the specific iOS platform being compiled for +# from CMAKE_OSX_SYSROOT. Should be ../../ from SDK specified in +# CMAKE_OSX_SYSROOT. There does not appear to be a direct way to obtain +# this information from xcrun or xcodebuild. +if (NOT CMAKE_IOS_DEVELOPER_ROOT) + get_filename_component(IOS_PLATFORM_SDK_DIR ${CMAKE_OSX_SYSROOT} PATH) + get_filename_component(CMAKE_IOS_DEVELOPER_ROOT ${IOS_PLATFORM_SDK_DIR} PATH) +endif() +if (NOT EXISTS ${CMAKE_IOS_DEVELOPER_ROOT}) + message(FATAL_ERROR "Invalid CMAKE_IOS_DEVELOPER_ROOT: " + "${CMAKE_IOS_DEVELOPER_ROOT} does not exist.") +endif() +# Find the C & C++ compilers for the specified SDK. +if (NOT CMAKE_C_COMPILER) + execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find clang + OUTPUT_VARIABLE CMAKE_C_COMPILER + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + message(STATUS "Using C compiler: ${CMAKE_C_COMPILER}") +endif() +if (NOT CMAKE_CXX_COMPILER) + execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find clang++ + OUTPUT_VARIABLE CMAKE_CXX_COMPILER + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + message(STATUS "Using CXX compiler: ${CMAKE_CXX_COMPILER}") +endif() +# Find (Apple's) libtool. +execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find libtool + OUTPUT_VARIABLE IOS_LIBTOOL + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) +message(STATUS "Using libtool: ${IOS_LIBTOOL}") +# Configure libtool to be used instead of ar + ranlib to build static libraries. +# This is required on Xcode 7+, but should also work on previous versions of +# Xcode. +set(CMAKE_C_CREATE_STATIC_LIBRARY + "${IOS_LIBTOOL} -static -o ") +set(CMAKE_CXX_CREATE_STATIC_LIBRARY + "${IOS_LIBTOOL} -static -o ") +# Get the version of Darwin (OS X) of the host. +execute_process(COMMAND uname -r + OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) +# Standard settings. +set(CMAKE_SYSTEM_NAME Darwin CACHE INTERNAL "") +set(CMAKE_SYSTEM_VERSION ${IOS_SDK_VERSION} CACHE INTERNAL "") +set(UNIX TRUE CACHE BOOL "") +set(APPLE TRUE CACHE BOOL "") +set(IOS TRUE CACHE BOOL "") +set(CMAKE_AR ar CACHE FILEPATH "" FORCE) +set(CMAKE_RANLIB ranlib CACHE FILEPATH "" FORCE) +# Force unset of OS X-specific deployment target (otherwise autopopulated), +# required as of cmake 2.8.10. +set(CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING + "Must be empty for iOS builds." FORCE) +# Set the architectures for which to build. +set(CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE STRING "Build architecture for iOS") +# Change the type of target generated for try_compile() so it'll work when cross-compiling +set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) +# Skip the platform compiler checks for cross compiling. +set(CMAKE_CXX_COMPILER_FORCED TRUE) +set(CMAKE_CXX_COMPILER_WORKS TRUE) +set(CMAKE_C_COMPILER_FORCED TRUE) +set(CMAKE_C_COMPILER_WORKS TRUE) +# All iOS/Darwin specific settings - some may be redundant. +set(CMAKE_SHARED_LIBRARY_PREFIX "lib") +set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib") +set(CMAKE_SHARED_MODULE_PREFIX "lib") +set(CMAKE_SHARED_MODULE_SUFFIX ".so") +set(CMAKE_C_COMPILER_ABI ELF) +set(CMAKE_CXX_COMPILER_ABI ELF) +set(CMAKE_C_HAS_ISYSROOT 1) +set(CMAKE_CXX_HAS_ISYSROOT 1) +set(CMAKE_MODULE_EXISTS 1) +set(CMAKE_DL_LIBS "") +set(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ") +set(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ") +set(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}") +set(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}") + +if(IOS_ARCH MATCHES "((^|, )(arm64|x86_64))+") + set(CMAKE_C_SIZEOF_DATA_PTR 8) + set(CMAKE_CXX_SIZEOF_DATA_PTR 8) + message(STATUS "Using a data_ptr size of 8") +else() + set(CMAKE_C_SIZEOF_DATA_PTR 4) + set(CMAKE_CXX_SIZEOF_DATA_PTR 4) + message(STATUS "Using a data_ptr size of 4") +endif() + +message(STATUS "Building for minimum iOS version: ${IOS_DEPLOYMENT_TARGET}" + " (SDK version: ${IOS_SDK_VERSION})") +# Note that only Xcode 7+ supports the newer more specific: +# -m${XCODE_IOS_PLATFORM}-version-min flags, older versions of Xcode use: +# -m(ios/ios-simulator)-version-min instead. +if (IOS_PLATFORM STREQUAL "OS") + if (XCODE_VERSION VERSION_LESS 7.0) + set(XCODE_IOS_PLATFORM_VERSION_FLAGS + "-mios-version-min=${IOS_DEPLOYMENT_TARGET}") + else() + # Xcode 7.0+ uses flags we can build directly from XCODE_IOS_PLATFORM. + set(XCODE_IOS_PLATFORM_VERSION_FLAGS + "-m${XCODE_IOS_PLATFORM}-version-min=${IOS_DEPLOYMENT_TARGET}") + endif() +elseif (IOS_PLATFORM STREQUAL "TVOS") + set(XCODE_IOS_PLATFORM_VERSION_FLAGS + "-mtvos-version-min=${IOS_DEPLOYMENT_TARGET}") +elseif (IOS_PLATFORM STREQUAL "SIMULATOR_TVOS") + set(XCODE_IOS_PLATFORM_VERSION_FLAGS + "-mtvos-simulator-version-min=${IOS_DEPLOYMENT_TARGET}") +else() + # SIMULATOR or SIMULATOR64 both use -mios-simulator-version-min. + set(XCODE_IOS_PLATFORM_VERSION_FLAGS + "-mios-simulator-version-min=${IOS_DEPLOYMENT_TARGET}") +endif() +message(STATUS "Version flags set to: ${XCODE_IOS_PLATFORM_VERSION_FLAGS}") + +if (ENABLE_BITCODE) + set(BITCODE "-fembed-bitcode") + set(HEADER_PAD "") + message(STATUS "Enabling bitcode support.") +else() + set(BITCODE "") + set(HEADER_PAD "-headerpad_max_install_names") + message(STATUS "Disabling bitcode support.") +endif() + +if (ENABLE_ARC) + set(FOBJC_ARC "-fobjc-arc") + message(STATUS "Enabling ARC support.") +else() + set(FOBJC_ARC "-fno-objc-arc") + message(STATUS "Disabling ARC support.") +endif() + +if (NOT ENABLE_VISIBILITY) + set(VISIBILITY "-fvisibility=hidden") + message(STATUS "Hiding symbols (-fvisibility=hidden).") +else() + set(VISIBILITY "") +endif() + +set(CMAKE_C_FLAGS +"${XCODE_IOS_PLATFORM_VERSION_FLAGS} ${BITCODE} -fobjc-abi-version=2 ${FOBJC_ARC} ${CMAKE_C_FLAGS}") +# Hidden visibilty is required for C++ on iOS. +set(CMAKE_CXX_FLAGS +"${XCODE_IOS_PLATFORM_VERSION_FLAGS} ${BITCODE} ${VISIBILITY} -fvisibility-inlines-hidden -fobjc-abi-version=2 ${FOBJC_ARC} ${CMAKE_CXX_FLAGS}") +set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS} -DNDEBUG -Os -ffast-math ${BITCODE} ${CMAKE_CXX_FLAGS_MINSIZEREL}") +set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS} -DNDEBUG -O2 -g -ffast-math ${BITCODE} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") +set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -DNDEBUG -O3 -ffast-math ${BITCODE} ${CMAKE_CXX_FLAGS_RELEASE}") +set(CMAKE_C_LINK_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}") +set(CMAKE_CXX_LINK_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}") + +# In order to ensure that the updated compiler flags are used in try_compile() +# tests, we have to forcibly set them in the CMake cache, not merely set them +# in the local scope. +list(APPEND VARS_TO_FORCE_IN_CACHE + CMAKE_C_FLAGS + CMAKE_CXX_FLAGS + CMAKE_CXX_FLAGS_RELWITHDEBINFO + CMAKE_CXX_FLAGS_MINSIZEREL + CMAKE_CXX_FLAGS_RELEASE + CMAKE_C_LINK_FLAGS + CMAKE_CXX_LINK_FLAGS) +foreach(VAR_TO_FORCE ${VARS_TO_FORCE_IN_CACHE}) + set(${VAR_TO_FORCE} "${${VAR_TO_FORCE}}" CACHE STRING "" FORCE) +endforeach() + +set(CMAKE_PLATFORM_HAS_INSTALLNAME 1) +set (CMAKE_SHARED_LINKER_FLAGS "-rpath @executable_path/Frameworks -rpath @loader_path/Frameworks") +set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib ${HEADER_PAD}") +set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle ${HEADER_PAD}") +set(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,") +set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,") +set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a") + +# Hack: if a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old +# build tree (where install_name_tool was hardcoded) and where +# CMAKE_INSTALL_NAME_TOOL isn't in the cache and still cmake didn't fail in +# CMakeFindBinUtils.cmake (because it isn't rerun) hardcode +# CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did +# before, Alex. +if (NOT DEFINED CMAKE_INSTALL_NAME_TOOL) + find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool) +endif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL) + +# Set the find root to the iOS developer roots and to user defined paths. +set(CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_OSX_SYSROOT} + ${CMAKE_PREFIX_PATH} CACHE string "iOS find search path root" FORCE) +# Default to searching for frameworks first. +set(CMAKE_FIND_FRAMEWORK FIRST) +# Set up the default search directories for frameworks. +set(CMAKE_SYSTEM_FRAMEWORK_PATH + ${CMAKE_OSX_SYSROOT}/System/Library/Frameworks + ${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks + ${CMAKE_OSX_SYSROOT}/Developer/Library/Frameworks) +# Only search the specified iOS SDK, not the remainder of the host filesystem. +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +# This little macro lets you set any XCode specific property. +macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE XCODE_RELVERSION) + set(XCODE_RELVERSION_I "${XCODE_RELVERSION}") + if (XCODE_RELVERSION_I STREQUAL "All") + set_property(TARGET ${TARGET} PROPERTY + XCODE_ATTRIBUTE_${XCODE_PROPERTY} "${XCODE_VALUE}") + else() + set_property(TARGET ${TARGET} PROPERTY + XCODE_ATTRIBUTE_${XCODE_PROPERTY}[variant=${XCODE_RELVERSION_I}] "${XCODE_VALUE}") + endif() +endmacro(set_xcode_property) +# This macro lets you find executable programs on the host system. +macro(find_host_package) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) + set(IOS FALSE) + find_package(${ARGN}) + set(IOS TRUE) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endmacro(find_host_package) \ No newline at end of file From 8de907adbfa0d89c1a09346bd2c119a709fe47e6 Mon Sep 17 00:00:00 2001 From: Mohammed Alyousef Date: Thu, 20 Sep 2018 17:40:32 +0200 Subject: [PATCH 05/12] emscripten --- scripts/cmake/vcpkg_configure_cmake.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index e89ac660eee0cd..470747c2492241 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -170,6 +170,8 @@ function(vcpkg_configure_cmake) list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/android.cmake") elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/osx.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/emscripten.cmake") endif() list(APPEND _csc_OPTIONS From 0677fbef3af76a16a8a6d7910a2e00e42e8052fb Mon Sep 17 00:00:00 2001 From: Mohammed Alyousef Date: Thu, 20 Sep 2018 19:43:12 +0200 Subject: [PATCH 06/12] adding toolchains --- scripts/buildsystems/vcpkg.cmake | 10 ---------- scripts/cmake/vcpkg_configure_cmake.cmake | 2 -- triplets/x86-wasm.cmake | 3 ++- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 2b75e482e8c50b..79c23fc9b55587 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -19,11 +19,7 @@ if(VCPKG_TARGET_TRIPLET) elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Xx]64$") - if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") - set(_VCPKG_TARGET_TRIPLET_ARCH x86) - else() set(_VCPKG_TARGET_TRIPLET_ARCH x64) - endif() elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$") set(_VCPKG_TARGET_TRIPLET_ARCH arm) elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]64$") @@ -52,11 +48,7 @@ else() elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") - if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") - set(_VCPKG_TARGET_TRIPLET_ARCH x86) - else() set(_VCPKG_TARGET_TRIPLET_ARCH x64) - endif() else() message(FATAL_ERROR "Unable to determine target architecture.") endif() @@ -73,8 +65,6 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_ set(_VCPKG_TARGET_TRIPLET_PLAT windows) elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")) set(_VCPKG_TARGET_TRIPLET_PLAT freebsd) -elseif (CMAKE_SYSTEM_NAME STREQUAL "Emscripten") - set(_VCPKG_TARGET_TRIPLET_PLAT wasm) endif() set(VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT} CACHE STRING "Vcpkg target triplet (ex. x86-windows)") diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 470747c2492241..e89ac660eee0cd 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -170,8 +170,6 @@ function(vcpkg_configure_cmake) list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/android.cmake") elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/osx.cmake") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Emscripten") - list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/emscripten.cmake") endif() list(APPEND _csc_OPTIONS diff --git a/triplets/x86-wasm.cmake b/triplets/x86-wasm.cmake index f4d0737465644f..0e470abd735c12 100644 --- a/triplets/x86-wasm.cmake +++ b/triplets/x86-wasm.cmake @@ -1,4 +1,5 @@ set(VCPKG_TARGET_ARCHITECTURE x86) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_CMAKE_SYSTEM_NAME Emscripten) \ No newline at end of file +set(VCPKG_CMAKE_SYSTEM_NAME Emscripten) +set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/scripts/toolchains/emscripten.cmake) \ No newline at end of file From c45b0dc2d2783858ba6f3283c0599a9793c0f681 Mon Sep 17 00:00:00 2001 From: Mohammed Alyousef Date: Thu, 20 Sep 2018 19:49:00 +0200 Subject: [PATCH 07/12] adding x86-ios --- .gitignore | 2 ++ triplets/x64-ios.cmake | 6 ++++++ triplets/x86-ios.cmake | 6 ++++++ 3 files changed, 14 insertions(+) create mode 100644 triplets/x64-ios.cmake create mode 100644 triplets/x86-ios.cmake diff --git a/.gitignore b/.gitignore index 85066d14378fd7..252908daa80843 100644 --- a/.gitignore +++ b/.gitignore @@ -299,6 +299,8 @@ __pycache__/ !triplets/x64-linux.cmake !triplets/x64-osx.cmake !triplets/x86-wasm.cmake +!triplets/x64-ios.cmake +!triplets/x86-ios.cmake *.exe *.zip diff --git a/triplets/x64-ios.cmake b/triplets/x64-ios.cmake new file mode 100644 index 00000000000000..c2f522188628f0 --- /dev/null +++ b/triplets/x64-ios.cmake @@ -0,0 +1,6 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +set(VCPKG_CMAKE_SYSTEM_NAME Darwin) +set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/scripts/toolchains/ios.cmake) diff --git a/triplets/x86-ios.cmake b/triplets/x86-ios.cmake new file mode 100644 index 00000000000000..53aec7b7dbe10a --- /dev/null +++ b/triplets/x86-ios.cmake @@ -0,0 +1,6 @@ +set(VCPKG_TARGET_ARCHITECTURE x86) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +set(VCPKG_CMAKE_SYSTEM_NAME Darwin) +set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/scripts/toolchains/ios.cmake) \ No newline at end of file From 341f328013cdfd3c09ccbb1cdf0420c920e789bf Mon Sep 17 00:00:00 2001 From: Mohammed Alyousef Date: Thu, 20 Sep 2018 19:51:46 +0200 Subject: [PATCH 08/12] formatting --- scripts/buildsystems/vcpkg.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 79c23fc9b55587..91c196fb9f1783 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -48,7 +48,7 @@ else() elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$") set(_VCPKG_TARGET_TRIPLET_ARCH x86) elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") - set(_VCPKG_TARGET_TRIPLET_ARCH x64) + set(_VCPKG_TARGET_TRIPLET_ARCH x64) else() message(FATAL_ERROR "Unable to determine target architecture.") endif() From f0f3603f8e6b658af6b96701aa446cdf4c9014d0 Mon Sep 17 00:00:00 2001 From: Mohammed Alyousef Date: Fri, 21 Sep 2018 20:30:43 +0200 Subject: [PATCH 09/12] adding android triplet --- .gitignore | 1 + triplets/x64-android.cmake | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 triplets/x64-android.cmake diff --git a/.gitignore b/.gitignore index 252908daa80843..987d07822a8216 100644 --- a/.gitignore +++ b/.gitignore @@ -301,6 +301,7 @@ __pycache__/ !triplets/x86-wasm.cmake !triplets/x64-ios.cmake !triplets/x86-ios.cmake +!triplets/x64-android.cmake *.exe *.zip diff --git a/triplets/x64-android.cmake b/triplets/x64-android.cmake new file mode 100644 index 00000000000000..8f0f029b0560b0 --- /dev/null +++ b/triplets/x64-android.cmake @@ -0,0 +1,5 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +set(VCPKG_CMAKE_SYSTEM_NAME Android) From cc2312bf2faa1c366b316e1b4e7da1a42e020795 Mon Sep 17 00:00:00 2001 From: Mohammed Alyousef Date: Sat, 22 Sep 2018 03:18:36 +0200 Subject: [PATCH 10/12] add portfile async++ --- .gitignore | 18 ++++++++++++------ ports/asyncplusplus/CONTROL | 4 ++++ ports/asyncplusplus/portfile.cmake | 30 ++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 ports/asyncplusplus/CONTROL create mode 100644 ports/asyncplusplus/portfile.cmake diff --git a/.gitignore b/.gitignore index 987d07822a8216..334879e84eecad 100644 --- a/.gitignore +++ b/.gitignore @@ -298,10 +298,16 @@ __pycache__/ !triplets/arm64-windows.cmake !triplets/x64-linux.cmake !triplets/x64-osx.cmake -!triplets/x86-wasm.cmake -!triplets/x64-ios.cmake -!triplets/x86-ios.cmake -!triplets/x64-android.cmake + +#ignore custom triplets +/scripts/toolchains/* +#add vcpkg-designed toolchains back in +!scripts/toolchains/android.cmake +!scripts/toolchains/freebsd.cmake +!scripts/toolchains/linux.cmake +!scripts/toolchains/osx.cmake +!scripts/toolchains/windows.cmake + *.exe *.zip @@ -311,7 +317,7 @@ __pycache__/ ############################################################ -# cmake and ninja - Start +# cmake and ninja build artifacts - Start ############################################################ .DS_Store @@ -332,5 +338,5 @@ build.ninja rules.ninja ############################################################ -# cmake and ninja - End +# cmake and ninja build artifacts - End ############################################################ diff --git a/ports/asyncplusplus/CONTROL b/ports/asyncplusplus/CONTROL new file mode 100644 index 00000000000000..dfc85146c5f453 --- /dev/null +++ b/ports/asyncplusplus/CONTROL @@ -0,0 +1,4 @@ +Source: asyncplusplus +Version: 1.0 +Description: Async++ is a lightweight concurrency framework for C++11 + diff --git a/ports/asyncplusplus/portfile.cmake b/ports/asyncplusplus/portfile.cmake new file mode 100644 index 00000000000000..124b0ff0d7f429 --- /dev/null +++ b/ports/asyncplusplus/portfile.cmake @@ -0,0 +1,30 @@ +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/asyncplusplus-1.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/Amanieu/asyncplusplus/archive/v1.0.tar.gz" + FILENAME "asyncplusplus-1.0.zip" + SHA512 bb1fc032d2d8de49b4505e0629d48e5cfa99edfcafbf17848f160ceb320bcd993f1549095248d1a0ef8fc1ec07ecbaad6b634a770ddc1974092d373a508a5fe3 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + + +vcpkg_install_cmake() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(COPY ${CURRENT_BUILDTREES_DIR}/src/asyncplusplus-1.0/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/asyncplusplus) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/asyncplusplus/LICENSE ${CURRENT_PACKAGES_DIR}/share/asyncplusplus/copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(COPY ${CURRENT_PACKAGES_DIR}/debug/cmake/Async++-debug.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/Async++-debug.cmake) +file(COPY ${CURRENT_PACKAGES_DIR}/cmake/Async++-release.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/Async++-release.cmake) +file(COPY ${CURRENT_PACKAGES_DIR}/cmake/Async++.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/Async++.cmake) +file(COPY ${CURRENT_PACKAGES_DIR}/cmake/Async++Config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/Async++Config.cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) +file(COPY ${CURRENT_PORT_DIR}/CONTROL DESTINATION ${CURRENT_PACKAGES_DIR}) From 60e53816d36915924b42b61a374faf6c8f3f41fb Mon Sep 17 00:00:00 2001 From: Mohammed Alyousef Date: Sat, 22 Sep 2018 03:22:58 +0200 Subject: [PATCH 11/12] removing custom triplets and toolchains --- scripts/toolchains/emscripten.cmake | 354 ---------------------- scripts/toolchains/ios.cmake | 436 ---------------------------- triplets/x64-android.cmake | 5 - triplets/x64-ios.cmake | 6 - triplets/x86-ios.cmake | 6 - triplets/x86-wasm.cmake | 5 - 6 files changed, 812 deletions(-) delete mode 100644 scripts/toolchains/emscripten.cmake delete mode 100644 scripts/toolchains/ios.cmake delete mode 100644 triplets/x64-android.cmake delete mode 100644 triplets/x64-ios.cmake delete mode 100644 triplets/x86-ios.cmake delete mode 100644 triplets/x86-wasm.cmake diff --git a/scripts/toolchains/emscripten.cmake b/scripts/toolchains/emscripten.cmake deleted file mode 100644 index fcf48b84a4e44d..00000000000000 --- a/scripts/toolchains/emscripten.cmake +++ /dev/null @@ -1,354 +0,0 @@ -# This file is a 'toolchain description file' for CMake. - # It teaches CMake about the Emscripten compiler, so that CMake can generate makefiles - # from CMakeLists.txt that invoke emcc. - - # At the moment this required minimum version is not exact (i.e. we do not know of a feature that needs CMake 3.0.0 specifically) - # It is possible that CMake 3.0.0 is too old and will not actually work. If you do find such a case, please report it at Emscripten - # bug tracker to revise the minimum requirement. See also https://github.com/juj/emsdk/issues/108 - cmake_minimum_required(VERSION 3.0.0) - - # To use this toolchain file with CMake, invoke CMake with the following command line parameters - # cmake -DCMAKE_TOOLCHAIN_FILE=/cmake/Modules/Platform/Emscripten.cmake - # -DCMAKE_BUILD_TYPE= - # -G "Unix Makefiles" (Linux and OSX) - # -G "MinGW Makefiles" (Windows) - # # Note, pass in here ONLY the path to the file, not the filename 'CMakeLists.txt' itself. - - # After that, build the generated Makefile with the command 'make'. On Windows, you may download and use 'mingw32-make' instead. - - # The following variable describes the target OS we are building to. - -# set(ENV{EMSCRIPTEN} /Users/mohammedalyousef/emsdk/emscripten/1.38.12/) - - if(NOT DEFINED ENV{EMSCRIPTEN}) - message(FATAL_ERROR "you must define env emscripten root") - endif() - - set(CMAKE_SYSTEM_NAME Emscripten) - set(CMAKE_SYSTEM_VERSION 1) - - set(CMAKE_CROSSCOMPILING TRUE) - - # Advertise Emscripten as a 32-bit platform (as opposed to CMAKE_SYSTEM_PROCESSOR=x86_64 for 64-bit platform), - # since some projects (e.g. OpenCV) use this to detect bitness. - set(CMAKE_SYSTEM_PROCESSOR x86) - - # Tell CMake how it should instruct the compiler to generate multiple versions of an outputted .so library: e.g. "libfoo.so, libfoo.so.1, libfoo.so.1.4" etc. - # This feature is activated if a shared library project has the property SOVERSION defined. - set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,") - - # In CMake, CMAKE_HOST_WIN32 is set when we are cross-compiling from Win32 to Emscripten: http://www.cmake.org/cmake/help/v2.8.12/cmake.html#variable:CMAKE_HOST_WIN32 - # The variable WIN32 is set only when the target arch that will run the code will be WIN32, so unset WIN32 when cross-compiling. - set(WIN32) - - # The same logic as above applies for APPLE and CMAKE_HOST_APPLE, so unset APPLE. - set(APPLE) - - # And for UNIX and CMAKE_HOST_UNIX. However, Emscripten is often able to mimic being a Linux/Unix system, in which case a lot of existing CMakeLists.txt files can be configured for Emscripten while assuming UNIX build, so this is left enabled. - set(UNIX 1) - - # Do a no-op access on the CMAKE_TOOLCHAIN_FILE variable so that CMake will not issue a warning on it being unused. - if (CMAKE_TOOLCHAIN_FILE) - endif() - - # In order for check_function_exists() detection to work, we must signal it to pass an additional flag, which causes the compilation - # to abort if linking results in any undefined symbols. The CMake detection mechanism depends on the undefined symbol error to be raised. - # Disable wasm in cmake checks so that (1) we do not depend on wasm support just for configuration (perhaps the user does not intend - # to build to wasm; using asm.js only depends on js which we need anyhow), and (2) we don't have issues with a separate .wasm file - # on the side, async startup, etc.. - set(CMAKE_REQUIRED_FLAGS "-s ERROR_ON_UNDEFINED_SYMBOLS=1 -s WASM=0") - - # Locate where the Emscripten compiler resides in relative to this toolchain file. - if ("${EMSCRIPTEN_ROOT_PATH}" STREQUAL "") - get_filename_component(GUESS_EMSCRIPTEN_ROOT_PATH "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE) - if (EXISTS "${GUESS_EMSCRIPTEN_ROOT_PATH}/emranlib") - set(EMSCRIPTEN_ROOT_PATH "${GUESS_EMSCRIPTEN_ROOT_PATH}") - endif() - endif() - - # If not found by above search, locate using the EMSCRIPTEN environment variable. - if ("${EMSCRIPTEN_ROOT_PATH}" STREQUAL "") - set(EMSCRIPTEN_ROOT_PATH "$ENV{EMSCRIPTEN}") - endif() - - # Abort if not found. - if ("${EMSCRIPTEN_ROOT_PATH}" STREQUAL "") - message(FATAL_ERROR "Could not locate the Emscripten compiler toolchain directory! Either set the EMSCRIPTEN environment variable, or pass -DEMSCRIPTEN_ROOT_PATH=xxx to CMake to explicitly specify the location of the compiler!") - endif() - - # Normalize, convert Windows backslashes to forward slashes or CMake will crash. - get_filename_component(EMSCRIPTEN_ROOT_PATH "${EMSCRIPTEN_ROOT_PATH}" ABSOLUTE) - - list(APPEND CMAKE_MODULE_PATH "${EMSCRIPTEN_ROOT_PATH}/cmake/Modules") - - list(APPEND CMAKE_FIND_ROOT_PATH "${EMSCRIPTEN_ROOT_PATH}/system") - - if (CMAKE_HOST_WIN32) - set(EMCC_SUFFIX ".bat") - else() - set(EMCC_SUFFIX "") - endif() - - # Specify the compilers to use for C and C++ - if ("${CMAKE_C_COMPILER}" STREQUAL "") - set(CMAKE_C_COMPILER "${EMSCRIPTEN_ROOT_PATH}/emcc${EMCC_SUFFIX}") - endif() - if ("${CMAKE_CXX_COMPILER}" STREQUAL "") - set(CMAKE_CXX_COMPILER "${EMSCRIPTEN_ROOT_PATH}/em++${EMCC_SUFFIX}") - endif() - - if ("${CMAKE_AR}" STREQUAL "") - set(CMAKE_AR "${EMSCRIPTEN_ROOT_PATH}/emar${EMCC_SUFFIX}" CACHE FILEPATH "Emscripten ar") - endif() - - if ("${CMAKE_RANLIB}" STREQUAL "") - set(CMAKE_RANLIB "${EMSCRIPTEN_ROOT_PATH}/emranlib${EMCC_SUFFIX}" CACHE FILEPATH "Emscripten ranlib") - endif() - - # Don't allow CMake to autodetect the compiler, since it does not understand Emscripten. - # Pass -DEMSCRIPTEN_FORCE_COMPILERS=OFF to disable (sensible mostly only for testing/debugging purposes). - option(EMSCRIPTEN_FORCE_COMPILERS "Force C/C++ compiler" ON) - if (EMSCRIPTEN_FORCE_COMPILERS) - - # Detect version of the 'emcc' executable. Note that for CMake, we tell it the version of the Clang compiler and not the version of Emscripten, - # because CMake understands Clang better. - if (NOT CMAKE_C_COMPILER_VERSION) # Toolchain script is interpreted multiple times, so don't rerun the check if already done before. - execute_process(COMMAND "${CMAKE_C_COMPILER}" "-v" RESULT_VARIABLE _cmake_compiler_result ERROR_VARIABLE _cmake_compiler_output OUTPUT_QUIET) - if (NOT _cmake_compiler_result EQUAL 0) - message(FATAL_ERROR "Failed to fetch compiler version information with command \"'${CMAKE_C_COMPILER}' -v\"! Process returned with error code ${_cmake_compiler_result}.") - endif() - if (NOT "${_cmake_compiler_output}" MATCHES "[Ee]mscripten") - message(FATAL_ERROR "System LLVM compiler cannot be used to build with Emscripten! Check Emscripten's LLVM toolchain location in .emscripten configuration file, and make sure to point CMAKE_C_COMPILER to where emcc is located. (was pointing to \"${CMAKE_C_COMPILER}\")") - endif() - string(REGEX MATCH "clang version ([0-9\\.]+)" _dummy_unused "${_cmake_compiler_output}") - if (NOT CMAKE_MATCH_1) - message(FATAL_ERROR "Failed to regex parse Clang compiler version from version string: ${_cmake_compiler_output}") - endif() - - set(CMAKE_C_COMPILER_VERSION "${CMAKE_MATCH_1}") - set(CMAKE_CXX_COMPILER_VERSION "${CMAKE_MATCH_1}") - if (${CMAKE_C_COMPILER_VERSION} VERSION_LESS 3.9.0) - message(WARNING "CMAKE_C_COMPILER version looks too old. Was ${CMAKE_C_COMPILER_VERSION}, should be at least 3.9.0.") - endif() - endif() - - set(CMAKE_C_COMPILER_ID_RUN TRUE) - set(CMAKE_C_COMPILER_FORCED TRUE) - set(CMAKE_C_COMPILER_WORKS TRUE) - set(CMAKE_C_COMPILER_ID Clang) - set(CMAKE_C_STANDARD_COMPUTED_DEFAULT 11) - - set(CMAKE_CXX_COMPILER_ID_RUN TRUE) - set(CMAKE_CXX_COMPILER_FORCED TRUE) - set(CMAKE_CXX_COMPILER_WORKS TRUE) - set(CMAKE_CXX_COMPILER_ID Clang) - set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT 98) - - set(CMAKE_C_PLATFORM_ID "emscripten") - set(CMAKE_CXX_PLATFORM_ID "emscripten") - - if ("${CMAKE_VERSION}" VERSION_LESS "3.8") - set(CMAKE_C_COMPILE_FEATURES "c_function_prototypes;c_restrict;c_variadic_macros;c_static_assert") - set(CMAKE_C90_COMPILE_FEATURES "c_function_prototypes") - set(CMAKE_C99_COMPILE_FEATURES "c_restrict;c_variadic_macros") - set(CMAKE_C11_COMPILE_FEATURES "c_static_assert") - - set(CMAKE_CXX_COMPILE_FEATURES "cxx_template_template_parameters;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") - set(CMAKE_CXX98_COMPILE_FEATURES "cxx_template_template_parameters") - set(CMAKE_CXX11_COMPILE_FEATURES "cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") - set(CMAKE_CXX14_COMPILE_FEATURES "cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") - else() - set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert") - set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") - set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") - set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") - - set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17") - set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters") - set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") - set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") - endif() - endif() - - # To find programs to execute during CMake run time with find_program(), e.g. 'git' or so, we allow looking - # into system paths. - set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) - - # Since Emscripten is a cross-compiler, we should never look at the system-provided directories like /usr/include and so on. - # Therefore only CMAKE_FIND_ROOT_PATH should be used as a find directory. See http://www.cmake.org/cmake/help/v3.0/variable/CMAKE_FIND_ROOT_PATH_MODE_INCLUDE.html - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) - - set(CMAKE_SYSTEM_INCLUDE_PATH "${EMSCRIPTEN_ROOT_PATH}/system/include") - - # We would prefer to specify a standard set of Clang+Emscripten-friendly common convention for suffix files, especially for CMake executable files, - # but if these are adjusted, ${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake will fail, since it depends on being able to compile output files with predefined names. - #SET(CMAKE_LINK_LIBRARY_SUFFIX "") - #SET(CMAKE_STATIC_LIBRARY_PREFIX "") - #SET(CMAKE_SHARED_LIBRARY_PREFIX "") - #SET(CMAKE_FIND_LIBRARY_PREFIXES "") - #SET(CMAKE_FIND_LIBRARY_SUFFIXES ".bc") - #SET(CMAKE_SHARED_LIBRARY_SUFFIX ".bc") - - option(EMSCRIPTEN_GENERATE_BITCODE_STATIC_LIBRARIES "If set, static library targets generate LLVM bitcode files (.bc). If disabled (default), UNIX ar archives (.a) are generated." OFF) - if (EMSCRIPTEN_GENERATE_BITCODE_STATIC_LIBRARIES) - SET(CMAKE_STATIC_LIBRARY_SUFFIX ".bc") - - SET(CMAKE_C_CREATE_STATIC_LIBRARY " -o ") - SET(CMAKE_CXX_CREATE_STATIC_LIBRARY " -o ") - else() - # Specify the program to use when building static libraries. Force Emscripten-related command line options to clang. - SET(CMAKE_C_CREATE_STATIC_LIBRARY " rc ") - SET(CMAKE_CXX_CREATE_STATIC_LIBRARY " rc ") - endif() - - SET(CMAKE_EXECUTABLE_SUFFIX ".js") - - SET(CMAKE_C_USE_RESPONSE_FILE_FOR_LIBRARIES 1) - SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES 1) - SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1) - SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1) - SET(CMAKE_C_USE_RESPONSE_FILE_FOR_INCLUDES 1) - SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES 1) - - set(CMAKE_C_RESPONSE_FILE_LINK_FLAG "@") - set(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "@") - - # Set a global EMSCRIPTEN variable that can be used in client CMakeLists.txt to detect when building using Emscripten. - set(EMSCRIPTEN 1 CACHE BOOL "If true, we are targeting Emscripten output.") - - # Hardwire support for cmake-2.8/Modules/CMakeBackwardsCompatibilityC.cmake without having CMake to try complex things - # to autodetect these: - set(CMAKE_SKIP_COMPATIBILITY_TESTS 1) - set(CMAKE_SIZEOF_CHAR 1) - set(CMAKE_SIZEOF_UNSIGNED_SHORT 2) - set(CMAKE_SIZEOF_SHORT 2) - set(CMAKE_SIZEOF_INT 4) - set(CMAKE_SIZEOF_UNSIGNED_LONG 4) - set(CMAKE_SIZEOF_UNSIGNED_INT 4) - set(CMAKE_SIZEOF_LONG 4) - set(CMAKE_SIZEOF_VOID_P 4) - set(CMAKE_SIZEOF_FLOAT 4) - set(CMAKE_SIZEOF_DOUBLE 8) - set(CMAKE_C_SIZEOF_DATA_PTR 4) - set(CMAKE_CXX_SIZEOF_DATA_PTR 4) - set(CMAKE_HAVE_LIMITS_H 1) - set(CMAKE_HAVE_UNISTD_H 1) - set(CMAKE_HAVE_PTHREAD_H 1) - set(CMAKE_HAVE_SYS_PRCTL_H 1) - set(CMAKE_WORDS_BIGENDIAN 0) - set(CMAKE_DL_LIBS) - - set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O2" CACHE STRING "Emscripten-overridden CMAKE_C_FLAGS_RELEASE") - set(CMAKE_C_FLAGS_MINSIZEREL "-DNDEBUG -Os" CACHE STRING "Emscripten-overridden CMAKE_C_FLAGS_MINSIZEREL") - set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2" CACHE STRING "Emscripten-overridden CMAKE_C_FLAGS_RELWITHDEBINFO") - set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O2" CACHE STRING "Emscripten-overridden CMAKE_CXX_FLAGS_RELEASE") - set(CMAKE_CXX_FLAGS_MINSIZEREL "-DNDEBUG -Os" CACHE STRING "Emscripten-overridden CMAKE_CXX_FLAGS_MINSIZEREL") - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2" CACHE STRING "Emscripten-overridden CMAKE_CXX_FLAGS_RELWITHDEBINFO") - - set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-O2" CACHE STRING "Emscripten-overridden CMAKE_EXE_LINKER_FLAGS_RELEASE") - set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-Os" CACHE STRING "Emscripten-overridden CMAKE_EXE_LINKER_FLAGS_MINSIZEREL") - set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Emscripten-overridden CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO") - set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "-O2" CACHE STRING "Emscripten-overridden CMAKE_SHARED_LINKER_FLAGS_RELEASE") - set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "-Os" CACHE STRING "Emscripten-overridden CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL") - set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Emscripten-overridden CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO") - set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "-O2" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_RELEASE") - set(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL "-Os" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL") - set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO") - - function(em_validate_asmjs_after_build target) - add_custom_command(TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E echo Validating build output for asm.js... COMMAND "python" ARGS "${EMSCRIPTEN_ROOT_PATH}/tools/validate_asmjs.py" "$") - endfunction() - - # A global counter to guarantee unique names for js library files. - set(link_js_counter 1) - - # Internal function: Do not call from user CMakeLists.txt files. Use one of em_link_js_library()/em_link_pre_js()/em_link_post_js() instead. - function(em_add_tracked_link_flag target flagname) - - # User can input list of JS files either as a single list, or as variable arguments to this function, so iterate over varargs, and treat each - # item in varargs as a list itself, to support both syntax forms. - foreach(jsFileList ${ARGN}) - foreach(jsfile ${jsFileList}) - # If the user edits the JS file, we want to relink the emscripten application, but unfortunately it is not possible to make a link step - # depend directly on a source file. Instead, we must make a dummy no-op build target on that source file, and make the project depend on - # that target. - - # Sanitate the source .js filename to a good symbol name to use as a dummy filename. - get_filename_component(jsname "${jsfile}" NAME) - string(REGEX REPLACE "[/:\\\\.\ ]" "_" dummy_js_target ${jsname}) - set(dummy_lib_name ${target}_${link_js_counter}_${dummy_js_target}) - set(dummy_c_name "${CMAKE_BINARY_DIR}/${dummy_js_target}_tracker.c") - - # Create a new static library target that with a single dummy .c file. - add_library(${dummy_lib_name} STATIC ${dummy_c_name}) - # Make the dummy .c file depend on the .js file we are linking, so that if the .js file is edited, the dummy .c file, and hence the static library will be rebuild (no-op). This causes the main application to be relinked, which is what we want. - # This approach was recommended by http://www.cmake.org/pipermail/cmake/2010-May/037206.html - add_custom_command(OUTPUT ${dummy_c_name} COMMAND ${CMAKE_COMMAND} -E touch ${dummy_c_name} DEPENDS ${jsfile}) - target_link_libraries(${target} ${dummy_lib_name}) - - # Link the js-library to the target - # When a linked library starts with a "-" cmake will just add it to the linker command line as it is. - # The advantage of doing it this way is that the js-library will also be automatically linked to targets - # that depend on this target. - get_filename_component(js_file_absolute_path "${jsfile}" ABSOLUTE ) - target_link_libraries(${target} "${flagname} \"${js_file_absolute_path}\"") - - math(EXPR link_js_counter "${link_js_counter} + 1") - endforeach() - endforeach() - endfunction() - - # This function links a (list of ) .js library file(s) to the given CMake project. - # Example: em_link_js_library(my_executable "lib1.js" "lib2.js") - # will result in emcc passing --js-library lib1.js --js-library lib2.js to the emscripten linker, as well as - # tracking the modification timestamp between the linked .js files and the main project, so that editing the .js file - # will cause the target project to be relinked. - function(em_link_js_library target) - em_add_tracked_link_flag(${target} "--js-library" ${ARGN}) - endfunction() - - # This function is identical to em_link_js_library(), except the .js files will be added with '--pre-js file.js' command line flag, - # which is generally used to add some preamble .js code to a generated output file. - function(em_link_pre_js target) - em_add_tracked_link_flag(${target} "--pre-js" ${ARGN}) - endfunction() - - # This function is identical to em_link_js_library(), except the .js files will be added with '--post-js file.js' command line flag, - # which is generally used to add some postamble .js code to a generated output file. - function(em_link_post_js target) - em_add_tracked_link_flag(${target} "--post-js" ${ARGN}) - endfunction() - - # Experimental support for targeting generation of Visual Studio project files (vs-tool) of Emscripten projects for Windows. - # To use this, pass the combination -G "Visual Studio 10" -DCMAKE_TOOLCHAIN_FILE=Emscripten.cmake - if ("${CMAKE_GENERATOR}" MATCHES "^Visual Studio.*") - # By default, CMake generates VS project files with a true directive. - # This causes VS to attempt to invoke rc.exe during the build, which will fail since app manifests are meaningless for Emscripten. - # To disable this, add the following linker flag. This flag will not go to emcc, since the Visual Studio CMake generator will swallow it. - set(EMSCRIPTEN_VS_LINKER_FLAGS "/MANIFEST:NO") - # CMake is hardcoded to write a ClCompile directive $(IntDir) in all VS project files it generates. - # This makes VS pass emcc a -o param that points to a directory instead of a file, which causes emcc autogenerate the output filename. - # CMake is hardcoded to assume all object files have the suffix .obj, so adjust the emcc-autogenerated default suffix name to match. - set(EMSCRIPTEN_VS_LINKER_FLAGS "${EMSCRIPTEN_VS_LINKER_FLAGS} --default-obj-ext .obj") - # Also hint CMake that it should not hardcode generation. Requires a custom CMake build for this to work (ignored on others) - # See http://www.cmake.org/Bug/view.php?id=14673 and https://github.com/juj/CMake - set(CMAKE_VS_NO_DEFAULT_OBJECTFILENAME 1) - - # Apply and cache Emscripten Visual Studio IDE-specific linker flags. - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${EMSCRIPTEN_VS_LINKER_FLAGS}" CACHE STRING "") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${EMSCRIPTEN_VS_LINKER_FLAGS}" CACHE STRING "") - set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${EMSCRIPTEN_VS_LINKER_FLAGS}" CACHE STRING "") - endif() - - if (NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR) - find_program(NODE_JS_EXECUTABLE NAMES nodejs node) - if(NODE_JS_EXECUTABLE) - set(CMAKE_CROSSCOMPILING_EMULATOR "${NODE_JS_EXECUTABLE}" CACHE FILEPATH "Path to the emulator for the target system.") - endif() - endif() - # No-op on CMAKE_CROSSCOMPILING_EMULATOR so older versions of cmake do not - # complain about unused CMake variable. - if(CMAKE_CROSSCOMPILING_EMULATOR) - endif() \ No newline at end of file diff --git a/scripts/toolchains/ios.cmake b/scripts/toolchains/ios.cmake deleted file mode 100644 index 846038a35f3419..00000000000000 --- a/scripts/toolchains/ios.cmake +++ /dev/null @@ -1,436 +0,0 @@ -# This file is part of the ios-cmake project. It was retrieved from -# https://github.com/cristeab/ios-cmake.git, which is a fork of -# https://code.google.com/p/ios-cmake/. Which in turn is based off of -# the Platform/Darwin.cmake and Platform/UnixPaths.cmake files which -# are included with CMake 2.8.4 -# -# The ios-cmake project is licensed under the new BSD license. -# -# Copyright (c) 2014, Bogdan Cristea and LTE Engineering Software, -# Kitware, Inc., Insight Software Consortium. All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# 3. Neither the name of the copyright holder nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -# This file is based off of the Platform/Darwin.cmake and -# Platform/UnixPaths.cmake files which are included with CMake 2.8.4 -# It has been altered for iOS development. -# -# Updated by Alex Stewart (alexs.mac@gmail.com) -# -# ***************************************************************************** -# Now maintained by Alexander Widerberg (widerbergaren [at] gmail.com) -# under the BSD-3-Clause license -# https://github.com/leetal/ios-cmake -# ***************************************************************************** -# -# INFORMATION / HELP -# -# The following variables control the behaviour of this toolchain: -# -# IOS_PLATFORM: OS (default) or SIMULATOR or SIMULATOR64 or TVOS or SIMULATOR_TVOS -# OS = Build for iPhoneOS. -# SIMULATOR = Build for x86 i386 iPhone Simulator. -# SIMULATOR64 = Build for x86_64 iPhone Simulator. -# TVOS = Build for AppleTVOS. -# SIMULATOR_TVOS = Build for x86_64 AppleTV Simulator. -# CMAKE_OSX_SYSROOT: Path to the iOS SDK to use. By default this is -# automatically determined from IOS_PLATFORM and xcodebuild, but -# can also be manually specified (although this should not be required). -# CMAKE_IOS_DEVELOPER_ROOT: Path to the Developer directory for the iOS platform -# being compiled for. By default this is automatically determined from -# CMAKE_OSX_SYSROOT, but can also be manually specified (although this should -# not be required). -# ENABLE_BITCODE: (1|0) Enables or disables bitcode support. Default 1 (true) -# ENABLE_ARC: (1|0) Enables or disables ARC support. Default 1 (true, ARC enabled by default) -# ENABLE_VISIBILITY: (1|0) Enables or disables symbol visibility support. Default 0 (false, visibility hidden by default) -# IOS_ARCH: (armv7 armv7s arm64 i386 x86_64) If specified, will override the default architectures for the given IOS_PLATFORM -# OS = armv7 armv7s arm64 -# SIMULATOR = i386 -# SIMULATOR64 = x86_64 -# TVOS = arm64 -# SIMULATOR_TVOS = x86_64 -# -# This toolchain defines the following variables for use externally: -# -# XCODE_VERSION: Version number (not including Build version) of Xcode detected. -# IOS_SDK_VERSION: Version of iOS SDK being used. -# CMAKE_OSX_ARCHITECTURES: Architectures being compiled for (generated from -# IOS_PLATFORM). -# -# This toolchain defines the following macros for use externally: -# -# set_xcode_property (TARGET XCODE_PROPERTY XCODE_VALUE XCODE_VARIANT) -# A convenience macro for setting xcode specific properties on targets. -# Available variants are: All, Release, RelWithDebInfo, Debug, MinSizeRel -# example: set_xcode_property (myioslib IPHONEOS_DEPLOYMENT_TARGET "3.1" "all"). -# -# find_host_package (PROGRAM ARGS) -# A macro used to find executable programs on the host system, not within the -# iOS environment. Thanks to the android-cmake project for providing the -# command. - -# Fix for PThread library not in path -set(CMAKE_THREAD_LIBS_INIT "-lpthread") -set(CMAKE_HAVE_THREADS_LIBRARY 1) -set(CMAKE_USE_WIN32_THREADS_INIT 0) -set(CMAKE_USE_PTHREADS_INIT 1) - -# Get the Xcode version being used. -execute_process(COMMAND xcodebuild -version - OUTPUT_VARIABLE XCODE_VERSION - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) -string(REGEX MATCH "Xcode [0-9\\.]+" XCODE_VERSION "${XCODE_VERSION}") -string(REGEX REPLACE "Xcode ([0-9\\.]+)" "\\1" XCODE_VERSION "${XCODE_VERSION}") -message(STATUS "Building with Xcode version: ${XCODE_VERSION}") -# Default to building for iPhoneOS if not specified otherwise, and we cannot -# determine the platform from the CMAKE_OSX_ARCHITECTURES variable. The use -# of CMAKE_OSX_ARCHITECTURES is such that try_compile() projects can correctly -# determine the value of IOS_PLATFORM from the root project, as -# CMAKE_OSX_ARCHITECTURES is propagated to them by CMake. -if (NOT DEFINED IOS_PLATFORM) - if (CMAKE_OSX_ARCHITECTURES) - if (CMAKE_OSX_ARCHITECTURES MATCHES ".*arm.*") - set(IOS_PLATFORM "OS") - elseif (CMAKE_OSX_ARCHITECTURES MATCHES "i386") - set(IOS_PLATFORM "SIMULATOR") - elseif (CMAKE_OSX_ARCHITECTURES MATCHES "x86_64") - set(IOS_PLATFORM "SIMULATOR64") - endif() - endif() - if (NOT IOS_PLATFORM) - set(IOS_PLATFORM "OS") - endif() -endif() -set(IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING - "Type of iOS platform for which to build.") -# Determine the platform name and architectures for use in xcodebuild commands -# from the specified IOS_PLATFORM name. -if (IOS_PLATFORM STREQUAL "OS") - set(XCODE_IOS_PLATFORM iphoneos) - if(NOT IOS_ARCH) - set(IOS_ARCH armv7 armv7s arm64) - endif() -elseif (IOS_PLATFORM STREQUAL "SIMULATOR") - set(XCODE_IOS_PLATFORM iphonesimulator) - if(NOT IOS_ARCH) - set(IOS_ARCH i386) - endif() -elseif(IOS_PLATFORM STREQUAL "SIMULATOR64") - set(XCODE_IOS_PLATFORM iphonesimulator) - if(NOT IOS_ARCH) - set(IOS_ARCH x86_64) - endif() -elseif (IOS_PLATFORM STREQUAL "TVOS") - set(XCODE_IOS_PLATFORM appletvos) - if(NOT IOS_ARCH) - set(IOS_ARCH arm64) - endif() -elseif (IOS_PLATFORM STREQUAL "SIMULATOR_TVOS") - set(XCODE_IOS_PLATFORM appletvsimulator) - if(NOT IOS_ARCH) - set(IOS_ARCH x86_64) - endif() -else() - message(FATAL_ERROR "Invalid IOS_PLATFORM: ${IOS_PLATFORM}") -endif() -message(STATUS "Configuring iOS build for platform: ${IOS_PLATFORM}, " - "architecture(s): ${IOS_ARCH}") -# If user did not specify the SDK root to use, then query xcodebuild for it. -if (NOT CMAKE_OSX_SYSROOT) - execute_process(COMMAND xcodebuild -version -sdk ${XCODE_IOS_PLATFORM} Path - OUTPUT_VARIABLE CMAKE_OSX_SYSROOT - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - message(STATUS "Using SDK: ${CMAKE_OSX_SYSROOT} for platform: ${IOS_PLATFORM}") -endif() -if (NOT EXISTS ${CMAKE_OSX_SYSROOT}) - message(SEND_ERROR "Please make sure that Xcode is installed and that the toolchain" - "is pointing to the correct path. Please run:" - "sudo xcode-select -s /Applications/Xcode.app/Contents/Developer" - "and see if that fixes the problem for you.") - message(FATAL_ERROR "Invalid CMAKE_OSX_SYSROOT: ${CMAKE_OSX_SYSROOT} " - "does not exist.") -endif() -# Specify minimum version of deployment target. -if (NOT DEFINED IOS_DEPLOYMENT_TARGET) - # Unless specified, SDK version 8.0 is used by default as minimum target version. - set(IOS_DEPLOYMENT_TARGET "8.0" - CACHE STRING "Minimum iOS version to build for." ) - message(STATUS "Using the default min-version since IOS_DEPLOYMENT_TARGET not provided!") -endif() -# Use bitcode or not -if (NOT DEFINED ENABLE_BITCODE AND NOT IOS_ARCH MATCHES "((^|, )(i386|x86_64))+") - # Unless specified, enable bitcode support by default - set(ENABLE_BITCODE TRUE CACHE BOOL "Whether or not to enable bitcode") - message(STATUS "Enabling bitcode support by default. ENABLE_BITCODE not provided!") -endif() -if (NOT DEFINED ENABLE_BITCODE) - message(STATUS "Disabling bitcode support by default on simulators. ENABLE_BITCODE not provided for override!") -endif() -# Use ARC or not -if (NOT DEFINED ENABLE_ARC) - # Unless specified, enable ARC support by default - set(ENABLE_ARC TRUE CACHE BOOL "Whether or not to enable ARC") - message(STATUS "Enabling ARC support by default. ENABLE_ARC not provided!") -endif() -# Use hidden visibility or not -if (NOT DEFINED ENABLE_VISIBILITY) - # Unless specified, disable symbols visibility by default - set(ENABLE_VISIBILITY FALSE CACHE BOOL "Whether or not to hide symbols (-fvisibility=hidden)") - message(STATUS "Hiding symbols visibility by default. ENABLE_VISIBILITY not provided!") -endif() -# Get the SDK version information. -execute_process(COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version SDKVersion - OUTPUT_VARIABLE IOS_SDK_VERSION - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) -# Find the Developer root for the specific iOS platform being compiled for -# from CMAKE_OSX_SYSROOT. Should be ../../ from SDK specified in -# CMAKE_OSX_SYSROOT. There does not appear to be a direct way to obtain -# this information from xcrun or xcodebuild. -if (NOT CMAKE_IOS_DEVELOPER_ROOT) - get_filename_component(IOS_PLATFORM_SDK_DIR ${CMAKE_OSX_SYSROOT} PATH) - get_filename_component(CMAKE_IOS_DEVELOPER_ROOT ${IOS_PLATFORM_SDK_DIR} PATH) -endif() -if (NOT EXISTS ${CMAKE_IOS_DEVELOPER_ROOT}) - message(FATAL_ERROR "Invalid CMAKE_IOS_DEVELOPER_ROOT: " - "${CMAKE_IOS_DEVELOPER_ROOT} does not exist.") -endif() -# Find the C & C++ compilers for the specified SDK. -if (NOT CMAKE_C_COMPILER) - execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find clang - OUTPUT_VARIABLE CMAKE_C_COMPILER - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - message(STATUS "Using C compiler: ${CMAKE_C_COMPILER}") -endif() -if (NOT CMAKE_CXX_COMPILER) - execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find clang++ - OUTPUT_VARIABLE CMAKE_CXX_COMPILER - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) - message(STATUS "Using CXX compiler: ${CMAKE_CXX_COMPILER}") -endif() -# Find (Apple's) libtool. -execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find libtool - OUTPUT_VARIABLE IOS_LIBTOOL - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) -message(STATUS "Using libtool: ${IOS_LIBTOOL}") -# Configure libtool to be used instead of ar + ranlib to build static libraries. -# This is required on Xcode 7+, but should also work on previous versions of -# Xcode. -set(CMAKE_C_CREATE_STATIC_LIBRARY - "${IOS_LIBTOOL} -static -o ") -set(CMAKE_CXX_CREATE_STATIC_LIBRARY - "${IOS_LIBTOOL} -static -o ") -# Get the version of Darwin (OS X) of the host. -execute_process(COMMAND uname -r - OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE) -# Standard settings. -set(CMAKE_SYSTEM_NAME Darwin CACHE INTERNAL "") -set(CMAKE_SYSTEM_VERSION ${IOS_SDK_VERSION} CACHE INTERNAL "") -set(UNIX TRUE CACHE BOOL "") -set(APPLE TRUE CACHE BOOL "") -set(IOS TRUE CACHE BOOL "") -set(CMAKE_AR ar CACHE FILEPATH "" FORCE) -set(CMAKE_RANLIB ranlib CACHE FILEPATH "" FORCE) -# Force unset of OS X-specific deployment target (otherwise autopopulated), -# required as of cmake 2.8.10. -set(CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING - "Must be empty for iOS builds." FORCE) -# Set the architectures for which to build. -set(CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE STRING "Build architecture for iOS") -# Change the type of target generated for try_compile() so it'll work when cross-compiling -set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) -# Skip the platform compiler checks for cross compiling. -set(CMAKE_CXX_COMPILER_FORCED TRUE) -set(CMAKE_CXX_COMPILER_WORKS TRUE) -set(CMAKE_C_COMPILER_FORCED TRUE) -set(CMAKE_C_COMPILER_WORKS TRUE) -# All iOS/Darwin specific settings - some may be redundant. -set(CMAKE_SHARED_LIBRARY_PREFIX "lib") -set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib") -set(CMAKE_SHARED_MODULE_PREFIX "lib") -set(CMAKE_SHARED_MODULE_SUFFIX ".so") -set(CMAKE_C_COMPILER_ABI ELF) -set(CMAKE_CXX_COMPILER_ABI ELF) -set(CMAKE_C_HAS_ISYSROOT 1) -set(CMAKE_CXX_HAS_ISYSROOT 1) -set(CMAKE_MODULE_EXISTS 1) -set(CMAKE_DL_LIBS "") -set(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ") -set(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ") -set(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}") -set(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}") - -if(IOS_ARCH MATCHES "((^|, )(arm64|x86_64))+") - set(CMAKE_C_SIZEOF_DATA_PTR 8) - set(CMAKE_CXX_SIZEOF_DATA_PTR 8) - message(STATUS "Using a data_ptr size of 8") -else() - set(CMAKE_C_SIZEOF_DATA_PTR 4) - set(CMAKE_CXX_SIZEOF_DATA_PTR 4) - message(STATUS "Using a data_ptr size of 4") -endif() - -message(STATUS "Building for minimum iOS version: ${IOS_DEPLOYMENT_TARGET}" - " (SDK version: ${IOS_SDK_VERSION})") -# Note that only Xcode 7+ supports the newer more specific: -# -m${XCODE_IOS_PLATFORM}-version-min flags, older versions of Xcode use: -# -m(ios/ios-simulator)-version-min instead. -if (IOS_PLATFORM STREQUAL "OS") - if (XCODE_VERSION VERSION_LESS 7.0) - set(XCODE_IOS_PLATFORM_VERSION_FLAGS - "-mios-version-min=${IOS_DEPLOYMENT_TARGET}") - else() - # Xcode 7.0+ uses flags we can build directly from XCODE_IOS_PLATFORM. - set(XCODE_IOS_PLATFORM_VERSION_FLAGS - "-m${XCODE_IOS_PLATFORM}-version-min=${IOS_DEPLOYMENT_TARGET}") - endif() -elseif (IOS_PLATFORM STREQUAL "TVOS") - set(XCODE_IOS_PLATFORM_VERSION_FLAGS - "-mtvos-version-min=${IOS_DEPLOYMENT_TARGET}") -elseif (IOS_PLATFORM STREQUAL "SIMULATOR_TVOS") - set(XCODE_IOS_PLATFORM_VERSION_FLAGS - "-mtvos-simulator-version-min=${IOS_DEPLOYMENT_TARGET}") -else() - # SIMULATOR or SIMULATOR64 both use -mios-simulator-version-min. - set(XCODE_IOS_PLATFORM_VERSION_FLAGS - "-mios-simulator-version-min=${IOS_DEPLOYMENT_TARGET}") -endif() -message(STATUS "Version flags set to: ${XCODE_IOS_PLATFORM_VERSION_FLAGS}") - -if (ENABLE_BITCODE) - set(BITCODE "-fembed-bitcode") - set(HEADER_PAD "") - message(STATUS "Enabling bitcode support.") -else() - set(BITCODE "") - set(HEADER_PAD "-headerpad_max_install_names") - message(STATUS "Disabling bitcode support.") -endif() - -if (ENABLE_ARC) - set(FOBJC_ARC "-fobjc-arc") - message(STATUS "Enabling ARC support.") -else() - set(FOBJC_ARC "-fno-objc-arc") - message(STATUS "Disabling ARC support.") -endif() - -if (NOT ENABLE_VISIBILITY) - set(VISIBILITY "-fvisibility=hidden") - message(STATUS "Hiding symbols (-fvisibility=hidden).") -else() - set(VISIBILITY "") -endif() - -set(CMAKE_C_FLAGS -"${XCODE_IOS_PLATFORM_VERSION_FLAGS} ${BITCODE} -fobjc-abi-version=2 ${FOBJC_ARC} ${CMAKE_C_FLAGS}") -# Hidden visibilty is required for C++ on iOS. -set(CMAKE_CXX_FLAGS -"${XCODE_IOS_PLATFORM_VERSION_FLAGS} ${BITCODE} ${VISIBILITY} -fvisibility-inlines-hidden -fobjc-abi-version=2 ${FOBJC_ARC} ${CMAKE_CXX_FLAGS}") -set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS} -DNDEBUG -Os -ffast-math ${BITCODE} ${CMAKE_CXX_FLAGS_MINSIZEREL}") -set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS} -DNDEBUG -O2 -g -ffast-math ${BITCODE} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") -set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -DNDEBUG -O3 -ffast-math ${BITCODE} ${CMAKE_CXX_FLAGS_RELEASE}") -set(CMAKE_C_LINK_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}") -set(CMAKE_CXX_LINK_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}") - -# In order to ensure that the updated compiler flags are used in try_compile() -# tests, we have to forcibly set them in the CMake cache, not merely set them -# in the local scope. -list(APPEND VARS_TO_FORCE_IN_CACHE - CMAKE_C_FLAGS - CMAKE_CXX_FLAGS - CMAKE_CXX_FLAGS_RELWITHDEBINFO - CMAKE_CXX_FLAGS_MINSIZEREL - CMAKE_CXX_FLAGS_RELEASE - CMAKE_C_LINK_FLAGS - CMAKE_CXX_LINK_FLAGS) -foreach(VAR_TO_FORCE ${VARS_TO_FORCE_IN_CACHE}) - set(${VAR_TO_FORCE} "${${VAR_TO_FORCE}}" CACHE STRING "" FORCE) -endforeach() - -set(CMAKE_PLATFORM_HAS_INSTALLNAME 1) -set (CMAKE_SHARED_LINKER_FLAGS "-rpath @executable_path/Frameworks -rpath @loader_path/Frameworks") -set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib ${HEADER_PAD}") -set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle ${HEADER_PAD}") -set(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,") -set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,") -set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a") - -# Hack: if a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old -# build tree (where install_name_tool was hardcoded) and where -# CMAKE_INSTALL_NAME_TOOL isn't in the cache and still cmake didn't fail in -# CMakeFindBinUtils.cmake (because it isn't rerun) hardcode -# CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did -# before, Alex. -if (NOT DEFINED CMAKE_INSTALL_NAME_TOOL) - find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool) -endif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL) - -# Set the find root to the iOS developer roots and to user defined paths. -set(CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_OSX_SYSROOT} - ${CMAKE_PREFIX_PATH} CACHE string "iOS find search path root" FORCE) -# Default to searching for frameworks first. -set(CMAKE_FIND_FRAMEWORK FIRST) -# Set up the default search directories for frameworks. -set(CMAKE_SYSTEM_FRAMEWORK_PATH - ${CMAKE_OSX_SYSROOT}/System/Library/Frameworks - ${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks - ${CMAKE_OSX_SYSROOT}/Developer/Library/Frameworks) -# Only search the specified iOS SDK, not the remainder of the host filesystem. -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -# This little macro lets you set any XCode specific property. -macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE XCODE_RELVERSION) - set(XCODE_RELVERSION_I "${XCODE_RELVERSION}") - if (XCODE_RELVERSION_I STREQUAL "All") - set_property(TARGET ${TARGET} PROPERTY - XCODE_ATTRIBUTE_${XCODE_PROPERTY} "${XCODE_VALUE}") - else() - set_property(TARGET ${TARGET} PROPERTY - XCODE_ATTRIBUTE_${XCODE_PROPERTY}[variant=${XCODE_RELVERSION_I}] "${XCODE_VALUE}") - endif() -endmacro(set_xcode_property) -# This macro lets you find executable programs on the host system. -macro(find_host_package) - set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) - set(IOS FALSE) - find_package(${ARGN}) - set(IOS TRUE) - set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -endmacro(find_host_package) \ No newline at end of file diff --git a/triplets/x64-android.cmake b/triplets/x64-android.cmake deleted file mode 100644 index 8f0f029b0560b0..00000000000000 --- a/triplets/x64-android.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(VCPKG_TARGET_ARCHITECTURE x64) -set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_LIBRARY_LINKAGE static) - -set(VCPKG_CMAKE_SYSTEM_NAME Android) diff --git a/triplets/x64-ios.cmake b/triplets/x64-ios.cmake deleted file mode 100644 index c2f522188628f0..00000000000000 --- a/triplets/x64-ios.cmake +++ /dev/null @@ -1,6 +0,0 @@ -set(VCPKG_TARGET_ARCHITECTURE x64) -set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_LIBRARY_LINKAGE static) - -set(VCPKG_CMAKE_SYSTEM_NAME Darwin) -set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/scripts/toolchains/ios.cmake) diff --git a/triplets/x86-ios.cmake b/triplets/x86-ios.cmake deleted file mode 100644 index 53aec7b7dbe10a..00000000000000 --- a/triplets/x86-ios.cmake +++ /dev/null @@ -1,6 +0,0 @@ -set(VCPKG_TARGET_ARCHITECTURE x86) -set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_LIBRARY_LINKAGE static) - -set(VCPKG_CMAKE_SYSTEM_NAME Darwin) -set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/scripts/toolchains/ios.cmake) \ No newline at end of file diff --git a/triplets/x86-wasm.cmake b/triplets/x86-wasm.cmake deleted file mode 100644 index 0e470abd735c12..00000000000000 --- a/triplets/x86-wasm.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(VCPKG_TARGET_ARCHITECTURE x86) -set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_CMAKE_SYSTEM_NAME Emscripten) -set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/scripts/toolchains/emscripten.cmake) \ No newline at end of file From c5c9ed546bbd877a2cfd65bea5da94e4ec3475bf Mon Sep 17 00:00:00 2001 From: Mohammed Alyousef Date: Sat, 22 Sep 2018 03:25:27 +0200 Subject: [PATCH 12/12] ignoring custom toolchains --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 334879e84eecad..3d49e3c52860d2 100644 --- a/.gitignore +++ b/.gitignore @@ -299,7 +299,7 @@ __pycache__/ !triplets/x64-linux.cmake !triplets/x64-osx.cmake -#ignore custom triplets +#ignore custom toolchains /scripts/toolchains/* #add vcpkg-designed toolchains back in !scripts/toolchains/android.cmake