Zajebany Sifl
Zajebany Sifl

Reputation: 13

pkg-config ld: library 'uSockets' not found

Im using pkg-config inside my cmake file like this:

pkg_check_modules(USOCKETS REQUIRED uSockets)

target_include_directories(realtime PRIVATE
    ${USOCKETS_INCLUDE_DIRS}
)

target_link_libraries(realtime PRIVATE
    ${USOCKETS_LIBRARIES}
)

I have inside my cmake file many of pkg_check_modules() and they work just fine. However when Im trying to include the uSockets library Im having trouble. Its saying that the uSockets library has not been found.

This is my uSockets.pc file:

 prefix=../include/uSockets
 exec_prefix=${prefix}
 includedir=${prefix}
 libdir=${prefix}/libs
  
 Name: uSockets
 Description: uSockets C++ Libraries
 Version: 0.8.8
 Libs: -L${libdir} -l uSockets
 Cflags: -I${includedir}

The paths are correct for the library, I even tried absolute path but didnt resolve. Inside the uSockets directory I have header files for the uSockets right inside the uSockets folder and the lib files inside the subdirectory libs. I renamed the uSockets.a to libuSockets.a to make it more clear for the pck-config, but didnt help.

Upvotes: 0

Views: 40

Answers (0)

Related Questions