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

**URL:** https://discourse.cmake.org/t/cmake-and-wsl-not-playing-well-together-source-directory-does-not-appear-to-contain-cmakelists-txt/5788
**Category:** Usage
**Created:** [June 3, 2022, 10:42am UTC](https://discourse.cmake.org/t/cmake-and-wsl-not-playing-well-together-source-directory-does-not-appear-to-contain-cmakelists-txt/5788 "2022-06-03T10:42:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![lbrtchx](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/l/f04885/32.png) [@lbrtchx](https://discourse.cmake.org/u/lbrtchx)
#### Post date: [June 3, 2022, 10:42am UTC](https://discourse.cmake.org/t/cmake-and-wsl-not-playing-well-together-source-directory-does-not-appear-to-contain-cmakelists-txt/5788/1 "2022-06-03T10:42:07Z")

</div>

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](http://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?

---

<div class="post-metadata">

### Author: ![fenrir](https://discourse.cmake.org/user_avatar/discourse.cmake.org/fenrir/32/734_2.png) [@fenrir](https://discourse.cmake.org/u/fenrir)
#### Post date: [June 3, 2022, 10:52am UTC](https://discourse.cmake.org/t/cmake-and-wsl-not-playing-well-together-source-directory-does-not-appear-to-contain-cmakelists-txt/5788/2 "2022-06-03T10:52:21Z")

</div>

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 `/`.

---

<div class="post-metadata">

### Author: ![lbrtchx](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/l/f04885/32.png) [@lbrtchx](https://discourse.cmake.org/u/lbrtchx)
#### Post date: [June 3, 2022, 1:14pm UTC](https://discourse.cmake.org/t/cmake-and-wsl-not-playing-well-together-source-directory-does-not-appear-to-contain-cmakelists-txt/5788/3 "2022-06-03T13:14:59Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [June 6, 2022, 1:54pm UTC](https://discourse.cmake.org/t/cmake-and-wsl-not-playing-well-together-source-directory-does-not-appear-to-contain-cmakelists-txt/5788/4 "2022-06-06T13:54:39Z")

</div>

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