@@ -31,7 +31,6 @@ assert_valid_variables( INCLUDE_INSTALL_DIR NO_NUMA_DEF )
3131add_library ( backend_headers_nodefs INTERFACE )
3232target_include_directories ( backend_headers_nodefs INTERFACE
3333 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} >
34- $<INSTALL_INTERFACE:.>
3534)
3635
3736# regex to filter all headers files based on the extension and
@@ -55,6 +54,7 @@ set( root_files
5554 "graphblas/vector.hpp" "graphblas/synchronizedNonzeroIterator.hpp"
5655 "graphblas/nonzeroStorage.hpp"
5756)
57+
5858set ( GRB_INCLUDE_INSTALL_DIR "${INCLUDE_INSTALL_DIR} /graphblas" )
5959install ( FILES ${root_files} DESTINATION "${GRB_INCLUDE_INSTALL_DIR} " )
6060
@@ -74,7 +74,6 @@ install( DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/graphblas/base/"
7474add_library ( alp_utils_headers INTERFACE )
7575target_include_directories ( alp_utils_headers INTERFACE
7676 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} >
77- $<INSTALL_INTERFACE:.>
7877)
7978
8079# copy utils headers
@@ -101,6 +100,9 @@ install( TARGETS backend_headers_nodefs EXPORT GraphBLASTargets
101100 INCLUDES DESTINATION "${INCLUDE_INSTALL_DIR} "
102101)
103102
103+ # the utils library currently depends heavily on other ALP functionalities,
104+ # but could be easily split out in future; in view of this, export an
105+ # independent include path (incidentally the same as ALP)
104106install ( TARGETS alp_utils_headers EXPORT GraphBLASTargets
105107 INCLUDES DESTINATION "${INCLUDE_INSTALL_DIR} "
106108)
@@ -144,6 +146,7 @@ if( WITH_HYPERDAGS_BACKEND )
144146 target_link_libraries ( backend_hyperdags_headers INTERFACE "backend_${WITH_HYPERDAGS_USING} _headers" )
145147 target_compile_definitions ( backend_hyperdags_headers INTERFACE "${HYPERDAGS_INCLUDE_DEFS} " )
146148 install ( TARGETS backend_hyperdags_headers EXPORT GraphBLASTargets )
149+
147150 install ( DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} /graphblas/hyperdags/"
148151 DESTINATION "${GRB_INCLUDE_INSTALL_DIR} /hyperdags"
149152 FILES_MATCHING REGEX "${HEADERS_REGEX} "
@@ -202,9 +205,7 @@ target_link_libraries( algorithms INTERFACE backend_headers_nodefs )
202205
203206target_include_directories (
204207 algorithms INTERFACE
205-
206208 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /graphblas/algorithms>
207- $<INSTALL_INTERFACE:graphblas/algorithms>
208209)
209210
210211install ( DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} /graphblas/algorithms/"
@@ -219,6 +220,7 @@ install( DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/graphblas/interfaces/"
219220
220221install ( TARGETS algorithms EXPORT GraphBLASTargets )
221222
223+
222224# generate the spblas header with the library prefix
223225configure_file ( ${CMAKE_CURRENT_SOURCE_DIR} /transition/spblas.h.in
224226 ${CMAKE_CURRENT_BINARY_DIR} /transition/spblas.h @ONLY
@@ -228,21 +230,23 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/transition/spblas.h.in
228230# these are plain C headers and do not have any dependences
229231add_library ( transition_headers INTERFACE )
230232
231- target_include_directories (
232- transition_headers INTERFACE
233+ target_include_directories ( transition_headers INTERFACE
233234 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /transition/>
234235 $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR} /transition/>
235- $<INSTALL_INTERFACE:transition/>
236236)
237237
238+ set ( TRANSITION_INCLUDE_INSTALL_DIR "${INCLUDE_INSTALL_DIR} /transition" )
239+
238240install ( FILES ${CMAKE_CURRENT_BINARY_DIR} /transition/spblas.h
239- DESTINATION "${INCLUDE_INSTALL_DIR} /transition "
241+ DESTINATION "${TRANSITION_INCLUDE_INSTALL_DIR} "
240242)
241243
242244install ( DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} /transition/"
243- DESTINATION "${INCLUDE_INSTALL_DIR} /transition "
245+ DESTINATION "${TRANSITION_INCLUDE_INSTALL_DIR} "
244246 FILES_MATCHING REGEX "${HEADERS_REGEX} "
245247)
246248
247- install ( TARGETS transition_headers EXPORT GraphBLASTargets )
249+ install ( TARGETS transition_headers EXPORT GraphBLASTargets
250+ INCLUDES DESTINATION "${TRANSITION_INCLUDE_INSTALL_DIR} "
251+ )
248252
0 commit comments