Replace CMake threads variable with modern target

This commit is contained in:
Camilla Löwy
2019-12-15 09:53:18 +01:00
parent 8a5fd0c5a4
commit 49c5d837b4
4 changed files with 6 additions and 7 deletions

View File

@@ -42,8 +42,8 @@ add_executable(title WIN32 MACOSX_BUNDLE title.c ${GLAD_GL})
add_executable(triangle-vulkan WIN32 triangle-vulkan.c ${GLAD_VULKAN})
add_executable(windows WIN32 MACOSX_BUNDLE windows.c ${GLAD_GL})
target_link_libraries(empty "${CMAKE_THREAD_LIBS_INIT}")
target_link_libraries(threads "${CMAKE_THREAD_LIBS_INIT}")
target_link_libraries(empty Threads::Threads)
target_link_libraries(threads Threads::Threads)
if (RT_LIBRARY)
target_link_libraries(empty "${RT_LIBRARY}")
target_link_libraries(threads "${RT_LIBRARY}")