Skip to content

Instantly share code, notes, and snippets.

@acgetchell
Created August 7, 2018 23:20
Show Gist options
  • Save acgetchell/3b294ec5c12f5eff3733c6b38dbafe99 to your computer and use it in GitHub Desktop.
Save acgetchell/3b294ec5c12f5eff3733c6b38dbafe99 to your computer and use it in GitHub Desktop.
Wrapper for cmake-conan by Joachim Jansen
# https://github.com/conan-io/cmake-conan
function(compile_conan_dependencies conanFile)
find_program(CONAN_CMD conan
DOC "Conan executable location"
PATHS /usr/local/bin
)
message("Running Conan install")
if(CMAKE_BUILD_TYPE STREQUAL "")
set(CMAKE_BUILD_TYPE "Release")
endif()
include(conan)
conan_cmake_run(CONANFILE ${conanFile}
BASIC_SETUP CMAKE_TARGETS
BUILD missing
CONAN_COMMAND ${CONAN_CMD})
endfunction(compile_conan_dependencies)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment