mirror of https://github.com/mgba-emu/mgba.git
Util: Use elf.h if elf_repl.h is not found
This commit is contained in:
parent
64409d9ca7
commit
d78065e823
|
@ -607,6 +607,10 @@ endif()
|
||||||
if(USE_ELF)
|
if(USE_ELF)
|
||||||
list(APPEND FEATURES ELF)
|
list(APPEND FEATURES ELF)
|
||||||
include_directories(AFTER ${LIBELF_INCLUDE_DIRS})
|
include_directories(AFTER ${LIBELF_INCLUDE_DIRS})
|
||||||
|
find_file(ELF_REPL_H elf_repl.h PATHS ${LIBELF_INCLUDE_DIRS})
|
||||||
|
if (ELF_REPL_H)
|
||||||
|
add_definitions(-DUSE_ELF_REPL)
|
||||||
|
endif()
|
||||||
list(APPEND DEPENDENCY_LIB ${LIBELF_LIBRARIES})
|
list(APPEND DEPENDENCY_LIB ${LIBELF_LIBRARIES})
|
||||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libelfg0")
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libelfg0")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -13,7 +13,12 @@ CXX_GUARD_START
|
||||||
#ifdef USE_ELF
|
#ifdef USE_ELF
|
||||||
|
|
||||||
#include <libelf.h>
|
#include <libelf.h>
|
||||||
|
|
||||||
|
#if USE_ELF_REPL
|
||||||
#include <elf_repl.h>
|
#include <elf_repl.h>
|
||||||
|
#else
|
||||||
|
#include <elf.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <mgba-util/vector.h>
|
#include <mgba-util/vector.h>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue