@@ -162,7 +162,7 @@ def completeBuildConfig(self):
162162 self .buildconfig .sharedliblink = list (
163163 set (self .buildconfig .sharedliblink + specificVersionDetails ["liblink" ])
164164 )
165- else :
165+ elif not self . buildconfig . lib_type == "headeronly" :
166166 self .logger .debug ("No specific library version information found" )
167167
168168 if self .buildconfig .lib_type == "static" :
@@ -580,7 +580,7 @@ def writebuildscript(
580580
581581 make_utility = self .buildconfig .make_utility
582582
583- if self .buildconfig .build_type == "cmake" :
583+ if self .buildconfig .build_type == "cmake" or self . buildconfig . build_type == "none" :
584584 expanded_cmake_args = [
585585 self .expand_make_arg (arg , compilerTypeOrGcc , buildtype , arch , stdver , stdlib )
586586 for arg in self .buildconfig .extra_cmake_arg
@@ -741,6 +741,10 @@ def writebuildscript(
741741 self .setCurrentConanBuildParameters (
742742 buildos , buildtype , "cshared" , "cshared" , libcxx , arch , stdver , extraflags
743743 )
744+ elif self .buildconfig .lib_type == "headeronly" :
745+ self .setCurrentConanBuildParameters (
746+ buildos , buildtype , "headeronly" , "headeronly" , libcxx , arch , stdver , extraflags
747+ )
744748 else :
745749 self .setCurrentConanBuildParameters (
746750 buildos , buildtype , compilerTypeOrGcc , compiler , libcxx , arch , stdver , extraflags
@@ -1336,6 +1340,16 @@ def makebuild(self, buildfor):
13361340 self .logger .error (
13371341 f"Unknown compiler { checkcompiler } to build cshared lib { self .buildconfig .sharedliblink } "
13381342 )
1343+ elif self .buildconfig .lib_type == "headeronly" :
1344+ if self .platform == LibraryPlatform .Windows :
1345+ checkcompiler = "mingw64_ucrt_gcc_1220"
1346+ self .logger .info (
1347+ f"Header-only library, but running on Windows, so attempting build with { checkcompiler } "
1348+ )
1349+ if checkcompiler not in self .compilerprops :
1350+ self .logger .error (f"Unknown compiler { checkcompiler } " )
1351+ else :
1352+ self .logger .info ("Header-only library, no need to build" )
13391353 elif buildfor == "nonx86" :
13401354 self .forcebuild = True
13411355 checkcompiler = ""
0 commit comments