mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Moved threads package to X11 block.
This commit is contained in:
parent
d3a2d268f6
commit
f6ba959b1b
@ -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})
|
||||||
|
Loading…
Reference in New Issue
Block a user