🐛 Fixed freeimage not building in RelWithDeb or MinSizeRel config

This commit is contained in:
Edgar 2021-12-19 11:16:15 +01:00
parent 8c58189817
commit 3f6b792b8d
No known key found for this signature in database
GPG Key ID: 17D930BB616061A5
2 changed files with 11 additions and 4 deletions

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
build/
tmp/
upload.*
upload.*
.idea/

View File

@ -1,6 +1,6 @@
import glob
from conans import ConanFile, MSBuild, tools, AutoToolsBuildEnvironment
from conans.tools import os_info
import glob
class freeimageConan(ConanFile):
@ -24,8 +24,14 @@ class freeimageConan(ConanFile):
for file in glob.glob("./**/*2017.vcxproj", recursive=True):
print(f"Patching winsdk in file {file}")
tools.replace_in_file(file, "10.0.16299.0", "10.0", strict=False)
if self.settings.build_type == "Debug":
_build_type = "Debug"
else:
_build_type = "Release"
msbuild = MSBuild(self)
msbuild.build("FreeImage.2017.sln")
msbuild.build("FreeImage.2017.sln", build_type=_build_type)
else:
autotools = AutoToolsBuildEnvironment(self)
autotools.make()
@ -43,4 +49,4 @@ class freeimageConan(ConanFile):
def package_info(self):
self.cpp_info.name = "FreeImage"
self.cpp_info.libs = tools.collect_libs(self)
self.cpp_info.libs = tools.collect_libs(self)