Skip to content

Commit

Permalink
{Build} Enhance build stability (#164)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #164

- Better support recent fmt library update
  - `fmt::join` needs an include

- Better support of CMake install
  - vrs_utils_cli needs to be installed

- VrsPlayer is Thread dependent
  - need to be linked to Threads

- Linux `rt` library is required
  - to fix `undefined reference to aio_write` & `undefined reference to aio_return` on some distributions

- `lz4` and `zstd` does not need to leak to client (only used in cpp)
  - they can be linked privately

Reviewed By: georges-berenger

Differential Revision: D62672156

fbshipit-source-id: 1f63b292fa6ff74683c024f9b7b9a65c7b4d5bd0
  • Loading branch information
SeaOtocinclus authored and facebook-github-bot committed Sep 14, 2024
1 parent 68e6863 commit 1755b5d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions tools/vrsplayer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ if (QT_FOUND)
Qt${QT_VERSION_MAJOR}::Gui
Qt${QT_VERSION_MAJOR}::Widgets
vrs_logging
Threads::Threads
)

install(TARGETS vrsplayer EXPORT VRSLibTargets
Expand Down
2 changes: 2 additions & 0 deletions tools/vrsplayer/FrameWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include <qscreen.h>
#endif

#include <fmt/ranges.h>

#define DEFAULT_LOG_CHANNEL "FrameWidget"
#include <logging/Log.h>
#include <vrs/TagConventions.h>
Expand Down
5 changes: 5 additions & 0 deletions vrs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@ target_link_libraries(vrslib
vrs_logging
vrs_os
vrs_utils_xxhash
)
target_link_libraries(vrslib
PRIVATE
Lz4::Lz4
Zstd::Zstd
)

target_link_libraries (vrslib PUBLIC $<$<PLATFORM_ID:Linux>:rt>)

install(TARGETS vrslib EXPORT VRSLibTargets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
Expand Down
12 changes: 11 additions & 1 deletion vrs/utils/cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,21 @@
file (GLOB VRS_UTILS_CLI_SRCS *.cpp *.h *.hpp)

add_library(vrs_utils_cli ${VRS_UTILS_CLI_SRCS})
target_include_directories(vrs_utils_cli PUBLIC ${VRS_SOURCE_DIR})
target_include_directories(vrs_utils_cli
PUBLIC
$<BUILD_INTERFACE:${VRS_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
target_link_libraries(vrs_utils_cli
PUBLIC
vrs_utils
PRIVATE
vrs_helpers
vrs_logging
)
install(TARGETS vrs_utils_cli EXPORT VRSLibTargets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)

0 comments on commit 1755b5d

Please sign in to comment.