-
Notifications
You must be signed in to change notification settings - Fork 86
/
Findneural-fortran.cmake
31 lines (25 loc) · 1.13 KB
/
Findneural-fortran.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
# Find the native neural-fortran includes and library
#
# neural-fortran_INCLUDE_DIRS - where to find nf.mod, etc.
# neural-fortran_LIBRARIES - List of libraries when using neural-fortran.
# neural-fortran_FOUND - True if neural-fortran found.
#
# To use neural-fortran_ROOT_DIR to specify the prefix directory of neural-fortran
find_path(neural-fortran_INCLUDE_DIRS
NAMES nf.mod
HINTS ${neural-fortran_ROOT_DIR}/include ENV neural-fortran_INCLUDE_DIR)
find_library(neural-fortran_LIBRARIES
NAMES neural-fortran
HINTS ${neural-fortran_ROOT_DIR}/lib ENV neural-fortran_LIB_DIR)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(neural-fortran DEFAULT_MSG neural-fortran_LIBRARIES neural-fortran_INCLUDE_DIRS)
mark_as_advanced(
neural-fortran_LIBRARIES
neural-fortran_INCLUDE_DIRS)
if(neural-fortran_FOUND AND NOT (TARGET neural-fortran::neural-fortran))
add_library (neural-fortran::neural-fortran STATIC IMPORTED)
set_target_properties(neural-fortran::neural-fortran
PROPERTIES
IMPORTED_LOCATION ${neural-fortran_LIBRARIES}
INTERFACE_INCLUDE_DIRECTORIES ${neural-fortran_INCLUDE_DIRS})
endif()