Skip to content

Commit 58d9ab6

Browse files
authored
update cmakelists.txt to be able to use it in add_subdirectory()
- Remove reference to ASM language - advance minimum version of the cmake required as far version 2 is VERY outdated. - remove hardcoded folder name of "tiny-AES-c as target_include_directory which by some reason is PRIVATE and could not be used as add_subdirectory() in main project.
1 parent b424066 commit 58d9ab6

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

CMakeLists.txt

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
cmake_minimum_required(VERSION 2.8.12)
1+
cmake_minimum_required(VERSION 3.12)
22

3-
project(tinyaes C ASM)
3+
project(tiny-aes C)
44

5-
add_library(tiny-aes
6-
aes.c
7-
)
5+
add_library(${PROJECT_NAME} "")
6+
target_sources(${PROJECT_NAME}
7+
PRIVATE
8+
${CMAKE_CURRENT_LIST_DIR}/aes.c
9+
INTERFACE
10+
${CMAKE_CURRENT_LIST_DIR}/aes.h
11+
${CMAKE_CURRENT_LIST_DIR}/aes.hpp
12+
)
813

9-
target_include_directories(tiny-aes PRIVATE tiny-AES-c/)
14+
target_include_directories(${PROJECT_NAME}
15+
INTERFACE
16+
${CMAKE_CURRENT_LIST_DIR}
17+
)

0 commit comments

Comments
 (0)