summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2024-09-15 00:12:25 +0300
committerOxore <oxore@protonmail.com>2024-11-21 00:18:24 +0300
commit559139fce64d685708c283397033bf152afd00a3 (patch)
treee5f2b1d35adef134512bf4e1c2990cf86a95bd1b /CMakeLists.txt
parent85614fc367ba53d0d5ca48873337571fc7f4f5b7 (diff)
Add initial COFF support (coff2bin, readcoff)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt40
1 files changed, 30 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ad1d511..fb6d9b1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,16 +18,7 @@ set(common_debug_flags
# -pg
)
-add_executable(m68k-disasm
- src/main.cpp
- src/data_buffer.cpp
- src/disasm.cpp
- src/gnu.cpp
- src/m68k.cpp
- src/elf_image.cpp
- )
-
-target_compile_options(m68k-disasm PRIVATE
+set(common_compile_options
$<$<CONFIG:Debug>:${common_debug_flags}>
$<$<COMPILE_LANGUAGE:C>:-Wno-nested-anon-types>
# Speed up compilation with -fno-exceptions and -fno-rtti
@@ -50,6 +41,35 @@ target_compile_options(m68k-disasm PRIVATE
-Wshadow
)
+add_executable(m68k-disasm
+ src/main.cpp
+ src/data_buffer.cpp
+ src/disasm.cpp
+ src/gnu.cpp
+ src/m68k.cpp
+ src/elf_image.cpp
+ )
+target_compile_options(m68k-disasm PRIVATE ${common_compile_options})
target_compile_definitions(m68k-disasm PRIVATE $<$<CONFIG:Debug>:_FORTIFY_SOURCE=2>)
target_link_options(m68k-disasm PRIVATE $<$<CONFIG:Debug>:${common_debug_flags}>)
target_include_directories(m68k-disasm PRIVATE . lib)
+
+add_executable(readcoff
+ src/readcoff.cpp
+ src/coff_image.cpp
+ src/data_buffer.cpp
+ )
+target_compile_options(readcoff PRIVATE ${common_compile_options})
+target_compile_definitions(readcoff PRIVATE $<$<CONFIG:Debug>:_FORTIFY_SOURCE=2>)
+target_link_options(readcoff PRIVATE $<$<CONFIG:Debug>:${common_debug_flags}>)
+target_include_directories(readcoff PRIVATE . lib)
+
+add_executable(coff2bin
+ src/coff2bin.cpp
+ src/coff_image.cpp
+ src/data_buffer.cpp
+ )
+target_compile_options(coff2bin PRIVATE ${common_compile_options})
+target_compile_definitions(coff2bin PRIVATE $<$<CONFIG:Debug>:_FORTIFY_SOURCE=2>)
+target_link_options(coff2bin PRIVATE $<$<CONFIG:Debug>:${common_debug_flags}>)
+target_include_directories(coff2bin PRIVATE . lib)