cmake_minimum_required(VERSION 3.2) project(elfinfo CXX ASM) # If this fails, check out README.md find_package(Antlr4) antlr4_add_target(TARGET GnuLd STATIC LEXER GnuLdLexer.g4 PARSER GnuLdParser.g4) add_executable(elfinfo elfinfo.cpp ld.cpp ld.h) target_compile_options(elfinfo PUBLIC "--std=c++14") target_link_libraries(elfinfo elf GnuLd Antlr4::antlr4_shared) INSTALL(TARGETS elfinfo RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib )