Summary: | CMake per-target property INCLUDE_DIRECTORIES incompatible with CMake 2.8.7 | ||
---|---|---|---|
Product: | WebKit | Reporter: | Nikos Andronikos <nikos.andronikos> |
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW --- | ||
Severity: | Normal | CC: | gustavo, mrobinson, rakuco, zan |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | Linux |
Description
Nikos Andronikos
2014-05-04 21:00:55 PDT
How easy is it for Ubuntu 12.04 users to move to a newer CMake? From a purely technical point of view just raising the CMake requirements to 2.8.8 would be the easiest approach (it's a matter of changing the fist line of the top-level CMakeLists.txt). The GTK+ port would like maintain compatibility for old CMake versions as long as possible. Probably the best thing to do here is to make a macro that checks the CMake version and falls back to setting the global include directory. (In reply to comment #2) > The GTK+ port would like maintain compatibility for old CMake versions as long as possible. Probably the best thing to do here is to make a macro that checks the CMake version and falls back to setting the global include directory. From what I understand the logic is currently structured as follows: USE_GTK2 in Source/cmake/OptionsGTK.cmake is undefined. Therefore, GTK_LIBRARIES, GTK_INCLUDE_DIRS etc.. are defined to use the GTK3/GDK3 libraries and include directories (Source/cmake/OptionsGTK.cmake:181). Then, in the Source/WebCore/PlatformGTK.cmake file the following properties are set: 1. The WebCorePlatformGTK2 target uses the GTK2_INCLUDE_DIRS and GDK2_INCLUDE_DIRS 2. The WebCorePlatformGTK target uses the GTK_INCLUDE_DIRS and GDK_INCLUDE_DIRS (which are defined as GTK3/GDK3) So if this is the required logic I am not sure that overriding with a global include directory is the right way to go. (In reply to comment #3) > So if this is the required logic I am not sure that overriding with a global include directory is the right way to go. That does present a bit of a problem then. Do you know how per-target includes were handled before 2.8.8? (In reply to comment #4) > (In reply to comment #3) > > > So if this is the required logic I am not sure that overriding with a global include directory is the right way to go. > > That does present a bit of a problem then. Do you know how per-target includes were handled before 2.8.8? According to this link: http://www.cmake.org/pipermail/cmake/2013-February/053765.html There seem to be a couple of options: 1. Create a folder per target and call include_directories() in each folder 2. Create a wrapper around the "add_target" command So, if my understanding is correct we should make the implicit requirement explicit and then open a bug about extending support into the past. |