-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathLCIConfig.cmake.in
50 lines (38 loc) · 1.98 KB
/
LCIConfig.cmake.in
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
if (NOT TARGET LCI::LCT)
@PACKAGE_INIT@
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/LCI")
set_and_check(LCT_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
set_and_check(LCT_SHARED_LIBRARY "@PACKAGE_CMAKE_INSTALL_LIBDIR@/@CMAKE_SHARED_LIBRARY_PREFIX@lct@CMAKE_SHARED_LIBRARY_SUFFIX@")
include(CMakeFindDependencyMacro)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_dependency(Threads)
add_library(LCI::LCT SHARED IMPORTED)
set_target_properties(LCI::LCT PROPERTIES
IMPORTED_LOCATION ${LCT_SHARED_LIBRARY}
)
target_include_directories(LCI::LCT INTERFACE ${LCT_INCLUDE_DIRS})
target_link_libraries(LCI::LCT INTERFACE Threads::Threads)
check_required_components(LCT)
set(LCI_WITH_LCT_ONLY @LCI_WITH_LCT_ONLY@)
if (NOT LCI_WITH_LCT_ONLY)
find_dependency(@FABRIC@)
set_and_check(LCI_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
set_and_check(LCI_SHARED_LIBRARY "@PACKAGE_CMAKE_INSTALL_LIBDIR@/@CMAKE_SHARED_LIBRARY_PREFIX@lci@CMAKE_SHARED_LIBRARY_SUFFIX@")
# set_and_check(LCI_STATIC_LIBRARY "@PACKAGE_CMAKE_INSTALL_LIBDIR@/@CMAKE_STATIC_LIBRARY_PREFIX@lci@CMAKE_STATIC_LIBRARY_SUFFIX@")
add_library(LCI::LCI SHARED IMPORTED)
set_target_properties(LCI::LCI PROPERTIES
IMPORTED_LOCATION ${LCI_SHARED_LIBRARY}
)
target_include_directories(LCI::LCI INTERFACE ${LCI_INCLUDE_DIRS})
target_link_libraries(LCI::LCI INTERFACE Threads::Threads @FABRIC@::@FABRIC@ LCI::LCT)
# add_library(LCI::LCI ALIAS LCI::Shared)
# add_library(LCI::Static STATIC IMPORTED)
# set_target_properties(LCI::Static PROPERTIES
# IMPORTED_LOCATION ${LCI_STATIC_LIBRARY}
# )
# target_include_directories(LCI::Static INTERFACE ${LCI_INCLUDE_DIRS})
# target_link_libraries(LCI::Static INTERFACE Threads::Threads @FABRIC@::@FABRIC@)
check_required_components(LCI)
endif()
endif()