Skip to content

Commit

Permalink
Include conanbuildinfo.cmake in ROOT CMake as this is needed for MSVC.
Browse files Browse the repository at this point in the history
Following recommendation in comments for #3732 by @madebr:
"This cmake script sets the current C runtime on MSVC (MT vs MD vd MTd vs MDd).
It also sets libstdc++11 vs libstdc++."
  • Loading branch information
davehadley committed Dec 27, 2020
1 parent 1dcf0be commit 9181355
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion recipes/root/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class RootConan(ConanFile):
# default python=off as there is currently no libpython in Conan center
"python": PythonOption.OFF,
}
generators = "cmake_find_package"
generators = ("cmake", "cmake_find_package")
requires = (
"opengl/system",
"libxml2/2.9.10",
Expand Down Expand Up @@ -124,6 +124,11 @@ def _patch_source_cmake(self):
os.sep.join((self._rootsrcdir, "CMakeLists.txt")),
"project(ROOT)",
"""project(ROOT)
# cmake script sets the current C runtime on MSVC (MT vs MD vd MTd vs MDd)
include(conanbuildinfo.cmake)
conan_basic_setup()
find_package(OpenSSL REQUIRED)
set(OPENSSL_VERSION ${OpenSSL_VERSION})
find_package(LibXml2 REQUIRED)
Expand Down

0 comments on commit 9181355

Please sign in to comment.