cmake: Fix missing header installation for libobs and obs-frontend-api
This commit is contained in:
parent
020cd92ab5
commit
2006092076
@ -249,24 +249,29 @@ endfunction()
|
||||
function(export_target target)
|
||||
set(CMAKE_EXPORT_PACKAGE_REGISTRY OFF)
|
||||
|
||||
if(OS_LINUX)
|
||||
set(_EXCLUDE "")
|
||||
else()
|
||||
set(_EXCLUDE "EXCLUDE_FROM_ALL")
|
||||
endif()
|
||||
install(
|
||||
TARGETS ${target}
|
||||
EXPORT ${target}Targets
|
||||
RUNTIME DESTINATION ${OBS_EXECUTABLE_DESTINATION}
|
||||
COMPONENT obs_libraries
|
||||
EXCLUDE_FROM_ALL
|
||||
${_EXCLUDE}
|
||||
LIBRARY DESTINATION ${OBS_LIBRARY_DESTINATION}
|
||||
COMPONENT obs_libraries
|
||||
EXCLUDE_FROM_ALL
|
||||
${_EXCLUDE}
|
||||
ARCHIVE DESTINATION ${OBS_LIBRARY_DESTINATION}
|
||||
COMPONENT obs_libraries
|
||||
EXCLUDE_FROM_ALL
|
||||
${_EXCLUDE}
|
||||
INCLUDES
|
||||
DESTINATION ${OBS_INCLUDE_DESTINATION}
|
||||
PUBLIC_HEADER
|
||||
DESTINATION ${OBS_INCLUDE_DESTINATION}
|
||||
COMPONENT obs_libraries
|
||||
EXCLUDE_FROM_ALL)
|
||||
${_EXCLUDE})
|
||||
|
||||
include(GenerateExportHeader)
|
||||
generate_export_header(${target} EXPORT_FILE_NAME
|
||||
@ -301,14 +306,14 @@ function(export_target target)
|
||||
NAMESPACE OBS::
|
||||
DESTINATION ${OBS_CMAKE_DESTINATION}/${target}
|
||||
COMPONENT obs_libraries
|
||||
EXCLUDE_FROM_ALL)
|
||||
${_EXCLUDE})
|
||||
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/${target}Config.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${target}ConfigVersion.cmake
|
||||
DESTINATION ${OBS_CMAKE_DESTINATION}/${target}
|
||||
COMPONENT obs_libraries
|
||||
EXCLUDE_FROM_ALL)
|
||||
${_EXCLUDE})
|
||||
endfunction()
|
||||
|
||||
# Helper function to define available graphics modules for targets
|
||||
|
@ -93,23 +93,20 @@ function(install_headers target)
|
||||
FILES
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/audio-monitoring/pulse/pulseaudio-wrapper.h"
|
||||
DESTINATION "${OBS_INCLUDE_DESTINATION}/audio-monitoring/pulse/"
|
||||
COMPONENT obs_libraries
|
||||
EXCLUDE_FROM_ALL)
|
||||
COMPONENT obs_libraries)
|
||||
endif()
|
||||
|
||||
if(ENABLE_HEVC)
|
||||
install(
|
||||
FILES "${CMAKE_CURRENT_SOURCE_DIR}/obs-hevc.h"
|
||||
DESTINATION "${OBS_INCLUDE_DESTINATION}"
|
||||
COMPONENT obs_libraries
|
||||
EXCLUDE_FROM_ALL)
|
||||
COMPONENT obs_libraries)
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${OBS_INCLUDE_DESTINATION}/obsconfig.h")
|
||||
install(
|
||||
FILES "${CMAKE_BINARY_DIR}/config/obsconfig.h"
|
||||
DESTINATION "${OBS_INCLUDE_DESTINATION}"
|
||||
COMPONENT obs_libraries
|
||||
EXCLUDE_FROM_ALL)
|
||||
COMPONENT obs_libraries)
|
||||
endif()
|
||||
endfunction()
|
||||
|
Loading…
x
Reference in New Issue
Block a user