1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

CMake: Fix invalid DEPENDS argument passed to add_custom_command

add_custom_command rejects this argument in CMake 3.31+ according to
CMP0175.
This commit is contained in:
reuk 2024-12-10 11:21:17 +00:00
parent 80bb7b0861
commit 0be5ad1afc

View file

@ -877,6 +877,8 @@ function(_juce_create_windows_package source_target dest_target extension defaul
set(desktop_ini "${output_folder}/desktop.ini")
set(plugin_ico "${output_folder}/Plugin.ico")
target_sources(${dest_target} PRIVATE "${desktop_ini}" "${icon_file}")
file(GENERATE OUTPUT "${desktop_ini}"
CONTENT
"[.ShellClassInfo]\nIconResource=Plugin.ico,0\nIconFile=Plugin.ico\nIconIndex=0\n")
@ -884,7 +886,6 @@ function(_juce_create_windows_package source_target dest_target extension defaul
COMMAND "${CMAKE_COMMAND}" -E copy "${icon_file}" "${plugin_ico}"
COMMAND attrib +s "${desktop_ini}"
COMMAND attrib +s "${output_folder}"
DEPENDS "${icon_file}" "${desktop_ini}"
VERBATIM)
endif()
endfunction()
@ -1309,9 +1310,9 @@ function(_juce_set_plugin_target_properties shared_code_target kind)
_juce_set_copy_properties(${shared_code_target} ${target_name} "${output_path}" JUCE_UNITY_COPY_DIR)
else()
# On windows and linux, the gui script needs to be copied next to the unity output
target_sources(${target_name} PRIVATE "${script_file}")
add_custom_command(TARGET ${target_name} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy "${script_file}" "${products_folder}"
DEPENDS "${script_file}"
VERBATIM)
_juce_set_copy_properties(${shared_code_target}