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 include/trygvis/elfinfo/Ld.h include-priv/trygvis/antlr.h) target_compile_options(elfinfo PUBLIC "--std=c++14") target_link_libraries(elfinfo elf GnuLd Antlr4::antlr4_shared) target_include_directories(elfinfo PUBLIC include PRIVATE include-priv) INSTALL(TARGETS elfinfo RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)