Prefer share location over lib one.

This commit is contained in:
Mathieu Malaterre 2012-01-20 11:05:11 +00:00
parent d27bc19d71
commit 180dd26df1
1 changed files with 7 additions and 4 deletions

View File

@ -86,8 +86,12 @@ IF(NOT OPENJPEG_INSTALL_LIB_DIR)
SET(OPENJPEG_INSTALL_LIB_DIR "lib")
ENDIF(NOT OPENJPEG_INSTALL_LIB_DIR)
IF(NOT OPENJPEG_INSTALL_SHARE_DIR)
SET(OPENJPEG_INSTALL_SHARE_DIR "share")
ENDIF(NOT OPENJPEG_INSTALL_SHARE_DIR)
IF(NOT OPENJPEG_INSTALL_DATA_DIR)
SET(OPENJPEG_INSTALL_DATA_DIR "share/${OPENJPEG_INSTALL_SUBDIR}")
SET(OPENJPEG_INSTALL_DATA_DIR "${OPENJPEG_INSTALL_SHARE_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
ENDIF(NOT OPENJPEG_INSTALL_DATA_DIR)
IF(NOT OPENJPEG_INSTALL_INCLUDE_DIR)
@ -103,8 +107,7 @@ IF(NOT OPENJPEG_INSTALL_DOC_DIR)
ENDIF(NOT OPENJPEG_INSTALL_DOC_DIR)
IF(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
SET(OPENJPEG_INSTALL_PACKAGE_DIR ${OPENJPEG_INSTALL_LIB_DIR}/${OPENJPEG_INSTALL_SUBDIR}
CACHE INTERNAL "")
SET(OPENJPEG_INSTALL_PACKAGE_DIR "${OPENJPEG_INSTALL_SHARE_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
ENDIF(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
#-----------------------------------------------------------------------------
@ -143,7 +146,7 @@ IF(UNIX)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libopenjpeg1.pc.cmake
${CMAKE_CURRENT_BINARY_DIR}/libopenjpeg1.pc @ONLY)
INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/libopenjpeg1.pc DESTINATION
${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig )
${OPENJPEG_INSTALL_SHARE_DIR}/pkgconfig )
INSTALL( CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
\"libopenjpeg1.pc\"
\"\$ENV{DESTDIR}${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig/libopenjpeg.pc\")")