mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-12-29 20:50:53 +01:00
7632a5abd4
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6441 8ced0084-cf51-0410-be5f-012b33b47a6e
35 lines
814 B
CMake
35 lines
814 B
CMake
macro(check_lib var lib required)
|
|
pkg_search_module(${var} ${lib})
|
|
if(${var}_FOUND)
|
|
message("${lib} found")
|
|
else()
|
|
find_library(${var} ${lib})
|
|
if(${var})
|
|
message("${lib} found")
|
|
set(${var}_FOUND 1 CACHE INTERNAL "")
|
|
else()
|
|
if(${required} STREQUAL "REQUIRED")
|
|
message(FATAL_ERROR "${lib} is required but not found")
|
|
else()
|
|
message("${lib} not found")
|
|
endif()
|
|
endif()
|
|
endif()
|
|
endmacro()
|
|
|
|
macro(check_lib_and_header var lib header required)
|
|
find_library(${var} ${lib})
|
|
find_path(${var}_INCLUDE ${header})
|
|
if(${var} AND ${var}_INCLUDE)
|
|
message("${lib} found")
|
|
set(${var}_FOUND 1 CACHE INTERNAL "")
|
|
else()
|
|
if(${required} STREQUAL "REQUIRED")
|
|
message(FATAL_ERROR "${lib} is required but not found")
|
|
else()
|
|
message("${lib} not found")
|
|
endif()
|
|
endif()
|
|
endmacro()
|
|
|