Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge pull request #10936 from TellowKrinkle/FixIncludeDirs
CMake: Actually use the include directories specified by dependencies
- Loading branch information
Showing
3 changed files
with
31 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # like add_library(new ALIAS old) but avoids add_library cannot create ALIAS target "new" because target "old" is imported but not globally visible. on older cmake | ||
| # This can be replaced with a direct alias call once our minimum is cmake 3.18 | ||
| function(dolphin_alias_library new old) | ||
| string(REPLACE "::" "" library_no_namespace ${old}) | ||
| if (NOT TARGET _alias_${library_no_namespace}) | ||
| add_library(_alias_${library_no_namespace} INTERFACE) | ||
| target_link_libraries(_alias_${library_no_namespace} INTERFACE ${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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -68,8 +68,8 @@ target_link_libraries(discio | ||
| PUBLIC | ||
| core | ||
| BZip2::BZip2 | ||
| lzma | ||
| zstd | ||
| LibLZMA::LibLZMA | ||
| zstd::zstd | ||
|
|
||
| PRIVATE | ||
| fmt::fmt | ||