ovni/cmake/FindNanos6.cmake
Rodrigo Arias 03c299b7a8 Add NODES runtime tests
Also add Nanos6 and NODES package modules
2022-10-04 19:54:55 +02:00

21 lines
512 B
CMake

include(GNUInstallDirs)
find_library(NANOS6_LIBRARY NAMES nanos6)
find_path(NANOS6_INCLUDE_DIR nanos6.h)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Nanos6 DEFAULT_MSG
NANOS6_LIBRARY NANOS6_INCLUDE_DIR)
if(NOT NANOS6_FOUND)
return()
endif()
if(NOT TARGET Nanos6::nanos6)
add_library(Nanos6::nanos6 SHARED IMPORTED)
set_target_properties(Nanos6::nanos6 PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${NANOS6_INCLUDE_DIR}"
IMPORTED_LOCATION ${NANOS6_LIBRARY})
endif()