aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..2749ba8
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,18 @@
+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
+)