Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
minhvogremsy authored Mar 25, 2024
1 parent 0166402 commit 9cb5afc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ pkg_check_modules(GST REQUIRED
gstreamer-app-1.0
)

# set library path
# Set library path based on system architecture
set(PAYLOADSDK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs)
set(PAYLOADSDK_LIB ${CMAKE_CURRENT_SOURCE_DIR}/libs/x86_64)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
set(PAYLOADSDK_LIB ${CMAKE_CURRENT_SOURCE_DIR}/libs/x86_64)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
set(PAYLOADSDK_LIB ${CMAKE_CURRENT_SOURCE_DIR}/libs/aarch64)
else()
message(FATAL_ERROR "Unsupported architecture: ${CMAKE_SYSTEM_PROCESSOR}")
endif()

# examples
add_subdirectory(examples)
Expand Down

0 comments on commit 9cb5afc

Please sign in to comment.