From 27eadf2a7c8249f87b925f10ad8c73e32c437e9f Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Fri, 25 Apr 2014 17:52:55 +0400 Subject: [PATCH] Properly handle pkgconfig files on FreeBSD --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 928b4be5..006a715a 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()