Fix issue when trying to install the library with cmake (wrong headers hierarchy)

This commit is contained in:
Daniel Chappuis 2020-02-19 12:48:14 +01:00
parent 5d55947e52
commit 9407651316

View File

@ -260,10 +260,12 @@ SET_TARGET_PROPERTIES(reactphysics3d PROPERTIES
SOVERSION "0.7" SOVERSION "0.7"
) )
# Install target # Install target (install library only, not headers)
INSTALL(TARGETS reactphysics3d INSTALL(TARGETS reactphysics3d
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/reactphysics3d
) )
# Install the headers separately (because INSTALL(TARGETS ... PUBLIC_HEADER DESTINATION ...) does not support subfolders
INSTALL(DIRECTORY src/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/reactphysics3d FILES_MATCHING PATTERN "*.h")