How to disable a CMAKE option

  android, android-ndk, c++, cmake

On ${CMAKE_CURRENT_SOURCE_DIR}/JUCE, there is:

option(JUCE_BUILD_EXTRAS "Add build targets for the Projucer and other tools" OFF)

if(JUCE_BUILD_EXTRAS)
    add_subdirectory(extras)
endif()

link: https://github.com/juce-framework/JUCE/blob/master/CMakeLists.txt#L57

So this is what I did:

set(JUCE_BUILD_EXTRAS OFF)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/JUCE)

However it still tries to build extras. I’m on Android Studio.

What should I do?

I also tried set(JUCE_BUILD_EXTRAS OFF)

The default value is OFF and even then it tried to build.

I always get these errors when trying to disable something on Android CMAKE but it always fails

Source: Windows Questions C++

LEAVE A COMMENT