Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Makefile.in
.cproject
.idea

CMakeUserPresets.json
/CMakeUserPresets.json

# clangd language server files.
/compile_commands.json
Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,9 @@ install(DIRECTORY DESTINATION ${CMAKE_INSTALL_CACHEDIR})

install(CODE "set(OWNER_USER ${TS_PKGSYSUSER})")
install(CODE "set(OWNER_GROUP ${TS_PKGSYSGROUP})")
install(CODE "set(CHOWN_DIRS ${CMAKE_INSTALL_LOGDIR} ${CMAKE_INSTALL_RUNSTATEDIR} ${CMAKE_INSTALL_CACHEDIR})")
install(
CODE "set(CHOWN_DIRS ${CMAKE_INSTALL_FULL_LOGDIR} ${CMAKE_INSTALL_FULL_RUNSTATEDIR} ${CMAKE_INSTALL_FULL_CACHEDIR})"
)
install(SCRIPT cmake/post_install.cmake)

# Display build summary
Expand Down
5 changes: 2 additions & 3 deletions cmake/post_install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@

if("$ENV{USER}" STREQUAL root)
foreach(DIR ${CHOWN_DIRS})
message(STATUS "Changing ${DIR} ownership to ${OWNER_USER}:${OWNER_GROUP}")
execute_process(COMMAND chown ${OWNER_USER}:${OWNER_GROUP} "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${DIR}")
message(STATUS "Changing $ENV{DESTDIR}${DIR} ownership to ${OWNER_USER}:${OWNER_GROUP}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't have ${CMAKE_INSTALL_PREFIX} as well like the line below it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the other should look like this one! I missed this picking from internal code. Thanks!

execute_process(COMMAND chown ${OWNER_USER}:${OWNER_GROUP} "$ENV{DESTDIR}${DIR}")
endforeach()

endif()
2 changes: 1 addition & 1 deletion lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if(NOT TARGET yaml-cpp::yaml-cpp)
# Turning CLANG_FORMAT off causes yamlcpp to not add its format target which
# otherwise conflicts with our format target.
set(YAML_CPP_CLANG_FORMAT_EXE OFF)
set(YAML_CPP_INSTALL OFF)
set(YAML_CPP_INSTALL ON)
add_subdirectory(yamlcpp)
install(TARGETS yaml-cpp)
endif()
Expand Down
2 changes: 1 addition & 1 deletion src/api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ target_link_libraries(
)

install(
TARGETS tsapi tsapibackend
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have removed this in the prior PR

TARGETS tsapi
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ts
Expand Down