mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-29 11:41:36 +08:00
[ogre] Update port to Ogre version 1.10.8.
This commit is contained in:
parent
912c38d466
commit
f4b09f5782
@ -1,17 +0,0 @@
|
||||
diff --git a/OgreMain/CMakeLists.txt b/OgreMain/CMakeLists.txt
|
||||
index 6a43378..22f950e 100644
|
||||
--- a/OgreMain/CMakeLists.txt
|
||||
+++ b/OgreMain/CMakeLists.txt
|
||||
@@ -220,7 +220,11 @@ endif ()
|
||||
list(APPEND HEADER_FILES ${THREAD_HEADER_FILES})
|
||||
|
||||
# Add needed definitions and nedmalloc include dir
|
||||
-add_definitions(-DOGRE_NONCLIENT_BUILD -DFREEIMAGE_LIB -D_MT -D_USRDLL)
|
||||
+# vcpkg specific patch: we removed -DFREEIMAGE_LIB
|
||||
+# from the defines, because vcpkg's freeimage can
|
||||
+# be both static or dynamic, and FREEIMAGE_LIB
|
||||
+# remove all the symbol exporting declaration from FreeImage.h
|
||||
+add_definitions(-DOGRE_NONCLIENT_BUILD -D_MT -D_USRDLL)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/nedmalloc)
|
||||
|
||||
set(LIBRARIES ${PLATFORM_LIBS})
|
@ -1,19 +0,0 @@
|
||||
diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt
|
||||
index 4c496b7..feb4017 100644
|
||||
--- a/CMake/CMakeLists.txt
|
||||
+++ b/CMake/CMakeLists.txt
|
||||
@@ -14,10 +14,12 @@
|
||||
#############################################################
|
||||
|
||||
if(WIN32 OR APPLE)
|
||||
- set(OGRE_CMAKE_DIR "CMake")
|
||||
+ set(OGRE_DEFAULT_CMAKE_DIR "CMake")
|
||||
else()
|
||||
- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake")
|
||||
+ set(OGRE_DEFAULT_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake")
|
||||
endif()
|
||||
+set(OGRE_CMAKE_DIR ${OGRE_DEFAULT_CMAKE_DIR} CACHE STRING "Install directory for CMake files.")
|
||||
+mark_as_advanced(OGRE_DEFAULT_CMAKE_DIR)
|
||||
|
||||
set(INST_FILES
|
||||
Packages/FindOIS.cmake
|
@ -1,41 +0,0 @@
|
||||
diff --git a/CMake/Utils/OgreConfigTargets.cmake b/CMake/Utils/OgreConfigTargets.cmake
|
||||
index c6b3b40..2da7ebf 100644
|
||||
--- a/CMake/Utils/OgreConfigTargets.cmake
|
||||
+++ b/CMake/Utils/OgreConfigTargets.cmake
|
||||
@@ -41,15 +41,28 @@ if (NOT OGRE_RUNTIME_OUTPUT)
|
||||
set(OGRE_RUNTIME_OUTPUT ${OGRE_BINARY_DIR}/bin)
|
||||
endif ()
|
||||
|
||||
+option(OGRE_NO_INSTALLATION_SUFFIXES_ON_WIN32 "Do not install in configuration-specific directories in Windows" FALSE)
|
||||
+
|
||||
if (WIN32)
|
||||
- set(OGRE_RELEASE_PATH "/Release")
|
||||
- set(OGRE_RELWDBG_PATH "/RelWithDebInfo")
|
||||
- set(OGRE_MINSIZE_PATH "/MinSizeRel")
|
||||
- set(OGRE_DEBUG_PATH "/Debug")
|
||||
- set(OGRE_LIB_RELEASE_PATH "/Release")
|
||||
- set(OGRE_LIB_RELWDBG_PATH "/RelWithDebInfo")
|
||||
- set(OGRE_LIB_MINSIZE_PATH "/MinSizeRel")
|
||||
- set(OGRE_LIB_DEBUG_PATH "/Debug")
|
||||
+ if (OGRE_NO_INSTALLATION_SUFFIXES_ON_WIN32)
|
||||
+ set(OGRE_RELEASE_PATH "")
|
||||
+ set(OGRE_RELWDBG_PATH "")
|
||||
+ set(OGRE_MINSIZE_PATH "")
|
||||
+ set(OGRE_DEBUG_PATH "")
|
||||
+ set(OGRE_LIB_RELEASE_PATH "")
|
||||
+ set(OGRE_LIB_RELWDBG_PATH "")
|
||||
+ set(OGRE_LIB_MINSIZE_PATH "")
|
||||
+ set(OGRE_LIB_DEBUG_PATH "/")
|
||||
+ else ()
|
||||
+ set(OGRE_RELEASE_PATH "/Release")
|
||||
+ set(OGRE_RELWDBG_PATH "/RelWithDebInfo")
|
||||
+ set(OGRE_MINSIZE_PATH "/MinSizeRel")
|
||||
+ set(OGRE_DEBUG_PATH "/Debug")
|
||||
+ set(OGRE_LIB_RELEASE_PATH "/Release")
|
||||
+ set(OGRE_LIB_RELWDBG_PATH "/RelWithDebInfo")
|
||||
+ set(OGRE_LIB_MINSIZE_PATH "/MinSizeRel")
|
||||
+ set(OGRE_LIB_DEBUG_PATH "/Debug")
|
||||
+ endif ()
|
||||
set(OGRE_PLUGIN_PATH "/opt")
|
||||
set(OGRE_SAMPLE_PATH "/opt/samples")
|
||||
elseif (UNIX)
|
@ -1,4 +1,14 @@
|
||||
Source: ogre
|
||||
Version: 1.9.0-1
|
||||
Version: 1.10.8
|
||||
Build-Depends: freeimage, freetype, zlib, zziplib
|
||||
Description: 3D Object-Oriented Graphics Rendering Engine
|
||||
|
||||
Feature: d3d9
|
||||
Description: Build Direct3D9 RenderSystem
|
||||
|
||||
Feature: java
|
||||
Description: Build Java (JNI) bindings
|
||||
|
||||
Feature: python
|
||||
Description: Build Python bindings
|
||||
Build-Depends: python3
|
||||
|
@ -1,37 +0,0 @@
|
||||
#.rst:
|
||||
# OGREConfig
|
||||
# ------------
|
||||
#
|
||||
# Dummy OGREConfig to simplify use of OGRE-provided FindOGRE module.
|
||||
#
|
||||
# This file is provided as part of the vcpkg port of OGRE .
|
||||
# It is meant to be found automatically by find_package(OGRE),
|
||||
# but then offloads all the real work to the FindOGRE module by temporarly
|
||||
# adding its directory to CMAKE_MODULE_PATH
|
||||
#
|
||||
# See the FindOGRE module to see the defined variables::
|
||||
#
|
||||
|
||||
# Temporarly add the directory in which OGREConfig.cmake is contained to
|
||||
# get access to the FindOGRE module
|
||||
get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
set(ORIGINAL_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
|
||||
list(APPEND CMAKE_MODULE_PATH ${SELF_DIR})
|
||||
find_package(OGRE MODULE)
|
||||
|
||||
# Leave CMAKE_MODULE_PATH as we found it
|
||||
set(CMAKE_MODULE_PATH ${ORIGINAL_CMAKE_MODULE_PATH})
|
||||
|
||||
# Handle components
|
||||
# imported from https://github.com/Kitware/CMake/blob/v3.7.1/Modules/CMakePackageConfigHelpers.cmake#L300
|
||||
macro(check_required_components _NAME)
|
||||
foreach(comp ${${_NAME}_FIND_COMPONENTS})
|
||||
if(NOT ${_NAME}_${comp}_FOUND)
|
||||
if(${_NAME}_FIND_REQUIRED_${comp})
|
||||
set(${_NAME}_FOUND FALSE)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
check_required_components(OGRE)
|
@ -1,60 +1,83 @@
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sinbad-ogre-dd30349ea667)
|
||||
|
||||
set(OGRE_VERSION 1.10.8)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ogre-${OGRE_VERSION})
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://bitbucket.org/sinbad/ogre/get/v1-9-0.zip"
|
||||
FILENAME "ogre-v1-9-0.zip"
|
||||
SHA512 de7315a2450ecf0d9073e6a8f0c54737e041016f7ad820556d10701c7d23eefab9d3473476a8e95447c30ab21518b8e4cfb0271db72494ea67a3dea284c9a3d3
|
||||
URLS "https://github.com/OGRECave/ogre/archive/v1.10.8.zip"
|
||||
FILENAME "ogre-1.10.8.zip"
|
||||
SHA512 c7d962fe7fb8c46a4e15bb6e2bb68c67f0cc2a0d04a8f53e03fb9572c76df3679dcd117137c6624f2f56a8eda108723817dbaa616ecb7dc4cfd6a644a6bc4356
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-use-vcpkg-freeimage.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/0002-ogre-cmake-dir-as-option.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/0003-use-flat-installation.patch"
|
||||
)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
set(OGRE_STATIC ON)
|
||||
else()
|
||||
set(OGRE_STATIC OFF)
|
||||
endif()
|
||||
|
||||
# Configure features
|
||||
|
||||
if("d3d9" IN_LIST FEATURES)
|
||||
set(WITH_D3D9 ON)
|
||||
else()
|
||||
set(WITH_D3D9 OFF)
|
||||
endif()
|
||||
|
||||
if("java" IN_LIST FEATURES)
|
||||
set(WITH_JAVA ON)
|
||||
else()
|
||||
set(WITH_JAVA OFF)
|
||||
endif()
|
||||
|
||||
if("python" IN_LIST FEATURES)
|
||||
set(WITH_PYTHON ON)
|
||||
else()
|
||||
set(WITH_PYTHON OFF)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS -DOGRE_USE_BOOST:BOOL=OFF
|
||||
-DOGRE_BUILD_RENDERSYSTEM_D3D9:BOOL=OFF
|
||||
-DOGRE_INSTALL_DEPENDENCIES:BOOL=OFF
|
||||
-DOGRE_COPY_DEPENDENCIES:BOOL=OFF
|
||||
-DOGRE_BUILD_TOOLS:BOOL=OFF
|
||||
-DOGRE_CMAKE_DIR:STRING=share/ogre
|
||||
-DOGRE_STATIC:BOOL=${OGRE_STATIC}
|
||||
-DOGRE_INSTALL_SAMPLES:BOOL=OFF
|
||||
-DOGRE_INSTALL_TOOLS:BOOL=OFF
|
||||
# We disable this option because it is broken and we rely on vcpkg_copy_pdbs
|
||||
-DOGRE_INSTALL_PDB:BOOL=OFF
|
||||
-DOGRE_BUILD_DOCS:BOOL=OFF
|
||||
-DOGRE_INSTALL_DOCS:BOOL=OFF
|
||||
-DOGRE_INSTALL_SAMPLES_SOURCE:BOOL=OFF
|
||||
-DOGRE_NO_INSTALLATION_SUFFIXES_ON_WIN32:BOOL=ON
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DOGRE_BUILD_DEPENDENCIES=OFF
|
||||
-DOGRE_BUILD_SAMPLES=OFF
|
||||
-DOGRE_BUILD_TESTS=OFF
|
||||
-DOGRE_BUILD_TOOLS=OFF
|
||||
-DOGRE_BUILD_MSVC_MP=ON
|
||||
-DOGRE_BUILD_MSVC_ZM=ON
|
||||
-DOGRE_INSTALL_DEPENDENCIES=OFF
|
||||
-DOGRE_INSTALL_DOCS=OFF
|
||||
-DOGRE_INSTALL_PDB=OFF
|
||||
-DOGRE_INSTALL_SAMPLES=OFF
|
||||
-DOGRE_INSTALL_TOOLS=OFF
|
||||
-DOGRE_INSTALL_CMAKE=ON
|
||||
-DOGRE_INSTALL_VSPROPS=OFF
|
||||
-DOGRE_STATIC=${OGRE_STATIC}
|
||||
-DOGRE_UNITY_BUILD=OFF
|
||||
-DOGRE_USE_STD11=ON
|
||||
-DOGRE_NODE_STORAGE_LEGACY=OFF
|
||||
-DOGRE_BUILD_RENDERSYSTEM_D3D11=ON
|
||||
-DOGRE_BUILD_RENDERSYSTEM_GL=ON
|
||||
-DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=ON
|
||||
-DOGRE_BUILD_RENDERSYSTEM_GLES=OFF
|
||||
-DOGRE_BUILD_RENDERSYSTEM_GLES2=OFF
|
||||
# Optional stuff
|
||||
-DOGRE_BUILD_COMPONENT_JAVA=${WITH_JAVA}
|
||||
-DOGRE_BUILD_COMPONENT_PYTHON=${WITH_PYTHON}
|
||||
-DOGRE_BUILD_RENDERSYSTEM_D3D9=${WITH_D3D9}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
# Add a OGREConfig.cmake to simplify the process of finding vcpkg OGRE
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/OGREConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre)
|
||||
|
||||
# Remove debug includes
|
||||
# Remove unwanted files
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# Remove debug CMake files
|
||||
# Note that at the moment OGRE do not export imported targets,
|
||||
# so we do not need to copy the debug imported targets in the
|
||||
# release CMake path
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/CMake)
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/ogre/COPYING ${CURRENT_PACKAGES_DIR}/share/ogre/copyright)
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre RENAME copyright)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
# Move installed CMake scripts to share folder
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/CMake ${CURRENT_PACKAGES_DIR}/share/ogre/CMake)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
Loading…
x
Reference in New Issue
Block a user