Skip to content

Commit 090b095

Browse files
committed
[CMake] Add an include directory for installed ROOT targets.
When using an installed ROOT, the targets didn't have include directories. Here, the default include directory for an installed ROOT is added to all targets.
1 parent 762d5d7 commit 090b095

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/modules/RootMacros.cmake

+5
Original file line numberDiff line numberDiff line change
@@ -1346,6 +1346,11 @@ function(ROOT_STANDARD_LIBRARY_PACKAGE libname)
13461346
)
13471347
endif(ARG_OBJECT_LIBRARY)
13481348

1349+
# Include directories relative to the installed location for installed targets:
1350+
if (PROJECT_NAME STREQUAL ROOT)
1351+
target_include_directories(${libname} PUBLIC $<INSTALL_INTERFACE:include>)
1352+
endif()
1353+
13491354
if (NOT (ARG_HEADERS OR ARG_NODEPHEADERS))
13501355
message(AUTHOR_WARNING "Called with no HEADERS and no NODEPHEADER. The generated "
13511356
"dictionary will be empty. Consider using ROOT_LINKER_LIBRARY instead.")

0 commit comments

Comments
 (0)