mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 07:29:11 +08:00
47 lines
1.3 KiB
Diff
47 lines
1.3 KiB
Diff
diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt
|
|
index 3382de139..404c56e5e 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
|
|
diff --git a/CMake/InstallResources.cmake b/CMake/InstallResources.cmake
|
|
index 0181259e2..346188c73 100644
|
|
--- a/CMake/InstallResources.cmake
|
|
+++ b/CMake/InstallResources.cmake
|
|
@@ -245,12 +245,14 @@ endif ()
|
|
# Create the CMake package files
|
|
include(CMakePackageConfigHelpers)
|
|
|
|
-if (WIN32)
|
|
- set(OGRE_CMAKE_DIR CMake)
|
|
-elseif (UNIX)
|
|
- set(OGRE_CMAKE_DIR lib/OGRE/cmake)
|
|
-elseif (APPLE)
|
|
-endif ()
|
|
+if (NOT DEFINED OGRE_CMAKE_DIR)
|
|
+ if (WIN32)
|
|
+ set(OGRE_CMAKE_DIR CMake)
|
|
+ elseif (UNIX)
|
|
+ set(OGRE_CMAKE_DIR lib/OGRE/cmake)
|
|
+ elseif (APPLE)
|
|
+ endif ()
|
|
+endif()
|
|
configure_package_config_file(${OGRE_TEMPLATES_DIR}/OGREConfig.cmake.in ${OGRE_BINARY_DIR}/cmake/OGREConfig.cmake
|
|
INSTALL_DESTINATION ${OGRE_CMAKE_DIR}
|
|
PATH_VARS CMAKE_INSTALL_PREFIX)
|