mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 21:14:35 +00:00
Replaced find_library with CMAKE_DL_LIBS.
This commit is contained in:
parent
0041699048
commit
23ff318f59
@ -282,23 +282,15 @@ if (_GLFW_GLX)
|
|||||||
|
|
||||||
# Check for dlopen support as a fallback
|
# Check for dlopen support as a fallback
|
||||||
|
|
||||||
find_library(DL_LIBRARY dl)
|
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS})
|
||||||
mark_as_advanced(DL_LIBRARY)
|
|
||||||
if (DL_LIBRARY)
|
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${DL_LIBRARY})
|
|
||||||
else()
|
|
||||||
set(CMAKE_REQUIRED_LIBRARIES "")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
check_function_exists(dlopen _GLFW_HAS_DLOPEN)
|
check_function_exists(dlopen _GLFW_HAS_DLOPEN)
|
||||||
|
|
||||||
if (NOT _GLFW_HAS_DLOPEN)
|
if (NOT _GLFW_HAS_DLOPEN)
|
||||||
message(FATAL_ERROR "No entry point retrieval mechanism found")
|
message(FATAL_ERROR "No entry point retrieval mechanism found")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (DL_LIBRARY)
|
if (CMAKE_DL_LIBS)
|
||||||
list(APPEND glfw_LIBRARIES ${DL_LIBRARY})
|
list(APPEND glfw_LIBRARIES ${CMAKE_DL_LIBS})
|
||||||
set(GLFW_PKG_LIBS "${GLFW_PKG_LIBS} -ldl")
|
set(GLFW_PKG_LIBS "${GLFW_PKG_LIBS} -l${CMAKE_DL_LIBS}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user