freebsd-ports/graphics/openjpeg15/files/patch-CMakeLists.txt
Koop Mast 097c01dd0a Update openjpeg to 2.1.0.
Version 2.x is incompatible with openjpeg 1.5. Preserve it as openjpeg15
and update users.

Approved by:	portmgr (implicit) for NO_STAGE ports
2014-05-26 14:42:44 +00:00

64 lines
2.8 KiB
Text

--- CMakeLists.txt.orig 2014-03-27 11:58:08.000000000 +0100
+++ CMakeLists.txt 2014-05-24 11:24:37.000000000 +0200
@@ -54,7 +54,7 @@
endif(NOT OPENJPEG_SOVERSION)
SET(OPENJPEG_LIBRARY_PROPERTIES
VERSION "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}"
- SOVERSION "${OPENJPEG_SOVERSION}"
+ SOVERSION 2
)
# --------------------------------------------------------------------------
@@ -94,7 +94,7 @@
# Install directories
STRING(TOLOWER ${PROJECT_NAME} projectname)
-SET(OPENJPEG_INSTALL_SUBDIR "${projectname}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}")
+SET(OPENJPEG_INSTALL_SUBDIR "${projectname}")
IF(NOT OPENJPEG_INSTALL_BIN_DIR)
SET(OPENJPEG_INSTALL_BIN_DIR "bin")
@@ -125,11 +125,11 @@
ENDIF(NOT OPENJPEG_INSTALL_DATA_DIR)
IF(NOT OPENJPEG_INSTALL_INCLUDE_DIR)
- SET(OPENJPEG_INSTALL_INCLUDE_DIR "include/${OPENJPEG_INSTALL_SUBDIR}")
+ SET(OPENJPEG_INSTALL_INCLUDE_DIR "include/")
ENDIF(NOT OPENJPEG_INSTALL_INCLUDE_DIR)
IF(NOT OPENJPEG_INSTALL_MAN_DIR)
- SET(OPENJPEG_INSTALL_MAN_DIR "share/man/")
+ SET(OPENJPEG_INSTALL_MAN_DIR "man/")
ENDIF(NOT OPENJPEG_INSTALL_MAN_DIR)
IF(NOT OPENJPEG_INSTALL_DOC_DIR)
@@ -148,7 +148,7 @@
# We could install *.cmake files in share/ however those files contains
# hardcoded path to libraries on a multi-arch system (fedora/debian) those
# path will be different (lib/i386-linux-gnu vs lib/x86_64-linux-gnu)
- SET(OPENJPEG_INSTALL_PACKAGE_DIR "${OPENJPEG_INSTALL_LIB_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
+ SET(OPENJPEG_INSTALL_PACKAGE_DIR "${OPENJPEG_INSTALL_SHARE_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
ENDIF(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
#-----------------------------------------------------------------------------
@@ -188,10 +188,10 @@
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 )
+ libdata/pkgconfig )
INSTALL( CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
\"libopenjpeg1.pc\"
- \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_SHARE_DIR}/pkgconfig/libopenjpeg.pc\")")
+ \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig/libopenjpeg.pc\")")
ENDIF(UNIX)
#-----------------------------------------------------------------------------
@@ -288,6 +288,7 @@
#-----------------------------------------------------------------------------
# install all targets referenced as OPENJPEGTargets
INSTALL(EXPORT OpenJPEGTargets DESTINATION ${OPENJPEG_INSTALL_PACKAGE_DIR})
+SET(OPENJPEG_LIBRARIES "${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_LIB_DIR}/lib${OPENJPEG_LIBRARY_NAME}.so")
CONFIGURE_FILE( ${OPENJPEG_SOURCE_DIR}/CMake/OpenJPEGConfig.cmake.in
${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
@ONLY