Skip to content

Commit

Permalink
Include conan.cmake to work around SSL issue in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed Oct 20, 2023
1 parent 5ec6e4b commit 806e8c7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
9 changes: 9 additions & 0 deletions ThirdParty.extra.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
"version": "0.15.0",
"url": "https://github.com/CesiumGS/cesium-native"
},
{
"name": "cmake-conan",
"license": [
"MIT"
],
"notes": "conan.cmake was downloaded to work around an SSL issue, see https://github.com/conan-io/cmake-conan/issues/575",
"version": "0.17.0",
"url": "https://github.com/conan-io/cmake-conan"
},
{
"name": "glTF-Asset-Generator",
"license": [
Expand Down
9 changes: 9 additions & 0 deletions ThirdParty.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
"version": "0.15.0",
"url": "https://github.com/CesiumGS/cesium-native"
},
{
"name": "cmake-conan",
"license": [
"MIT"
],
"notes": "conan.cmake was downloaded to work around an SSL issue, see https://github.com/conan-io/cmake-conan/issues/575",
"version": "0.17.0",
"url": "https://github.com/conan-io/cmake-conan"
},
{
"name": "cpr",
"license": [
Expand Down
12 changes: 4 additions & 8 deletions cmake/ConfigureConan.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,12 @@ macro(configure_conan)
message(FATAL_ERROR "REQUIRES was not specified")
endif()

if(NOT EXISTS "${_PROJECT_BUILD_DIRECTORY}/conan.cmake")
message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
file(
DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/0.17.0/conan.cmake"
"${_PROJECT_BUILD_DIRECTORY}/conan.cmake"
EXPECTED_HASH SHA256=3bef79da16c2e031dc429e1dac87a08b9226418b300ce004cc125a82687baeef
TLS_VERIFY ON)
if(NOT EXISTS "${_PROJECT_BUILD_DIRECTORY}/conan-0.17.0.cmake")
message(STATUS "Copying Conan 0.17.0 into build folder")
file(COPY "${CMAKE_MODULE_PATH}/conan-0.17.0.cmake" DESTINATION "${_PROJECT_BUILD_DIRECTORY}")
endif()

include("${_PROJECT_BUILD_DIRECTORY}/conan.cmake")
include("${_PROJECT_BUILD_DIRECTORY}/conan-0.17.0.cmake")

# Execute conan config init to ensure ~/.conan/settings.yml exists
find_program(CONAN_CMD_PATH conan)
Expand Down

0 comments on commit 806e8c7

Please sign in to comment.