Use Find*.cmake files for backend discovery

This commit is contained in:
luisangelsm
2026-03-29 23:15:24 +02:00
parent 52dd4e4c3c
commit 268b23376b
6 changed files with 221 additions and 144 deletions

View File

@ -15,7 +15,7 @@ endfunction()
function(yacreader_add_imported_library target_name)
set(options)
set(oneValueArgs TYPE LOCATION IMPORTED_IMPLIB INCLUDE_DIR)
set(multiValueArgs LINK_LIBRARIES)
set(multiValueArgs LINK_LIBRARIES COMPILE_DEFINITIONS)
cmake_parse_arguments(YR "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT YR_TYPE)
@ -41,4 +41,8 @@ function(yacreader_add_imported_library target_name)
if(YR_LINK_LIBRARIES)
set_property(TARGET "${target_name}" PROPERTY INTERFACE_LINK_LIBRARIES "${YR_LINK_LIBRARIES}")
endif()
if(YR_COMPILE_DEFINITIONS)
set_property(TARGET "${target_name}" PROPERTY INTERFACE_COMPILE_DEFINITIONS "${YR_COMPILE_DEFINITIONS}")
endif()
endfunction()