Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build against new libajantv2 #10771

Open
bwarden opened this issue Jun 4, 2024 · 3 comments
Open

Fails to build against new libajantv2 #10771

bwarden opened this issue Jun 4, 2024 · 3 comments

Comments

@bwarden
Copy link

bwarden commented Jun 4, 2024

Operating System Info

Other

Other OS

Clear Linux OS

OBS Studio Version

30.1.2

OBS Studio Version (Other)

No response

OBS Studio Log URL

not in application

OBS Studio Crash Log URL

No response

Expected Behavior

Compiles against libajantv2-17.0.1

Current Behavior

Fails to find header file ntv2linuxdriverinterface.h

Steps to Reproduce

  1. Compile against system-provided libajantv2

...

Anything else we should know?

Variable names AJA_LIBRARIES_INCLUDE_DIRS, LIBAJANTV2_INCLUDE_DIRS, and LibAJANTV2_INCLUDE_DIRS are used inconsistently in the cmake file, dropping the OS-specific path appends

set(AJA_LIBRARIES_INCLUDE_DIRS
${AJA_LIBRARIES_INCLUDE_DIR} ${AJA_LIBRARIES_INCLUDE_DIR}/ajaanc ${AJA_LIBRARIES_INCLUDE_DIR}/ajabase
${AJA_LIBRARIES_INCLUDE_DIR}/ajantv2 ${AJA_LIBRARIES_INCLUDE_DIR}/ajantv2/includes)
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
list(APPEND LibAJANTV2_INCLUDE_DIRS ${AJA_LIBRARIES_INCLUDE_DIR}/ajantv2/src/win)
elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin")
list(APPEND LibAJANTV2_INCLUDE_DIRS ${AJA_LIBRARIES_INCLUDE_DIR}/ajantv2/src/mac)
elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
list(APPEND LibAJANTV2_INCLUDE_DIRS ${AJA_LIBRARIES_INCLUDE_DIR}/ajantv2/src/lin)
endif()
set(LIBAJANTV2_LIBRARIES ${AJA_NTV2_LIB})
if(AJA_NTV2_DEBUG_LIB STREQUAL "AJA_NTV2_DEBUG_LIB-NOTFOUND")
set(AJA_NTV2_DEBUG_LIB ${AJA_NTV2_LIB})
mark_as_advanced(AJA_NTV2_DEBUG_LIB)
endif()
set(LIBAJANTV2_DEBUG_LIBRARIES ${AJA_NTV2_DEBUG_LIB})
set(LIBAJANTV2_INCLUDE_DIRS ${AJA_LIBRARIES_INCLUDE_DIRS})

from the final list of include directories:

set_target_properties(AJA::LibAJANTV2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBAJANTV2_INCLUDE_DIRS}")

Here is a patch to fix the naming:
backport-Fix-AJANTV2-includes-in-backport-patch.patch

@RytoEX
Copy link
Member

RytoEX commented Jun 4, 2024

cc @paulh-aja @PatTheMav

However, please note that this finder is in the old CMake path, which is deprecated and due for removal.

Also, if you have a proposed patch, submitting a PR would be more appropriate.

@tytan652
Copy link
Collaborator

tytan652 commented Jun 4, 2024

Your are trying to compile OBS 30.1.2 against libajantv2 17 ?
30.1.2 only support 16.x.

If this is the case, this is not a bug and neither an issue.

@marillat
Copy link

30.2.0~beta3 also need libajantv2 16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants