aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2023-10-07 12:24:15 +0200
committerFelix Morgner <felix.morgner@ost.ch>2023-10-07 12:24:15 +0200
commit60f8108324dcc3859640799168fb33ea865cf815 (patch)
treeb8c137a386cd15d42c7c2d0cd4a94e9b378b3ed9
parent84f03c4870af20c9edf16343f968f3b920c04a02 (diff)
downloadteachos-60f8108324dcc3859640799168fb33ea865cf815.tar.xz
teachos-60f8108324dcc3859640799168fb33ea865cf815.zip
cmake: move modules to source
-rw-r--r--conanfile.py9
-rw-r--r--source/cmake/Platforms/x86_64.cmake (renamed from cmake/Platforms/x86_64.cmake)0
2 files changed, 5 insertions, 4 deletions
diff --git a/conanfile.py b/conanfile.py
index cc79bae..83040b7 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -38,6 +38,8 @@ class KernelConan(ConanFile):
toolchain.variables["TEACHOS_DESCRIPTION"] = self.description
toolchain.variables["TEACHOS_HOMEPAGE_URL"] = self.homepage
toolchain.variables["TEACHOS_VERSION"] = self.version
+ toolchain.blocks["teachos_cmake_modules"] = CMakeModulesPathBlock
+ toolchain.blocks["teachos_cmake_modules"].values["root"] = self.source_folder
toolchain.blocks["teachos_platform"] = PlatformIncludeBlock
toolchain.blocks["teachos_platform"].values["platform"] = self.settings.arch
toolchain.blocks.remove("cmake_flags_init")
@@ -49,8 +51,7 @@ class KernelConan(ConanFile):
class PlatformIncludeBlock:
- template = 'include("../cmake/Platforms/{{platform}}.cmake")'
+ template = 'include("{{platform}}")'
-
-def context(self):
- return {"platform": None}
+class CMakeModulesPathBlock:
+ template = 'list(APPEND CMAKE_MODULE_PATH "{{root}}/cmake/Modules" "{{root}}/cmake/Platforms")'
diff --git a/cmake/Platforms/x86_64.cmake b/source/cmake/Platforms/x86_64.cmake
index 9e727cf..9e727cf 100644
--- a/cmake/Platforms/x86_64.cmake
+++ b/source/cmake/Platforms/x86_64.cmake