Skip to content

Commit

Permalink
ogre: migrate to Conan v2, bump to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Apr 20, 2024
1 parent 4d82681 commit d781d9d
Show file tree
Hide file tree
Showing 10 changed files with 676 additions and 861 deletions.
50 changes: 45 additions & 5 deletions recipes/ogre/1.x/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,47 @@
cmake_minimum_required(VERSION 3.10.2)
project(cmake_wrapper)
cmake_minimum_required(VERSION 3.15)
project(OGRE)

include(conanbuildinfo.cmake)
conan_basic_setup(TARGETS)
macro(custom_find_package name)
find_package(${name} ${ARGN}
# Allow only Conan packages
NO_DEFAULT_PATH
PATHS ${CMAKE_PREFIX_PATH}
)
string(TOUPPER ${name} name_upper)
set(${name_upper}_FOUND TRUE)
set(${name_upper}_VERSION_STRING ${${name}_VERSION_STRING})
set(${name_upper}_INCLUDE_DIRS ${${name}_INCLUDE_DIRS})
set(${name_upper}_INCLUDE_DIR ${${name}_INCLUDE_DIR})
set(${name_upper}_LIBRARIES ${${name}_LIBRARIES})
set(${name_upper}_DEFINITIONS ${${name}_DEFINITIONS})
unset(name_upper)
endmacro()

add_subdirectory(source_subfolder)
# Do not allow system Qt to be used by accident
set(CMAKE_DISABLE_FIND_PACKAGE_QT TRUE)
set(CMAKE_DISABLE_FIND_PACKAGE_Qt5 TRUE)
set(CMAKE_DISABLE_FIND_PACKAGE_Qt6 TRUE)

custom_find_package(FreeImage QUIET CONFIG)
custom_find_package(Freetype QUIET CONFIG)
custom_find_package(OpenEXR QUIET CONFIG)
custom_find_package(assimp QUIET CONFIG)
custom_find_package(pugixml REQUIRED CONFIG)

add_subdirectory(src)

if(TARGET Codec_FreeImage)
target_link_libraries(Codec_FreeImage PUBLIC freeimage::freeimage)
endif()
if(TARGET Codec_EXR)
target_link_libraries(Codec_EXR openexr::openexr)
endif()
if(TARGET OgreOverlay)
target_link_libraries(OgreOverlay PUBLIC Freetype::Freetype)
endif()
if(TARGET Plugin_DotScene)
target_link_libraries(Plugin_DotScene PUBLIC pugixml::pugixml)
endif()
if(TARGET OgreXMLConverter)
target_link_libraries(OgreXMLConverter pugixml::pugixml)
endif()
10 changes: 3 additions & 7 deletions recipes/ogre/1.x/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
sources:
"1.10.2":
url: "https://github.com/OGRECave/ogre/archive/refs/tags/v1.10.2.tar.gz"
sha256: "db022c682376ace2abc45b42802048ad3a8458f5052cbc180b5fb470e4f06a53"
patches:
"1.10.2":
- base_path: "source_subfolder"
patch_file: "patches/0001-ogre-1.10.2-cmake-fixes.patch"
"14.2.4":
url: "https://github.com/OGRECave/ogre/archive/refs/tags/v14.2.4.tar.gz"
sha256: "320cf8eb020e8848d5b7ed2efec260dbff5ae8013812d2f3aca1655df4e2282a"
852 changes: 567 additions & 285 deletions recipes/ogre/1.x/conanfile.py

Large diffs are not rendered by default.

Loading

0 comments on commit d781d9d

Please sign in to comment.