mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-22 19:45:40 +00:00
cmake: check whether SONAME actualy exists
//Have include libunwind.h
This commit is contained in:
parent
0262f757e1
commit
1c6a649362
|
@ -18,6 +18,7 @@ macro(FindLibraryAndSONAME _LIB)
|
|||
# reduce the library name for shared linking
|
||||
|
||||
get_filename_component(_LIB_REALPATH ${${_LNAME}_LIB} REALPATH) # resolves symlinks
|
||||
get_filename_component(_LIB_DIRECTORY ${_LIB_REALPATH} DIRECTORY)
|
||||
get_filename_component(_LIB_JUSTNAME ${_LIB_REALPATH} NAME)
|
||||
|
||||
if(APPLE)
|
||||
|
@ -26,6 +27,11 @@ macro(FindLibraryAndSONAME _LIB)
|
|||
string(REGEX REPLACE "(\\.[0-9]*)\\.[0-9\\.]*$" "\\1" _LIB_REGEXD "${_LIB_JUSTNAME}")
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${_LIB_DIRECTORY}/${_LIB_REGEXD}")
|
||||
set(_LIB_REGEXD "${_LIB_JUSTNAME}")
|
||||
endif()
|
||||
set(${_LNAME}_LIBDIR "${_LIB_LIBDIR}")
|
||||
|
||||
SET(_DEBUG_FindSONAME FALSE)
|
||||
if(_DEBUG_FindSONAME)
|
||||
message_warn("DYNLIB OUTPUTVAR: ${_LIB} ... ${_LNAME}_LIB")
|
||||
|
|
Loading…
Reference in a new issue