mirror of https://github.com/PCSX2/pcsx2.git
cmake: CheckLib allow to search only include
Some libraries doesn't have any .so file
This commit is contained in:
parent
30e3956ea7
commit
797e3d81da
|
@ -17,7 +17,7 @@ macro(check_lib var lib)
|
|||
# Make sure include directories for headers found using find_path below
|
||||
# are re-added when reconfiguring
|
||||
include_directories(${${var}_INCLUDE})
|
||||
_internal_message("-- ${lib} found")
|
||||
_internal_message("-- ${var} found")
|
||||
else()
|
||||
find_library(${var}_LIBRARIES ${lib})
|
||||
if(_arg_list)
|
||||
|
@ -25,16 +25,26 @@ macro(check_lib var lib)
|
|||
else()
|
||||
set(${var}_INCLUDE FALSE)
|
||||
endif()
|
||||
if (${lib})
|
||||
if(${var}_LIBRARIES AND ${var}_INCLUDE)
|
||||
include_directories(${${var}_INCLUDE})
|
||||
_internal_message("-- ${lib} found")
|
||||
_internal_message("-- ${var} found")
|
||||
set(${var}_FOUND 1 CACHE INTERNAL "")
|
||||
elseif(${var}_LIBRARIES)
|
||||
_internal_message("-- ${lib} not found (miss include)")
|
||||
_internal_message("-- ${var} not found (miss include)")
|
||||
elseif(${var}_INCLUDE)
|
||||
_internal_message("-- ${lib} not found (miss lib)")
|
||||
_internal_message("-- ${var} not found (miss lib)")
|
||||
else()
|
||||
_internal_message("-- ${lib} not found")
|
||||
_internal_message("-- ${var} not found")
|
||||
endif()
|
||||
else()
|
||||
if(${var}_INCLUDE)
|
||||
include_directories(${${var}_INCLUDE})
|
||||
_internal_message("-- ${var} found")
|
||||
set(${var}_FOUND 1 CACHE INTERNAL "")
|
||||
else()
|
||||
_internal_message("-- ${var} not found")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
|
Loading…
Reference in New Issue