diff --git a/ThriftLibrary.cmake b/ThriftLibrary.cmake index 483b6258992..07f787f2374 100644 --- a/ThriftLibrary.cmake +++ b/ThriftLibrary.cmake @@ -200,8 +200,8 @@ macro(thrift_generate ) cmake_parse_arguments(THRIFT_GENERATE # Prefix "" # Options - "source_file_name" # One Value args - "TARGET_NAME_BASE" # Multi-value args + "TARGET_NAME_BASE" # One Value args + "THRIFT_INCLUDE_DIRECTORIES" # Multi-value args "${ARGN}") set(source_file_name ${file_name}) @@ -210,8 +210,8 @@ macro(thrift_generate foreach(dir ${THRIFT_GENERATE_THRIFT_INCLUDE_DIRECTORIES}) list(APPEND thrift_include_directories "-I" "${dir}") endforeach() - if(DEFINED TARGET_NAME_BASE AND NOT TARGET_NAME_BASE STREQUAL "") - set(target_file_name ${TARGET_NAME_BASE}) + if(DEFINED THRIFT_GENERATE_TARGET_NAME_BASE AND NOT THRIFT_GENERATE_TARGET_NAME_BASE STREQUAL "") + set(target_file_name ${THRIFT_GENERATE_TARGET_NAME_BASE}) endif() set("${target_file_name}-${language}-HEADERS"