Let the developer specify their own path to pkg-config files

This commit is contained in:
Axel Isouard 2017-02-06 20:02:57 +01:00
parent c8042df583
commit 9743793fdb
No known key found for this signature in database
GPG key ID: 4E64BB3EAAF31C29
2 changed files with 5 additions and 1 deletions

View file

@ -37,7 +37,7 @@ if (UNIX)
configure_file(${CMAKE_MODULE_PATH}/LibWebRTC.pc.in configure_file(${CMAKE_MODULE_PATH}/LibWebRTC.pc.in
${CMAKE_BINARY_DIR}/LibWebRTC.pc @ONLY) ${CMAKE_BINARY_DIR}/LibWebRTC.pc @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/LibWebRTC.pc install(FILES ${CMAKE_BINARY_DIR}/LibWebRTC.pc
DESTINATION ${INSTALL_LIB_DIR}/pkg-config DESTINATION ${INSTALL_PKGCONFIG_DIR}
COMPONENT cmake) COMPONENT cmake)
endif (UNIX) endif (UNIX)

View file

@ -17,6 +17,10 @@ set(INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables")
set(INSTALL_INCLUDE_DIR include CACHE PATH "Installation directory for header files") set(INSTALL_INCLUDE_DIR include CACHE PATH "Installation directory for header files")
set(INSTALL_CMAKE_DIR lib/cmake/LibWebRTC CACHE PATH "Installation directory for CMake files") set(INSTALL_CMAKE_DIR lib/cmake/LibWebRTC CACHE PATH "Installation directory for CMake files")
if (UNIX)
set(INSTALL_PKGCONFIG_DIR lib/pkgconfig CACHE PATH "Installation directory for pkg-config script")
endif (UNIX)
# #
# Make relative paths absolute (needed later on) # Make relative paths absolute (needed later on)
foreach(p LIB BIN INCLUDE CMAKE) foreach(p LIB BIN INCLUDE CMAKE)