CMake can generate Eclipse project files, using either GNU Make or ninja: http://www.cmake.org/Wiki/Eclipse_CDT4_Generator The command to do so is almost identical to the normal CMake command. You just replace -G ninja with -G "Eclipse CDT4 - Ninja". Unfortunately, our CMake command is fairly complex, so it would be nice if we could use the same setup as the build-webkit script uses. For reference, the command we want to run looks like this: cmake -DPORT="GTK" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -G Eclipse CDT4 - Ninja --no-warn-unused-cli -DENABLE_3D_RENDERING=ON -DENABLE_ACCELERATED_2D_CANVAS=OFF -DENABLE_BATTERY_STATUS=OFF -DENABLE_BLOB=ON -DENABLE_CANVAS_PATH=ON -DENABLE_CANVAS_PROXY=OFF -DENABLE_CHANNEL_MESSAGING=ON -DENABLE_CSP_NEXT=ON -DENABLE_CSS_DEVICE_ADAPTATION=OFF -DENABLE_CSS_SHAPES=ON -DENABLE_CSS_FILTERS=OFF -DENABLE_CSS_GRID_LAYOUT=ON -DENABLE_CSS3_CONDITIONAL_RULES=OFF -DENABLE_CSS3_TEXT=ON -DENABLE_CSS3_TEXT_LINE_BREAK=OFF -DENABLE_CSS_BOX_DECORATION_BREAK=ON -DENABLE_CSS_IMAGE_ORIENTATION=ON -DENABLE_CSS_IMAGE_RESOLUTION=ON -DENABLE_CSS_IMAGE_SET=ON -DENABLE_CSS_REGIONS=ON -DENABLE_CSS_SHADERS=OFF -DENABLE_CSS_STICKY_POSITION=ON -DENABLE_CSS_COMPOSITING=OFF -DENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED=ON -DENABLE_CUSTOM_SCHEME_HANDLER=OFF -DENABLE_DATALIST_ELEMENT=OFF -DENABLE_DATA_TRANSFER_ITEMS=OFF -DENABLE_DETAILS_ELEMENT=ON -DENABLE_DEVICE_ORIENTATION=OFF -DENABLE_DOM4_EVENTS_CONSTRUCTOR=ON -DENABLE_DOWNLOAD_ATTRIBUTE=OFF -DENABLE_FILTERS=ON -DENABLE_FONT_LOAD_EVENTS=OFF -DENABLE_FTPDIR=ON -DENABLE_FULLSCREEN_API=ON -DENABLE_GAMEPAD=ON -DENABLE_GEOLOCATION=ON -DENABLE_HIGH_DPI_CANVAS=OFF -DENABLE_ICONDATABASE=ON -DENABLE_INDEXED_DATABASE=ON -DENABLE_INPUT_SPEECH=OFF -DENABLE_INPUT_TYPE_COLOR=OFF -DENABLE_INPUT_TYPE_DATE=OFF -DENABLE_INPUT_TYPE_DATETIME_INCOMPLETE=OFF -DENABLE_INPUT_TYPE_DATETIMELOCAL=OFF -DENABLE_INPUT_TYPE_MONTH=OFF -DENABLE_INPUT_TYPE_TIME=OFF -DENABLE_INPUT_TYPE_WEEK=OFF -DENABLE_INSPECTOR=ON -DENABLE_LEGACY_NOTIFICATIONS=OFF -DENABLE_LEGACY_VENDOR_PREFIXES=ON -DENABLE_LEGACY_WEB_AUDIO=ON -DENABLE_LINK_PREFETCH=ON -DENABLE_MATHML=ON -DENABLE_MEDIA_CAPTURE=OFF -DENABLE_MEDIA_SOURCE=ON -DENABLE_MEDIA_STATISTICS=OFF -DENABLE_MEDIA_STREAM=ON -DENABLE_METER_ELEMENT=ON -DENABLE_MHTML=ON -DENABLE_MOUSE_CURSOR_SCALE=OFF -DENABLE_NAVIGATOR_CONTENT_UTILS=OFF -DENABLE_NETSCAPE_PLUGIN_API=ON -DENABLE_NOSNIFF=OFF -DENABLE_NOTIFICATIONS=OFF -DENABLE_ORIENTATION_EVENTS=OFF -DENABLE_PAGE_VISIBILITY_API=ON -DENABLE_PLUGIN_PROXY_FOR_VIDEO=OFF -DENABLE_PERFORMANCE_TIMELINE=ON -DENABLE_PROGRESS_ELEMENT=ON -DENABLE_PROMISES=ON -DENABLE_PROXIMITY_EVENTS=OFF -DENABLE_QUOTA=OFF -DENABLE_RESOLUTION_MEDIA_QUERY=OFF -DENABLE_RESOURCE_TIMING=ON -DENABLE_REQUEST_ANIMATION_FRAME=ON -DENABLE_SECCOMP_FILTERS=OFF -DENABLE_SCRIPTED_SPEECH=OFF -DENABLE_SHARED_WORKERS=ON -DENABLE_SQL_DATABASE=ON -DENABLE_SUID_SANDBOX_LINUX=OFF -DENABLE_SVG_FONTS=ON -DUSE_SYSTEM_MALLOC=OFF -DENABLE_TEMPLATE_ELEMENT=ON -DENABLE_TEXT_AUTOSIZING=OFF -DWTF_USE_TILED_BACKING_STORE=OFF -DENABLE_TOUCH_EVENTS=ON -DENABLE_TOUCH_SLIDER=OFF -DENABLE_TOUCH_ICON_LOADING=OFF -DENABLE_USER_TIMING=ON -DENABLE_VIBRATION=OFF -DENABLE_VIDEO=ON -DENABLE_VIDEO_TRACK=ON -DENABLE_WEBGL=ON -DENABLE_WEB_AUDIO=ON -DENABLE_WEB_REPLAY=OFF -DENABLE_WEB_SOCKETS=ON -DENABLE_WEB_TIMING=ON -DENABLE_XHR_TIMEOUT=ON -DENABLE_XSLT=ON -DENABLE_FTL_JIT=OFF -DENABLE_LLINT_C_LOOP=OFF "/home/blong/workspace/webkit"
Created attachment 229990 [details] Patch This just creates an Eclipse project file when you run build-webkit. A more complex version might look for a --create-project argument, or maybe a new Tools/Scripts/create-project script. We can also generate other kinds of projects if we wanted to get into that (--create-project eclipse or --create-project kdevelop). Maybe a new script is the way to do since Apple will eventually want this for XCode?
So that creates a sort of weird project. It looks like the .project and .cproject files need to be at the project root for things to work entirely correctly. Just copying the result works: cp WebKitBuild/Debug/.*project . Running the cmake command against the root folder causes problems because it creates a bunch of files across the build tree, which is fairly annoying.
I also ran into an issue where C++11 features were causing trouble (std::function, std::unique_ptr, etc.). I had to manually define __cplusplus=201103L to fix that.
Have you seen bug #132190? That patch is already integrated and does what you need if Eclipse is detected.
Thanks for the heads up. Glad to see I wasn't the only one who thought of this. *** This bug has been marked as a duplicate of bug 132190 ***