mirror of
https://github.com/SFML/SFML.git
synced 2024-11-24 20:31:05 +08:00
Fix Nix pkg-config support
CMAKE_INSTALL_LIBDIR is an absolute path on Nix (which is a valid thing to do). In such a case two absolute paths would get appended resulting in a nonsense path that broke pkg-config support.
This commit is contained in:
parent
9cea872dbc
commit
5e18e5403b
@ -303,9 +303,12 @@ endif()
|
|||||||
sfml_set_option(SFML_INSTALL_PKGCONFIG_FILES ${SFML_INSTALL_PKGCONFIG_DEFAULT} BOOL "TRUE to automatically install pkg-config files so other projects can find SFML")
|
sfml_set_option(SFML_INSTALL_PKGCONFIG_FILES ${SFML_INSTALL_PKGCONFIG_DEFAULT} BOOL "TRUE to automatically install pkg-config files so other projects can find SFML")
|
||||||
|
|
||||||
if(SFML_INSTALL_PKGCONFIG_FILES)
|
if(SFML_INSTALL_PKGCONFIG_FILES)
|
||||||
|
# account for CMAKE_INSTALL_LIBDIR potentially being an absolute path
|
||||||
|
file(RELATIVE_PATH SFML_RELATIVE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_FULL_LIBDIR})
|
||||||
|
|
||||||
# set pkgconfig install directory
|
# set pkgconfig install directory
|
||||||
# this could be e.g. macports on mac or msys2 on windows etc.
|
# this could be e.g. macports on mac or msys2 on windows etc.
|
||||||
set(SFML_PKGCONFIG_DIR "/${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
set(SFML_PKGCONFIG_DIR "/${SFML_RELATIVE_INSTALL_LIBDIR}/pkgconfig")
|
||||||
|
|
||||||
if(SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD)
|
if(SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD)
|
||||||
set(SFML_PKGCONFIG_DIR "/libdata/pkgconfig")
|
set(SFML_PKGCONFIG_DIR "/libdata/pkgconfig")
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
- Ensure GNUInstallDirs cache vars are included before first used (#2778, #2779)
|
- Ensure GNUInstallDirs cache vars are included before first used (#2778, #2779)
|
||||||
- [macOS] Fix incorrect variable expansion (#2780)
|
- [macOS] Fix incorrect variable expansion (#2780)
|
||||||
- Issue warning when trying to use UCRT MinGW with precompiled MSVCRT depenencies (#2821)
|
- Issue warning when trying to use UCRT MinGW with precompiled MSVCRT depenencies (#2821)
|
||||||
|
- Fix Nix pkg-config support
|
||||||
|
|
||||||
### Audio
|
### Audio
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
prefix=@CMAKE_INSTALL_PREFIX@
|
prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
exec_prefix=${prefix}
|
exec_prefix=${prefix}
|
||||||
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
|
libdir=${exec_prefix}/@SFML_RELATIVE_INSTALL_LIBDIR@
|
||||||
includedir=${prefix}/include
|
includedir=${prefix}/include
|
||||||
|
|
||||||
Name: SFML-all
|
Name: SFML-all
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
prefix=@CMAKE_INSTALL_PREFIX@
|
prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
exec_prefix=${prefix}
|
exec_prefix=${prefix}
|
||||||
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
|
libdir=${exec_prefix}/@SFML_RELATIVE_INSTALL_LIBDIR@
|
||||||
includedir=${prefix}/include
|
includedir=${prefix}/include
|
||||||
|
|
||||||
Name: SFML-audio
|
Name: SFML-audio
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
prefix=@CMAKE_INSTALL_PREFIX@
|
prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
exec_prefix=${prefix}
|
exec_prefix=${prefix}
|
||||||
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
|
libdir=${exec_prefix}/@SFML_RELATIVE_INSTALL_LIBDIR@
|
||||||
includedir=${prefix}/include
|
includedir=${prefix}/include
|
||||||
|
|
||||||
Name: SFML-graphics
|
Name: SFML-graphics
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
prefix=@CMAKE_INSTALL_PREFIX@
|
prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
exec_prefix=${prefix}
|
exec_prefix=${prefix}
|
||||||
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
|
libdir=${exec_prefix}/@SFML_RELATIVE_INSTALL_LIBDIR@
|
||||||
includedir=${prefix}/include
|
includedir=${prefix}/include
|
||||||
|
|
||||||
Name: SFML-network
|
Name: SFML-network
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
prefix=@CMAKE_INSTALL_PREFIX@
|
prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
exec_prefix=${prefix}
|
exec_prefix=${prefix}
|
||||||
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
|
libdir=${exec_prefix}/@SFML_RELATIVE_INSTALL_LIBDIR@
|
||||||
includedir=${prefix}/include
|
includedir=${prefix}/include
|
||||||
|
|
||||||
Name: SFML-system
|
Name: SFML-system
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
prefix=@CMAKE_INSTALL_PREFIX@
|
prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
exec_prefix=${prefix}
|
exec_prefix=${prefix}
|
||||||
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
|
libdir=${exec_prefix}/@SFML_RELATIVE_INSTALL_LIBDIR@
|
||||||
includedir=${prefix}/include
|
includedir=${prefix}/include
|
||||||
|
|
||||||
Name: SFML-window
|
Name: SFML-window
|
||||||
|
Loading…
Reference in New Issue
Block a user