CMake and WSL not playing well together? source directory "/" does not appear to contain CMakeLists.txt ...

based on the similarity with my subject string five other posts were suggested to me, which I read but only one of them was relevant to my case.

Basically, I am trying to compile WebKit2 on WSL. I was expecting to run into run of the mill problems (with missing libraries), but then I decided to use the NTFS partition of my local disk to make the compilation run faster. I do need to use WSL for “political reasons”. I am a teacher and my school’s tech support would not give my students Linux labtops (kids need to see colors and things moving on a screen, preferably their cell phones: webkit’s minibrowser) …

This is what I got:

Microsoft Windows [Version 10.0.19043.1706]
(c) Microsoft Corporation. All rights reserved.

…>wsl -l -v
NAME STATE VERSION

  • Debian Stopped 1

…>
~
$ uname -a
Linux CP-HP-14515 4.4.0-19041-Microsoft #1237-Microsoft Sat Sep 11 14:32:00 PST 2021 x86_64 GNU/Linux

$ which cmake
/usr/bin/cmake

$ cmake --version
cmake version 3.18.4

CMake suite maintained and supported by Kitware (kitware.com/cmake).
$

and this is my full cmake statement:

_DT=$(date +%Y%m%d%H%M%S)
LOG_FL="logs/webkit${_DT}_cmake.log"
echo “// __ $_LOG_FL: |${_LOG_FL}|”

time (
cmake -DCMAKE_BUILD_TYPE=Release /
-DCMAKE_INSTALL_PREFIX=/usr /
-DCMAKE_SKIP_RPATH=ON /
-DPORT=GTK /
-DLIB_INSTALL_DIR=/usr/lib /
-DUSE_LIBHYPHEN=OFF /
-DENABLE_GAMEPAD=OFF /
-DENABLE_MINIBROWSER=ON /
-DUSE_WOFF2=OFF /
-DUSE_SOUP2=ON /
-DUSE_WPE_RENDERER=ON /
-DENABLE_BUBBLEWRAP_SANDBOX=OFF /
-Wno-dev -GNinja > “${_LOG_FL}” 2>&1
) >> “${_LOG_FL}”

and the error message on my screen:

CMake Error: The source directory “/” does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
-bash: -DCMAKE_INSTALL_PREFIX=/usr: No such file or directory
-bash: -DCMAKE_SKIP_RPATH=ON: command not found
-bash: -DPORT=GTK: command not found
-bash: -DLIB_INSTALL_DIR=/usr/lib: No such file or directory
-bash: -DUSE_LIBHYPHEN=OFF: command not found
-bash: -DENABLE_GAMEPAD=OFF: command not found
-bash: -DENABLE_MINIBROWSER=ON: command not found
-bash: -DUSE_WOFF2=OFF: command not found
-bash: -DUSE_SOUP2=ON: command not found
-bash: -DUSE_WPE_RENDERER=ON: command not found
-bash: -DENABLE_BUBBLEWRAP_SANDBOX=OFF: command not found

The “No such file or directory” started happening after I moved to the new drive.

I had been using a plain Debian installation with less RAM but the compilation was taking too long.

I am speculating here, but could one of the problems be that the initial (un)taring I did on that Debian Linux box? If you need too, I could replicate the whole process all over again.

So, what is it I need to fix?

It looks like you wanted to run a multi-line command but used the wrong escaping for the line breaks. The escape character is \, and not /.

Thank you! It must have been most probably an editing mistake I made.
Correcting it brought me back to the apparent dead end where I was before:
CMake Error at Source/cmake/OptionsGTK.cmake:211 (message): libsoup is required.

You’ll want to install libsoup-dev (or similar) package.