# CMake woes on Windows

**URL:** <https://forum.juce.com/t/cmake-woes-on-windows/54514>\
**Category:** General JUCE discussion\
**Created:** [January 13, 2023, 3:02pm UTC](https://forum.juce.com/t/cmake-woes-on-windows/54514 "2023-01-13T15:02:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [January 13, 2023, 3:02pm UTC](https://forum.juce.com/t/cmake-woes-on-windows/54514/1 "2023-01-13T15:02:06Z")

</div>

Hi, so I’ve been using CMake quite happily for a while and all was good.

Just been trying to track down an issue that I couldn’t reproduce on Mac or through Projucer on Windows and it turns out that I had 7.0.2, 7.0.3 and 7.0.4 installed on Windows (I’m using sustemwide version of JUCE, not per project) and it was still using 7.0.2.

I tried reinstalling JUCE again and it kept on using 7.0.2.  
So, I’ve removed all JUCE installation inside JUCE/includes and JUCE/lib and started from scratch and have just installed 7.0.4

Now, however, when I try to configure my project I get the following:

CMake Error at CMakeLists.txt:13 (find\_package):  
Could not find a configuration file for package “JUCE” that is compatible  
with requested version “”.

The following configuration files were considered but not accepted:

```
C:/Users/leehu/Dev/JUCE/lib/cmake/JUCE-7.0.4/JUCEConfig.cmake, version: 7.0.4 (32bit)

```

Anyone any idea?

Also, Mac seemed to happily swithc from 7.0.2 to 7.0.3 and 7.0.4, but Windows was stuck on 7.0.2. Where is this actually configured?

Thanks

---

<div class="post-metadata">

**Author:** ![mcmartin](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mcmartin/32/7432_2.png) [@mcmartin](https://forum.juce.com/u/mcmartin)\
**Post date:** [January 13, 2023, 7:23pm UTC](https://forum.juce.com/t/cmake-woes-on-windows/54514/2 "2023-01-13T19:23:03Z")

</div>

When I see

```auto
version: 7.0.4 (32bit)

```

the first thing that jumps to my mind is that your project is targeting x64, so CMake dismisses that installation that targets Win32.

How are you building and installing JUCE exactly?

---

<div class="post-metadata">

**Author:** ![benvining](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/benvining/32/9922_2.png) [@benvining](https://forum.juce.com/u/benvining)\
**Post date:** [January 13, 2023, 7:37pm UTC](https://forum.juce.com/t/cmake-woes-on-windows/54514/3 "2023-01-13T19:37:15Z")

</div>

That shouldn’t matter, right, because installing JUCE just means copying the module sources to system directories, modules aren’t actually built and installed as binaries. The only thing I could see being an issue is if the juceaide is installed in prebuilt binary form, but I’m not sure if that’s the case.

---

<div class="post-metadata">

**Author:** ![benvining](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/benvining/32/9922_2.png) [@benvining](https://forum.juce.com/u/benvining)\
**Post date:** [January 13, 2023, 7:37pm UTC](https://forum.juce.com/t/cmake-woes-on-windows/54514/4 "2023-01-13T19:37:53Z")

</div>

> [@leehu](#):
>
> Could not find a configuration file for package “JUCE” that is compatible  
> with requested version “”

This looks like you requested an empty version string. How exactly are you calling `find_package(JUCE)`?

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [January 14, 2023, 11:28am UTC](https://forum.juce.com/t/cmake-woes-on-windows/54514/5 "2023-01-14T11:28:51Z")

</div>

thx for the replies. i remove the cmake\_build\_install folder in addition to the others above and reran the juce install and everything is working fine now.

I’ve been using these commands from the juce docs:

```auto
# Go to JUCE directory
cd /path/to/clone/JUCE
# Configure build with library components only
cmake -B cmake-build-install -DCMAKE_INSTALL_PREFIX=/path/to/JUCE/install
# Run the installation
cmake --build cmake-build-install --target install

```
