1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 10:48:51 -05:00

Moved threads package to X11 block.

This commit is contained in:
Camilla Berglund 2012-09-12 21:54:00 +02:00
parent d3a2d268f6
commit f6ba959b1b

View File

@ -17,15 +17,6 @@ option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
if (NOT WIN32)
set(CMAKE_THREAD_PREFER_PTHREADS YES)
endif()
find_package(Threads)
if (CMAKE_THREAD_LIBS_INIT)
list(APPEND glfw_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
endif()
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Enable all warnings on GCC, regardless of OS # Enable all warnings on GCC, regardless of OS
#-------------------------------------------------------------------- #--------------------------------------------------------------------
@ -94,6 +85,12 @@ if (_GLFW_X11_GLX)
find_package(X11 REQUIRED) find_package(X11 REQUIRED)
set(CMAKE_THREAD_PREFER_PTHREADS YES)
find_package(Threads)
if (CMAKE_THREAD_LIBS_INIT)
list(APPEND glfw_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
endif()
# Set up library and include paths # Set up library and include paths
list(APPEND glfw_INCLUDE_DIRS ${X11_X11_INCLUDE_PATH} ${OPENGL_INCLUDE_DIR}) list(APPEND glfw_INCLUDE_DIRS ${X11_X11_INCLUDE_PATH} ${OPENGL_INCLUDE_DIR})
list(APPEND glfw_LIBRARIES ${X11_X11_LIB} ${OPENGL_gl_LIBRARY}) list(APPEND glfw_LIBRARIES ${X11_X11_LIB} ${OPENGL_gl_LIBRARY})