mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-24 13:53:36 +02:00
Use relative install path for pkgconfig files
It is recommended in CMake's official documentation to use relative path for DESTINATION parameter. Using absolute paths do not work with the cmake --install command's --prefix option.
This commit is contained in:
1 parent
0f4b9a4383
commit
ad9edb0256
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -68,7 +68,7 @@ endif()
|
||||
csfml_set_option(CSFML_INSTALL_PKGCONFIG_FILES ${CSFML_INSTALL_PKGCONFIG_DEFAULT} BOOL "TRUE to automatically install pkg-config files so other projects can find SFML")
|
||||
|
||||
if(CSFML_INSTALL_PKGCONFIG_FILES)
|
||||
csfml_set_option(CSFML_PKGCONFIG_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/${CSFML_PKGCONFIG_DIR}" PATH "Install directory for CSFML's pkg-config .pc files")
|
||||
csfml_set_option(CSFML_PKGCONFIG_INSTALL_DIR "${CSFML_PKGCONFIG_DIR}" PATH "Install directory for CSFML's pkg-config .pc files")
|
||||
|
||||
foreach(csfml_module IN ITEMS all system window graphics audio network)
|
||||
configure_file(
|
||||
@@ -76,7 +76,7 @@ if(CSFML_INSTALL_PKGCONFIG_FILES)
|
||||
"tools/pkg-config/csfml-${csfml_module}.pc"
|
||||
@ONLY)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tools/pkg-config/csfml-${csfml_module}.pc"
|
||||
DESTINATION "${CSFML_PKGCONFIG_INSTALL_PREFIX}")
|
||||
DESTINATION "${CSFML_PKGCONFIG_INSTALL_DIR}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
|
||||
+2
-2
@@ -34,10 +34,10 @@ endif()
|
||||
|
||||
# set pkgconfig install directory
|
||||
# this could be e.g. macports on mac or msys2 on windows etc.
|
||||
set(CSFML_PKGCONFIG_DIR "/${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
set(CSFML_PKGCONFIG_DIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
|
||||
if(SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD)
|
||||
set(CSFML_PKGCONFIG_DIR "/libdata/pkgconfig")
|
||||
set(CSFML_PKGCONFIG_DIR "libdata/pkgconfig")
|
||||
endif()
|
||||
|
||||
# detect the compiler and its version
|
||||
|
||||
Reference in new issue
Block a user