From 71c650097eefc28c814c422c69c194c026ce2497 Mon Sep 17 00:00:00 2001 From: reuk Date: Mon, 21 Sep 2020 16:39:26 +0100 Subject: [PATCH] CMake: Add support for the searchpaths module configuration option --- extras/Build/CMake/JUCEUtils.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake index 3536994dff..2f3d679334 100644 --- a/extras/Build/CMake/JUCEUtils.cmake +++ b/extras/Build/CMake/JUCEUtils.cmake @@ -608,6 +608,15 @@ function(juce_add_module module_path) _juce_get_metadata("${metadata_dict}" dependencies module_dependencies) target_link_libraries(${module_name} INTERFACE ${module_dependencies}) + _juce_get_metadata("${metadata_dict}" searchpaths module_searchpaths) + + if(NOT module_searchpaths STREQUAL "") + foreach(module_searchpath IN LISTS module_searchpaths) + target_include_directories(${module_name} + INTERFACE "${module_path}/${module_searchpath}") + endforeach() + endif() + if(JUCE_ARG_INSTALL_PATH) install(DIRECTORY "${module_path}" DESTINATION "${JUCE_ARG_INSTALL_PATH}") endif()