Generate proper DL_OPENGL value for linux
Since we rely on the dynamic linker to find the library for us via dlopen(), we need to have DL_OPENGL be .so.N, not the full library filename, as ldconfig doesn't cache the full filename Use of TARGET_SONAME_FILE requires the library to be marked as SHARED, not MODULE This closes pull request #370
This commit is contained in:
@@ -521,10 +521,17 @@ function(define_graphic_modules target)
|
||||
foreach(dl_lib opengl d3d9 d3d11)
|
||||
string(TOUPPER ${dl_lib} dl_lib_upper)
|
||||
if(TARGET libobs-${dl_lib})
|
||||
target_compile_definitions(${target}
|
||||
PRIVATE
|
||||
DL_${dl_lib_upper}="$<TARGET_FILE_NAME:libobs-${dl_lib}>"
|
||||
)
|
||||
if(UNIX AND UNIX_STRUCTURE)
|
||||
target_compile_definitions(${target}
|
||||
PRIVATE
|
||||
DL_${dl_lib_upper}="$<TARGET_SONAME_FILE_NAME:libobs-${dl_lib}>"
|
||||
)
|
||||
else()
|
||||
target_compile_definitions(${target}
|
||||
PRIVATE
|
||||
DL_${dl_lib_upper}="$<TARGET_FILE_NAME:libobs-${dl_lib}>"
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
target_compile_definitions(${target}
|
||||
PRIVATE
|
||||
|
Reference in New Issue
Block a user