Skip to content

Commit

Permalink
build: Clean up the find-module for lksctp-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Haber-Kucharsky committed Dec 16, 2018
1 parent c2bd3f6 commit c9bc41a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions cmake/Findlksctp-tools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,32 @@
# Copyright (C) 2018 Scylladb, Ltd.
#

find_path (lksctp-tools_INCLUDE_DIR
NAMES netinet/sctp.h)

find_library (lksctp-tools_LIBRARY
NAMES sctp)

if (lksctp-tools_INCLUDE_DIR AND lksctp-tools_LIBRARY)
set (lksctp-tools_FOUND ON)
set (lksctp-tools_INCLUDE_DIRS ${lksctp-tools_INCLUDE_DIR})
set (lksctp-tools_LIBRARIES ${lksctp-tools_LIBRARY})
endif ()
find_path (lksctp-tools_INCLUDE_DIR
NAMES netinet/sctp.h)

mark_as_advanced (
lksctp-tools_LIBRARY
lksctp-tools_INCLUDE_DIR)

include (FindPackageHandleStandardArgs)

find_package_handle_standard_args (lksctp-tools
FOUND_VAR lksctp-tools_FOUND
REQUIRED_VARS
lksctp-tools_INCLUDE_DIR
lksctp-tools_LIBRARY)
lksctp-tools_LIBRARY
lksctp-tools_INCLUDE_DIR)

set (lksctp-tools_LIBRARIES ${lksctp-tools_LIBRARY})
set (lksctp-tools_INCLUDE_DIRS ${lksctp-tools_INCLUDE_DIR})

if (lksctp-tools_FOUND AND NOT (TARGET lksctp-tools::lksctp-tools))
add_library (lksctp-tools::lksctp-tools UNKNOWN IMPORTED)

set_target_properties (lksctp-tools::lksctp-tools
PROPERTIES
IMPORTED_LOCATION ${lksctp-tools_LIBRARY}
IMPORTED_LOCATION ${lksctp-tools_LIBRARIES}
INTERFACE_INCLUDE_DIRECTORIES ${lksctp-tools_INCLUDE_DIRS})
endif ()

Expand Down

0 comments on commit c9bc41a

Please sign in to comment.