From 62e410495b5199189e79b5f3ee596999d5879660 Mon Sep 17 00:00:00 2001 From: Julianiolo <50519317+Julianiolo@users.noreply.github.com> Date: Thu, 11 Jul 2024 12:35:54 +0200 Subject: [PATCH 01/17] support custom frame control --- recipes/raylib/all/conanfile.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/recipes/raylib/all/conanfile.py b/recipes/raylib/all/conanfile.py index 38b018aee6008..55c6e10330b82 100644 --- a/recipes/raylib/all/conanfile.py +++ b/recipes/raylib/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save, replace_in_file from conan.tools.microsoft import is_msvc from conan.tools.scm import Version import os @@ -22,11 +22,13 @@ class RaylibConan(ConanFile): "shared": [True, False], "fPIC": [True, False], "opengl_version": [None, "4.3", "3.3", "2.1", "1.1", "ES-2.0"], + "custom_frame_control": [True, False] } default_options = { "shared": False, "fPIC": True, "opengl_version": None, + "custom_frame_control": False } def export_sources(self): @@ -80,6 +82,11 @@ def generate(self): def build(self): apply_conandata_patches(self) + + if self.options.custom_frame_control: + opt = "#define SUPPORT_CUSTOM_FRAME_CONTROL 1" + replace_in_file(self, os.path.join(self.source_folder, "src", "config.h"), "//"+opt, opt) + cmake = CMake(self) cmake.configure() cmake.build() From cf5f29e5f95961224488bece99c63f48360c3760 Mon Sep 17 00:00:00 2001 From: Julianiolo <50519317+Julianiolo@users.noreply.github.com> Date: Thu, 11 Jul 2024 12:48:36 +0200 Subject: [PATCH 02/17] add some more common settings --- recipes/raylib/all/conanfile.py | 36 +++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/recipes/raylib/all/conanfile.py b/recipes/raylib/all/conanfile.py index 55c6e10330b82..7c43ecc43810c 100644 --- a/recipes/raylib/all/conanfile.py +++ b/recipes/raylib/all/conanfile.py @@ -1,4 +1,5 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save, replace_in_file from conan.tools.microsoft import is_msvc @@ -22,12 +23,22 @@ class RaylibConan(ConanFile): "shared": [True, False], "fPIC": [True, False], "opengl_version": [None, "4.3", "3.3", "2.1", "1.1", "ES-2.0"], + "module_rshapes": [True, False], + "module_rtextures": [True, False], + "module_rtext": [True, False], + "module_rmodels": [True, False], + "module_raudio": [True, False], "custom_frame_control": [True, False] } default_options = { "shared": False, "fPIC": True, "opengl_version": None, + "module_rshapes": True, + "module_rtextures": True, + "module_rtext": True, + "module_rmodels": True, + "module_raudio": True, "custom_frame_control": False } @@ -56,6 +67,10 @@ def requirements(self): if self.settings.os == "Linux": self.requires("xorg/system") + def validate(self): + if self.options.module_rtext and not self.options.module_rtextures: + raise ConanInvalidConfiguration("Cannot build rtext without rtextures") + def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -83,9 +98,26 @@ def generate(self): def build(self): apply_conandata_patches(self) + config_file = os.path.join(self.source_folder, "src", "config.h") + if not self.options.module_rshapes: + opt = "#define SUPPORT_MODULE_RSHAPES" + replace_in_file(self, config_file, opt, "//"+opt, strict=True) + if not self.options.module_rtextures: + opt = "#define SUPPORT_MODULE_RTEXTURES" + replace_in_file(self, config_file, opt, "//"+opt, strict=True) + if not self.options.module_rtext: + opt = "#define SUPPORT_MODULE_RTEXT" + replace_in_file(self, config_file, opt, "//"+opt, strict=True) + if not self.options.module_rmodels: + opt = "#define SUPPORT_MODULE_RMODELS" + replace_in_file(self, config_file, opt, "//"+opt, strict=True) + if not self.options.module_raudio: + opt = "#define SUPPORT_MODULE_RAUDIO" + replace_in_file(self, config_file, opt, "//"+opt, strict=True) + if self.options.custom_frame_control: - opt = "#define SUPPORT_CUSTOM_FRAME_CONTROL 1" - replace_in_file(self, os.path.join(self.source_folder, "src", "config.h"), "//"+opt, opt) + opt = "#define SUPPORT_CUSTOM_FRAME_CONTROL" + replace_in_file(self, config_file, "//"+opt, opt, strict=True) cmake = CMake(self) cmake.configure() From 9fae9a8eaac7398d59283e6c045d0725dcc08f02 Mon Sep 17 00:00:00 2001 From: Julianiolo <50519317+Julianiolo@users.noreply.github.com> Date: Mon, 15 Jul 2024 12:10:34 +0200 Subject: [PATCH 03/17] Update recipes/raylib/all/conanfile.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Abril Rincón Blanco --- recipes/raylib/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/raylib/all/conanfile.py b/recipes/raylib/all/conanfile.py index 7c43ecc43810c..db7da7a177f5c 100644 --- a/recipes/raylib/all/conanfile.py +++ b/recipes/raylib/all/conanfile.py @@ -69,7 +69,7 @@ def requirements(self): def validate(self): if self.options.module_rtext and not self.options.module_rtextures: - raise ConanInvalidConfiguration("Cannot build rtext without rtextures") + raise ConanInvalidConfiguration('-o="raylib/*:module_rtext=True" needs -o="raylib/*:module_rtextures=True"') def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From f3052b52f9027af261043f5ce2c40af54ab6d15d Mon Sep 17 00:00:00 2001 From: Julianiolo <50519317+Julianiolo@users.noreply.github.com> Date: Mon, 15 Jul 2024 23:49:59 +0200 Subject: [PATCH 04/17] moved from patching defines to cmake options --- recipes/raylib/all/conanfile.py | 66 ++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 21 deletions(-) diff --git a/recipes/raylib/all/conanfile.py b/recipes/raylib/all/conanfile.py index db7da7a177f5c..4bc180cd181af 100644 --- a/recipes/raylib/all/conanfile.py +++ b/recipes/raylib/all/conanfile.py @@ -23,22 +23,42 @@ class RaylibConan(ConanFile): "shared": [True, False], "fPIC": [True, False], "opengl_version": [None, "4.3", "3.3", "2.1", "1.1", "ES-2.0"], + "module_rshapes": [True, False], "module_rtextures": [True, False], "module_rtext": [True, False], "module_rmodels": [True, False], "module_raudio": [True, False], + + "mouse_gestures": [True, False], + "default_font": [True, False], + "screen_capture": [True, False], + "gif_recording": [True, False], + "busy_wait_loop": [True, False], + "events_waiting": [True, False], + "compression_api": [True, False], + "events_automation": [True, False], "custom_frame_control": [True, False] } default_options = { "shared": False, "fPIC": True, "opengl_version": None, + "module_rshapes": True, "module_rtextures": True, "module_rtext": True, "module_rmodels": True, "module_raudio": True, + + "mouse_gestures": True, + "default_font": True, + "screen_capture": True, + "gif_recording": True, + "busy_wait_loop": False, + "events_waiting": False, + "compression_api": True, + "events_automation": False, "custom_frame_control": False } @@ -89,8 +109,33 @@ def generate(self): tc.variables["USE_EXTERNAL_GLFW"] = "ON" tc.variables["OPENGL_VERSION"] = "OFF" if not self.options.opengl_version else self.options.opengl_version tc.variables["WITH_PIC"] = self.options.get_safe("fPIC", True) + + tc.variables["CUSTOMIZE_BUILD"] = True + true_false = lambda x: True if x else False + tc.variables["SUPPORT_MODULE_RSHAPES"] = true_false(self.options.module_rshapes) + tc.variables["SUPPORT_MODULE_RTEXTURES"] = true_false(self.options.module_rtextures) + tc.variables["SUPPORT_MODULE_RTEXT"] = true_false(self.options.module_rtext) + tc.variables["SUPPORT_MODULE_RMODELS"] = true_false(self.options.module_rmodels) + tc.variables["SUPPORT_MODULE_RAUDIO"] = true_false(self.options.module_raudio) + + # this makes it include the headers rcamera.h, rgesture.h and rprand.h + tc.variables["SUPPORT_CAMERA_SYSTEM"] = True + tc.variables["SUPPORT_GESTURES_SYSTEM"] = True + tc.variables["SUPPORT_RPRAND_GENERATOR"] = True + + tc.variables["SUPPORT_MOUSE_GESTURES"] = true_false(self.options.mouse_gestures) + tc.variables["SUPPORT_DEFAULT_FONT"] = true_false(self.options.default_font) + tc.variables["SUPPORT_SCREEN_CAPTURE"] = true_false(self.options.screen_capture) + tc.variables["SUPPORT_GIF_RECORDING"] = true_false(self.options.gif_recording) + tc.variables["SUPPORT_BUSY_WAIT_LOOP"] = true_false(self.options.busy_wait_loop) + tc.variables["SUPPORT_EVENTS_WAITING"] = true_false(self.options.events_waiting) + tc.variables["SUPPORT_COMPRESSION_API"] = true_false(self.options.compression_api) + tc.variables["SUPPORT_EVENTS_AUTOMATION"] = true_false(self.options.events_automation) + tc.variables["SUPPORT_CUSTOM_FRAME_CONTROL"] = true_false(self.options.custom_frame_control) + # Due to a specific logic of cmakedeps_macros.cmake used by CMakeDeps to try to locate shared libs on Windows tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0054"] = "NEW" + tc.generate() deps = CMakeDeps(self) deps.generate() @@ -98,27 +143,6 @@ def generate(self): def build(self): apply_conandata_patches(self) - config_file = os.path.join(self.source_folder, "src", "config.h") - if not self.options.module_rshapes: - opt = "#define SUPPORT_MODULE_RSHAPES" - replace_in_file(self, config_file, opt, "//"+opt, strict=True) - if not self.options.module_rtextures: - opt = "#define SUPPORT_MODULE_RTEXTURES" - replace_in_file(self, config_file, opt, "//"+opt, strict=True) - if not self.options.module_rtext: - opt = "#define SUPPORT_MODULE_RTEXT" - replace_in_file(self, config_file, opt, "//"+opt, strict=True) - if not self.options.module_rmodels: - opt = "#define SUPPORT_MODULE_RMODELS" - replace_in_file(self, config_file, opt, "//"+opt, strict=True) - if not self.options.module_raudio: - opt = "#define SUPPORT_MODULE_RAUDIO" - replace_in_file(self, config_file, opt, "//"+opt, strict=True) - - if self.options.custom_frame_control: - opt = "#define SUPPORT_CUSTOM_FRAME_CONTROL" - replace_in_file(self, config_file, "//"+opt, opt, strict=True) - cmake = CMake(self) cmake.configure() cmake.build() From 7b9c19337a75a76f58b582a6c0a547c1e313b409 Mon Sep 17 00:00:00 2001 From: Julianiolo <50519317+Julianiolo@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:03:01 +0200 Subject: [PATCH 05/17] Update recipes/raylib/all/conanfile.py Co-authored-by: Uilian Ries --- recipes/raylib/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/raylib/all/conanfile.py b/recipes/raylib/all/conanfile.py index 4bc180cd181af..82185ce5e609a 100644 --- a/recipes/raylib/all/conanfile.py +++ b/recipes/raylib/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save, replace_in_file +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save from conan.tools.microsoft import is_msvc from conan.tools.scm import Version import os From 414694bcf3aad757a8e92d7659532d58c29018b5 Mon Sep 17 00:00:00 2001 From: Julianiolo <50519317+Julianiolo@users.noreply.github.com> Date: Tue, 16 Jul 2024 11:11:09 +0200 Subject: [PATCH 06/17] reduce number of options --- recipes/raylib/all/conanfile.py | 37 +++++++++++---------------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/recipes/raylib/all/conanfile.py b/recipes/raylib/all/conanfile.py index 82185ce5e609a..0002a7699a76e 100644 --- a/recipes/raylib/all/conanfile.py +++ b/recipes/raylib/all/conanfile.py @@ -30,13 +30,9 @@ class RaylibConan(ConanFile): "module_rmodels": [True, False], "module_raudio": [True, False], - "mouse_gestures": [True, False], "default_font": [True, False], - "screen_capture": [True, False], - "gif_recording": [True, False], "busy_wait_loop": [True, False], "events_waiting": [True, False], - "compression_api": [True, False], "events_automation": [True, False], "custom_frame_control": [True, False] } @@ -51,13 +47,9 @@ class RaylibConan(ConanFile): "module_rmodels": True, "module_raudio": True, - "mouse_gestures": True, "default_font": True, - "screen_capture": True, - "gif_recording": True, "busy_wait_loop": False, "events_waiting": False, - "compression_api": True, "events_automation": False, "custom_frame_control": False } @@ -111,27 +103,22 @@ def generate(self): tc.variables["WITH_PIC"] = self.options.get_safe("fPIC", True) tc.variables["CUSTOMIZE_BUILD"] = True - true_false = lambda x: True if x else False - tc.variables["SUPPORT_MODULE_RSHAPES"] = true_false(self.options.module_rshapes) - tc.variables["SUPPORT_MODULE_RTEXTURES"] = true_false(self.options.module_rtextures) - tc.variables["SUPPORT_MODULE_RTEXT"] = true_false(self.options.module_rtext) - tc.variables["SUPPORT_MODULE_RMODELS"] = true_false(self.options.module_rmodels) - tc.variables["SUPPORT_MODULE_RAUDIO"] = true_false(self.options.module_raudio) + tc.variables["SUPPORT_MODULE_RSHAPES"] = self.options.module_rshapes + tc.variables["SUPPORT_MODULE_RTEXTURES"] = self.options.module_rtextures + tc.variables["SUPPORT_MODULE_RTEXT"] = self.options.module_rtext + tc.variables["SUPPORT_MODULE_RMODELS"] = self.options.module_rmodels + tc.variables["SUPPORT_MODULE_RAUDIO"] = self.options.module_raudio # this makes it include the headers rcamera.h, rgesture.h and rprand.h - tc.variables["SUPPORT_CAMERA_SYSTEM"] = True - tc.variables["SUPPORT_GESTURES_SYSTEM"] = True + tc.variables["SUPPORT_CAMERA_SYSTEM"] = True + tc.variables["SUPPORT_GESTURES_SYSTEM"] = True tc.variables["SUPPORT_RPRAND_GENERATOR"] = True - tc.variables["SUPPORT_MOUSE_GESTURES"] = true_false(self.options.mouse_gestures) - tc.variables["SUPPORT_DEFAULT_FONT"] = true_false(self.options.default_font) - tc.variables["SUPPORT_SCREEN_CAPTURE"] = true_false(self.options.screen_capture) - tc.variables["SUPPORT_GIF_RECORDING"] = true_false(self.options.gif_recording) - tc.variables["SUPPORT_BUSY_WAIT_LOOP"] = true_false(self.options.busy_wait_loop) - tc.variables["SUPPORT_EVENTS_WAITING"] = true_false(self.options.events_waiting) - tc.variables["SUPPORT_COMPRESSION_API"] = true_false(self.options.compression_api) - tc.variables["SUPPORT_EVENTS_AUTOMATION"] = true_false(self.options.events_automation) - tc.variables["SUPPORT_CUSTOM_FRAME_CONTROL"] = true_false(self.options.custom_frame_control) + tc.variables["SUPPORT_DEFAULT_FONT"] = self.options.default_font + tc.variables["SUPPORT_BUSY_WAIT_LOOP"] = self.options.busy_wait_loop + tc.variables["SUPPORT_EVENTS_WAITING"] = self.options.events_waiting + tc.variables["SUPPORT_EVENTS_AUTOMATION"] = self.options.events_automation + tc.variables["SUPPORT_CUSTOM_FRAME_CONTROL"] = self.options.custom_frame_control # Due to a specific logic of cmakedeps_macros.cmake used by CMakeDeps to try to locate shared libs on Windows tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0054"] = "NEW" From e0f1d2ca1d38d56dbf79a815bd0b31f4c18de16a Mon Sep 17 00:00:00 2001 From: Julianiolo <50519317+Julianiolo@users.noreply.github.com> Date: Wed, 17 Jul 2024 16:25:11 +0200 Subject: [PATCH 07/17] reduced number of options, added on_off converter --- recipes/raylib/all/conanfile.py | 45 +++++++++++---------------------- 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/recipes/raylib/all/conanfile.py b/recipes/raylib/all/conanfile.py index 82185ce5e609a..d2bc0c9dc6aec 100644 --- a/recipes/raylib/all/conanfile.py +++ b/recipes/raylib/all/conanfile.py @@ -30,13 +30,8 @@ class RaylibConan(ConanFile): "module_rmodels": [True, False], "module_raudio": [True, False], - "mouse_gestures": [True, False], "default_font": [True, False], - "screen_capture": [True, False], - "gif_recording": [True, False], - "busy_wait_loop": [True, False], "events_waiting": [True, False], - "compression_api": [True, False], "events_automation": [True, False], "custom_frame_control": [True, False] } @@ -51,13 +46,8 @@ class RaylibConan(ConanFile): "module_rmodels": True, "module_raudio": True, - "mouse_gestures": True, "default_font": True, - "screen_capture": True, - "gif_recording": True, - "busy_wait_loop": False, "events_waiting": False, - "compression_api": True, "events_automation": False, "custom_frame_control": False } @@ -110,28 +100,23 @@ def generate(self): tc.variables["OPENGL_VERSION"] = "OFF" if not self.options.opengl_version else self.options.opengl_version tc.variables["WITH_PIC"] = self.options.get_safe("fPIC", True) - tc.variables["CUSTOMIZE_BUILD"] = True - true_false = lambda x: True if x else False - tc.variables["SUPPORT_MODULE_RSHAPES"] = true_false(self.options.module_rshapes) - tc.variables["SUPPORT_MODULE_RTEXTURES"] = true_false(self.options.module_rtextures) - tc.variables["SUPPORT_MODULE_RTEXT"] = true_false(self.options.module_rtext) - tc.variables["SUPPORT_MODULE_RMODELS"] = true_false(self.options.module_rmodels) - tc.variables["SUPPORT_MODULE_RAUDIO"] = true_false(self.options.module_raudio) + tc.variables["CUSTOMIZE_BUILD"] = "ON" + on_off = lambda x: "ON" if x else "OFF" + tc.variables["SUPPORT_MODULE_RSHAPES"] = on_off(self.options.module_rshapes) + tc.variables["SUPPORT_MODULE_RTEXTURES"] = on_off(self.options.module_rtextures) + tc.variables["SUPPORT_MODULE_RTEXT"] = on_off(self.options.module_rtext) + tc.variables["SUPPORT_MODULE_RMODELS"] = on_off(self.options.module_rmodels) + tc.variables["SUPPORT_MODULE_RAUDIO"] = on_off(self.options.module_raudio) # this makes it include the headers rcamera.h, rgesture.h and rprand.h - tc.variables["SUPPORT_CAMERA_SYSTEM"] = True - tc.variables["SUPPORT_GESTURES_SYSTEM"] = True - tc.variables["SUPPORT_RPRAND_GENERATOR"] = True - - tc.variables["SUPPORT_MOUSE_GESTURES"] = true_false(self.options.mouse_gestures) - tc.variables["SUPPORT_DEFAULT_FONT"] = true_false(self.options.default_font) - tc.variables["SUPPORT_SCREEN_CAPTURE"] = true_false(self.options.screen_capture) - tc.variables["SUPPORT_GIF_RECORDING"] = true_false(self.options.gif_recording) - tc.variables["SUPPORT_BUSY_WAIT_LOOP"] = true_false(self.options.busy_wait_loop) - tc.variables["SUPPORT_EVENTS_WAITING"] = true_false(self.options.events_waiting) - tc.variables["SUPPORT_COMPRESSION_API"] = true_false(self.options.compression_api) - tc.variables["SUPPORT_EVENTS_AUTOMATION"] = true_false(self.options.events_automation) - tc.variables["SUPPORT_CUSTOM_FRAME_CONTROL"] = true_false(self.options.custom_frame_control) + tc.variables["SUPPORT_CAMERA_SYSTEM"] = "ON" + tc.variables["SUPPORT_GESTURES_SYSTEM"] = "ON" + tc.variables["SUPPORT_RPRAND_GENERATOR"] = "ON" + + tc.variables["SUPPORT_DEFAULT_FONT"] = on_off(self.options.default_font) + tc.variables["SUPPORT_EVENTS_WAITING"] = on_off(self.options.events_waiting) + tc.variables["SUPPORT_EVENTS_AUTOMATION"] = on_off(self.options.events_automation) + tc.variables["SUPPORT_CUSTOM_FRAME_CONTROL"] = on_off(self.options.custom_frame_control) # Due to a specific logic of cmakedeps_macros.cmake used by CMakeDeps to try to locate shared libs on Windows tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0054"] = "NEW" From 8d053fe35c76071bf5c30b405ba3c9466422fed7 Mon Sep 17 00:00:00 2001 From: Julianiolo <50519317+Julianiolo@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:51:36 +0200 Subject: [PATCH 08/17] removed some options --- recipes/raylib/all/conanfile.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/recipes/raylib/all/conanfile.py b/recipes/raylib/all/conanfile.py index d2bc0c9dc6aec..5e80cefd8a5ba 100644 --- a/recipes/raylib/all/conanfile.py +++ b/recipes/raylib/all/conanfile.py @@ -24,15 +24,9 @@ class RaylibConan(ConanFile): "fPIC": [True, False], "opengl_version": [None, "4.3", "3.3", "2.1", "1.1", "ES-2.0"], - "module_rshapes": [True, False], - "module_rtextures": [True, False], - "module_rtext": [True, False], - "module_rmodels": [True, False], "module_raudio": [True, False], - "default_font": [True, False], "events_waiting": [True, False], - "events_automation": [True, False], "custom_frame_control": [True, False] } default_options = { @@ -40,15 +34,9 @@ class RaylibConan(ConanFile): "fPIC": True, "opengl_version": None, - "module_rshapes": True, - "module_rtextures": True, - "module_rtext": True, - "module_rmodels": True, "module_raudio": True, - "default_font": True, "events_waiting": False, - "events_automation": False, "custom_frame_control": False } @@ -77,10 +65,6 @@ def requirements(self): if self.settings.os == "Linux": self.requires("xorg/system") - def validate(self): - if self.options.module_rtext and not self.options.module_rtextures: - raise ConanInvalidConfiguration('-o="raylib/*:module_rtext=True" needs -o="raylib/*:module_rtextures=True"') - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -102,10 +86,6 @@ def generate(self): tc.variables["CUSTOMIZE_BUILD"] = "ON" on_off = lambda x: "ON" if x else "OFF" - tc.variables["SUPPORT_MODULE_RSHAPES"] = on_off(self.options.module_rshapes) - tc.variables["SUPPORT_MODULE_RTEXTURES"] = on_off(self.options.module_rtextures) - tc.variables["SUPPORT_MODULE_RTEXT"] = on_off(self.options.module_rtext) - tc.variables["SUPPORT_MODULE_RMODELS"] = on_off(self.options.module_rmodels) tc.variables["SUPPORT_MODULE_RAUDIO"] = on_off(self.options.module_raudio) # this makes it include the headers rcamera.h, rgesture.h and rprand.h @@ -113,9 +93,7 @@ def generate(self): tc.variables["SUPPORT_GESTURES_SYSTEM"] = "ON" tc.variables["SUPPORT_RPRAND_GENERATOR"] = "ON" - tc.variables["SUPPORT_DEFAULT_FONT"] = on_off(self.options.default_font) tc.variables["SUPPORT_EVENTS_WAITING"] = on_off(self.options.events_waiting) - tc.variables["SUPPORT_EVENTS_AUTOMATION"] = on_off(self.options.events_automation) tc.variables["SUPPORT_CUSTOM_FRAME_CONTROL"] = on_off(self.options.custom_frame_control) # Due to a specific logic of cmakedeps_macros.cmake used by CMakeDeps to try to locate shared libs on Windows From 7bbefefabb21a760cf52099d950161e890d49ce1 Mon Sep 17 00:00:00 2001 From: Julianiolo <50519317+Julianiolo@users.noreply.github.com> Date: Thu, 19 Sep 2024 16:46:54 +0200 Subject: [PATCH 09/17] incorporated review --- recipes/raylib/all/conanfile.py | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/recipes/raylib/all/conanfile.py b/recipes/raylib/all/conanfile.py index 5e80cefd8a5ba..b265485cd67a2 100644 --- a/recipes/raylib/all/conanfile.py +++ b/recipes/raylib/all/conanfile.py @@ -1,5 +1,4 @@ from conan import ConanFile -from conan.errors import ConanInvalidConfiguration from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save from conan.tools.microsoft import is_msvc @@ -24,9 +23,9 @@ class RaylibConan(ConanFile): "fPIC": [True, False], "opengl_version": [None, "4.3", "3.3", "2.1", "1.1", "ES-2.0"], - "module_raudio": [True, False], - - "events_waiting": [True, False], + "customize_build": [True, False], + "module_raudio": [True, False], + "events_waiting": [True, False], "custom_frame_control": [True, False] } default_options = { @@ -34,9 +33,9 @@ class RaylibConan(ConanFile): "fPIC": True, "opengl_version": None, - "module_raudio": True, - - "events_waiting": False, + "customize_build": False, + "module_raudio": True, + "events_waiting": False, "custom_frame_control": False } @@ -55,6 +54,11 @@ def configure(self): self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") + if not self.options.customize_build: + del self.options.module_raudio + del self.options.events_waiting + del self.options.custom_frame_control + def layout(self): cmake_layout(self, src_folder="src") @@ -84,18 +88,17 @@ def generate(self): tc.variables["OPENGL_VERSION"] = "OFF" if not self.options.opengl_version else self.options.opengl_version tc.variables["WITH_PIC"] = self.options.get_safe("fPIC", True) - tc.variables["CUSTOMIZE_BUILD"] = "ON" - on_off = lambda x: "ON" if x else "OFF" - tc.variables["SUPPORT_MODULE_RAUDIO"] = on_off(self.options.module_raudio) + tc.variables["CUSTOMIZE_BUILD"] = self.options.customize_build + if self.options.customize_build: + tc.variables["SUPPORT_MODULE_RAUDIO"] = self.options.get_safe("module_raudio") + tc.variables["SUPPORT_EVENTS_WAITING"] = self.options.get_safe("events_waiting") + tc.variables["SUPPORT_CUSTOM_FRAME_CONTROL"] = self.options.get_safe("custom_frame_control") # this makes it include the headers rcamera.h, rgesture.h and rprand.h tc.variables["SUPPORT_CAMERA_SYSTEM"] = "ON" tc.variables["SUPPORT_GESTURES_SYSTEM"] = "ON" tc.variables["SUPPORT_RPRAND_GENERATOR"] = "ON" - tc.variables["SUPPORT_EVENTS_WAITING"] = on_off(self.options.events_waiting) - tc.variables["SUPPORT_CUSTOM_FRAME_CONTROL"] = on_off(self.options.custom_frame_control) - # Due to a specific logic of cmakedeps_macros.cmake used by CMakeDeps to try to locate shared libs on Windows tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0054"] = "NEW" From d31fc2900e3e68f918adb8739df3aa9a551adf42 Mon Sep 17 00:00:00 2001 From: Julianiolo <50519317+Julianiolo@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:06:52 +0200 Subject: [PATCH 10/17] add camera, gestures and rprand support --- recipes/raylib/all/conanfile.py | 27 +++++++++++++------ recipes/raylib/all/test_package/conanfile.py | 4 +++ .../raylib/all/test_package/test_package.c | 6 +++++ 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/recipes/raylib/all/conanfile.py b/recipes/raylib/all/conanfile.py index b265485cd67a2..23744685a9981 100644 --- a/recipes/raylib/all/conanfile.py +++ b/recipes/raylib/all/conanfile.py @@ -24,7 +24,10 @@ class RaylibConan(ConanFile): "opengl_version": [None, "4.3", "3.3", "2.1", "1.1", "ES-2.0"], "customize_build": [True, False], - "module_raudio": [True, False], + "module_raudio": [True, False], + "camera_system": [True, False], + "gestures_system": [True, False], + "rprand_generator": [True, False], "events_waiting": [True, False], "custom_frame_control": [True, False] } @@ -33,9 +36,12 @@ class RaylibConan(ConanFile): "fPIC": True, "opengl_version": None, - "customize_build": False, - "module_raudio": True, - "events_waiting": False, + "customize_build": False, + "module_raudio": True, + "camera_system": False, + "gestures_system": False, + "rprand_generator": False, + "events_waiting": False, "custom_frame_control": False } @@ -94,10 +100,10 @@ def generate(self): tc.variables["SUPPORT_EVENTS_WAITING"] = self.options.get_safe("events_waiting") tc.variables["SUPPORT_CUSTOM_FRAME_CONTROL"] = self.options.get_safe("custom_frame_control") - # this makes it include the headers rcamera.h, rgesture.h and rprand.h - tc.variables["SUPPORT_CAMERA_SYSTEM"] = "ON" - tc.variables["SUPPORT_GESTURES_SYSTEM"] = "ON" - tc.variables["SUPPORT_RPRAND_GENERATOR"] = "ON" + # this makes it include the headers rcamera.h, rgesture.h and rprand.h + tc.variables["SUPPORT_CAMERA_SYSTEM"] = self.options.get_safe("camera_system") + tc.variables["SUPPORT_GESTURES_SYSTEM"] = self.options.get_safe("gestures_system") + tc.variables["SUPPORT_RPRAND_GENERATOR"] = self.options.get_safe("rprand_generator") # Due to a specific logic of cmakedeps_macros.cmake used by CMakeDeps to try to locate shared libs on Windows tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0054"] = "NEW" @@ -126,6 +132,11 @@ def package(self): {"raylib": "raylib::raylib"} ) + + copy(self, pattern="rcamera.h", dst=os.path.join(self.package_folder, "res"), src=os.path.join(self.source_folder, "src")) + copy(self, pattern="rgestures.h", dst=os.path.join(self.package_folder, "res"), src=os.path.join(self.source_folder, "src")) + copy(self, pattern="rprand.h", dst=os.path.join(self.package_folder, "res", "external"), src=os.path.join(self.source_folder, "src", "external")) + def _create_cmake_module_alias_targets(self, module_file, targets): content = "" for alias, aliased in targets.items(): diff --git a/recipes/raylib/all/test_package/conanfile.py b/recipes/raylib/all/test_package/conanfile.py index 0a6bc68712d90..343790db0745c 100644 --- a/recipes/raylib/all/test_package/conanfile.py +++ b/recipes/raylib/all/test_package/conanfile.py @@ -1,6 +1,7 @@ from conan import ConanFile from conan.tools.build import can_run from conan.tools.cmake import CMake, cmake_layout +from conan.tools.files import copy import os @@ -15,6 +16,9 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) + def generate(self): + copy(self, pattern="rcamera.h", src=self.dependencies["raylib"].cpp_info.resdirs[0], dst=os.path.join(self.build_folder, "raylib_stuff")) + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/raylib/all/test_package/test_package.c b/recipes/raylib/all/test_package/test_package.c index 97c33c55b19d9..c9b45dff847f8 100644 --- a/recipes/raylib/all/test_package/test_package.c +++ b/recipes/raylib/all/test_package/test_package.c @@ -1,5 +1,7 @@ #include "raylib.h" +#include "raylib_stuff/rcamera.h" + #include int main(void) { @@ -8,5 +10,9 @@ int main(void) { if (CheckCollisionSpheres(center, r, center, r)) { printf("unit sphere collides with itself!\n"); } + Camera3D cam; + cam.fovy = 0; + printf("%f\n", cam.fovy); + return 0; } From 148691fa5b32e8786bf929483ca96d6c4610a7c2 Mon Sep 17 00:00:00 2001 From: Julianiolo <50519317+Julianiolo@users.noreply.github.com> Date: Mon, 30 Sep 2024 00:53:15 +0200 Subject: [PATCH 11/17] added resdirs --- recipes/raylib/all/conanfile.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/recipes/raylib/all/conanfile.py b/recipes/raylib/all/conanfile.py index 23744685a9981..072450e5a54dc 100644 --- a/recipes/raylib/all/conanfile.py +++ b/recipes/raylib/all/conanfile.py @@ -132,10 +132,10 @@ def package(self): {"raylib": "raylib::raylib"} ) - - copy(self, pattern="rcamera.h", dst=os.path.join(self.package_folder, "res"), src=os.path.join(self.source_folder, "src")) - copy(self, pattern="rgestures.h", dst=os.path.join(self.package_folder, "res"), src=os.path.join(self.source_folder, "src")) - copy(self, pattern="rprand.h", dst=os.path.join(self.package_folder, "res", "external"), src=os.path.join(self.source_folder, "src", "external")) + res_path = os.path.join(self.package_folder, "res", "include") + copy(self, pattern="rcamera.h", dst=res_path, src=os.path.join(self.source_folder, "src")) + copy(self, pattern="rgestures.h", dst=res_path, src=os.path.join(self.source_folder, "src")) + copy(self, pattern="rprand.h", dst=os.path.join(res_path, "external"), src=os.path.join(self.source_folder, "src", "external")) def _create_cmake_module_alias_targets(self, module_file, targets): content = "" @@ -166,6 +166,10 @@ def package_info(self): self.cpp_info.system_libs.extend(["m", "pthread"]) elif self.settings.os == "Windows": self.cpp_info.system_libs.append("winmm") + + # Some useful files are not packaged by default + res_includes = os.path.join(self.package_folder, "res", "include") + self.cpp_info.resdirs = [res_includes] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] From 20615161c1902680368fbfd2ce847a77263ac31d Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 31 Oct 2024 09:32:20 +0100 Subject: [PATCH 12/17] Simplify custom modules headers Signed-off-by: Uilian Ries --- recipes/raylib/all/conanfile.py | 76 ++++++++++++------- recipes/raylib/all/test_package/conanfile.py | 3 - .../raylib/all/test_package/test_package.c | 5 -- 3 files changed, 50 insertions(+), 34 deletions(-) diff --git a/recipes/raylib/all/conanfile.py b/recipes/raylib/all/conanfile.py index 072450e5a54dc..c49162bd8efa1 100644 --- a/recipes/raylib/all/conanfile.py +++ b/recipes/raylib/all/conanfile.py @@ -23,12 +23,12 @@ class RaylibConan(ConanFile): "fPIC": [True, False], "opengl_version": [None, "4.3", "3.3", "2.1", "1.1", "ES-2.0"], - "customize_build": [True, False], + "customize_build": [True, False], "module_raudio": [True, False], "camera_system": [True, False], "gestures_system": [True, False], "rprand_generator": [True, False], - "events_waiting": [True, False], + "events_waiting": [True, False], "custom_frame_control": [True, False] } default_options = { @@ -36,15 +36,27 @@ class RaylibConan(ConanFile): "fPIC": True, "opengl_version": None, - "customize_build": False, - "module_raudio": True, - "camera_system": False, - "gestures_system": False, - "rprand_generator": False, - "events_waiting": False, + "customize_build": False, + "module_raudio": True, + "camera_system": True, + "gestures_system": True, + "rprand_generator": True, + "events_waiting": False, "custom_frame_control": False } + @property + def _support_custom_modules(self): + return Version(self.version) >= "4.2.0" + + @property + def _support_rpand_generator(self): + return Version(self.version) >= "5.0" + + @property + def _support_frame_control(self): + return Version(self.version) >= "4.6" + def export_sources(self): export_conandata_patches(self) @@ -53,6 +65,12 @@ def config_options(self): del self.options.fPIC if self.settings.os == "Android": del self.options.opengl_version + if not self._support_custom_modules: + del self.options.module_raudio + if not self._support_rpand_generator: + del self.options.rprand_generator + if not self._support_frame_control: + del self.options.custom_frame_control def configure(self): if self.options.shared: @@ -61,9 +79,12 @@ def configure(self): self.settings.rm_safe("compiler.libcxx") if not self.options.customize_build: - del self.options.module_raudio + self.options.rm_safe("module_raudio") + del self.options.camera_system + del self.options.gestures_system + self.options.rm_safe("rprand_generator") del self.options.events_waiting - del self.options.custom_frame_control + self.options.rm_safe("custom_frame_control") def layout(self): cmake_layout(self, src_folder="src") @@ -94,16 +115,19 @@ def generate(self): tc.variables["OPENGL_VERSION"] = "OFF" if not self.options.opengl_version else self.options.opengl_version tc.variables["WITH_PIC"] = self.options.get_safe("fPIC", True) - tc.variables["CUSTOMIZE_BUILD"] = self.options.customize_build - if self.options.customize_build: - tc.variables["SUPPORT_MODULE_RAUDIO"] = self.options.get_safe("module_raudio") - tc.variables["SUPPORT_EVENTS_WAITING"] = self.options.get_safe("events_waiting") - tc.variables["SUPPORT_CUSTOM_FRAME_CONTROL"] = self.options.get_safe("custom_frame_control") + tc.variables["CUSTOMIZE_BUILD"] = self.options.customize_build + if self.options.customize_build: + if self._support_custom_modules: + tc.variables["SUPPORT_MODULE_RAUDIO"] = self.options.module_raudio + tc.variables["SUPPORT_EVENTS_WAITING"] = self.options.events_waiting + if self._support_frame_control: + tc.variables["SUPPORT_CUSTOM_FRAME_CONTROL"] = self.options.custom_frame_control # this makes it include the headers rcamera.h, rgesture.h and rprand.h - tc.variables["SUPPORT_CAMERA_SYSTEM"] = self.options.get_safe("camera_system") - tc.variables["SUPPORT_GESTURES_SYSTEM"] = self.options.get_safe("gestures_system") - tc.variables["SUPPORT_RPRAND_GENERATOR"] = self.options.get_safe("rprand_generator") + tc.variables["SUPPORT_CAMERA_SYSTEM"] = self.options.camera_system + tc.variables["SUPPORT_GESTURES_SYSTEM"] = self.options.gestures_system + if self._support_rpand_generator: + tc.variables["SUPPORT_RPRAND_GENERATOR"] = self.options.rprand_generator # Due to a specific logic of cmakedeps_macros.cmake used by CMakeDeps to try to locate shared libs on Windows tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0054"] = "NEW" @@ -132,10 +156,14 @@ def package(self): {"raylib": "raylib::raylib"} ) - res_path = os.path.join(self.package_folder, "res", "include") - copy(self, pattern="rcamera.h", dst=res_path, src=os.path.join(self.source_folder, "src")) - copy(self, pattern="rgestures.h", dst=res_path, src=os.path.join(self.source_folder, "src")) - copy(self, pattern="rprand.h", dst=os.path.join(res_path, "external"), src=os.path.join(self.source_folder, "src", "external")) + # INFO: Custom modules are enabled by default but need to copy the headers manually + include_path = os.path.join(self.package_folder, "include") + if self.options.get_safe("camera_system", True): + copy(self, pattern="rcamera.h", dst=include_path, src=os.path.join(self.source_folder, "src")) + if self.options.get_safe("gestures_system", True): + copy(self, pattern="rgestures.h", dst=include_path, src=os.path.join(self.source_folder, "src")) + if self._support_rpand_generator and self.options.get_safe("rprand_generator", True): + copy(self, pattern="rprand.h", dst=include_path, src=os.path.join(self.source_folder, "src", "external")) def _create_cmake_module_alias_targets(self, module_file, targets): content = "" @@ -166,10 +194,6 @@ def package_info(self): self.cpp_info.system_libs.extend(["m", "pthread"]) elif self.settings.os == "Windows": self.cpp_info.system_libs.append("winmm") - - # Some useful files are not packaged by default - res_includes = os.path.join(self.package_folder, "res", "include") - self.cpp_info.resdirs = [res_includes] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.build_modules["cmake_find_package"] = [self._module_file_rel_path] diff --git a/recipes/raylib/all/test_package/conanfile.py b/recipes/raylib/all/test_package/conanfile.py index 343790db0745c..2f875bd00f7ef 100644 --- a/recipes/raylib/all/test_package/conanfile.py +++ b/recipes/raylib/all/test_package/conanfile.py @@ -16,9 +16,6 @@ def layout(self): def requirements(self): self.requires(self.tested_reference_str) - def generate(self): - copy(self, pattern="rcamera.h", src=self.dependencies["raylib"].cpp_info.resdirs[0], dst=os.path.join(self.build_folder, "raylib_stuff")) - def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/raylib/all/test_package/test_package.c b/recipes/raylib/all/test_package/test_package.c index c9b45dff847f8..30f0b1d640db4 100644 --- a/recipes/raylib/all/test_package/test_package.c +++ b/recipes/raylib/all/test_package/test_package.c @@ -1,7 +1,5 @@ #include "raylib.h" -#include "raylib_stuff/rcamera.h" - #include int main(void) { @@ -10,9 +8,6 @@ int main(void) { if (CheckCollisionSpheres(center, r, center, r)) { printf("unit sphere collides with itself!\n"); } - Camera3D cam; - cam.fovy = 0; - printf("%f\n", cam.fovy); return 0; } From f82c6bc83d60dcc373c027e55247bfc34420d08b Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 31 Oct 2024 09:57:42 +0100 Subject: [PATCH 13/17] Include headers from version 3.5.0 Signed-off-by: Uilian Ries --- recipes/raylib/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/raylib/all/conanfile.py b/recipes/raylib/all/conanfile.py index c49162bd8efa1..f56689a1ae369 100644 --- a/recipes/raylib/all/conanfile.py +++ b/recipes/raylib/all/conanfile.py @@ -159,9 +159,9 @@ def package(self): # INFO: Custom modules are enabled by default but need to copy the headers manually include_path = os.path.join(self.package_folder, "include") if self.options.get_safe("camera_system", True): - copy(self, pattern="rcamera.h", dst=include_path, src=os.path.join(self.source_folder, "src")) + copy(self, pattern="*camera.h", dst=include_path, src=os.path.join(self.source_folder, "src")) if self.options.get_safe("gestures_system", True): - copy(self, pattern="rgestures.h", dst=include_path, src=os.path.join(self.source_folder, "src")) + copy(self, pattern="*gestures.h", dst=include_path, src=os.path.join(self.source_folder, "src")) if self._support_rpand_generator and self.options.get_safe("rprand_generator", True): copy(self, pattern="rprand.h", dst=include_path, src=os.path.join(self.source_folder, "src", "external")) From f593cebbab707f4449a68aeacb839a6a9d11d688 Mon Sep 17 00:00:00 2001 From: Julianiolo <50519317+Julianiolo@users.noreply.github.com> Date: Thu, 31 Oct 2024 12:27:36 +0100 Subject: [PATCH 14/17] fix rprand typo --- recipes/raylib/all/conanfile.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/raylib/all/conanfile.py b/recipes/raylib/all/conanfile.py index f56689a1ae369..6012caf7111c9 100644 --- a/recipes/raylib/all/conanfile.py +++ b/recipes/raylib/all/conanfile.py @@ -50,7 +50,7 @@ def _support_custom_modules(self): return Version(self.version) >= "4.2.0" @property - def _support_rpand_generator(self): + def _support_rprand_generator(self): return Version(self.version) >= "5.0" @property @@ -67,7 +67,7 @@ def config_options(self): del self.options.opengl_version if not self._support_custom_modules: del self.options.module_raudio - if not self._support_rpand_generator: + if not self._support_rprand_generator: del self.options.rprand_generator if not self._support_frame_control: del self.options.custom_frame_control @@ -126,7 +126,7 @@ def generate(self): # this makes it include the headers rcamera.h, rgesture.h and rprand.h tc.variables["SUPPORT_CAMERA_SYSTEM"] = self.options.camera_system tc.variables["SUPPORT_GESTURES_SYSTEM"] = self.options.gestures_system - if self._support_rpand_generator: + if self._support_rprand_generator: tc.variables["SUPPORT_RPRAND_GENERATOR"] = self.options.rprand_generator # Due to a specific logic of cmakedeps_macros.cmake used by CMakeDeps to try to locate shared libs on Windows @@ -162,7 +162,7 @@ def package(self): copy(self, pattern="*camera.h", dst=include_path, src=os.path.join(self.source_folder, "src")) if self.options.get_safe("gestures_system", True): copy(self, pattern="*gestures.h", dst=include_path, src=os.path.join(self.source_folder, "src")) - if self._support_rpand_generator and self.options.get_safe("rprand_generator", True): + if self._support_rprand_generator and self.options.get_safe("rprand_generator", True): copy(self, pattern="rprand.h", dst=include_path, src=os.path.join(self.source_folder, "src", "external")) def _create_cmake_module_alias_targets(self, module_file, targets): From 08dc263d06c8ce4258a9846ebad195e61204f07f Mon Sep 17 00:00:00 2001 From: Julianiolo <50519317+Julianiolo@users.noreply.github.com> Date: Thu, 31 Oct 2024 12:32:55 +0100 Subject: [PATCH 15/17] fix linter warnings --- recipes/raylib/all/conanfile.py | 5 ----- recipes/raylib/all/test_package/conanfile.py | 1 - 2 files changed, 6 deletions(-) diff --git a/recipes/raylib/all/conanfile.py b/recipes/raylib/all/conanfile.py index 6012caf7111c9..1a5786bf0d626 100644 --- a/recipes/raylib/all/conanfile.py +++ b/recipes/raylib/all/conanfile.py @@ -57,9 +57,6 @@ def _support_rprand_generator(self): def _support_frame_control(self): return Version(self.version) >= "4.6" - def export_sources(self): - export_conandata_patches(self) - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -137,8 +134,6 @@ def generate(self): deps.generate() def build(self): - apply_conandata_patches(self) - cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/raylib/all/test_package/conanfile.py b/recipes/raylib/all/test_package/conanfile.py index 2f875bd00f7ef..0a6bc68712d90 100644 --- a/recipes/raylib/all/test_package/conanfile.py +++ b/recipes/raylib/all/test_package/conanfile.py @@ -1,7 +1,6 @@ from conan import ConanFile from conan.tools.build import can_run from conan.tools.cmake import CMake, cmake_layout -from conan.tools.files import copy import os From 026bdfa9c046931d7ba94ef2a56bbc814f1560b9 Mon Sep 17 00:00:00 2001 From: Julianiolo <50519317+Julianiolo@users.noreply.github.com> Date: Thu, 31 Oct 2024 13:46:00 +0100 Subject: [PATCH 16/17] Update recipes/raylib/all/conanfile.py Co-authored-by: Uilian Ries --- recipes/raylib/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/raylib/all/conanfile.py b/recipes/raylib/all/conanfile.py index 1a5786bf0d626..e83e056fc8ef7 100644 --- a/recipes/raylib/all/conanfile.py +++ b/recipes/raylib/all/conanfile.py @@ -128,7 +128,7 @@ def generate(self): # Due to a specific logic of cmakedeps_macros.cmake used by CMakeDeps to try to locate shared libs on Windows tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0054"] = "NEW" - + tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0091"] = "NEW" tc.generate() deps = CMakeDeps(self) deps.generate() From eb91ffd8b70bc67c3bddd1dd87c417d05c46912b Mon Sep 17 00:00:00 2001 From: Julianiolo <50519317+Julianiolo@users.noreply.github.com> Date: Thu, 31 Oct 2024 19:21:54 +0100 Subject: [PATCH 17/17] readd patches --- recipes/raylib/all/conanfile.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes/raylib/all/conanfile.py b/recipes/raylib/all/conanfile.py index e83e056fc8ef7..26644f7b9bb79 100644 --- a/recipes/raylib/all/conanfile.py +++ b/recipes/raylib/all/conanfile.py @@ -57,6 +57,9 @@ def _support_rprand_generator(self): def _support_frame_control(self): return Version(self.version) >= "4.6" + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -96,6 +99,7 @@ def requirements(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) + def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_EXAMPLES"] = False @@ -134,6 +138,7 @@ def generate(self): deps.generate() def build(self): + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build()