Browse Source

CMake: Allow multiple calls to find_package(JUCE) in a single build

tags/2021-05-28
reuk ed 5 years ago
parent
commit
1dd3b6a711
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      extras/Build/CMake/JUCEConfig.cmake.in

+ 5
- 3
extras/Build/CMake/JUCEConfig.cmake.in View File

@@ -30,9 +30,11 @@ if(_IMPORT_PREFIX STREQUAL "/")
set(_IMPORT_PREFIX "")
endif()

add_executable(juce::juceaide IMPORTED)
set_target_properties(juce::juceaide PROPERTIES
IMPORTED_LOCATION "${_IMPORT_PREFIX}/@JUCE_CMAKE_BINARY_BUILDER_NAME@")
if(NOT TARGET juce::juceaide)
add_executable(juce::juceaide IMPORTED)
set_target_properties(juce::juceaide PROPERTIES
IMPORTED_LOCATION "${_IMPORT_PREFIX}/@JUCE_CMAKE_BINARY_BUILDER_NAME@")
endif()

set(_IMPORT_PREFIX)



Loading…
Cancel
Save