0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00

UI: Update Linux slice for CMake build framework 3.0

This commit is contained in:
PatTheMav 2024-04-13 20:05:23 +02:00 committed by Ryan Foster
parent be09cfe242
commit 1f911dd0d0
6 changed files with 35 additions and 1 deletions

View File

@ -8,6 +8,11 @@ if(ENABLE_WHATSNEW AND TARGET OBS::browser-panels)
elseif(OS_LINUX)
find_package(MbedTLS REQUIRED)
find_package(nlohmann_json REQUIRED)
if(NOT TARGET OBS::blake2)
add_subdirectory("${CMAKE_SOURCE_DIR}/deps/blake2" "${CMAKE_BINARY_DIR}/deps/blake2")
endif()
target_link_libraries(obs-studio PRIVATE MbedTLS::MbedTLS nlohmann_json::nlohmann_json OBS::blake2)
target_sources(

View File

@ -475,6 +475,7 @@ elseif(OS_POSIX)
if(OS_FREEBSD)
target_link_libraries(obs PRIVATE procstat)
target_compile_options(obs PRIVATE -Wno-unqualified-std-cast-call)
endif()
if(OS_LINUX AND ENABLE_WHATSNEW)

View File

@ -24,6 +24,7 @@ target_sources(
vertical-scroll-area.hpp)
target_include_directories(obs-ui-support INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}")
target_compile_options(obs-ui-support INTERFACE $<$<PLATFORM_ID:Linux>:-Wno-error=enum-conversion>)
target_link_libraries(obs-studio PRIVATE OBS::ui-support)

View File

@ -19,7 +19,11 @@ elseif(OS_MACOS)
endif()
# cmake-format: off
set_target_properties_obs(obs-frontend-api PROPERTIES FOLDER frontend PREFIX "" PUBLIC_HEADER obs-frontend-api.h)
set_target_properties_obs(obs-frontend-api PROPERTIES FOLDER frontend PUBLIC_HEADER obs-frontend-api.h)
if (OS_WINDOWS OR OS_MACOS)
set_property(TARGET obs-frontend-api PROPERTY PREFIX "")
endif()
# cmake-format: on
target_export(obs-frontend-api)

View File

@ -0,0 +1,13 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include
Name: obs-frontend-api
Description: OBS Studio frontend API library
Version: @OBS_VERSION_CANONICAL@
Requires:
Libs: -L${libdir} -lobs-frontend-api -lobs
Libs.private: -lobs -lm -pthread
Cflags: -I${includedir} -std=gnu@CMAKE_C_STANDARD@ -fPIC -fvisibility=hidden -fopenmp-simd -Werror

View File

@ -194,8 +194,18 @@ bool GetDataFilePath(const char *data, string &output)
return true;
}
char *relative_data_path =
os_get_executable_path_ptr("../" OBS_DATA_PATH "/obs-studio/");
if (relative_data_path) {
bool result = check_path(data, relative_data_path, output);
bfree(relative_data_path);
return result;
}
if (check_path(data, OBS_DATA_PATH "/obs-studio/", output))
return true;
if (check_path(data, INSTALL_DATA_PATH, output))
return true;