aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt12
-rw-r--r--utils/CMakeLists.txt4
2 files changed, 6 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 63d1a42..5a03ad7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,8 +1,10 @@
-project(aes_tools)
+cmake_minimum_required(VERSION 3.1)
+
+project(aes_tools C CXX)
include(cmake/common.cmake)
-set(AES_TOOLS_ASM OFF CACHE BOOL "Use the assembly language implementation instead of the one in C")
+option(AES_TOOLS_ASM "Use the assembly language implementation instead of the one in C")
file(GLOB_RECURSE aes_include "include/*.h")
@@ -20,10 +22,8 @@ endif()
add_library(aes ${aes_src} ${aes_include})
target_include_directories(aes PUBLIC include/)
-if(is_root_project)
- if(MSVC)
- target_compile_definitions(aes PRIVATE _CRT_SECURE_NO_WARNINGS)
- endif()
+if(MSVC)
+ target_compile_definitions(aes PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
index 6b7a1c4..b141e62 100644
--- a/utils/CMakeLists.txt
+++ b/utils/CMakeLists.txt
@@ -1,7 +1,3 @@
-if(MSVC)
- add_definitions(/DNOMINMAX)
-endif()
-
find_package(Boost REQUIRED COMPONENTS filesystem program_options system)
set(block_util_headers block_cmd_parser.hpp block_dumper.hpp block_input.hpp data_parsers.hpp helpers/command_line.hpp)