CMake: Properly include lzma include directories

This commit is contained in:
TellowKrinkle
2022-08-01 17:35:34 -05:00
parent 048f6fac52
commit 1bc133f3ae
3 changed files with 15 additions and 8 deletions

View File

@ -8,3 +8,13 @@ function(dolphin_alias_library new old)
endif()
add_library(${new} ALIAS _alias_${library_no_namespace})
endfunction()
# Makes an imported target if it doesn't exist. Useful for when find scripts from older versions of cmake don't make the targets you need
function(dolphin_make_imported_target_if_missing target lib)
if(${lib}_FOUND AND NOT TARGET ${target})
add_library(_${lib} INTERFACE)
target_link_libraries(_${lib} INTERFACE "${${lib}_LIBRARIES}")
target_include_directories(_${lib} INTERFACE "${${lib}_INCLUDE_DIRS}")
add_library(${target} ALIAS _${lib})
endif()
endfunction()