Skip to content

Commit 690d775

Browse files
committed
Make: Use relative install path for C sources
The install() command for C sources was using a hardcoded absolute path `/usr/src/`, which ignores CMAKE_INSTALL_PREFIX and breaks builds on non-standard environments like Termux or when using custom installation prefixes. Relates to ashvardanian/NumKong#287
1 parent 7ca3964 commit 690d775

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,5 +861,5 @@ if (STRINGZILLA_INSTALL)
861861
endif ()
862862

863863
install(DIRECTORY ${STRINGZILLA_INCLUDE_BUILD_DIR} DESTINATION ${STRINGZILLA_INCLUDE_INSTALL_DIR})
864-
install(DIRECTORY ./c/ DESTINATION /usr/src/${PROJECT_NAME}/)
864+
install(DIRECTORY c/ DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/src)
865865
endif ()

0 commit comments

Comments
 (0)