Skip to content

Commit 49aa44b

Browse files
committed
0.25.5
1 parent 2b01c0a commit 49aa44b

16 files changed

+1440
-334
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
!README.md
1818
!LICENSE*
1919
!*.cmake
20+
!cross-compile.sh
21+
!linux-dependencies.sh
2022

2123
!/lib
2224
!.vscode

buildspec.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@
4747
"uuids": {
4848
"windowsApp": "ad885c58-5ca9-44de-8f4f-1c12676626a9"
4949
},
50-
"version": "0.25.3",
50+
"version": "0.25.5",
5151
"website": "https://www.atkaudio.com"
5252
}

cmake-toolchain-arm64.cmake

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# CMake toolchain file for cross-compiling to arm64
2+
set(CMAKE_SYSTEM_NAME Linux)
3+
set(CMAKE_SYSTEM_PROCESSOR aarch64)
4+
5+
# Specify the cross compiler
6+
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
7+
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
8+
9+
# Add custom CMake module path for finding packages
10+
list(APPEND CMAKE_MODULE_PATH "/workspace/cmake/linux")
11+
12+
# Use system's multiarch directories - no separate sysroot needed
13+
# The cross-compiler toolchain already knows about:
14+
# /usr/lib/aarch64-linux-gnu/
15+
# /usr/include/aarch64-linux-gnu/
16+
# Ubuntu's multiarch support handles everything
17+
18+
# Set CMAKE_LIBRARY_ARCHITECTURE for multiarch support
19+
set(CMAKE_LIBRARY_ARCHITECTURE aarch64-linux-gnu)
20+
21+
# Set root paths for finding libraries - exclude Linuxbrew/Homebrew
22+
set(CMAKE_FIND_ROOT_PATH
23+
/usr
24+
/usr/lib/aarch64-linux-gnu
25+
/usr/include/aarch64-linux-gnu
26+
)
27+
28+
# Add prefix paths for finding CMake package config files
29+
set(CMAKE_PREFIX_PATH
30+
/usr
31+
/usr/lib/aarch64-linux-gnu
32+
/usr/lib/aarch64-linux-gnu/cmake
33+
/usr/share
34+
)
35+
36+
# Exclude Linuxbrew/Homebrew paths to prevent architecture mismatches
37+
set(CMAKE_IGNORE_PATH
38+
/home/linuxbrew/.linuxbrew
39+
/opt/homebrew
40+
/usr/local/Homebrew
41+
)
42+
43+
# Search for programs in the build host directories
44+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
45+
46+
# Search for libraries and headers in the target directories only
47+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
48+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
49+
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
50+
51+
# Don't build helper tools when cross-compiling
52+
set(JUCE_BUILD_HELPER_TOOLS OFF CACHE BOOL "Don't build helper tools" FORCE)
53+
54+
# Point to pre-built juceaide from host build
55+
if(EXISTS "/workspace/build-host-tools/JUCE/tools/juceaide")
56+
set(JUCE_JUCEAIDE_PATH "/workspace/build-host-tools/JUCE/tools/juceaide" CACHE FILEPATH "Path to juceaide" FORCE)
57+
message(STATUS "Using pre-built juceaide: /workspace/build-host-tools/JUCE/tools/juceaide")
58+
endif()
59+
60+
# pkg-config configuration for cross-compilation
61+
set(PKG_CONFIG_EXECUTABLE /usr/bin/aarch64-linux-gnu-pkg-config)
62+
if(NOT EXISTS "${PKG_CONFIG_EXECUTABLE}")
63+
# Fallback to regular pkg-config with environment variables
64+
set(PKG_CONFIG_EXECUTABLE /usr/bin/pkg-config)
65+
set(ENV{PKG_CONFIG_PATH} "")
66+
set(ENV{PKG_CONFIG_LIBDIR} "/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig")
67+
set(ENV{PKG_CONFIG_SYSROOT_DIR} "/")
68+
endif()

cmake/linux/FindLibObs.cmake

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# FindLibObs.cmake - Find OBS Studio libraries
2+
# This module finds the OBS Studio libraries, particularly useful for cross-compilation
3+
# where CMake config files may not be available in multiarch directories.
4+
#
5+
# This module defines:
6+
# LibObs_FOUND - System has OBS Studio libraries
7+
# LibObs_INCLUDE_DIRS - The OBS Studio include directories
8+
# LibObs_LIBRARIES - The libraries needed to use OBS Studio
9+
# LibObs_DEFINITIONS - Compiler switches required for using OBS Studio
10+
#
11+
# And creates the following imported targets:
12+
# libobs - The main OBS library
13+
14+
include(FindPackageHandleStandardArgs)
15+
16+
# Try pkg-config first
17+
find_package(PkgConfig QUIET)
18+
if(PKG_CONFIG_FOUND)
19+
pkg_check_modules(PC_LIBOBS QUIET libobs)
20+
set(LibObs_DEFINITIONS ${PC_LIBOBS_CFLAGS_OTHER})
21+
endif()
22+
23+
# Find the include directory
24+
find_path(LibObs_INCLUDE_DIR
25+
NAMES obs.h obs-module.h
26+
PATHS
27+
${PC_LIBOBS_INCLUDE_DIRS}
28+
${LIBOBS_INCLUDE_PATH}
29+
/usr/include
30+
/usr/local/include
31+
${CMAKE_SYSROOT}/usr/include
32+
PATH_SUFFIXES obs libobs
33+
)
34+
35+
# Find the library
36+
find_library(LibObs_LIBRARY
37+
NAMES obs libobs
38+
PATHS
39+
${PC_LIBOBS_LIBRARY_DIRS}
40+
${LIBOBS_LIB_PATH}
41+
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
42+
/usr/lib
43+
/usr/local/lib
44+
${CMAKE_SYSROOT}/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
45+
${CMAKE_SYSROOT}/usr/lib
46+
)
47+
48+
# Handle the QUIETLY and REQUIRED arguments
49+
find_package_handle_standard_args(LibObs
50+
REQUIRED_VARS LibObs_LIBRARY LibObs_INCLUDE_DIR
51+
VERSION_VAR PC_LIBOBS_VERSION
52+
)
53+
54+
if(LibObs_FOUND)
55+
set(LibObs_LIBRARIES ${LibObs_LIBRARY})
56+
set(LibObs_INCLUDE_DIRS ${LibObs_INCLUDE_DIR})
57+
58+
# Create imported target
59+
if(NOT TARGET libobs)
60+
add_library(libobs UNKNOWN IMPORTED)
61+
set_target_properties(libobs PROPERTIES
62+
IMPORTED_LOCATION "${LibObs_LIBRARY}"
63+
INTERFACE_INCLUDE_DIRECTORIES "${LibObs_INCLUDE_DIR}"
64+
INTERFACE_COMPILE_OPTIONS "${LibObs_DEFINITIONS}"
65+
)
66+
endif()
67+
68+
# Also create OBS::libobs alias for compatibility
69+
if(NOT TARGET OBS::libobs)
70+
add_library(OBS::libobs ALIAS libobs)
71+
endif()
72+
73+
mark_as_advanced(LibObs_INCLUDE_DIR LibObs_LIBRARY)
74+
endif()

0 commit comments

Comments
 (0)