mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 10:09:36 -06:00
CMake: Use targets for all optionally-external dependencies
This commit is contained in:
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()
|
Reference in New Issue
Block a user