1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-12-03 07:28:51 -05:00

Added threading library to link dependencies.

Since the GLX backend now uses explicit pthread calls, linking needs to
be explicit as well.
This commit is contained in:
Camilla Berglund 2013-05-07 21:39:09 +02:00
parent 475d10d9d8
commit 807f1622ea
2 changed files with 4 additions and 8 deletions

View File

@ -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)

View File

@ -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