🐛 Fixed caelum patch
This commit is contained in:
parent
da749af80e
commit
7026ce1c40
@ -7,4 +7,7 @@ sources:
|
|||||||
sha256: "deffe26ba169d89954f62ade50e856fdae293078c73836378d7bf3051eff0a8d"
|
sha256: "deffe26ba169d89954f62ade50e856fdae293078c73836378d7bf3051eff0a8d"
|
||||||
"2022.08":
|
"2022.08":
|
||||||
url: "https://github.com/OGRECave/ogre-caelum/archive/4bd1b0581d55896d37922483981582661ca557de.zip"
|
url: "https://github.com/OGRECave/ogre-caelum/archive/4bd1b0581d55896d37922483981582661ca557de.zip"
|
||||||
sha256: "deffe26ba169d89954f62ade50e856fdae293078c73836378d7bf3051eff0a8d"
|
sha256: "deffe26ba169d89954f62ade50e856fdae293078c73836378d7bf3051eff0a8d"
|
||||||
|
patches:
|
||||||
|
"2022.08":
|
||||||
|
- patch_file: "patches/2022.08/CMakeLists.txt.patch"
|
@ -1,8 +1,14 @@
|
|||||||
from conan import ConanFile
|
from conan import ConanFile
|
||||||
from conan.tools.files import get, collect_libs, replace_in_file
|
from conan.tools.files import (
|
||||||
|
get,
|
||||||
|
collect_libs,
|
||||||
|
apply_conandata_patches,
|
||||||
|
export_conandata_patches,
|
||||||
|
)
|
||||||
from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
|
from conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps, cmake_layout
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
class CaelumConan(ConanFile):
|
class CaelumConan(ConanFile):
|
||||||
name = "ogre3d-caelum"
|
name = "ogre3d-caelum"
|
||||||
license = "GNU Lesser General Public License v2.1"
|
license = "GNU Lesser General Public License v2.1"
|
||||||
@ -10,6 +16,9 @@ class CaelumConan(ConanFile):
|
|||||||
description = "Library for rendering of dynamic and realistic skies"
|
description = "Library for rendering of dynamic and realistic skies"
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
settings = "os", "compiler", "build_type", "arch"
|
||||||
|
|
||||||
|
def export_sources(self):
|
||||||
|
export_conandata_patches(self)
|
||||||
|
|
||||||
def layout(self):
|
def layout(self):
|
||||||
cmake_layout(self)
|
cmake_layout(self)
|
||||||
|
|
||||||
@ -27,11 +36,7 @@ class CaelumConan(ConanFile):
|
|||||||
deps.generate()
|
deps.generate()
|
||||||
|
|
||||||
def _patch_sources(self):
|
def _patch_sources(self):
|
||||||
replace_in_file(self,
|
apply_conandata_patches(self)
|
||||||
os.path.join(self.source_folder, "main/CMakeLists.txt"),
|
|
||||||
"OgreMain",
|
|
||||||
"OGRE::OGRE",
|
|
||||||
)
|
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
self._patch_sources()
|
self._patch_sources()
|
||||||
@ -48,10 +53,7 @@ class CaelumConan(ConanFile):
|
|||||||
self.cpp_info.set_property("cmake_module_target_name", "Caelum::Caelum")
|
self.cpp_info.set_property("cmake_module_target_name", "Caelum::Caelum")
|
||||||
self.cpp_info.set_property("cmake_file_name", "Caelum")
|
self.cpp_info.set_property("cmake_file_name", "Caelum")
|
||||||
self.cpp_info.set_property("cmake_target_name", "Caelum::Caelum")
|
self.cpp_info.set_property("cmake_target_name", "Caelum::Caelum")
|
||||||
self.cpp_info.includedirs = [
|
self.cpp_info.includedirs = ["include", "include/Caelum"]
|
||||||
'include',
|
|
||||||
'include/Caelum'
|
|
||||||
]
|
|
||||||
self.cpp_info.libs = collect_libs(self)
|
self.cpp_info.libs = collect_libs(self)
|
||||||
|
|
||||||
def package_id(self):
|
def package_id(self):
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
--- CMakeLists.txt
|
|
||||||
+++ CMakeLists.txt
|
|
||||||
@@ -7,7 +7,7 @@
|
|
||||||
# cmake system for Caelum updated on 6-10-2017 by Edgar{at}AnotherFoxGuy{DOT}com
|
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.0.2)
|
|
||||||
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
|
|
||||||
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake)
|
|
||||||
|
|
||||||
|
|
||||||
# add some functions we use that are shipped with cmake
|
|
||||||
@@ -34,7 +34,7 @@
|
|
||||||
|
|
||||||
SET(CMAKE_USE_RELATIVE_PATHS OFF)
|
|
||||||
|
|
||||||
-find_package(OGRE REQUIRED CONFIG)
|
|
||||||
+find_package(OGRE REQUIRED)
|
|
||||||
link_directories(${OGRE_LIBRARY_DIRS})
|
|
||||||
|
|
||||||
# setup paths
|
|
@ -1,25 +1,8 @@
|
|||||||
--- CMakeLists.txt
|
--- a/main/CMakeLists.txt
|
||||||
+++ CMakeLists.txt
|
+++ b/main/CMakeLists.txt
|
||||||
@@ -8,6 +8,8 @@
|
@@ -34,4 +34,4 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/main/include/ DESTINATION ${CMAKE_INSTALL_
|
||||||
|
install(DIRECTORY ${CMAKE_BINARY_DIR}/main/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Caelum FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE)
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.0.2)
|
# --- Ogre 3D graphics engine ---
|
||||||
|
-target_link_libraries(${CMAKE_PROJECT_NAME} PUBLIC OgreMain)
|
||||||
+set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR} ${CMAKE_MODULE_PATH})
|
+target_link_libraries(${CMAKE_PROJECT_NAME} PUBLIC OGRE::OGRE)
|
||||||
+set(CMAKE_DEBUG_POSTFIX _d)
|
|
||||||
# define the project
|
|
||||||
project(
|
|
||||||
Caelum
|
|
||||||
@@ -29,7 +31,12 @@
|
|
||||||
|
|
||||||
SET(CMAKE_USE_RELATIVE_PATHS OFF)
|
|
||||||
|
|
||||||
-find_package(OGRE REQUIRED CONFIG)
|
|
||||||
+find_package(OGRE REQUIRED)
|
|
||||||
+
|
|
||||||
+add_library(OgreMain INTERFACE IMPORTED GLOBAL)
|
|
||||||
+target_include_directories(OgreMain INTERFACE ${OGRE_INCLUDE_DIRS})
|
|
||||||
+target_link_libraries(OgreMain INTERFACE ${OGRE_LIBRARIES})
|
|
||||||
+
|
|
||||||
|
|
||||||
# setup paths
|
|
||||||
SET(RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin/")
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user