mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 14:21:04 +08:00
Ensure GNUInstallDirs cache vars are included before first used
This commit is contained in:
parent
69ea0cd863
commit
c20ab7d6d8
@ -301,6 +301,14 @@ 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")
|
||||
|
||||
if(SFML_INSTALL_PKGCONFIG_FILES)
|
||||
# set pkgconfig install directory
|
||||
# this could be e.g. macports on mac or msys2 on windows etc.
|
||||
set(SFML_PKGCONFIG_DIR "/${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
|
||||
if(SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD)
|
||||
set(SFML_PKGCONFIG_DIR "/libdata/pkgconfig")
|
||||
endif()
|
||||
|
||||
sfml_set_option(SFML_PKGCONFIG_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/${SFML_PKGCONFIG_DIR}" PATH "Install directory for SFML's pkg-config .pc files")
|
||||
|
||||
foreach(sfml_module IN ITEMS all system window graphics audio network)
|
||||
|
@ -73,14 +73,6 @@ else()
|
||||
return()
|
||||
endif()
|
||||
|
||||
# set pkgconfig install directory
|
||||
# this could be e.g. macports on mac or msys2 on windows etc.
|
||||
set(SFML_PKGCONFIG_DIR "/${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
|
||||
if(SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD)
|
||||
set(SFML_PKGCONFIG_DIR "/libdata/pkgconfig")
|
||||
endif()
|
||||
|
||||
# detect the compiler and its version
|
||||
# Note: The detection is order is important because:
|
||||
# - Visual Studio can both use MSVC and Clang
|
||||
|
Loading…
Reference in New Issue
Block a user