-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathFindowfat.cmake
33 lines (28 loc) · 883 Bytes
/
Findowfat.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
include(FindPackageHandleStandardArgs)
find_path(OWFAT_INCLUDE_DIR
PATH_SUFFIXES libowfat
PATHS /opt/diet/include
NAMES taia.h
)
mark_as_advanced(OWFAT_INCLUDE_DIR)
find_library(OWFAT_LIBRARY
NAMES owfat
PATHS /opt/diet/lib
)
mark_as_advanced(OWFAT_LIBRARY)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(owfat DEFAULT_MSG OWFAT_LIBRARY OWFAT_INCLUDE_DIR)
if(OWFAT_FOUND)
if (NOT TARGET owfat::owfat)
add_library(owfat::owfat STATIC IMPORTED)
set_target_properties(owfat::owfat PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${OWFAT_INCLUDE_DIR}")
set_target_properties(owfat::owfat PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${OWFAT_LIBRARY}")
if (CMAKE_SOCKET_LIB)
set_target_properties(owfat::owfat PROPERTIES
INTERFACE_LINK_LIBRARIES "${CMAKE_SOCKET_LIB}")
endif ()
endif ()
set(OWFAT_INCLUDE_DIRS ${OWFAT_INCLUDE_DIR})
endif()