View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013316CMakeCMakepublic2012-06-19 05:292012-10-24 17:20
ReporterGeorge Petasis 
Assigned To 
PrioritynormalSeverityblockReproducibilityalways
StatusclosedResolutionno change required 
PlatformLinux 32/64 bitsOSFedoraOS Version17
Product VersionCMake 2.8.8 
Target VersionCMake 2.8.10Fixed in VersionCMake 2.8.10 
Summary0013316: FIND_PACKAGE ( X11 REQUIRED ) returns garbage...
DescriptionHi all,

The following code:

MESSAGE ( STATUS "Searching for X11..." )
FIND_PACKAGE ( X11 REQUIRED )
IF ( X11_FOUND )
      INCLUDE_DIRECTORIES ( ${X11_INCLUDE_DIR} )
      LINK_LIBRARIES ( ${X11_LIBRARIES} )
      MESSAGE ( STATUS " X11_INCLUDE_DIR: " ${X11_INCLUDE_DIR} )
      MESSAGE ( STATUS " X11_LIBRARIES: " ${X11_LIBRARIES} )
ENDIF ( X11_FOUND )

Prints under Fedora 17:

Searching for X11...
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/libX11.so
-- X11_INCLUDE_DIR: /usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include/usr/include
-- X11_LIBRARIES: /usr/lib/libSM.so/usr/lib/libICE.so/usr/lib/libX11.so/usr/lib/libXext.so
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0029746)
Rex Dieter (reporter)
2012-06-19 15:50
edited on: 2012-06-19 15:51

What make you think the values are garbage? They are lists (and they look legit to me). maybe try instead:

MESSAGE ( STATUS " X11_INCLUDE_DIR: ${X11_INCLUDE_DIR}" )
MESSAGE ( STATUS " X11_LIBRARIES: ${X11_LIBRARIES}" )

putting the vars inside the quotes to make it clearer. On my box, I get:
-- X11_INCLUDE_DIR: /usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include;/usr/include
-- X11_LIBRARIES: /usr/lib64/libSM.so;/usr/lib64/libICE.so;/usr/lib64/libX11.so;/usr/lib64/libXext.so

(0029778)
George Petasis (reporter)
2012-06-20 14:17

I didn't know that it was a list, that was simply print wrong.

If it is a list, then this is not a bug.
(0030473)
Rolf Eike Beer (developer)
2012-08-13 10:23

So it looks like there is no bug and we can just close this?

But looking at this I think we should do a list(REMOVE_DUPLICATES X11_INCLUDE_DIR) at the end of FindX11.cmake, no?
(0030570)
George Petasis (reporter)
2012-08-13 12:46

Yes, this can be closed. It would be nice if duplicates can be removed, but it is not so important.
(0030572)
Rolf Eike Beer (developer)
2012-08-13 13:41

Closing since no change is required. The simplification is en route for 2.8.10.

 Issue History
Date Modified Username Field Change
2012-06-19 05:29 George Petasis New Issue
2012-06-19 15:50 Rex Dieter Note Added: 0029746
2012-06-19 15:51 Rex Dieter Note Edited: 0029746
2012-06-20 14:17 George Petasis Note Added: 0029778
2012-08-13 10:23 Rolf Eike Beer Note Added: 0030473
2012-08-13 12:46 George Petasis Note Added: 0030570
2012-08-13 13:41 Rolf Eike Beer Note Added: 0030572
2012-08-13 13:41 Rolf Eike Beer Status new => closed
2012-08-13 13:41 Rolf Eike Beer Resolution open => no change required
2012-10-24 17:20 David Cole Fixed in Version => CMake 2.8.10
2012-10-24 17:20 David Cole Target Version => CMake 2.8.10


Copyright © 2000 - 2018 MantisBT Team