From 37e6d114d9b8624e36ffd0bdc8e37ede32dc7678 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 6 Jun 2026 01:03:09 +0200 Subject: cmake: upgrade cmake-common, introduce new features, etc. --- aesxx/utils/CMakeLists.txt | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'aesxx/utils') diff --git a/aesxx/utils/CMakeLists.txt b/aesxx/utils/CMakeLists.txt index 98b07f1..9ee06d0 100644 --- a/aesxx/utils/CMakeLists.txt +++ b/aesxx/utils/CMakeLists.txt @@ -1,20 +1,35 @@ -find_package(Boost REQUIRED COMPONENTS filesystem program_options) +find_package(Boost CONFIG 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::disable_autolinking Boost::filesystem Boost::program_options) + target_link_libraries("${target}" PRIVATE + aesxx + Boost::disable_autolinking + Boost::filesystem + Boost::program_options) set_target_properties("${target}" PROPERTIES OUTPUT_NAME "${name}") install(TARGETS "${target}" RUNTIME DESTINATION bin) - install_pdbs(TARGETS "${target}" DESTINATION bin) + if(MSVC) + install(FILES "$" 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) +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) +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}) -- cgit v1.3