I’m a beginner to CMAKE. I’m trying to compile a dummy main.cpp
while using Urho3D library. Below are the location of files:
D:\cppLibs\Urho3D-1.7.1 (extracted zip file, untouched dir)
D:\projectName\client\cpp\CMakeLists.txt
D:\projectName\client\cpp\src\main.cpp
Currently I wanna keep this kind of tree, rather than placing engine’s files inside project folder. Below is the CMakeLists.txt file:
cmake_minimum_required(VERSION 3.2.3)
if(COMMAND cmake_policy)
cmake_policy (SET CMP0003 NEW)
cmake_policy (SET CMP0022 NEW)
cmake_policy (SET CMP0026 OLD)
cmake_policy (SET CMP0042 NEW)
cmake_policy (SET CMP0063 OLD)
endif()
project(“projectName”)
set(ENV{URHO3D_HOME} D:/cppLibs/Urho3D-1.7.1)
set(CMAKE_MODULE_PATH D:/cppLibs/Urho3D-1.7.1/CMake/Modules)
include(UrhoCommon)
include_directories(D:/cppLibs)
add_executable(“projectName” src/main.cpp)
As you can see I don’t want yet to build for all platforms, I want just to compile main.cpp
. I get the following error at D:/cppLibs/Urho3D-1.7.1/CMake/Modules/UrhoCommon.cmake:231
:
Could NOT find compatible Urho3D library in Urho3D SDK installation or build tree