Skip to content

Commit

Permalink
build(cmake): Make monolithic libs be built inside Velox's own binary…
Browse files Browse the repository at this point in the history
… directory when being used as a subproject (#12144)

Summary:
Similar to #12128, currently when Velox is imported as a subproject of another project, the monolithic libs `libvelox.a` / `libvelox.so` will be generated in root project's binary directory which is sub-optimal.

The patch fixes the issue so the libs will be generated inside Velox's binary directory.

Pull Request resolved: #12144

Reviewed By: kgpai

Differential Revision: D68606631

Pulled By: xiaoxmeng

fbshipit-source-id: d0ef042c5ee935a598637b07549c9c48a06708fe
  • Loading branch information
zhztheplayer authored and facebook-github-bot committed Jan 28, 2025
1 parent 1692f5b commit 9fd0b0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMake/VeloxUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ function(velox_add_library TARGET)
# Create the target if this is the first invocation.
add_library(velox ${_type} ${ARGN})
set_target_properties(velox PROPERTIES LIBRARY_OUTPUT_DIRECTORY
${CMAKE_BINARY_DIR}/lib)
${PROJECT_BINARY_DIR}/lib)
set_target_properties(velox PROPERTIES ARCHIVE_OUTPUT_DIRECTORY
${CMAKE_BINARY_DIR}/lib)
${PROJECT_BINARY_DIR}/lib)
install(TARGETS velox DESTINATION lib/velox)
endif()
# create alias for compatability
Expand Down

0 comments on commit 9fd0b0f

Please sign in to comment.