Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit 9571497

Browse files
Aleksey Marchukdiyessi
authored andcommitted
Add all dependent libraries to mlsl linkage interface (#2501)
* Add all dependent libraries to mlsl linkage interface * Use ${CMAKE_SHARED_LIBRARY_PREFIX} and ${CMAKE_SHARED_LIBRARY_SUFFIX}
1 parent 2a7e409 commit 9571497

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

cmake/external_mlsl.cmake

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,17 @@ ExternalProject_Add(
4343
EXCLUDE_FROM_ALL TRUE
4444
)
4545

46+
add_library(libmlsl INTERFACE)
4647
ExternalProject_Get_Property(MLSL SOURCE_DIR)
4748
ExternalProject_Get_Property(MLSL INSTALL_DIR)
48-
add_library(libmlsl INTERFACE)
4949
target_include_directories(libmlsl SYSTEM INTERFACE ${SOURCE_DIR}/include)
50-
target_link_libraries(libmlsl INTERFACE ${INSTALL_DIR}/intel64/lib/thread/libmlsl.so)
51-
link_directories(${INSTALL_DIR}/intel64/lib/thread)
50+
51+
set(MLSL_LINK_LIBRARIES
52+
${INSTALL_DIR}/intel64/lib/thread/${CMAKE_SHARED_LIBRARY_PREFIX}mlsl${CMAKE_SHARED_LIBRARY_SUFFIX}
53+
${INSTALL_DIR}/intel64/lib/thread/${CMAKE_SHARED_LIBRARY_PREFIX}mpi${CMAKE_SHARED_LIBRARY_SUFFIX}
54+
${INSTALL_DIR}/intel64/lib/thread/${CMAKE_SHARED_LIBRARY_PREFIX}fabric${CMAKE_SHARED_LIBRARY_SUFFIX})
55+
56+
target_link_libraries(libmlsl PRIVATE INTERFACE ${MLSL_LINK_LIBRARIES})
5257
add_dependencies(libmlsl MLSL)
5358

5459
#installation

0 commit comments

Comments
 (0)