Hello, I've got a problem , i'm not an expert with Cmake , but i want to embed Ogre3D
has simple dependency of my project, for that's, i want to use Fetch feature to download
Ogre in my ./dependencies folder , the build is inside another directory ./build/dependencies/Ogre3D
All is fine , but when i call find_package(OGRE REQUIRED ) i've got an error message :
CMake Error at build/dependencies/Ogre3D/cmake/OGREConfig.cmake:33 (message):
File or directory E:/DEV/Engine3D/build/dependencies/Ogre3D/Media
referenced by variable OGRE_MEDIA_DIR does not exist !
but the directory exist , what i'm going wrong ?
thanks !
this is a part of my cmakelists.txt :
FetchContent_Declare(
OGRE3D
GIT_REPOSITORY https://github.com/OGRECave/ogre.git
GIT_TAG master
SOURCE_DIR ${DEPENDENCIES_DIR}/Ogre3D
)FetchContent_GetProperties(OGRE3D)
if(NOT OGRE3D_POPULATED)
FetchContent_Populate(Ogre3D)
set(OGRE_DIR ${CMAKE_BINARY_DIR}/dependencies/Ogre3D/cmake CACHE STRING "" FORCE)
set(OGRE_STATIC ON CACHE BOOL "" FORCE)
set(OGRE_BUILD_SAMPLES OFF CACHE BOOL "" FORCE)
add_subdirectory(${DEPENDENCIES_DIR}/Ogre3D)
endif()