Skip to content

Commit

Permalink
cern-root: fix libXft not being found
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Nov 28, 2023
1 parent e589049 commit 9079168
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
11 changes: 10 additions & 1 deletion recipes/cern-root/all/conan_deps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ custom_find_package(TBB REQUIRED CONFIG)
#custom_find_package(Vdt REQUIRED CONFIG)
#custom_find_package(VecCore REQUIRED CONFIG)
#custom_find_package(VecGeom REQUIRED CONFIG)
find_package(X11 REQUIRED)
#custom_find_package(XROOTD REQUIRED CONFIG)
custom_find_package(xxHash REQUIRED CONFIG)
custom_find_package(ZLIB REQUIRED CONFIG)
Expand All @@ -72,4 +71,14 @@ if(asimage)
custom_find_package(TIFF REQUIRED CONFIG)
endif()

if(x11)
find_package(X11 REQUIRED)
custom_find_package(X11_Xft REQUIRED CONFIG)
set(X11_Xft_LIB ${X11_Xft_LIBRARIES})
set(X11_Xft_INCLUDE_PATH ${X11_Xft_INCLUDE_DIR}/X11/Xft/Xft.h)
custom_find_package(X11_Xpm REQUIRED CONFIG)
set(X11_Xpm_LIB ${X11_Xpm_LIBRARIES})
set(X11_Xpm_INCLUDE_PATH ${X11_Xpm_INCLUDE_DIR}/X11/xpm.h)
endif()

link_libraries(FreeType::FreeType)
13 changes: 9 additions & 4 deletions recipes/cern-root/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,15 @@ def requirements(self):
self.requires("openssl/[>=1.1 <4]")
self.requires("pcre/8.45")
self.requires("sqlite3/3.44.2")
self.requires("xorg/system")
self.requires("xxhash/0.8.2")
self.requires("xz_utils/5.4.5")
self.requires("zlib/[>=1.2.11 <2]")
self.requires("zstd/1.5.5")
if self.settings in ["Linux", "FreeBSD"]:

if self.settings.os in ["Linux", "FreeBSD"]:
self.requires("xorg/system")
self.requires("libxft/2.3.8")
self.requires("libxpm/3.5.13")
self.requires("util-linux-libuuid/2.39.2")

if self.options.asimage:
Expand Down Expand Up @@ -142,7 +145,7 @@ def generate(self):
tc.variables["asimage"] = self.options.asimage
tc.variables["fail-on-missing"] = True
tc.variables["soversion"] = True
tc.variables["soversion"] = True
tc.variables["x11"] = self.settings.os in ["Linux", "FreeBSD"]
# Disable builtins and use Conan deps where available
tc.variables["builtin_cfitsio"] = False
tc.variables["builtin_davix"] = False
Expand All @@ -159,7 +162,7 @@ def generate(self):
tc.variables["builtin_zlib"] = False
tc.variables["builtin_zstd"] = False
# Enable builtins where there is no Conan package
tc.variables["builtin_afterimage"] = False # FIXME : replace with afterimage CCI package when available
tc.variables["builtin_afterimage"] = self.options.asimage # FIXME : replace with afterimage CCI package when available
tc.variables["builtin_gl2ps"] = True # FIXME : replace with gl2ps CCI package when available
tc.variables["builtin_ftgl"] = True # FIXME : replace with ftgl CCI package when available
tc.variables["builtin_vdt"] = True # FIXME : replace with vdt CCI package when available
Expand Down Expand Up @@ -208,6 +211,8 @@ def generate(self):
"libpng": "PNG",
"libpq": "PostgreSQL",
"libxml2": "LibXml2",
"libxft": "X11_Xft",
"libxpm": "X11_Xpm",
"lz4": "LZ4",
"odbc": "ODBC",
"onetbb": "TBB",
Expand Down

0 comments on commit 9079168

Please sign in to comment.