URL:
<http://savannah.cern.ch/bugs/?100735>
Summary: CMake: missing include_directories for multiple
packages
Project: XROOTD
Submitted by: davidlt
Submitted on: 2013-03-05 12:59
Report Type: Bug
Priority: 5 - Normal
Severity: 3 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Fixed by commit(s):
_______________________________________________________
Details:
Hi,
Let's give a look at cmake/XRootDFindLibs.cmake
find_package( ZLIB REQUIRED)
zlib is a required package. XrdClient and XrdApps depends on zlib packages,
yet I do not see anywhere include_directories( ${ZLIB_INCLUDE_DIRS} ) in
src/XrdApps.cmake and src/XrdClient.cmake or any other CMake script. Now it
tries to find zlib on the standard system location, which is wrong. I
explicitly tell CMake where to find zlib package:
-DZLIB_INCLUDE_DIR:PATH=${ZLIB_ROOT}/include
-DZLIB_LIBRARY:FILEPATH=${ZLIB_ROOT}/lib/libz.${SOLIB_EXT}
Without having include_directories( ${ZLIB_INCLUDE_DIRS} ) after you found
the package, you loose information where to find the headers. It only works
if use assume that zlib is always installed on the system.
Same applies to all other required/optional external libs (e.g., readline).
At the same time, cmake/FindReadline.cmake actually checks for two packages,
readline and ncurses. There are such variables READLINE_INCLUDE_DIR,
READLINE_LIBRARY, and NCURSES_LIBRARY. Yet there is no NCURSES_INCLUDE_DIR.
Why ncurses is included into cmake/FindReadline.cmake?
I would suggest to revise CMake scripts.
_______________________________________________________
Reply to this item at:
<http://savannah.cern.ch/bugs/?100735>
_______________________________________________
Message sent via/by LCG Savannah
http://savannah.cern.ch/
########################################################################
Use REPLY-ALL to reply to list
To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1
|