@@ -133,6 +133,10 @@ def validate(self):
133
133
raise ConanInvalidConfiguration ("OGRE 1.x not supported with gcc version greater than 11" )
134
134
if self .settings .compiler == "clang" and tools .Version (self .settings .compiler .version ) >= 11 :
135
135
raise ConanInvalidConfiguration ("OGRE 1.x not supported with clang version greater than 11" )
136
+
137
+ miss_boost_required_comp = any (getattr (self .options ["boost" ], "without_{}" .format (boost_comp ), True ) for boost_comp in self ._required_boost_components )
138
+ if self .options ["boost" ].header_only or miss_boost_required_comp :
139
+ raise ConanInvalidConfiguration ("OGRE requires these boost components: {}" .format (", " .join (self ._required_boost_components )))
136
140
137
141
@property
138
142
def _source_subfolder (self ):
@@ -146,6 +150,16 @@ def config_options(self):
146
150
def configure (self ):
147
151
if self .options .shared :
148
152
del self .options .fPIC
153
+ self ._strict_options_requirements ()
154
+
155
+ def _strict_options_requirements (self ):
156
+ self .options ["boost" ].header_only = False
157
+ for boost_comp in self ._required_boost_components :
158
+ setattr (self .options ["boost" ], "without_{}" .format (boost_comp ), False )
159
+
160
+ @property
161
+ def _required_boost_components (self ):
162
+ return ["date_time" , "thread" ]
149
163
150
164
@functools .lru_cache (1 )
151
165
def _configure_cmake (self ):
@@ -249,7 +263,6 @@ def _create_cmake_module_variables(module_file, version):
249
263
250
264
@property
251
265
def _components (self ):
252
- pkg_name = "OGRE"
253
266
include_prefix = os .path .join ("include" , "OGRE" )
254
267
plugin_lib_dir = os .path .join ("lib" , "OGRE" )
255
268
components = {
@@ -321,7 +334,6 @@ def _components(self):
321
334
return components
322
335
323
336
def package_info (self ):
324
- version_major = tools .Version (self .version ).major
325
337
self .cpp_info .set_property ("cmake_file_name" , "OGRE" )
326
338
self .cpp_info .names ["cmake_find_package" ] = "OGRE"
327
339
self .cpp_info .names ["cmake_find_package_multi" ] = "OGRE"
0 commit comments