diff --git a/cmake/third_party.cmake b/cmake/third_party.cmake index b930e08..d0bc8fc 100644 --- a/cmake/third_party.cmake +++ b/cmake/third_party.cmake @@ -2,18 +2,21 @@ if(NOT DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() -string(FIND "${CMAKE_TOOLCHAIN_FILE}" "conan_toolchain.cmake" FOUND_CONAN_TOOLCHAIN) -if(FOUND_CONAN_TOOLCHAIN GREATER_EQUAL 0) - set(BUILD_TRIGGERED_BY_CONAN TRUE) +string(FIND "${CMAKE_TOOLCHAIN_FILE}" "conan_toolchain.cmake" _result) +if(_result GREATER_EQUAL 0) + set(FOUND_CONAN_TOOLCHAIN TRUE) +endif() +string(FIND "${CMAKE_TOOLCHAIN_FILE}" "vcpkg.cmake" _result) +if(_result GREATER_EQUAL 0) + set(FOUND_VCPKG_TOOLCHAIN TRUE) endif() - -if(DEFINED VCPKG_TOOLCHAIN) - message(NOTICE "Vcpkg toolchain detected, disabling automatic dependency management") - set(USE_CONAN FALSE) -elseif(BUILD_TRIGGERED_BY_CONAN) +if(FOUND_CONAN_TOOLCHAIN) message(NOTICE "Conan toolchain already in use, disabling automatic dependency management") set(USE_CONAN FALSE) +elseif(FOUND_VCPKG_TOOLCHAIN) + message(NOTICE "Vcpkg toolchain already in use, disabling automatic dependency management") + set(USE_CONAN FALSE) else() option(USE_CONAN "Use Conan to automatically manage dependencies" TRUE) endif() diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 0000000..ff59c3a --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "velodyne-decoder", + "description": "Decoder for raw Velodyne packet data", + "version-string": "3.0.0", + "license": "BSD-3-Clause", + "homepage": "https://github.com/valgur/velodyne_decoder", + "maintainers": [ + "Martin Valgur " + ], + "builtin-baseline": "c9919121dde6f61c0436adda94624636e041226b", + "dependencies": [ + "yaml-cpp", + "ms-gsl" + ] +}