Skip to content

Commit

Permalink
Fix incorrect way of turning CMAKE_INSTALL_LIBDIR absolute (#1261)
Browse files Browse the repository at this point in the history
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} is not guaranteed to make sense
because CMAKE_INSTALL_LIBDIR may be specified as an absolute path, in which case
this concatenation is nonsense.

Use CMAKE_INSTALL_FULL_LIBDIR instead, which will use CMAKE_INSTALL_LIBDIR if
it's already absolute, or concatenate it onto CMAKE_INSTALL_PREFIX if it isn't.
  • Loading branch information
OPNA2608 committed Jul 11, 2023
1 parent a85aa98 commit 5a12a58
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,7 @@ unset ( DARWIN CACHE )
unset ( MACOSX_FRAMEWORK CACHE )
if ( CMAKE_SYSTEM MATCHES "Darwin" )
set ( DARWIN 1 )
set ( CMAKE_INSTALL_NAME_DIR
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} )
set ( CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_FULL_LIBDIR} )
if ( enable-coreaudio )
check_include_file ( CoreAudio/AudioHardware.h COREAUDIO_FOUND )
if ( COREAUDIO_FOUND )
Expand Down

0 comments on commit 5a12a58

Please sign in to comment.