deps,libobs: Replace uthash with prefix/system install

This commit is contained in:
tytan652 2023-07-24 10:52:05 +02:00 committed by Matthew Gajownik
parent 0faa661f2b
commit e032c2d0c9
8 changed files with 5 additions and 1176 deletions

1
deps/CMakeLists.txt vendored
View file

@ -11,4 +11,3 @@ add_subdirectory(libcaption)
add_subdirectory(media-playback) add_subdirectory(media-playback)
add_subdirectory(obs-scripting) add_subdirectory(obs-scripting)
add_subdirectory(opts-parser) add_subdirectory(opts-parser)
add_subdirectory(uthash)

View file

@ -1,3 +0,0 @@
Language: Cpp
SortIncludes: false
DisableFormat: true

View file

@ -1,8 +0,0 @@
cmake_minimum_required(VERSION 3.22...3.25)
add_library(uthash INTERFACE)
add_library(OBS::uthash ALIAS uthash)
target_sources(uthash INTERFACE uthash/uthash.h)
target_include_directories(uthash INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}")

View file

@ -1,21 +0,0 @@
Copyright (c) 2005-2021, Troy D. Hanson http://troydhanson.github.com/uthash/
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

File diff suppressed because it is too large Load diff

View file

@ -23,6 +23,7 @@ find_package(
# cmake-format: on # cmake-format: on
find_package(ZLIB REQUIRED) find_package(ZLIB REQUIRED)
find_package(Uthash REQUIRED)
if(ENABLE_UI) if(ENABLE_UI)
find_package(Qt6 REQUIRED Core) find_package(Qt6 REQUIRED Core)
@ -33,10 +34,6 @@ if(NOT TARGET OBS::caption)
add_subdirectory("${CMAKE_SOURCE_DIR}/deps/libcaption" "${CMAKE_BINARY_DIR}/deps/libcaption") add_subdirectory("${CMAKE_SOURCE_DIR}/deps/libcaption" "${CMAKE_BINARY_DIR}/deps/libcaption")
endif() endif()
if(NOT TARGET OBS::uthash)
add_subdirectory("${CMAKE_SOURCE_DIR}/deps/uthash" "${CMAKE_BINARY_DIR}/deps/uthash")
endif()
add_library(libobs SHARED) add_library(libobs SHARED)
add_library(OBS::libobs ALIAS libobs) add_library(OBS::libobs ALIAS libobs)
@ -250,7 +247,6 @@ target_compile_definitions(
target_link_libraries( target_link_libraries(
libobs libobs
PRIVATE OBS::caption PRIVATE OBS::caption
OBS::uthash
OBS::libobs-version OBS::libobs-version
FFmpeg::avcodec FFmpeg::avcodec
FFmpeg::avformat FFmpeg::avformat
@ -258,6 +254,7 @@ target_link_libraries(
FFmpeg::swscale FFmpeg::swscale
FFmpeg::swresample FFmpeg::swresample
jansson::jansson jansson::jansson
Uthash::Uthash
ZLIB::ZLIB ZLIB::ZLIB
PUBLIC Threads::Threads) PUBLIC Threads::Threads)

View file

@ -20,6 +20,7 @@ find_package(
COMPONENTS avformat avutil swscale swresample COMPONENTS avformat avutil swscale swresample
OPTIONAL_COMPONENTS avcodec) OPTIONAL_COMPONENTS avcodec)
find_package(ZLIB REQUIRED) find_package(ZLIB REQUIRED)
find_package(Uthash REQUIRED)
add_library(libobs SHARED) add_library(libobs SHARED)
add_library(OBS::libobs ALIAS libobs) add_library(OBS::libobs ALIAS libobs)
@ -254,8 +255,8 @@ target_link_libraries(
FFmpeg::swresample FFmpeg::swresample
Jansson::Jansson Jansson::Jansson
OBS::caption OBS::caption
OBS::uthash
OBS::libobs-version OBS::libobs-version
Uthash::Uthash
ZLIB::ZLIB ZLIB::ZLIB
PUBLIC Threads::Threads) PUBLIC Threads::Threads)

View file

@ -21,7 +21,7 @@
* This file (re)defines various uthash settings for use in libobs * This file (re)defines various uthash settings for use in libobs
*/ */
#include <uthash/uthash.h> #include <uthash.h>
/* Use OBS allocator */ /* Use OBS allocator */
#undef uthash_malloc #undef uthash_malloc