Skip to content

Commit 6b2089a

Browse files
sloretzchristophebedard
authored andcommitted
Install headers to include/${PROJECT_NAME}
Signed-off-by: Shane Loretz <[email protected]>
1 parent 0c9092c commit 6b2089a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tracetools/CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ if(NOT TRACETOOLS_DISABLED)
8585
# Only use output/binary include directory
8686
target_include_directories(${PROJECT_NAME} PUBLIC
8787
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>"
88-
"$<INSTALL_INTERFACE:include>"
88+
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
8989
)
9090
else()
9191
target_include_directories(${PROJECT_NAME} INTERFACE
9292
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>"
93-
"$<INSTALL_INTERFACE:include>"
93+
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
9494
)
9595
endif()
9696

@@ -140,18 +140,19 @@ endforeach()
140140

141141
install(
142142
DIRECTORY ${PROJECT_BINARY_DIR}/include/
143-
DESTINATION include
143+
DESTINATION include/${PROJECT_NAME}
144144
)
145145
install(
146146
TARGETS ${PROJECT_NAME}
147147
EXPORT ${PROJECT_NAME}_export
148148
LIBRARY DESTINATION lib
149149
ARCHIVE DESTINATION lib
150150
RUNTIME DESTINATION bin
151-
INCLUDES DESTINATION include
152151
)
153152

154-
ament_export_include_directories(include)
153+
# Export old-style CMake variables
154+
ament_export_include_directories("include/${PROJECT_NAME}")
155+
155156
if(TRACETOOLS_LTTNG_ENABLED)
156157
ament_export_libraries(${PROJECT_NAME} ${LTTNG_LIBRARIES})
157158
# Export -rdynamic for downstream packages using classic CMake variables

0 commit comments

Comments
 (0)