mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-01 15:16:22 +00:00
CMake: Use targets for all optionally-external dependencies
This commit is contained in:
parent
63090d411d
commit
5b10a80401
25 changed files with 172 additions and 133 deletions
15
CMake/FindLZO.cmake
Normal file
15
CMake/FindLZO.cmake
Normal file
|
@ -0,0 +1,15 @@
|
|||
find_path(LZO_INCLUDE_DIR lzo/lzo1x.h)
|
||||
find_library(LZO_LIBRARY lzo2)
|
||||
mark_as_advanced(LZO_INCLUDE_DIR LZO_LIBRARY)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LZO DEFAULT_MSG
|
||||
LZO_INCLUDE_DIR LZO_LIBRARY)
|
||||
|
||||
if(LZO_FOUND AND NOT TARGET LZO::LZO)
|
||||
add_library(LZO::LZO UNKNOWN IMPORTED)
|
||||
set_target_properties(LZO::LZO PROPERTIES
|
||||
IMPORTED_LOCATION "${LZO_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LZO_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
Loading…
Add table
Add a link
Reference in a new issue