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
Collaborator

Updates to:

  • ConfigureChecks.cmake - Change the test for libXss to look ask where the library is first, then find out if it has the required API function. The OpenGL test now includes the library paths and include paths returned from pkg_search_module.
  • kcontrol/energy/CMakeLists.txt - use the library flags and include paths in the API test, and include the link/include directories for libXext.
  • twin/compton-tde/CMakeLists.txt - complete the link/include directories to take into account the optional dependencies
  • tdm/backend/CMakeLists.txt - add missing link/include directories
  • nsplugins/viewer/CMakeLists.txt - add missing glib2 link directory
  • drkonqi/CMakeLists.txt - add missing libr link directory (this seems to the the only libr link in tdebase that isn't happy with the LINK_PRIVATE in tdelibs!).
Updates to: - ConfigureChecks.cmake - Change the test for libXss to look ask where the library is first, then find out if it has the required API function. The OpenGL test now includes the library paths and include paths returned from pkg_search_module. - kcontrol/energy/CMakeLists.txt - use the library flags and include paths in the API test, and include the link/include directories for libXext. - twin/compton-tde/CMakeLists.txt - complete the link/include directories to take into account the optional dependencies - tdm/backend/CMakeLists.txt - add missing link/include directories - nsplugins/viewer/CMakeLists.txt - add missing glib2 link directory - drkonqi/CMakeLists.txt - add missing libr link directory (this seems to the the only libr link in tdebase that isn't happy with the LINK_PRIVATE in tdelibs!).
aneejit1 changed title from WIP: Improve detection of libXss, OpenGL, and libXext DPMS functionality, plus add include/link directories to Improve detection of libXss, OpenGL, and libXext DPMS functionality, plus add include/link directories 4 years ago
SlavekB requested changes 4 years ago
SlavekB left a comment
Owner

There are issues that cause FTBFS.

There 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 )
Owner

On standard systems, where libraries are located on system paths, ${XSS_LIBRARY_DIRS} will be empty. This causes the wrong number of arguments to call check_library_exists => it is necessary to use quotation marks around ${XSS_LIBRARY_DIRS}.

On standard systems, where libraries are located on system paths, `${XSS_LIBRARY_DIRS}` will be empty. This causes the wrong number of arguments to call `check_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 )
Owner

Same as above => ${XEXT_LIBRARY_DIRS} needs to be in quotation marks.

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}" )
Owner

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.

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.
Poster
Collaborator

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.

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}" )
Owner

Same as above – using CMAKE_REQUIRED_LIBRARIES is necessary.

Same as above – using `CMAKE_REQUIRED_LIBRARIES` is necessary.
Poster
Collaborator

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.

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.
SlavekB approved these changes 4 years ago
SlavekB left a comment
Owner

Great, problems solved, now it looks good.

Great, problems solved, now it looks good.
aneejit1 closed this pull request 4 years ago
SlavekB deleted branch bug/build-issues 4 years ago
SlavekB added this to the R14.0.9 release milestone 4 years ago
The pull request has been manually merged as 036992eec5.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/tdebase#156
Loading…
There is no content yet.