Skip to content

Commit c5988e9

Browse files
committed
fix(ci): add CMOCKA_LIBRARY_DIRS to CMake linker search path
pkg-config finds cmocka but the library directories weren't being added to the linker search path, causing link failures on macOS.
1 parent c41234b commit c5988e9

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

crates/tacet-c/tests/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ target_include_directories(tacet_tests PRIVATE
110110
${CMAKE_CURRENT_SOURCE_DIR}
111111
)
112112

113+
# Link directories (needed for pkg-config found libraries)
114+
if(CMOCKA_LIBRARY_DIRS)
115+
target_link_directories(tacet_tests PRIVATE ${CMOCKA_LIBRARY_DIRS})
116+
endif()
117+
113118
# Link libraries
114119
target_link_libraries(tacet_tests PRIVATE
115120
${TACET_LIB}

0 commit comments

Comments
 (0)