Skip to content

Commit

Permalink
chore: Update install paths to use CMAKE_INSTALL_INCLUDEDIR
Browse files Browse the repository at this point in the history
Modified the install commands to use CMAKE_INSTALL_INCLUDEDIR variable instead of hardcoded 'include' path for better flexibility and compatibility with CMake's install directories.
  • Loading branch information
HNIdesu committed Feb 3, 2025
1 parent 773766d commit 218384d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ install(TARGETS marisa

set(include_headers ${MARISA_ROOT}/include/marisa.h)
file(GLOB libmarisa_include_headers ${MARISA_ROOT}/include/marisa/*.h)
install(FILES ${include_headers} DESTINATION include)
install(FILES ${libmarisa_include_headers} DESTINATION include/marisa)
install(FILES ${include_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(FILES ${libmarisa_include_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/marisa)
target_include_directories(marisa PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
Expand Down

0 comments on commit 218384d

Please sign in to comment.