2018-11-29 01:47:15 +08:00
|
|
|
--- a/CMake/CMakeLists.txt
|
|
|
|
+++ b/CMake/CMakeLists.txt
|
2017-11-08 22:50:49 +08:00
|
|
|
@@ -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")
|
2018-11-29 01:47:15 +08:00
|
|
|
+if(NOT DEFINED OGRE_CMAKE_DIR)
|
2018-03-02 22:11:58 +08:00
|
|
|
+ if(WIN32 OR APPLE)
|
|
|
|
+ set(OGRE_CMAKE_DIR "CMake")
|
|
|
|
+ else()
|
|
|
|
+ set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake")
|
|
|
|
+ endif()
|
2017-11-08 22:50:49 +08:00
|
|
|
endif()
|
|
|
|
|
2018-11-29 01:47:15 +08:00
|
|
|
set(INST_FILES Utils/FindPkgMacros.cmake)
|
|
|
|
--- a/CMake/InstallResources.cmake
|
|
|
|
+++ b/CMake/InstallResources.cmake
|
|
|
|
@@ -242,10 +242,12 @@
|
2017-11-08 22:50:49 +08:00
|
|
|
# Create the CMake package files
|
|
|
|
include(CMakePackageConfigHelpers)
|
|
|
|
|
2018-03-02 22:11:58 +08:00
|
|
|
-if(WIN32 OR APPLE)
|
|
|
|
- set(OGRE_CMAKE_DIR "CMake")
|
|
|
|
-else()
|
|
|
|
- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake")
|
2018-11-29 01:47:15 +08:00
|
|
|
+if(NOT DEFINED OGRE_CMAKE_DIR)
|
2018-03-02 22:11:58 +08:00
|
|
|
+ if(WIN32 OR APPLE)
|
|
|
|
+ set(OGRE_CMAKE_DIR "CMake")
|
|
|
|
+ else()
|
|
|
|
+ set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake")
|
|
|
|
+ endif()
|
|
|
|
endif()
|
2017-11-08 22:50:49 +08:00
|
|
|
configure_package_config_file(${OGRE_TEMPLATES_DIR}/OGREConfig.cmake.in ${OGRE_BINARY_DIR}/cmake/OGREConfig.cmake
|
|
|
|
INSTALL_DESTINATION ${OGRE_CMAKE_DIR}
|