diff --git a/CMakeLists.txt b/CMakeLists.txt index 928b4be50..006a715a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -165,6 +165,10 @@ if(SFML_OS_MACOSX) endif() if(SFML_OS_LINUX OR SFML_OS_FREEBSD) + set(PKGCONFIG_DIR lib${LIB_SUFFIX}/pkgconfig) + if(SFML_OS_FREEBSD) + set(PKGCONFIG_DIR libdata/pkgconfig) + endif() if(BUILD_SHARED_LIBS) sfml_set_option(SFML_INSTALL_PKGCONFIG_FILES FALSE BOOL "TRUE to automatically install pkg-config files so other projects can find SFML") if(SFML_INSTALL_PKGCONFIG_FILES) @@ -174,7 +178,7 @@ if(SFML_OS_LINUX OR SFML_OS_FREEBSD) "tools/pkg-config/sfml-${sfml_module}.pc" @ONLY) INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/tools/pkg-config/sfml-${sfml_module}.pc" - DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig") + DESTINATION "${CMAKE_INSTALL_PREFIX}/${PKGCONFIG_DIR}") endforeach() endif() else()