Set better install paths for lib, include and cmake components

This commit is contained in:
Axel Isouard 2017-02-05 06:26:26 -08:00
parent 95384c655e
commit 5ccda05d8c
No known key found for this signature in database
GPG key ID: D30914735883C824

View file

@ -44,21 +44,20 @@ option(BUILD_TESTS "Build test binaries" OFF)
set(NINJA_ARGS "" CACHE STRING "Ninja arguments to pass before compiling WebRTC") set(NINJA_ARGS "" CACHE STRING "Ninja arguments to pass before compiling WebRTC")
# #
# Directories # Offer the user the choice of overriding the installation directories
# set(INSTALL_LIB_DIR lib CACHE PATH "Installation directory for libraries")
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_CMAKE_DIR lib/cmake/LibWebRTC CACHE PATH "Installation directory for CMake files")
if (NOT LIBWEBRTC_INSTALL_BIN_DIR) #
set(LIBWEBRTC_INSTALL_BIN_DIR "bin") # Make relative paths absolute (needed later on)
endif () foreach(p LIB BIN INCLUDE CMAKE)
if (NOT LIBWEBRTC_INSTALL_LIB_DIR) set(var INSTALL_${p}_DIR)
set(LIBWEBRTC_INSTALL_LIB_DIR "lib") if(NOT IS_ABSOLUTE "${${var}}")
endif () set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
if (NOT LIBWEBRTC_INSTALL_DATA_DIR) endif()
set(LIBWEBRTC_INSTALL_DATA_DIR "share") endforeach()
endif ()
if (NOT LIBWEBRTC_INSTALL_INCLUDE_DIR)
set(LIBWEBRTC_INSTALL_INCLUDE_DIR "include")
endif ()
# #
# Target OS # Target OS