Skip to content

Commit

Permalink
Repair assimp feature
Browse files Browse the repository at this point in the history
  • Loading branch information
dg0yt committed Sep 25, 2022
1 parent 761577c commit 9239a80
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
10 changes: 6 additions & 4 deletions ports/ogre/fix-dependencies.patch
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ index 73606c9..540ac6e 100644
else ()
configure_file(${OGRE_TEMPLATES_DIR}/OGRE.pc.in ${PROJECT_BINARY_DIR}/pkgconfig/OGRE.pc @ONLY)
diff --git a/CMake/Dependencies.cmake b/CMake/Dependencies.cmake
index 2ae0b66..283a475 100644
index 2ae0b66..1954a3f 100644
--- a/CMake/Dependencies.cmake
+++ b/CMake/Dependencies.cmake
@@ -233,16 +233,19 @@ macro_log_feature(ZLIB_FOUND "zlib" "Simple data compression library" "http://ww
Expand Down Expand Up @@ -76,7 +76,7 @@ index 2ae0b66..283a475 100644

# Assimp
-find_package(ASSIMP QUIET)
+find_package(ASSIMP NAMES assimp REQUIRED)
+find_package(ASSIMP NAMES assimp)
macro_log_feature(ASSIMP_FOUND "Assimp" "Needed for the AssimpLoader Plugin" "https://www.assimp.org/" FALSE "" "")

if(ASSIMP_FOUND)
Expand All @@ -98,7 +98,7 @@ diff --git a/CMake/Templates/OGREConfig.cmake.in b/CMake/Templates/OGREConfig.cm
index 392c89c..266ba3a 100644
--- a/CMake/Templates/OGREConfig.cmake.in
+++ b/CMake/Templates/OGREConfig.cmake.in
@@ -32,6 +32,27 @@ get_filename_component(OGRE_LIBRARY_DIRS "${OGRE_PREFIX_DIR}/lib" ABSOLUTE)
@@ -32,6 +32,29 @@ get_filename_component(OGRE_LIBRARY_DIRS "${OGRE_PREFIX_DIR}/lib" ABSOLUTE)
get_filename_component(OGRE_INCLUDE_DIRS "${OGRE_PREFIX_DIR}/include/OGRE" ABSOLUTE)
set(OGRE_LIBRARIES)

Expand All @@ -107,7 +107,6 @@ index 392c89c..266ba3a 100644
+find_dependency(pugixml CONFIG)
+find_dependency(SDL2 CONFIG)
+find_dependency(ZLIB)
+find_dependency(assimp CONFIG)
+find_dependency(freetype CONFIG)
+
+if(@OGRE_CONFIG_ENABLE_ZIP@)
Expand All @@ -116,6 +115,9 @@ index 392c89c..266ba3a 100644
+if (@OGRE_BUILD_COMPONENT_OVERLAY_IMGUI@)
+ find_dependency(imgui CONFIG)
+endif()
+if(@OGRE_BUILD_PLUGIN_ASSIMP@)
+ find_dependency(assimp CONFIG)
+endif()
+if(@OGRE_BUILD_PLUGIN_FREEIMAGE@)
+ find_dependency(freeimage CONFIG)
+endif()
Expand Down
7 changes: 6 additions & 1 deletion ports/ogre/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ endif()

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
assimp OGRE_BUILD_PLUGIN_ASSIMP
assimp CMAKE_REQUIRE_FIND_PACKAGE_ASSIMP
d3d9 OGRE_BUILD_RENDERSYSTEM_D3D9
freeimage OGRE_BUILD_PLUGIN_FREEIMAGE
freeimage CMAKE_REQUIRE_FIND_PACKAGE_FreeImage
Expand Down Expand Up @@ -113,7 +115,10 @@ if(DBG_CFGS)
file(REMOVE ${DBG_CFGS})
endif()

set(tools OgreAssimpConverter OgreMeshUpgrader OgreXMLConverter VRMLConverter)
set(tools OgreMeshUpgrader OgreXMLConverter VRMLConverter)
if(OGRE_BUILD_PLUGIN_ASSIMP)
list(APPEND tools OgreAssimpConverter)
endif()
if(OGRE_BUILD_TOOLS)
vcpkg_copy_tools(TOOL_NAMES ${tools} AUTO_CLEAN)
endif()
Expand Down
6 changes: 4 additions & 2 deletions ports/ogre/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"homepage": "https://github.com/OGRECave/ogre",
"license": "MIT",
"dependencies": [
"assimp",
"pugixml",
"sdl2",
{
Expand All @@ -27,7 +26,10 @@
],
"features": {
"assimp": {
"description": "Deprecate feature, enable by default"
"description": "Build with assimp support",
"dependencies": [
"assimp"
]
},
"csharp": {
"description": "Build csharp bindings"
Expand Down

0 comments on commit 9239a80

Please sign in to comment.