diff --git a/cmake/python.cmake b/cmake/python.cmake index f673404c..08299d17 100644 --- a/cmake/python.cmake +++ b/cmake/python.cmake @@ -22,5 +22,16 @@ execute_process( if(CONAN_STATUS EQUAL 0) message(STATUS "Have conan.") else() - message(WARNING "conan not working!! This will almost certainly cause problems down the line.") + execute_process( + COMMAND "${Python_EXECUTABLE}" -m pip install --user --upgrade conan + ) + execute_process( + COMMAND "conan" --version + RESULT_VARIABLE CONAN_STATUS + ) + if(CONAN_STATUS EQUAL 0) + message(STATUS "Installed conan.") + else() + message(WARNING "conan not working!! This will almost certainly cause problems down the line.") + endif() endif()