mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Merge pull request #146 from johnbartholomew/pkg-config-support
Add support for pkg-config
This commit is contained in:
commit
9d4c8b26a5
@ -127,6 +127,26 @@ if(MACOSX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(LINUX)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
sfml_set_option(INSTALL_PKGCONFIG_FILES TRUE BOOL "TRUE to automatically install pkg-config files so other projects can find SFML")
|
||||
if(INSTALL_PKGCONFIG_FILES)
|
||||
foreach(sfml_module IN ITEMS all system window graphics audio network)
|
||||
CONFIGURE_FILE(
|
||||
"tools/pkg-config/sfml-${sfml_module}.pc.in"
|
||||
"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")
|
||||
endforeach()
|
||||
endif()
|
||||
else()
|
||||
if(INSTALL_PKGCONFIG_FILES)
|
||||
message(WARNING "No pkg-config files are provided for the static SFML libraries (INSTALL_PKGCONFIG_FILES will be ignored).")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# add the subdirectories
|
||||
add_subdirectory(src/SFML)
|
||||
if(BUILD_EXAMPLES)
|
||||
|
10
tools/pkg-config/sfml-all.pc.in
Normal file
10
tools/pkg-config/sfml-all.pc.in
Normal file
@ -0,0 +1,10 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib@LIB_SUFFIX@
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: SFML-all
|
||||
Description: The Simple and Fast Multimedia Library, all modules.
|
||||
URL: http://www.sfml-dev.org
|
||||
Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
|
||||
Requires: sfml-system, sfml-window, sfml-graphics, sfml-audio, sfml-network
|
11
tools/pkg-config/sfml-audio.pc.in
Normal file
11
tools/pkg-config/sfml-audio.pc.in
Normal file
@ -0,0 +1,11 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib@LIB_SUFFIX@
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: SFML-audio
|
||||
Description: The Simple and Fast Multimedia Library, audio module.
|
||||
URL: http://www.sfml-dev.org
|
||||
Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
|
||||
Libs: -L${libdir} -lsfml-audio
|
||||
Cflags: -I${includedir}
|
11
tools/pkg-config/sfml-graphics.pc.in
Normal file
11
tools/pkg-config/sfml-graphics.pc.in
Normal file
@ -0,0 +1,11 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib@LIB_SUFFIX@
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: SFML-graphics
|
||||
Description: The Simple and Fast Multimedia Library, graphics module.
|
||||
URL: http://www.sfml-dev.org
|
||||
Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
|
||||
Libs: -L${libdir} -lsfml-graphics
|
||||
Cflags: -I${includedir}
|
11
tools/pkg-config/sfml-network.pc.in
Normal file
11
tools/pkg-config/sfml-network.pc.in
Normal file
@ -0,0 +1,11 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib@LIB_SUFFIX@
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: SFML-network
|
||||
Description: The Simple and Fast Multimedia Library, network module.
|
||||
URL: http://www.sfml-dev.org
|
||||
Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
|
||||
Libs: -L${libdir} -lsfml-network
|
||||
Cflags: -I${includedir}
|
11
tools/pkg-config/sfml-system.pc.in
Normal file
11
tools/pkg-config/sfml-system.pc.in
Normal file
@ -0,0 +1,11 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib@LIB_SUFFIX@
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: SFML-system
|
||||
Description: The Simple and Fast Multimedia Library, system module.
|
||||
URL: http://www.sfml-dev.org
|
||||
Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
|
||||
Libs: -L${libdir} -lsfml-system
|
||||
Cflags: -I${includedir}
|
11
tools/pkg-config/sfml-window.pc.in
Normal file
11
tools/pkg-config/sfml-window.pc.in
Normal file
@ -0,0 +1,11 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib@LIB_SUFFIX@
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: SFML-window
|
||||
Description: The Simple and Fast Multimedia Library, window module.
|
||||
URL: http://www.sfml-dev.org
|
||||
Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
|
||||
Libs: -L${libdir} -lsfml-window
|
||||
Cflags: -I${includedir}
|
Loading…
Reference in New Issue
Block a user