mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 13:03:01 +08:00
[ogre-next] Add new port (#8677)
* ogre-next * add rename_config_cmake.patch * add fix_find_package_sdl2.patch * Update ports/ogre-next/portfile.cmake Co-Authored-By: Victor Romero <romerosanchezv@gmail.com> * Use vcpkg_check_features to simplify the portfile a little bit (thanks to @vicroms) * add features in CONTROL file * add "Building steps for ogre-next[d3d9]"
This commit is contained in:
parent
84bafa656b
commit
9bf809b610
18
ports/ogre-next/CONTROL
Normal file
18
ports/ogre-next/CONTROL
Normal file
@ -0,0 +1,18 @@
|
||||
Source: ogre-next
|
||||
Version: 2019-10-20
|
||||
Build-Depends: zlib, freeimage, freetype, rapidjson, openvr, boost-thread, boost-date-time, poco, tbb, sdl2, tinyxml, zziplib
|
||||
Homepage: https://github.com/OGRECave/ogre-next
|
||||
Description: Ogre 2.1 & 2.2 - scene-oriented, flexible 3D engine written in C++
|
||||
|
||||
Feature: d3d9
|
||||
Description: Build Direct3D9 RenderSystem
|
||||
|
||||
Feature: csharp
|
||||
Description: Build csharp bindings
|
||||
|
||||
Feature: java
|
||||
Description: Build Java (JNI) bindings
|
||||
|
||||
Feature: python
|
||||
Description: Build Python bindings
|
||||
Build-Depends: python3
|
16
ports/ogre-next/environment-overrides.cmake
Normal file
16
ports/ogre-next/environment-overrides.cmake
Normal file
@ -0,0 +1,16 @@
|
||||
#[[
|
||||
|
||||
Building steps for ogre-next[d3d9]:
|
||||
|
||||
1. Download and install "Microsoft DirectX SDK"
|
||||
https://www.microsoft.com/en-us/download/confirmation.aspx?id=6812
|
||||
|
||||
2. Set env variable
|
||||
set DXSDK_DIR=C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)
|
||||
|
||||
3. Install port
|
||||
.\vcpkg.exe install ogre-next[d3d9] --triplet x64-windows
|
||||
|
||||
]]
|
||||
|
||||
set(VCPKG_ENV_PASSTHROUGH DXSDK_DIR)
|
18
ports/ogre-next/fix_find_package_sdl2.patch
Normal file
18
ports/ogre-next/fix_find_package_sdl2.patch
Normal file
@ -0,0 +1,18 @@
|
||||
diff --git a/CMake/Dependencies.cmake b/CMake/Dependencies.cmake
|
||||
index 4b67ed8cb..7da194820 100644
|
||||
--- a/CMake/Dependencies.cmake
|
||||
+++ b/CMake/Dependencies.cmake
|
||||
@@ -292,11 +292,11 @@ macro_log_feature(PYTHONLIBS_FOUND "Python" "Language bindings to use OGRE from
|
||||
# Find sdl2
|
||||
if(NOT ANDROID AND NOT EMSCRIPTEN)
|
||||
# find script does not work in cross compilation environment
|
||||
- find_package(SDL2)
|
||||
+ find_package(SDL2 CONFIG)
|
||||
macro_log_feature(SDL2_FOUND "SDL2" "Simple DirectMedia Library needed for input handling in samples" "https://www.libsdl.org/" FALSE "" "")
|
||||
if(SDL2_FOUND AND WIN32 AND NOT SDL2_BINARY)
|
||||
# fix linking static SDL2 on windows
|
||||
- set(SDL2_LIBRARY ${SDL2_LIBRARY} winmm.lib imm32.lib version.lib)
|
||||
+ set(SDL2_LIBRARY SDL2::SDL2 winmm.lib imm32.lib version.lib)
|
||||
endif()
|
||||
endif()
|
||||
|
119
ports/ogre-next/portfile.cmake
Normal file
119
ports/ogre-next/portfile.cmake
Normal file
@ -0,0 +1,119 @@
|
||||
# This portfile is based (shamelessly copied and adapted a bit) on 'ogre' portfile.
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
if(NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
message("${PORT} currently requires the following library from the system package manager:\n Xaw\n\nIt can be installed on Ubuntu systems via apt-get install libxaw7-dev")
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO OGRECave/ogre-next
|
||||
REF 8083067c1835147de5d82015347d95c710e36bc0
|
||||
SHA512 2660f739def7076b42009ba932a27532f2a20e7be8ec2674aff29116c7dcd7f2d75564d8ce07bef3dba13ece5293d604573ad4f8734f6086c1750127f52834cd
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
toolchain_fixes.patch
|
||||
rename_config_cmake.patch
|
||||
fix_find_package_sdl2.patch
|
||||
)
|
||||
|
||||
file(REMOVE "${SOURCE_PATH}/CMake/Packages/FindOpenEXR.cmake")
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
set(OGRE_STATIC ON)
|
||||
else()
|
||||
set(OGRE_STATIC OFF)
|
||||
endif()
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
d3d9 OGRE_BUILD_RENDERSYSTEM_D3D9
|
||||
java OGRE_BUILD_COMPONENT_JAVA
|
||||
python OGRE_BUILD_COMPONENT_PYTHON
|
||||
csharp OGRE_BUILD_COMPONENT_CSHARP
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
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_CONFIG_THREAD_PROVIDER=std
|
||||
-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
|
||||
${FEATURE_OPTIONS}
|
||||
# vcpkg specific stuff
|
||||
-DOGRE_CMAKE_DIR=share/ogre-next
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
file(GLOB REL_CFGS ${CURRENT_PACKAGES_DIR}/bin/*.cfg)
|
||||
if(REL_CFGS)
|
||||
file(COPY ${REL_CFGS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
file(REMOVE ${REL_CFGS})
|
||||
endif()
|
||||
|
||||
file(GLOB DBG_CFGS ${CURRENT_PACKAGES_DIR}/debug/bin/*.cfg)
|
||||
if(DBG_CFGS)
|
||||
file(COPY ${DBG_CFGS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
file(REMOVE ${DBG_CFGS})
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
|
||||
#Remove OgreMain*.lib from lib/ folder, because autolink would complain, since it defines a main symbol
|
||||
#manual-link subfolder is here to the rescue!
|
||||
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Release")
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/OgreMain.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/OgreMain.lib)
|
||||
else()
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/OgreMainStatic.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/OgreMainStatic.lib)
|
||||
endif()
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Debug")
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/OgreMain_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/OgreMain_d.lib)
|
||||
else()
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/OgreMainStatic_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/OgreMainStatic_d.lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(GLOB SHARE_FILES ${CURRENT_PACKAGES_DIR}/share/ogre-next/*.cmake)
|
||||
foreach(SHARE_FILE ${SHARE_FILES})
|
||||
file(READ "${SHARE_FILE}" _contents)
|
||||
string(REPLACE "lib/OgreMain" "lib/manual-link/OgreMain" _contents "${_contents}")
|
||||
file(WRITE "${SHARE_FILE}" "${_contents}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ogre-next RENAME copyright)
|
||||
|
||||
vcpkg_copy_pdbs()
|
22
ports/ogre-next/rename_config_cmake.patch
Normal file
22
ports/ogre-next/rename_config_cmake.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git a/CMake/InstallResources.cmake b/CMake/InstallResources.cmake
|
||||
index 79f7514..79bc033 100644
|
||||
--- a/CMake/InstallResources.cmake
|
||||
+++ b/CMake/InstallResources.cmake
|
||||
@@ -215,7 +215,7 @@ if(NOT DEFINED OGRE_CMAKE_DIR)
|
||||
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
|
||||
+configure_package_config_file(${OGRE_TEMPLATES_DIR}/OGREConfig.cmake.in ${PROJECT_BINARY_DIR}/cmake/ogre-nextConfig.cmake
|
||||
INSTALL_DESTINATION ${OGRE_CMAKE_DIR}
|
||||
PATH_VARS CMAKE_INSTALL_PREFIX)
|
||||
write_basic_package_version_file(
|
||||
@@ -223,7 +223,7 @@ write_basic_package_version_file(
|
||||
VERSION ${OGRE_VERSION}
|
||||
COMPATIBILITY SameMajorVersion)
|
||||
install(FILES
|
||||
- ${PROJECT_BINARY_DIR}/cmake/OGREConfig.cmake
|
||||
+ ${PROJECT_BINARY_DIR}/cmake/ogre-nextConfig.cmake
|
||||
${PROJECT_BINARY_DIR}/cmake/OGREConfigVersion.cmake
|
||||
DESTINATION ${OGRE_CMAKE_DIR}
|
||||
)
|
291
ports/ogre-next/toolchain_fixes.patch
Normal file
291
ports/ogre-next/toolchain_fixes.patch
Normal file
@ -0,0 +1,291 @@
|
||||
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}
|
||||
diff --git a/CMake/Packages/FindCg.cmake b/CMake/Packages/FindCg.cmake
|
||||
index 4501cf9..7eb57c3 100644
|
||||
--- a/CMake/Packages/FindCg.cmake
|
||||
+++ b/CMake/Packages/FindCg.cmake
|
||||
@@ -56,7 +56,7 @@ endif()
|
||||
|
||||
find_library(Cg_LIBRARY_REL NAMES ${Cg_LIBRARY_NAMES} HINTS ${Cg_LIB_SEARCH_PATH} ${Cg_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel)
|
||||
find_library(Cg_LIBRARY_DBG NAMES ${Cg_LIBRARY_NAMES_DBG} HINTS ${Cg_LIB_SEARCH_PATH} ${Cg_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug)
|
||||
-make_library_set(Cg_LIBRARY)
|
||||
+make_library_set(Cg)
|
||||
|
||||
if (WIN32)
|
||||
if (CMAKE_CL_64)
|
||||
diff --git a/CMake/Packages/FindFreeImage.cmake b/CMake/Packages/FindFreeImage.cmake
|
||||
index 7c89ec5..d8314f0 100644
|
||||
--- a/CMake/Packages/FindFreeImage.cmake
|
||||
+++ b/CMake/Packages/FindFreeImage.cmake
|
||||
@@ -43,7 +43,7 @@ find_path(FreeImage_INCLUDE_DIR NAMES FreeImage.h HINTS ${FreeImage_INC_SEARCH_P
|
||||
find_library(FreeImage_LIBRARY_REL NAMES ${FreeImage_LIBRARY_NAMES} HINTS ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel)
|
||||
find_library(FreeImage_LIBRARY_DBG NAMES ${FreeImage_LIBRARY_NAMES_DBG} HINTS ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug)
|
||||
|
||||
-make_library_set(FreeImage_LIBRARY)
|
||||
+make_library_set(FreeImage)
|
||||
|
||||
findpkg_finish(FreeImage)
|
||||
|
||||
diff --git a/CMake/Packages/FindGLSLOptimizer.cmake b/CMake/Packages/FindGLSLOptimizer.cmake
|
||||
index dd4b179..6f158fc 100644
|
||||
--- a/CMake/Packages/FindGLSLOptimizer.cmake
|
||||
+++ b/CMake/Packages/FindGLSLOptimizer.cmake
|
||||
@@ -38,7 +38,7 @@ findpkg_framework(GLSL_Optimizer)
|
||||
find_path(GLSL_Optimizer_INCLUDE_DIR NAMES glsl_optimizer.h HINTS ${GLSL_Optimizer_INC_SEARCH_PATH} ${GLSL_Optimizer_PKGC_INCLUDE_DIRS} PATH_SUFFIXES GLSL_Optimizer)
|
||||
find_library(GLSL_Optimizer_LIBRARY_REL NAMES ${GLSL_Optimizer_LIBRARY_NAMES} HINTS ${GLSL_Optimizer_LIB_SEARCH_PATH} ${GLSL_Optimizer_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel)
|
||||
find_library(GLSL_Optimizer_LIBRARY_DBG NAMES ${GLSL_Optimizer_LIBRARY_NAMES_DBG} HINTS ${GLSL_Optimizer_LIB_SEARCH_PATH} ${GLSL_Optimizer_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug)
|
||||
-make_library_set(GLSL_Optimizer_LIBRARY)
|
||||
+make_library_set(GLSL_Optimizer)
|
||||
|
||||
findpkg_finish(GLSL_Optimizer)
|
||||
add_parent_dir(GLSL_Optimizer_INCLUDE_DIRS GLSL_Optimizer_INCLUDE_DIR)
|
||||
diff --git a/CMake/Packages/FindHLSL2GLSL.cmake b/CMake/Packages/FindHLSL2GLSL.cmake
|
||||
index 7125895..13a306f 100644
|
||||
--- a/CMake/Packages/FindHLSL2GLSL.cmake
|
||||
+++ b/CMake/Packages/FindHLSL2GLSL.cmake
|
||||
@@ -38,7 +38,7 @@ findpkg_framework(HLSL2GLSL)
|
||||
find_path(HLSL2GLSL_INCLUDE_DIR NAMES hlsl2glsl.h HINTS ${HLSL2GLSL_INC_SEARCH_PATH} ${HLSL2GLSL_PKGC_INCLUDE_DIRS} PATH_SUFFIXES HLSL2GLSL)
|
||||
find_library(HLSL2GLSL_LIBRARY_REL NAMES ${HLSL2GLSL_LIBRARY_NAMES} HINTS ${HLSL2GLSL_LIB_SEARCH_PATH} ${HLSL2GLSL_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel)
|
||||
find_library(HLSL2GLSL_LIBRARY_DBG NAMES ${HLSL2GLSL_LIBRARY_NAMES_DBG} HINTS ${HLSL2GLSL_LIB_SEARCH_PATH} ${HLSL2GLSL_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug)
|
||||
-make_library_set(HLSL2GLSL_LIBRARY)
|
||||
+make_library_set(HLSL2GLSL)
|
||||
|
||||
findpkg_finish(HLSL2GLSL)
|
||||
add_parent_dir(HLSL2GLSL_INCLUDE_DIRS HLSL2GLSL_INCLUDE_DIR)
|
||||
diff --git a/CMake/Packages/FindNVAPI.cmake b/CMake/Packages/FindNVAPI.cmake
|
||||
index 2b9deba..f33a298 100644
|
||||
--- a/CMake/Packages/FindNVAPI.cmake
|
||||
+++ b/CMake/Packages/FindNVAPI.cmake
|
||||
@@ -44,7 +44,7 @@ findpkg_framework(NVAPI)
|
||||
find_path(NVAPI_INCLUDE_DIR NAMES nvapi.h HINTS ${NVAPI_FRAMEWORK_INCLUDES} ${NVAPI_INC_SEARCH_PATH} ${NVAPI_PKGC_INCLUDE_DIRS} PATH_SUFFIXES NVAPI)
|
||||
find_library(NVAPI_LIBRARY_REL NAMES ${NVAPI_LIBRARY_NAMES} HINTS ${NVAPI_LIB_SEARCH_PATH} ${NVAPI_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel)
|
||||
find_library(NVAPI_LIBRARY_DBG NAMES ${NVAPI_LIBRARY_NAMES_DBG} HINTS ${NVAPI_LIB_SEARCH_PATH} ${NVAPI_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug)
|
||||
-make_library_set(NVAPI_LIBRARY)
|
||||
+make_library_set(NVAPI)
|
||||
|
||||
findpkg_finish(NVAPI)
|
||||
add_parent_dir(NVAPI_INCLUDE_DIRS NVAPI_INCLUDE_DIR)
|
||||
\ No newline at end of file
|
||||
diff --git a/CMake/Packages/FindPOCO.cmake b/CMake/Packages/FindPOCO.cmake
|
||||
index 6b6d7fa..3667b8b 100644
|
||||
--- a/CMake/Packages/FindPOCO.cmake
|
||||
+++ b/CMake/Packages/FindPOCO.cmake
|
||||
@@ -50,7 +50,7 @@ findpkg_framework(POCO)
|
||||
find_path(POCO_INCLUDE_DIR NAMES Poco/Foundation.h HINTS ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Foundation/include)
|
||||
find_library(POCO_LIBRARY_REL NAMES ${POCO_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
|
||||
find_library(POCO_LIBRARY_DBG NAMES ${POCO_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
|
||||
-make_library_set(POCO_LIBRARY)
|
||||
+make_library_set(POCO)
|
||||
|
||||
findpkg_finish(POCO)
|
||||
|
||||
@@ -66,7 +66,7 @@ get_debug_names(POCO_Util_LIBRARY_NAMES)
|
||||
find_path(POCO_Util_INCLUDE_DIR NAMES Poco/Util/Util.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Util/include)
|
||||
find_library(POCO_Util_LIBRARY_REL NAMES ${POCO_Util_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
|
||||
find_library(POCO_Util_LIBRARY_DBG NAMES ${POCO_Util_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
|
||||
-make_library_set(POCO_Util_LIBRARY)
|
||||
+make_library_set(POCO_Util)
|
||||
findpkg_finish(POCO_Util)
|
||||
|
||||
# Look for Poco's Net package
|
||||
@@ -76,7 +76,7 @@ get_debug_names(POCO_Net_LIBRARY_NAMES)
|
||||
find_path(POCO_Net_INCLUDE_DIR NAMES Poco/Net/Net.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Net/include)
|
||||
find_library(POCO_Net_LIBRARY_REL NAMES ${POCO_Net_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
|
||||
find_library(POCO_Net_LIBRARY_DBG NAMES ${POCO_Net_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
|
||||
-make_library_set(POCO_Net_LIBRARY)
|
||||
+make_library_set(POCO_Net)
|
||||
findpkg_finish(POCO_Net)
|
||||
|
||||
# Look for Poco's NetSSL package
|
||||
@@ -86,7 +86,7 @@ get_debug_names(POCO_NetSSL_LIBRARY_NAMES)
|
||||
find_path(POCO_NetSSL_INCLUDE_DIR NAMES Poco/Net/NetSSL.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES NetSSL/include)
|
||||
find_library(POCO_NetSSL_LIBRARY_REL NAMES ${POCO_NetSSL_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
|
||||
find_library(POCO_NetSSL_LIBRARY_DBG NAMES ${POCO_NetSSL_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
|
||||
-make_library_set(POCO_NetSSL_LIBRARY)
|
||||
+make_library_set(POCO_NetSSL)
|
||||
findpkg_finish(POCO_NetSSL)
|
||||
|
||||
# Look for Poco's XML package
|
||||
@@ -96,6 +96,6 @@ get_debug_names(POCO_XML_LIBRARY_NAMES)
|
||||
find_path(POCO_XML_INCLUDE_DIR NAMES Poco/XML/XML.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES XML/include)
|
||||
find_library(POCO_XML_LIBRARY_REL NAMES ${POCO_XML_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
|
||||
find_library(POCO_XML_LIBRARY_DBG NAMES ${POCO_XML_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
|
||||
-make_library_set(POCO_XML_LIBRARY)
|
||||
+make_library_set(POCO_XML)
|
||||
findpkg_finish(POCO_XML)
|
||||
|
||||
diff --git a/CMake/Packages/FindTBB.cmake b/CMake/Packages/FindTBB.cmake
|
||||
index 0c48510..c121966 100644
|
||||
--- a/CMake/Packages/FindTBB.cmake
|
||||
+++ b/CMake/Packages/FindTBB.cmake
|
||||
@@ -104,7 +104,7 @@ findpkg_framework(TBB)
|
||||
find_path(TBB_INCLUDE_DIR NAMES tbb/tbb.h HINTS ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS})
|
||||
find_library(TBB_LIBRARY_REL NAMES ${TBB_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS})
|
||||
find_library(TBB_LIBRARY_DBG NAMES ${TBB_LIBRARY_NAMES_DBG} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS})
|
||||
-make_library_set(TBB_LIBRARY)
|
||||
+make_library_set(TBB)
|
||||
|
||||
findpkg_finish(TBB)
|
||||
|
||||
@@ -120,7 +120,7 @@ get_debug_names(TBB_MALLOC_LIBRARY_NAMES)
|
||||
find_path(TBB_MALLOC_INCLUDE_DIR NAMES tbb/tbb.h HINTS ${TBB_INCLUDE_DIR} ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS} )
|
||||
find_library(TBB_MALLOC_LIBRARY_REL NAMES ${TBB_MALLOC_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS} )
|
||||
find_library(TBB_MALLOC_LIBRARY_DBG NAMES ${TBB_MALLOC_LIBRARY_NAMES_DBG} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS} )
|
||||
-make_library_set(TBB_MALLOC_LIBRARY)
|
||||
+make_library_set(TBB_MALLOC)
|
||||
findpkg_finish(TBB_MALLOC)
|
||||
|
||||
# Look for TBB's malloc proxy package
|
||||
@@ -130,5 +130,5 @@ get_debug_names(TBB_MALLOC_PROXY_LIBRARY_NAMES)
|
||||
find_path(TBB_MALLOC_PROXY_INCLUDE_DIR NAMES tbb/tbbmalloc_proxy.h HINTS ${TBB_INCLUDE_DIR} ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS})
|
||||
find_library(TBB_MALLOC_PROXY_LIBRARY_REL NAMES ${TBB_MALLOC_PROXY_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS})
|
||||
find_library(TBB_MALLOC_PROXY_LIBRARY_DBG NAMES ${TBB_MALLOC_PROXY_LIBRARY_NAMES_DBG} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS})
|
||||
-make_library_set(TBB_MALLOC_PROXY_LIBRARY)
|
||||
+make_library_set(TBB_MALLOC_PROXY)
|
||||
findpkg_finish(TBB_MALLOC_PROXY)
|
||||
diff --git a/CMake/Packages/FindZZip.cmake b/CMake/Packages/FindZZip.cmake
|
||||
index e97951e..54c2567 100644
|
||||
--- a/CMake/Packages/FindZZip.cmake
|
||||
+++ b/CMake/Packages/FindZZip.cmake
|
||||
@@ -39,12 +39,12 @@ use_pkgconfig(ZZip_PKGC zziplib)
|
||||
|
||||
findpkg_framework(ZZip)
|
||||
|
||||
-find_path(ZZip_INCLUDE_DIR NAMES zzip/zzip.h HINTS ${ZZip_INC_SEARCH_PATH} ${ZZip_PKGC_INCLUDE_DIRS})
|
||||
+find_path(ZZip_INCLUDE_DIRS NAMES zzip/zzip.h HINTS ${ZZip_INC_SEARCH_PATH} ${ZZip_PKGC_INCLUDE_DIRS})
|
||||
|
||||
find_library(ZZip_LIBRARY_REL NAMES ${ZZip_LIBRARY_NAMES} HINTS ${ZZip_LIB_SEARCH_PATH} ${ZZip_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel)
|
||||
find_library(ZZip_LIBRARY_DBG NAMES ${ZZip_LIBRARY_NAMES_DBG} HINTS ${ZZip_LIB_SEARCH_PATH} ${ZZip_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug)
|
||||
|
||||
-make_library_set(ZZip_LIBRARY)
|
||||
+make_library_set(ZZip)
|
||||
|
||||
findpkg_finish(ZZip)
|
||||
|
||||
diff --git a/CMake/Utils/FindPkgMacros.cmake b/CMake/Utils/FindPkgMacros.cmake
|
||||
index 374f84b..dc7066d 100644
|
||||
--- a/CMake/Utils/FindPkgMacros.cmake
|
||||
+++ b/CMake/Utils/FindPkgMacros.cmake
|
||||
@@ -79,15 +79,21 @@ endmacro (use_pkgconfig)
|
||||
|
||||
# Couple a set of release AND debug libraries (or frameworks)
|
||||
macro(make_library_set PREFIX)
|
||||
- if (${PREFIX}_FWK)
|
||||
- set(${PREFIX} ${${PREFIX}_FWK})
|
||||
- elseif (${PREFIX}_REL AND ${PREFIX}_DBG)
|
||||
- set(${PREFIX} optimized ${${PREFIX}_REL} debug ${${PREFIX}_DBG})
|
||||
- elseif (${PREFIX}_REL)
|
||||
- set(${PREFIX} ${${PREFIX}_REL})
|
||||
- elseif (${PREFIX}_DBG)
|
||||
- set(${PREFIX} ${${PREFIX}_DBG})
|
||||
- endif ()
|
||||
+ include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
|
||||
+ set(PREFIX_LIB "${PREFIX}_LIBRARY")
|
||||
+ if (${PREFIX_LIB}_FWK)
|
||||
+ set(${PREFIX_LIB} ${${PREFIX_LIB}_FWK})
|
||||
+ elseif (${PREFIX_LIB}_REL AND ${PREFIX_LIB}_DBG)
|
||||
+ set(${PREFIX_LIB}_RELEASE ${${PREFIX_LIB}_REL} CACHE STRING "")
|
||||
+ set(${PREFIX_LIB}_DEBUG ${${PREFIX_LIB}_DBG} CACHE STRING "")
|
||||
+ select_library_configurations(${PREFIX})
|
||||
+ elseif (${PREFIX_LIB}_REL)
|
||||
+ set(${PREFIX_LIB} ${${PREFIX_LIB}_REL})
|
||||
+ set(${PREFIX_LIB}_RELEASE ${${PREFIX_LIB}_REL})
|
||||
+ elseif (${PREFIX_LIB}_DBG)
|
||||
+ set(${PREFIX_LIB} ${${PREFIX_LIB}_DBG})
|
||||
+ set(${PREFIX_LIB}_DEBUG ${${PREFIX_LIB}_DBG})
|
||||
+ endif()
|
||||
endmacro(make_library_set)
|
||||
|
||||
# Generate debug names from given release names
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3e09d2d..58968f0 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -274,7 +274,7 @@ elseif(EMSCRIPTEN)
|
||||
elseif (APPLE AND NOT APPLE_IOS)
|
||||
|
||||
set(XCODE_ATTRIBUTE_SDKROOT macosx)
|
||||
- if(CMAKE_GENERATOR STREQUAL "Unix Makefiles")
|
||||
+ if(1)
|
||||
execute_process(COMMAND xcodebuild -version -sdk "${XCODE_ATTRIBUTE_SDKROOT}" Path | head -n 1 OUTPUT_VARIABLE CMAKE_OSX_SYSROOT)
|
||||
string(REGEX REPLACE "(\r?\n)+$" "" CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}")
|
||||
else()
|
||||
diff --git a/Components/Overlay/CMakeLists.txt b/Components/Overlay/CMakeLists.txt
|
||||
index bdb303d..d9cc221 100644
|
||||
--- a/Components/Overlay/CMakeLists.txt
|
||||
+++ b/Components/Overlay/CMakeLists.txt
|
||||
@@ -21,7 +21,7 @@ file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
|
||||
# setup target
|
||||
add_library(OgreOverlay ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES} ${PLATFORM_HEADER_FILES} ${PLATFORM_SOURCE_FILES})
|
||||
set_target_properties(OgreOverlay PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION})
|
||||
-target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE "${FREETYPE_LIBRARIES}" ZLIB::ZLIB)
|
||||
+target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE ${FREETYPE_LIBRARIES} ZLIB::ZLIB)
|
||||
target_include_directories(OgreOverlay PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
||||
$<INSTALL_INTERFACE:include/OGRE/Overlay>
|
||||
diff --git a/OgreMain/CMakeLists.txt b/OgreMain/CMakeLists.txt
|
||||
index 6ec4e34..cc9cb9d 100644
|
||||
--- a/OgreMain/CMakeLists.txt
|
||||
+++ b/OgreMain/CMakeLists.txt
|
||||
@@ -225,8 +225,6 @@ if (APPLE)
|
||||
set_target_properties(OgreMain PROPERTIES
|
||||
LINK_FLAGS "-framework IOKit -framework Cocoa -framework Carbon -framework OpenGL -framework CoreVideo"
|
||||
)
|
||||
-
|
||||
- set(OGRE_OSX_BUILD_CONFIGURATION "$(PLATFORM_NAME)/$(CONFIGURATION)")
|
||||
|
||||
if(OGRE_BUILD_LIBS_AS_FRAMEWORKS)
|
||||
add_custom_command(TARGET OgreMain POST_BUILD
|
||||
diff --git a/PlugIns/EXRCodec/CMakeLists.txt b/PlugIns/EXRCodec/CMakeLists.txt
|
||||
index e9c936a..bb8747e 100644
|
||||
--- a/PlugIns/EXRCodec/CMakeLists.txt
|
||||
+++ b/PlugIns/EXRCodec/CMakeLists.txt
|
||||
@@ -16,7 +16,7 @@ target_link_libraries(Codec_EXR OgreMain ${OPENEXR_LIBRARIES})
|
||||
target_include_directories(Codec_EXR PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
||||
$<INSTALL_INTERFACE:include/OGRE/Plugins/EXRCodec>)
|
||||
-target_include_directories(Codec_EXR SYSTEM PRIVATE "${OPENEXR_INCLUDE_DIR}/OpenEXR")
|
||||
+target_include_directories(Codec_EXR SYSTEM PRIVATE "${OPENEXR_INCLUDE_DIR}")
|
||||
|
||||
ogre_config_framework(Codec_EXR)
|
||||
ogre_config_plugin(Codec_EXR)
|
Loading…
Reference in New Issue
Block a user