Skip to content

Commit

Permalink
pagmo2: require boost::boost as a fix for MSVC linker issues
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Nov 16, 2023
1 parent 98e5d52 commit b991692
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions recipes/pagmo2/pre_2.11/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,24 +103,19 @@ def package(self):
def package_info(self):
self.cpp_info.set_property("cmake_file_name", "pagmo")
self.cpp_info.set_property("cmake_target_name", "Pagmo::pagmo")

if self.settings.os in ["Linux", "FreeBSD"]:
self.cpp_info.components["_pagmo"].system_libs.append("pthread")

# TODO: back to global scope in conan v2 once cmake_find_package_* generators removed
self.cpp_info.components["_pagmo"].requires = [
"boost::headers",
"boost::serialization",
"onetbb::onetbb",
]
self.cpp_info.components["_pagmo"].requires = ["boost::boost", "onetbb::onetbb"]
if self.options.with_eigen:
self.cpp_info.components["_pagmo"].requires.append("eigen::eigen")
if self.options.with_nlopt:
self.cpp_info.components["_pagmo"].requires.append("nlopt::nlopt")
if self.settings.os in ["Linux", "FreeBSD"]:
self.cpp_info.components["_pagmo"].system_libs.append("pthread")

# TODO: to remove in conan v2 once cmake_find_package_* generators removed
self.cpp_info.filenames["cmake_find_package"] = "pagmo"
self.cpp_info.filenames["cmake_find_package_multi"] = "pagmo"
self.cpp_info.names["cmake_find_package"] = "Pagmo"
self.cpp_info.names["cmake_find_package_multi"] = "Pagmo"
self.cpp_info.components["_pagmo"].names["cmake_find_package"] = "pagmo"
self.cpp_info.components["_pagmo"].names["cmake_find_package_multi"] = "pagmo"
self.cpp_info.components["_pagmo"].set_property("cmake_target_name", "Pagmo::pagmo")

0 comments on commit b991692

Please sign in to comment.