Bug 143640 - [GTK] Useless code in OptionsGTK.cmake
Summary: [GTK] Useless code in OptionsGTK.cmake
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Minor
Assignee: Nobody
URL:
Keywords:
Depends on: 143558 144105
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-11 19:21 PDT by Michael Catanzaro
Modified: 2015-04-27 20:49 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2015-04-11 19:21:22 PDT
In OptionsGTK.cmake we have this:

# This part can be simplified once CMake 2.8.6 is required and
# CMakePushCheckState can be used. We need to have OPENGL_INCLUDE_DIR as part
# of the directories check_include_files() looks for in case OpenGL is
# installed into a non-standard location.
if (ENABLE_X11_TARGET)
    set(REQUIRED_INCLUDES_OLD ${CMAKE_REQUIRED_INCLUDES})
    set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${OPENGL_INCLUDE_DIR})
    set(CMAKE_REQUIRED_INCLUDES ${REQUIRED_INCLUDES_OLD})

    ...
endif ()

Which does nothing. This broke sometime recentlyish when the check for GLX moved elsewhere in the file. Should be:

set(REQUIRED_INCLUDES_OLD ${CMAKE_REQUIRED_INCLUDES})
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${OPENGL_INCLUDE_DIR})
# We don't use find_package for GLX because it is part of -lGL, unlike EGL.
check_include_files("GL/glx.h" GLX_FOUND)
set(CMAKE_REQUIRED_INCLUDES ${REQUIRED_INCLUDES_OLD})

I will fix this in bug #143558, since it is hard to split my changes to OptionsGTK.cmake into multiple patches. I'm filing this bug just to make sure we don't lose track of it.
Comment 1 Michael Catanzaro 2015-04-22 13:55:33 PDT
Note that we nowadays require CMake 2.8.8.