mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 06:51:54 +00:00
Fix pkgconfig file for absolute paths (#347)
When building fluidsynth, we can use relative or absolute paths for LIB_INSTALL_DIR and INCLUDE_INSTALL_DIR. Check whether the two vars were defined absolute before writing fluidsynth.pc. Fixes https://bugzilla.opensuse.org/1084081
This commit is contained in:
parent
657c784dc9
commit
ce00c35012
1 changed files with 10 additions and 2 deletions
|
@ -458,8 +458,16 @@ add_subdirectory ( doc )
|
|||
# pkg-config support
|
||||
set ( prefix "${CMAKE_INSTALL_PREFIX}" )
|
||||
set ( exec_prefix "\${prefix}" )
|
||||
set ( libdir "\${exec_prefix}/${LIB_INSTALL_DIR}" )
|
||||
set ( includedir "\${prefix}/${INCLUDE_INSTALL_DIR}" )
|
||||
if ( IS_ABSOLUTE "${LIB_INSTALL_DIR}" )
|
||||
set ( libdir "${LIB_INSTALL_DIR}" )
|
||||
else ()
|
||||
set ( libdir "\${exec_prefix}/${LIB_INSTALL_DIR}" )
|
||||
endif ()
|
||||
if ( IS_ABSOLUTE "${INCLUDE_INSTALL_DIR}" )
|
||||
set ( includedir "${INCLUDE_INSTALL_DIR}" )
|
||||
else ()
|
||||
set ( includedir "\${prefix}/${INCLUDE_INSTALL_DIR}" )
|
||||
endif ()
|
||||
configure_file ( fluidsynth.pc.in
|
||||
${CMAKE_BINARY_DIR}/fluidsynth.pc IMMEDIATE @ONLY )
|
||||
install ( FILES ${CMAKE_BINARY_DIR}/fluidsynth.pc
|
||||
|
|
Loading…
Reference in a new issue