Skip to content

Commit 0358201

Browse files
committed
Fix LIBHWLOC_LIBRARY_DIRS and add LIBHWLOC_LIBRARIES
Fix LIBHWLOC_LIBRARY_DIRS and add LIBHWLOC_LIBRARIES for Windows with static hwloc. Signed-off-by: Lukasz Dorau <[email protected]>
1 parent 5f42368 commit 0358201

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,16 @@ else()
282282
SOURCE_SUBDIR contrib/windows-cmake/ FIND_PACKAGE_ARGS)
283283
FetchContent_MakeAvailable(hwloc_targ)
284284

285+
if(CMAKE_GENERATOR STREQUAL "Ninja")
286+
set(LIBHWLOC_LIBRARY_DIRS ${hwloc_targ_BINARY_DIR}/)
287+
set(LIBHWLOC_LIBRARIES ${hwloc_targ_BINARY_DIR}/hwloc.lib)
288+
else()
289+
set(LIBHWLOC_LIBRARY_DIRS ${hwloc_targ_BINARY_DIR}/$<CONFIG>)
290+
set(LIBHWLOC_LIBRARIES ${hwloc_targ_BINARY_DIR}/$<CONFIG>/hwloc.lib)
291+
endif()
292+
285293
set(LIBHWLOC_INCLUDE_DIRS
286294
${hwloc_targ_SOURCE_DIR}/include;${hwloc_targ_BINARY_DIR}/include)
287-
set(LIBHWLOC_LIBRARY_DIRS
288-
${hwloc_targ_BINARY_DIR}/Release;${hwloc_targ_BINARY_DIR}/Debug)
289295
else()
290296
include(FetchContent)
291297
message(

0 commit comments

Comments
 (0)