Skip to content

Commit

Permalink
Add SheenBidi dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
glebm committed Feb 7, 2025
1 parent a3eea0f commit b259f5e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
13 changes: 13 additions & 0 deletions 3rdParty/SheenBidi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
include(functions/FetchContent_ExcludeFromAll_backport)
include(FetchContent)

set(BUILD_TESTING OFF)
set(ENABLE_INSTALL OFF)
set(ASAN OFF)
set(UBSAN OFF)

FetchContent_Declare_ExcludeFromAll(SheenBidi
URL https://github.com/Tehreer/SheenBidi/archive/a1a55a8d6fbb63bab26f4f8ff43bdea5ec30a60a.tar.gz
URL_HASH MD5=f652da33c6a437ff8038d25c6fc9a01c
)
FetchContent_MakeAvailable_ExcludeFromAll(SheenBidi)
16 changes: 16 additions & 0 deletions CMake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,22 @@ add_subdirectory(3rdParty/tl)

add_subdirectory(3rdParty/hoehrmann_utf8)

if(NOT DEFINED DEVILUTIONX_SYSTEM_SHEENBIDI)
find_package(SheenBidi QUIET)
if(SheenBidi_FOUND)
message("-- Found SheenBidi ${SheenBidi_VERSION}")
else()
message("-- Suitable system SheenBidi package not found, will use SheenBidi from source")
set(DEVILUTIONX_SYSTEM_SHEENBIDI OFF)
endif()
endif()
dependency_options("SheenBidi" DEVILUTIONX_SYSTEM_SHEENBIDI ON DEVILUTIONX_STATIC_SHEENBIDI)
if(DEVILUTIONX_SYSTEM_SHEENBIDI)
find_package(SheenBidi REQUIRED)
else()
add_subdirectory(3rdParty/SheenBidi)
endif()

if(NOT DEFINED DEVILUTIONX_SYSTEM_UNORDERED_DENSE)
find_package(unordered_dense CONFIG QUIET)
if (unordered_dense_FOUND)
Expand Down
11 changes: 9 additions & 2 deletions tools/make_src_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@
# We only package the dependencies that are:
# 1. Uncommon in package managers (sdl_audiolib).
# 2. Require devilutionx forks (all others).
_DEPS = ['asio', 'libmpq', 'libsmackerdec',
'libzt', 'sdl_audiolib', 'unordered_dense']
_DEPS = [
"asio",
"libmpq",
"libsmackerdec",
"libzt",
"sdl_audiolib",
"sheenbidi",
"unordered_dense",
]
_ALWAYS_VENDORED_DEPS = ['asio', 'libmpq', 'libsmackerdec', 'libzt']

# These dependencies are not vendored by default.
Expand Down

0 comments on commit b259f5e

Please sign in to comment.