mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-28 02:34:58 +08:00
cmake: Skip generate export header if interface in legacy path
It backports a behavior from CMake 3.0 to CMake 2.0
This commit is contained in:
committed by
Matthew Gajownik
parent
76eb88d984
commit
cdca983733
@@ -251,10 +251,13 @@ function(export_target target)
|
||||
COMPONENT obs_libraries
|
||||
${_EXCLUDE})
|
||||
|
||||
include(GenerateExportHeader)
|
||||
generate_export_header(${target} EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/${target}_EXPORT.h)
|
||||
get_target_property(target_type ${target} TYPE)
|
||||
if(NOT target_type STREQUAL INTERFACE_LIBRARY)
|
||||
include(GenerateExportHeader)
|
||||
generate_export_header(${target} EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/${target}_EXPORT.h)
|
||||
|
||||
target_sources(${target} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/${target}_EXPORT.h)
|
||||
target_sources(${target} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/${target}_EXPORT.h)
|
||||
endif()
|
||||
|
||||
set(TARGETS_EXPORT_NAME "${target}Targets")
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
Reference in New Issue
Block a user