Properly handle pkgconfig files on FreeBSD

This commit is contained in:
Dmitry Marakasov 2014-04-25 17:52:55 +04:00
parent f1431e416c
commit 27eadf2a7c

View File

@ -165,6 +165,10 @@ if(SFML_OS_MACOSX)
endif() endif()
if(SFML_OS_LINUX OR SFML_OS_FREEBSD) 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) 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") 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) if(SFML_INSTALL_PKGCONFIG_FILES)
@ -174,7 +178,7 @@ if(SFML_OS_LINUX OR SFML_OS_FREEBSD)
"tools/pkg-config/sfml-${sfml_module}.pc" "tools/pkg-config/sfml-${sfml_module}.pc"
@ONLY) @ONLY)
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/tools/pkg-config/sfml-${sfml_module}.pc" 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() endforeach()
endif() endif()
else() else()