File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -253,16 +253,11 @@ function(opendds_target_sources target)
253
253
endif ()
254
254
else ()
255
255
# Assuming the custom export header is compatible with ones generated by generate_export_file.pl
256
+ list (GET use_export 0 existing_header )
256
257
list (GET use_export 1 existing_macro )
257
258
string (FIND ${existing_macro} "_Export" index )
258
259
string (SUBSTRING ${existing_macro} 0 ${index} macro_prefix )
259
- string (TOUPPER ${macro_prefix} macro_prefix )
260
- if (target_type STREQUAL "SHARED_LIBRARY" )
261
- target_compile_definitions (${target} PRIVATE "${macro_prefix} _BUILD_DLL" )
262
- target_compile_definitions (${target} PUBLIC "${macro_prefix} _HAS_DLL=1" )
263
- elseif (target_type STREQUAL "STATIC_LIBRARY" )
264
- target_compile_definitions (${target} PUBLIC "${macro_prefix} _HAS_DLL=0" )
265
- endif ()
260
+ opendds_export_header (${target} INCLUDE exisiting_header EXISTING MACRO_PREFIX ${macro_prefix} )
266
261
endif ()
267
262
268
263
if (use_versioned_namespace )
Original file line number Diff line number Diff line change
1
+ .. news-prs: 4964
2
+
3
+ .. news-start-section: Platform Support and Dependencies
4
+ .. news-start-section: CMake
5
+ - Fixed support for existing export header and macro in :cmake:func: `opendds_target_sources ` with `USE_EXPORT `.
6
+
7
+ .. news-end-section
8
+ .. news-end-section
You can’t perform that action at this time.
0 commit comments