🐛 Fixed freeimage not building in RelWithDeb or MinSizeRel config
This commit is contained in:
parent
8c58189817
commit
3f6b792b8d
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
build/
|
build/
|
||||||
tmp/
|
tmp/
|
||||||
upload.*
|
upload.*
|
||||||
|
.idea/
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
import glob
|
||||||
from conans import ConanFile, MSBuild, tools, AutoToolsBuildEnvironment
|
from conans import ConanFile, MSBuild, tools, AutoToolsBuildEnvironment
|
||||||
from conans.tools import os_info
|
from conans.tools import os_info
|
||||||
import glob
|
|
||||||
|
|
||||||
|
|
||||||
class freeimageConan(ConanFile):
|
class freeimageConan(ConanFile):
|
||||||
@ -24,8 +24,14 @@ class freeimageConan(ConanFile):
|
|||||||
for file in glob.glob("./**/*2017.vcxproj", recursive=True):
|
for file in glob.glob("./**/*2017.vcxproj", recursive=True):
|
||||||
print(f"Patching winsdk in file {file}")
|
print(f"Patching winsdk in file {file}")
|
||||||
tools.replace_in_file(file, "10.0.16299.0", "10.0", strict=False)
|
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 = MSBuild(self)
|
||||||
msbuild.build("FreeImage.2017.sln")
|
msbuild.build("FreeImage.2017.sln", build_type=_build_type)
|
||||||
else:
|
else:
|
||||||
autotools = AutoToolsBuildEnvironment(self)
|
autotools = AutoToolsBuildEnvironment(self)
|
||||||
autotools.make()
|
autotools.make()
|
||||||
@ -43,4 +49,4 @@ class freeimageConan(ConanFile):
|
|||||||
|
|
||||||
def package_info(self):
|
def package_info(self):
|
||||||
self.cpp_info.name = "FreeImage"
|
self.cpp_info.name = "FreeImage"
|
||||||
self.cpp_info.libs = tools.collect_libs(self)
|
self.cpp_info.libs = tools.collect_libs(self)
|
Loading…
x
Reference in New Issue
Block a user