mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	[Conan] add validate method to catch incorrect combination of options
This commit is contained in:
		| @@ -204,7 +204,7 @@ class VCMI(ConanFile): | ||||
|             self.requires("qt/[~5.15.2]") | ||||
|  | ||||
|         # use Apple system libraries instead of external ones | ||||
|         if self.options.with_apple_system_libs and not self.options.default_options_of_requirements and is_apple_os(self): | ||||
|         if self.options.with_apple_system_libs and is_apple_os(self): | ||||
|             systemLibsOverrides = [ | ||||
|                 "bzip2/1.0.8", | ||||
|                 "libiconv/1.17", | ||||
| @@ -223,6 +223,12 @@ class VCMI(ConanFile): | ||||
|         if self.options.with_luajit and not str(self.settings.arch).startswith("arm"): | ||||
|             self.requires("luajit/[~2.0.5]") | ||||
|  | ||||
|     def validate(self): | ||||
|         if self.options.with_apple_system_libs and not is_apple_os(self): | ||||
|             raise ConanInvalidConfiguration("with_apple_system_libs is only for Apple platforms") | ||||
|         if self.options.with_apple_system_libs and self.options.default_options_of_requirements: | ||||
|             raise ConanInvalidConfiguration("with_apple_system_libs and default_options_of_requirements can't be True at the same time") | ||||
|  | ||||
|     def generate(self): | ||||
|         tc = CMakeToolchain(self) | ||||
|         tc.variables["USING_CONAN"] = True | ||||
|   | ||||
		Reference in New Issue
	
	Block a user