minecraft-pi-reborn/dependencies/LIEF/CMakeLists.txt

44 lines
1.3 KiB
CMake
Raw Normal View History

2022-09-25 19:47:36 +00:00
project(LIEF)
# Silence Warnings
add_compile_options(-w -Wno-psabi)
## LIEF
# Options
set(BUILD_SHARED_LIBS TRUE CACHE BOOL "" FORCE)
set(LIEF_C_API FALSE CACHE BOOL "" FORCE)
set(LIEF_EXAMPLES FALSE CACHE BOOL "" FORCE)
set(LIEF_PYTHON_API FALSE CACHE BOOL "" FORCE)
set(LIEF_TESTS FALSE CACHE BOOL "" FORCE)
set(LIEF_USE_CCACHE FALSE CACHE BOOL "" FORCE)
set(LIEF_LOGGING FALSE CACHE BOOL "" FORCE)
set(LIEF_LOGGING_DEBUG FALSE CACHE BOOL "" FORCE)
set(LIEF_ENABLE_JSON FALSE CACHE BOOL "" FORCE)
set(LIEF_ELF TRUE CACHE BOOL "" FORCE)
set(LIEF_PE FALSE CACHE BOOL "" FORCE)
set(LIEF_MACHO FALSE CACHE BOOL "" FORCE)
set(LIEF_DEX FALSE CACHE BOOL "" FORCE)
set(LIEF_ART FALSE CACHE BOOL "" FORCE)
set(LIEF_OAT FALSE CACHE BOOL "" FORCE)
set(LIEF_VDEX FALSE CACHE BOOL "" FORCE)
# Download
2024-01-20 07:10:18 +00:00
set(MESSAGE_QUIET TRUE)
2022-09-25 19:47:36 +00:00
add_subdirectory(src EXCLUDE_FROM_ALL)
2024-01-20 07:10:18 +00:00
unset(MESSAGE_QUIET)
2022-09-25 19:47:36 +00:00
# Install
2024-11-20 00:57:43 +00:00
setup_library(LIB_LIEF TRUE TRUE)
2022-09-25 19:47:36 +00:00
# License
install(FILES src/LICENSE DESTINATION "${MCPI_LEGAL_DIR}/LIEF")
2024-11-18 23:47:13 +00:00
# Fix Flags
function(fix_flags property)
get_target_property(flags LIB_LIEF "${property}")
list(REMOVE_ITEM flags "_GLIBCXX_USE_CXX11_ABI=1")
set_target_properties(LIB_LIEF PROPERTIES "${property}" "${flags}")
endfunction()
fix_flags(COMPILE_DEFINITIONS)
fix_flags(INTERFACE_COMPILE_DEFINITIONS)