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

43 lines
1.1 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
2024-11-24 22:42:36 +00:00
force_set(LIEF_C_API FALSE BOOL)
force_set(LIEF_EXAMPLES FALSE BOOL)
force_set(LIEF_PYTHON_API FALSE BOOL)
force_set(LIEF_TESTS FALSE BOOL)
force_set(LIEF_USE_CCACHE FALSE BOOL)
force_set(LIEF_LOGGING FALSE BOOL)
force_set(LIEF_LOGGING_DEBUG FALSE BOOL)
force_set(LIEF_ENABLE_JSON FALSE BOOL)
force_set(LIEF_ELF TRUE BOOL)
force_set(LIEF_PE FALSE BOOL)
force_set(LIEF_MACHO FALSE BOOL)
force_set(LIEF_DEX FALSE BOOL)
force_set(LIEF_ART FALSE BOOL)
force_set(LIEF_OAT FALSE BOOL)
force_set(LIEF_VDEX FALSE BOOL)
2022-09-25 19:47:36 +00:00
# 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)