diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt index a7a3796..2e21403 100644 --- a/CMake/CMakeLists.txt +++ b/CMake/CMakeLists.txt @@ -13,10 +13,12 @@ # directory, but can also be used for custom projects. ############################################################# -if(WIN32 OR APPLE) - set(OGRE_CMAKE_DIR "CMake") -else() - set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") +if(NOT DEFINED OGRE_CMAKE_DIR) + if(WIN32 OR APPLE) + set(OGRE_CMAKE_DIR "CMake") + else() + set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") + endif() endif() set(INST_FILES Utils/FindPkgMacros.cmake) diff --git a/CMake/InstallResources.cmake b/CMake/InstallResources.cmake index 783755e..79f7514 100644 --- a/CMake/InstallResources.cmake +++ b/CMake/InstallResources.cmake @@ -208,10 +208,12 @@ endif () # Create the CMake package files include(CMakePackageConfigHelpers) -if(WIN32 OR APPLE) - set(OGRE_CMAKE_DIR "CMake") -else() - set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") +if(NOT DEFINED OGRE_CMAKE_DIR) + if(WIN32 OR APPLE) + set(OGRE_CMAKE_DIR "CMake") + else() + set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") + endif() endif() configure_package_config_file(${OGRE_TEMPLATES_DIR}/OGREConfig.cmake.in ${PROJECT_BINARY_DIR}/cmake/OGREConfig.cmake INSTALL_DESTINATION ${OGRE_CMAKE_DIR}