Added threading library to link dependencies.

Since the GLX backend now uses explicit pthread calls, linking needs to
be explicit as well.
master
Camilla Berglund ago%!(EXTRA string=12 years)
parent 475d10d9d8
commit 807f1622ea
  1. 5
      CMakeLists.txt
  2. 7
      tests/CMakeLists.txt

@ -162,7 +162,10 @@ if (_GLFW_X11)
# Set up library and include paths
list(APPEND glfw_INCLUDE_DIRS ${X11_X11_INCLUDE_PATH})
list(APPEND glfw_LIBRARIES ${X11_X11_LIB})
list(APPEND glfw_LIBRARIES ${X11_X11_LIB} ${CMAKE_THREAD_LIBS_INIT})
if (UNIX AND NOT APPLE)
list(APPEND glfw_LIBRARIES ${RT_LIBRARY})
endif()
# Check for XRandR (modern resolution switching and gamma control)
if (NOT X11_Xrandr_FOUND)

@ -8,11 +8,6 @@ else()
link_libraries(${glfw_LIBRARIES})
endif()
list(APPEND thread_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
if (UNIX AND NOT APPLE)
list(APPEND thread_LIBRARIES ${RT_LIBRARY})
endif()
include_directories(${GLFW_SOURCE_DIR}/include
${GLFW_SOURCE_DIR}/deps)
@ -61,8 +56,6 @@ set_target_properties(title PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Title")
add_executable(windows WIN32 MACOSX_BUNDLE windows.c)
set_target_properties(windows PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Windows")
target_link_libraries(threads ${thread_LIBRARIES})
set(WINDOWS_BINARIES accuracy sharing tearing threads title windows)
set(CONSOLE_BINARIES clipboard defaults events fsaa fsfocus gamma glfwinfo

Loading…
Cancel
Save