Skip to content

Commit

Permalink
[build] only install headers if CMAKE_INSTALL_INCLUDEDIR is available
Browse files Browse the repository at this point in the history
We shouldn't install in CMAKE_INSTALL_INCLUDEDIR if it's not set (it will
install them in /srt).
  • Loading branch information
robUx4 committed Sep 9, 2022
1 parent 150637c commit 3daf891
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Expand Up @@ -1045,9 +1045,11 @@ else()
install(TARGETS ${INSTALL_TARGETS})
endif()

install(FILES ${HEADERS_srt} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/srt)
if (WIN32)
install(FILES ${HEADERS_srt_win32} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/srt/win)
if (DEFINED CMAKE_INSTALL_INCLUDEDIR)
install(FILES ${HEADERS_srt} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/srt)
if (WIN32)
install(FILES ${HEADERS_srt_win32} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/srt/win)
endif()
endif()

# ---
Expand Down

0 comments on commit 3daf891

Please sign in to comment.