From eabbb5eb368df3ff606a472bd96a4a4077a214d8 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 3 Nov 2013 03:34:00 +0100 Subject: Improve build system for ciphers and MACs as well --- src/methods/CMakeLists.txt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/methods') diff --git a/src/methods/CMakeLists.txt b/src/methods/CMakeLists.txt index 4a1f986..0060f7c 100644 --- a/src/methods/CMakeLists.txt +++ b/src/methods/CMakeLists.txt @@ -1,16 +1,17 @@ add_library(methods STATIC "${CMAKE_CURRENT_BINARY_DIR}/methods.c") add_library(method_common STATIC "common.c") -macro(fastd_method) - fastd_module(method ${ARGV}) +macro(fastd_method name) + fastd_module(method "method" ${name} ${ARGN}) + set_property(GLOBAL APPEND PROPERTY FASTD_METHODS ${name}) endmacro(fastd_method) macro(fastd_method_include_directories) - fastd_module_include_directories(method ${ARGV}) + fastd_module_include_directories(method ${ARGN}) endmacro(fastd_method_include_directories) macro(fastd_method_link_libraries) - fastd_module_link_libraries(method ${ARGV}) + fastd_module_link_libraries(method ${ARGN}) endmacro(fastd_method_link_libraries) @@ -24,8 +25,10 @@ set(METHOD_LIST "") get_property(METHODS GLOBAL PROPERTY FASTD_METHODS) foreach(method ${METHODS}) - set(METHOD_DEFINITIONS "${METHOD_DEFINITIONS}\nextern const fastd_method_t fastd_method_${method};") - set(METHOD_LIST "${METHOD_LIST}\n&fastd_method_${method},") + string(REPLACE - _ method_ "${method}") + + set(METHOD_DEFINITIONS "${METHOD_DEFINITIONS}\nextern const fastd_method_t fastd_method_${method_};") + set(METHOD_LIST "${METHOD_LIST}\n&fastd_method_${method_},") endforeach(method) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/methods.c.in ${CMAKE_CURRENT_BINARY_DIR}/methods.c) -- cgit v1.2.3