Using as a CMake Submodule causes error


Hello, I am trying to use Urho3D through an add_subdirectory command, yet the CMake gives me the error:

 CMake Error at Urho3D/CMake/Modules/FindUrho3D.cmake:344 (message):
  Could NOT find compatible Urho3D library in Urho3D SDK installation or
  build tree.  Use URHO3D_HOME environment variable or build option to
  specify the location of the non-default SDK installation or build tree.
Call Stack (most recent call first):
  Urho3D/CMake/Modules/UrhoCommon.cmake:200 (find_package)
  Urho3D/CMakeLists.txt:43 (include)

The master branch is located at <ROOT>/Urho3D and the listing for the CMakeLists in the root is as follows

cmake_minimum_required(VERSION 3.2)

I have also changed line 40 in ROOT/Urho3D/CMakeLists.txt to

# from 

I’ve tried with various different values for URHO3D_HOME, including ROOT/Urho3D and BINARY_DIR/Urho3D
This is probably a really simple fix, so any help would be greatly appreciated


I’m sure you meant CMAKE_BINARY_DIR, which for me points to the build tree.

Just some related discussion
Embedding the engine as a submodule and cmake module?