Skip to content

Commit

Permalink
restore find_package module freetype
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceIm committed Nov 13, 2023
1 parent 2870f2b commit d678393
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion recipes/msdfgen/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ def generate(self):
def _patch_sources(self):
apply_conandata_patches(self)

# workaround against CMAKE_FIND_PACKAGE_PREFER_CONFIG ON in conan toolchain
cmakelists = os.path.join(self.source_folder, "CMakeLists.txt")
replace_in_file(self, cmakelists, "find_package(Freetype REQUIRED)", "find_package(Freetype REQUIRED MODULE)")

if Version(self.version) < "1.10":
# remove bundled lodepng & tinyxml2
rmdir(self, os.path.join(self.source_folder, "lib"))
Expand All @@ -96,7 +100,7 @@ def _patch_sources(self):
if is_msvc(self):
replace_in_file(
self,
os.path.join(self.source_folder, "CMakeLists.txt"),
cmakelists,
"set_target_properties(msdfgen-standalone PROPERTIES ARCHIVE_OUTPUT_DIRECTORY archive OUTPUT_NAME msdfgen)",
"set_target_properties(msdfgen-standalone PROPERTIES OUTPUT_NAME msdfgen IMPORT_PREFIX foo)",
)
Expand Down

0 comments on commit d678393

Please sign in to comment.