Skip to content

Commit 4a21c8b

Browse files
committed
Fixing builds
1 parent 0a3e078 commit 4a21c8b

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

cmake/opendds_target_sources.cmake

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function(_opendds_get_sources_and_options
1515
non_idl_prefix
1616
tao_options
1717
opendds_options
18-
existing_export
18+
use_export
1919
use_versioned_namespace
2020
suppress_anys
2121
export_header_dir
@@ -40,7 +40,7 @@ function(_opendds_get_sources_and_options
4040
set(multi_value_options
4141
PUBLIC PRIVATE INTERFACE
4242
TAO_IDL_OPTIONS OPENDDS_IDL_OPTIONS
43-
EXISTING_EXPORT
43+
USE_EXPORT
4444
USE_VERSIONED_NAMESPACE
4545
)
4646
cmake_parse_arguments(arg
@@ -77,14 +77,14 @@ function(_opendds_get_sources_and_options
7777
endif()
7878
set(${suppress_anys} ${arg_SUPPRESS_ANYS} PARENT_SCOPE)
7979

80-
if(arg_EXISTING_EXPORT)
81-
list(LENGTH arg_EXISTING_EXPORT existing_export_len)
82-
if(NOT existing_export_len EQUAL 2)
80+
if(arg_USE_EXPORT)
81+
list(LENGTH arg_USE_EXPORT use_export_len)
82+
if(NOT use_export_len EQUAL 2)
8383
message(FATAL_ERROR
84-
"The opendds_target_sources EXISTING_EXPORT option takes a header path and macro name, "
85-
"but was passed ${existing_export_len} values")
84+
"The opendds_target_sources USE_EXPORT option takes a header path and macro name, "
85+
"but was passed ${use_export_len} values")
8686
endif()
87-
set(${existing_export} "${arg_EXISTING_EXPORT}" PARENT_SCOPE)
87+
set(${use_export} "${arg_USE_EXPORT}" PARENT_SCOPE)
8888
else()
8989
if(NOT DEFINED arg_ALWAYS_GENERATE_LIB_EXPORT_HEADER)
9090
set(arg_ALWAYS_GENERATE_LIB_EXPORT_HEADER ${OPENDDS_ALWAYS_GENERATE_LIB_EXPORT_HEADER})
@@ -213,7 +213,7 @@ function(opendds_target_sources target)
213213
non_idl_sources
214214
tao_options
215215
opendds_options
216-
existing_export
216+
use_export
217217
use_versioned_namespace
218218
suppress_anys
219219
export_header_dir
@@ -246,15 +246,14 @@ function(opendds_target_sources target)
246246
endif()
247247

248248
get_target_property(target_type ${target} TYPE)
249-
if(NOT existing_export)
249+
if(NOT use_export)
250250
if((target_type STREQUAL "SHARED_LIBRARY" AND max_scope STREQUAL "PUBLIC")
251251
OR (target_type MATCHES "LIBRARY" AND always_generate_lib_export_header))
252252
opendds_export_header(${target} USE_EXPORT_VAR use_export DIR "${export_header_dir}")
253253
endif()
254254
else()
255-
set(use_export "${existing_export}")
256255
# Assuming the custom export header is compatible with ones generated by generate_export_file.pl
257-
list(GET existing_export 1 existing_macro)
256+
list(GET use_export 1 existing_macro)
258257
string(FIND ${existing_macro} "_Export" index)
259258
string(SUBSTRING ${existing_macro} 0 ${index} macro_prefix)
260259
string(TOUPPER ${macro_prefix} macro_prefix)

0 commit comments

Comments
 (0)