Skip to content

Commit

Permalink
cmake: add LZ4::LZ4 target for LZ4
Browse files Browse the repository at this point in the history
Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Aug 6, 2018
1 parent 73fa175 commit c325327
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmake/modules/FindLZ4.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,12 @@ find_package_handle_standard_args(LZ4
VERSION_VAR LZ4_VERSION_STRING)

mark_as_advanced(LZ4_INCLUDE_DIR LZ4_LIBRARY)

if(LZ4_FOUND AND NOT (TARGET LZ4::LZ4))
add_library(LZ4::LZ4 UNKNOWN IMPORTED)
set_target_properties(LZ4::LZ4 PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${LZ4_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${LZ4_LIBRARY}"
VERSION "${LZ4_VERSION_STRING}")
endif()

0 comments on commit c325327

Please sign in to comment.