Improve detection of libXss, OpenGL, and libXext DPMS functionality, plus add include/link directories #156
Manually merged
aneejit1
merged 1 commits from bug/build-issues
into master
4 years ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'bug/build-issues'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Updates to:
WIP: Improve detection of libXss, OpenGL, and libXext DPMS functionality, plus add include/link directoriesto Improve detection of libXss, OpenGL, and libXext DPMS functionality, plus add include/link directories 4 years agoThere are issues that cause FTBFS.
if( XSS_FOUND )
tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${XSS_INCLUDE_DIRS}" )
check_library_exists( Xss XScreenSaverQueryInfo ${XSS_LIBRARY_DIRS} HAVE_XSSLIB )
On standard systems, where libraries are located on system paths,
${XSS_LIBRARY_DIRS}
will be empty. This causes the wrong number of arguments to callcheck_library_exists
=> it is necessary to use quotation marks around${XSS_LIBRARY_DIRS}
.endif( XSS_FOUND )
if( NOT HAVE_XSSLIB )
check_library_exists( Xext XScreenSaverQueryInfo ${XEXT_LIBRARY_DIRS} HAVE_XEXT_XSS )
Same as above =>
${XEXT_LIBRARY_DIRS}
needs to be in quotation marks.tde_save( CMAKE_REQUIRED_LIBRARIES )
set( CMAKE_REQUIRED_LIBRARIES ${GL_LIBRARIES} )
tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${GL_INCLUDE_DIRS}" )
tde_save_and_set( CMAKE_REQUIRED_LINK_OPTIONS "${GL_LDFLAGS}" )
I have no idea in which version of CMake the use of the
CMAKE_REQUIRED_LINK_OPTIONS
variable was added, but this causes both Debian Wheezy and Debian Stretch to fail.CMAKE_REQUIRED_LIBRARIES
seems to be necessary.It was 3.14 that it appeared in. I've just checked the dates on 3.14 and I hadn't realised how quickly cmake has been cranking up it's release numbers! 3.14 was only last year and they're already setting up to release 3.18. I've put the "CMAKE_REQUIRED_LIBRARIES" settings back and I'm currently testing to see if the "CMAKE_REQUIRED_FLAGS" variable will do the same job as "CMAKE_REQUIRE_LINK_OPTIONS"; if it does, I'll use FLAGS rather than LINK_OPTIONS.
set( CMAKE_REQUIRED_LIBRARIES Xext )
set( CMAKE_REQUIRED_INCLUDES "${XEXT_INCLUDE_DIRS}" )
set( CMAKE_REQUIRED_LINK_OPTIONS "${XEXT_LDFLAGS}" )
Same as above – using
CMAKE_REQUIRED_LIBRARIES
is necessary.OK, the quotes are in and CMAKE_REQUIRED_LIBRARIES is back. I've switched to using CMAKE_REQUIRED_FLAGS instead of the newer CMAKE_REQUIRED_LINK_OPTIONS as that works just as well and is rather more backward compatible.
Great, problems solved, now it looks good.
036992eec5
.