File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -251,10 +251,13 @@ function(export_target target)
251251 COMPONENT obs_libraries
252252 ${_EXCLUDE} )
253253
254- include (GenerateExportHeader)
255- generate_export_header(${target} EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR} /${target} _EXPORT.h)
254+ get_target_property (target_type ${target} TYPE )
255+ if (NOT target_type STREQUAL INTERFACE_LIBRARY)
256+ include (GenerateExportHeader)
257+ generate_export_header(${target} EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR} /${target} _EXPORT.h)
256258
257- target_sources (${target} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} /${target} _EXPORT.h)
259+ target_sources (${target} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} /${target} _EXPORT.h)
260+ endif ()
258261
259262 set (TARGETS_EXPORT_NAME "${target} Targets" )
260263 include (CMakePackageConfigHelpers)
You can’t perform that action at this time.
0 commit comments