1
- # idl2library(IDLS <files> [BUILD_STATIC])
1
+ # idl2library(IDLS <files> [BUILD_STATIC] [INSTALL_OUTPUT] )
2
2
# Generate a shared or static library for each IDL in a list.
3
3
#
4
- # Example :
4
+ # Examples :
5
5
# idl2library(IDLS idl/example.idl idl/std_doc.idl)
6
- # idl2library(IDLS idl/example.idl idl/std_doc.idl BUILD_STATIC)
6
+ # idl2library(IDLS idl/example.idl idl/std_doc.idl BUILD_STATIC INSTALL_OUTPUT )
7
7
# idl2library(IDLS idl/example.idl idl/std_doc.idl INCLUDE_DIRS "${PATH_TO_STD_QOS_IDL}/idl/")
8
8
#
9
9
@@ -49,7 +49,7 @@ function(find_idl_dependencies input_file)
49
49
endfunction ()
50
50
51
51
function (idl2library)
52
- set (options BUILD_STATIC)
52
+ set (options BUILD_STATIC INSTALL_OUTPUT )
53
53
set (singleValueArgs)
54
54
set (multiValueArgs IDLS INCLUDE_DIRS)
55
55
@@ -189,7 +189,7 @@ function(idl2library)
189
189
add_library (${current_idl_target} SHARED)
190
190
endif ()
191
191
192
- opendds_target_sources(${current_idl_target}
192
+ opendds_target_sources(${current_idl_target} PUBLIC
193
193
${${current_idl_target} _RELPATH}
194
194
OPENDDS_IDL_OPTIONS ${current_idl_include_opts} -Gxtypes-complete
195
195
TAO_IDL_OPTIONS ${current_idl_include_opts}
@@ -203,6 +203,21 @@ function(idl2library)
203
203
# Group the IDL projects together
204
204
set_target_properties (${current_idl_target} PROPERTIES FOLDER IDL)
205
205
target_compile_definitions (${current_idl_target} PUBLIC _HAS_AUTO_PTR_ETC=1 _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING)
206
+
207
+ #Set the PUBLIC_HEADER for the target
208
+ if (${idl2library_INSTALL_OUTPUT} )
209
+ opendds_install_interface_files(${current_idl_target} )
210
+
211
+ # Add each idl to the project target list for export and make them exportable
212
+ LIST (APPEND PROJECT_TARGET_LIST ${current_idl_target} )
213
+ install (TARGETS ${current_idl_target}
214
+ EXPORT ${PROJECT_NAME}
215
+ LIBRARY DESTINATION lib
216
+ ARCHIVE DESTINATION lib
217
+ PUBLIC_HEADER DESTINATION include
218
+ )
219
+
220
+ endif ()
206
221
207
222
# Add this project to the IDL list so it's only loaded 1x
208
223
list (APPEND IDL_TARGETS "${current_idl_target} " )
0 commit comments