Commit 459d54c7 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Fix automatic wrapper generation of enums with the L_DECLARE_C_ENUM macro.

parent e52a8e90
...@@ -2004,7 +2004,8 @@ SEARCH_INCLUDES = YES ...@@ -2004,7 +2004,8 @@ SEARCH_INCLUDES = YES
# preprocessor. # preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES. # This tag requires that the tag SEARCH_INCLUDES is set to YES.
INCLUDE_PATH = . INCLUDE_PATH = . \
@LINPHONE_HEADER_ROOT_DIR@
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the # patterns (like *.h and *.hpp) to filter out the header-files in the
......
...@@ -122,6 +122,7 @@ PREPEND(ENUMS_HEADER_FILES "${SRC_ROOT_DIRECTORY}/enums" ${ENUMS_HEADER_FILES}) ...@@ -122,6 +122,7 @@ PREPEND(ENUMS_HEADER_FILES "${SRC_ROOT_DIRECTORY}/enums" ${ENUMS_HEADER_FILES})
PREPEND(UTILS_HEADER_FILES "${SRC_ROOT_DIRECTORY}/utils" ${UTILS_HEADER_FILES}) PREPEND(UTILS_HEADER_FILES "${SRC_ROOT_DIRECTORY}/utils" ${UTILS_HEADER_FILES})
set(LINPHONE_HEADER_FILES ${ROOT_HEADER_FILES} ${C_API_HEADER_FILES} ${ENUMS_HEADER_FILES} ${UTILS_HEADER_FILES} PARENT_SCOPE) set(LINPHONE_HEADER_FILES ${ROOT_HEADER_FILES} ${C_API_HEADER_FILES} ${ENUMS_HEADER_FILES} ${UTILS_HEADER_FILES} PARENT_SCOPE)
set(LINPHONE_HEADER_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}" PARENT_SCOPE)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
......
...@@ -53,10 +53,9 @@ LINPHONE_BEGIN_NAMESPACE ...@@ -53,10 +53,9 @@ LINPHONE_BEGIN_NAMESPACE
#define L_C_ENUM_PREFIX Linphone #define L_C_ENUM_PREFIX Linphone
#define L_DECLARE_C_ENUM(NAME, VALUES) \ #define L_DECLARE_C_ENUM(NAME, VALUES) \
enum L_CONCAT(L_C_ENUM_PREFIX, NAME) { \ typedef enum L_CONCAT(_, L_CONCAT(L_C_ENUM_PREFIX, NAME)) { \
L_APPLY(L_CONCAT, L_CONCAT(L_C_ENUM_PREFIX, NAME), L_GET_HEAP(VALUES(L_DECLARE_ENUM_VALUE))) \ L_APPLY(L_CONCAT, L_CONCAT(L_C_ENUM_PREFIX, NAME), L_GET_HEAP(VALUES(L_DECLARE_ENUM_VALUE))) \
}; \ } L_CONCAT(L_C_ENUM_PREFIX, NAME)
typedef enum L_CONCAT(L_C_ENUM_PREFIX, NAME) L_CONCAT(L_C_ENUM_PREFIX, NAME);
LINPHONE_END_NAMESPACE LINPHONE_END_NAMESPACE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment