Skip to content

Commit

Permalink
Fix install interface to use CMAKE_INSTALL_INCLUDEDIR
Browse files Browse the repository at this point in the history
Currently, the sparta target will use `$CMAKE_INSTALL_PREFIX/include` as
the include directory when installed. If the user sets a custom
CMAKE_INSTALL_INCLUDEDIR, however, then this will not be the correct
location. This commit changes the include directory of the sparta target
to be consistent with the actual installed location.
  • Loading branch information
Technius committed Dec 14, 2023
1 parent e5d1dbc commit 4b617ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ add_library(sparta INTERFACE)

target_include_directories(sparta INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

target_link_libraries(sparta INTERFACE ${Boost_LIBRARIES})
Expand Down

0 comments on commit 4b617ae

Please sign in to comment.