[CMake] require LIBRT wherever we require LIBM #2453

This commit is contained in:
nick black 2021-12-12 00:35:48 -05:00
parent e63593cdd3
commit b5ccc9d6a2
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -266,6 +266,7 @@ target_link_libraries(notcurses-core
"${ZLIB_LIBRARIES}" "${ZLIB_LIBRARIES}"
"${TERMINFO_LIBRARIES}" "${TERMINFO_LIBRARIES}"
"${LIBM}" "${LIBM}"
"${LIBRT}"
"${unistring}" "${unistring}"
"${gpm}" "${gpm}"
PUBLIC PUBLIC
@ -278,6 +279,7 @@ target_link_libraries(notcurses-core-static
"${ZLIB_STATIC_LIBRARIES}" "${ZLIB_STATIC_LIBRARIES}"
"${TERMINFO_STATIC_LIBRARIES}" "${TERMINFO_STATIC_LIBRARIES}"
"${LIBM}" "${LIBM}"
"${LIBRT}"
"${unistring}" "${unistring}"
"${gpm}" "${gpm}"
PUBLIC PUBLIC
@ -529,7 +531,7 @@ foreach(f ${POCSRCS})
"${PROJECT_BINARY_DIR}/include" "${PROJECT_BINARY_DIR}/include"
) )
target_link_libraries(${fe} target_link_libraries(${fe}
PRIVATE notcurses "${TERMINFO_LIBRARIES}" "${LIBM}" PRIVATE notcurses "${TERMINFO_LIBRARIES}" "${LIBM}" "${LIBRT}"
) )
target_link_directories(${fe} target_link_directories(${fe}
PRIVATE "${TERMINFO_LIBRARY_DIRS}" PRIVATE "${TERMINFO_LIBRARY_DIRS}"
@ -546,7 +548,7 @@ if(${USE_CXX})
"${PROJECT_BINARY_DIR}/include" "${PROJECT_BINARY_DIR}/include"
) )
target_link_libraries(${fe} target_link_libraries(${fe}
PRIVATE notcurses++ "${TERMINFO_LIBRARIES}" "${LIBM}" PRIVATE notcurses++ "${TERMINFO_LIBRARIES}" "${LIBM}" "${LIBRT}"
) )
target_link_directories(${fe} target_link_directories(${fe}
PRIVATE "${TERMINFO_LIBRARY_DIRS}" PRIVATE "${TERMINFO_LIBRARY_DIRS}"
@ -576,6 +578,7 @@ target_link_libraries(notcurses-demo
PRIVATE PRIVATE
notcurses notcurses
${LIBM} ${LIBM}
${LIBRT}
Threads::Threads Threads::Threads
) )