mirror of https://github.com/mgba-emu/mgba.git
CMake: Fix build on BSD
This commit is contained in:
parent
74758fc3c3
commit
935b5e40d9
|
@ -1,6 +1,8 @@
|
|||
include(CheckFunctionExists)
|
||||
function(find_function FUNCTION_NAME)
|
||||
set(CMAKE_REQUIRED_FLAGS -Wl,--require-defined,${FUNCTION_NAME})
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Generic")
|
||||
set(CMAKE_REQUIRED_FLAGS -Wl,--require-defined,${FUNCTION_NAME})
|
||||
endif()
|
||||
string(TOUPPER ${FUNCTION_NAME} FLAG_NAME)
|
||||
check_function_exists(${FUNCTION_NAME} HAVE_${FLAG_NAME})
|
||||
unset(CMAKE_REQUIRED_FLAGS)
|
||||
|
|
Loading…
Reference in New Issue