CMake woes on Windows

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?


When I see

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?

1 Like

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.

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


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:

# 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