mpp : Add install mpp public header files.

Headers will be installed to ${CMAKE_SOURCE_DIR}/out/inc by default.
Override INC_INSTALL_DIR to install to linux system dir.
"cmake -DINC_INSTALL_DIR=/usr/include/mpp ..."

Change-Id: I94cd4652e9ce728107b29e6715a50d51e68ceb8c
Signed-off-by: Cody Xie <xkd@rock-chips.com>
This commit is contained in:
Cody Xie
2016-11-24 10:27:11 +08:00
committed by Herman Chen
parent b534aaf68e
commit 3f0b6e50bd

View File

@@ -334,6 +334,7 @@ set(CMAKE_INSTALL_PREFIX "")
set(LIB_INSTALL_DIR "${CMAKE_SOURCE_DIR}/out/lib" CACHE STRING "Install location of libraries")
set(BIN_INSTALL_DIR "${CMAKE_SOURCE_DIR}/out/bin" CACHE STRING "Install location of executables")
set(TEST_INSTALL_DIR "${CMAKE_BINARY_DIR}/test" CACHE STRING "Install location of unit test")
set(INC_INSTALL_DIR "${CMAKE_SOURCE_DIR}/out/inc" CACHE STRING "Install location of headers")
# ----------------------------------------------------------------------------
@@ -388,9 +389,9 @@ if(MSVC)
set(WIN32_PTHREAD_LIB_DIRS "${CMAKE_SOURCE_DIR}/osal/window/pthread/lib")
set(WIN32_PTHREAD_DLL_DIRS "${CMAKE_SOURCE_DIR}/osal/window/pthread/dll")
if(X64)
set(WIN32_ARCH "x64")
else()
set(WIN32_ARCH "x86")
set(WIN32_ARCH "x64")
else()
set(WIN32_ARCH "x86")
endif()
include_directories("${WIN32_PTHREAD_LIB_DIRS}/${WIN32_ARCH}")
include_directories("${WIN32_PTHREAD_DLL_DIRS}/${WIN32_ARCH}")
@@ -457,3 +458,11 @@ add_subdirectory(mpp)
# test / demo
# ----------------------------------------------------------------------------
add_subdirectory(test)
# ----------------------------------------------------------------------------
# install headers
# ----------------------------------------------------------------------------
install(DIRECTORY ${CMAKE_SOURCE_DIR}/inc/
DESTINATION "${INC_INSTALL_DIR}"
FILES_MATCHING PATTERN "*.h"
)