aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/aesxx/utils/CMakeLists.txt
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2019-12-21 14:50:03 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2019-12-21 14:52:12 +0300
commit3304264990b96c09b174716ecb8da63d24457ae8 (patch)
tree9ec5711da75d4aa67587a8e39c24daaf6088c498 /aesxx/utils/CMakeLists.txt
parenttest: move data files to test/data (diff)
downloadaes-tools-3304264990b96c09b174716ecb8da63d24457ae8.tar.gz
aes-tools-3304264990b96c09b174716ecb8da63d24457ae8.zip
utils/ -> aesxx/utils/
Diffstat (limited to 'aesxx/utils/CMakeLists.txt')
-rw-r--r--aesxx/utils/CMakeLists.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/aesxx/utils/CMakeLists.txt b/aesxx/utils/CMakeLists.txt
new file mode 100644
index 0000000..27d3422
--- /dev/null
+++ b/aesxx/utils/CMakeLists.txt
@@ -0,0 +1,27 @@
+find_package(Boost REQUIRED COMPONENTS filesystem program_options)
+
+function(add_util name src)
+ set(target "util_${name}")
+ add_executable("${target}" ${src})
+ target_link_libraries("${target}" PRIVATE aesxx Boost::filesystem Boost::program_options)
+ set_target_properties("${target}" PROPERTIES OUTPUT_NAME "${name}")
+ install(TARGETS "${target}" RUNTIME DESTINATION bin)
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ install(FILES "$<TARGET_PDB_FILE:${target}>" DESTINATION bin OPTIONAL)
+ endif()
+endfunction()
+
+set(block_util_headers block_cmd_parser.hpp block_dumper.hpp block_input.hpp data_parsers.hpp helpers/command_line.hpp)
+
+add_util(encrypt_block encrypt_block.cpp ${block_util_headers})
+add_util(decrypt_block decrypt_block.cpp ${block_util_headers})
+
+set(file_util_headers data_parsers.hpp file_cmd_parser.hpp helpers/command_line.hpp helpers/file.hpp)
+
+add_util(encrypt_file encrypt_file.cpp ${file_util_headers})
+add_util(decrypt_file decrypt_file.cpp ${file_util_headers})
+
+set(bmp_util_headers ${file_util_headers} helpers/bmp.hpp)
+
+add_util(encrypt_bmp encrypt_bmp.cpp ${bmp_util_headers})
+add_util(decrypt_bmp decrypt_bmp.cpp ${bmp_util_headers})