Some bits have been loaned from http://pkgs.fedoraproject.org/gitweb/?p=openjpeg.git;a=tree --- CMake/OpenJPEGConfig.cmake.in +++ CMake/OpenJPEGConfig.cmake.in @@ -11,13 +11,13 @@ SET(OPENJPEG_BUILD_VERSION "@OPENJPEG_VERSION_BUILD@") # The libraries. -SET(OPENJPEG_LIBRARIES "@OPENJPEG_LIBRARIES@") +SET(OPENJPEG_LIBRARIES "@OPENJPEG_LIBRARY_NAME@") # The CMake macros dir. -SET(OPENJPEG_CMAKE_DIR "@OPENJPEG_CMAKE_DIR_CONFIG@") +SET(OPENJPEG_CMAKE_DIR "@OPENJPEG_INSTALL_PACKAGE_DIR@") # The configuration options. -SET(OPENJPEG_BUILD_SHARED_LIBS "@OPENJPEG_BUILD_SHARED_LIBS@") +SET(OPENJPEG_BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@") # The "use" file. SET(OPENJPEG_USE_FILE "@OPENJPEG_USE_FILE_CONFIG@") --- CMakeLists.txt +++ CMakeLists.txt @@ -146,7 +146,7 @@ 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_SHARE_DIR}/pkgconfig ) + ${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig ) INSTALL( CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink \"libopenjpeg1.pc\" \"\$ENV{DESTDIR}${OPENJPEG_INSTALL_LIB_DIR}/pkgconfig/libopenjpeg.pc\")") @@ -252,11 +252,4 @@ DESTINATION ${OPENJPEG_INSTALL_PACKAGE_DIR} ) -#----------------------------------------------------------------------------- -# install CHANGES and LICENSE -INSTALL( - FILES CHANGES - LICENSE - DESTINATION ${OPENJPEG_INSTALL_DOC_DIR}) - INCLUDE (CMake/OpenJPEGCPack.cmake) --- libopenjpeg/CMakeLists.txt +++ libopenjpeg/CMakeLists.txt @@ -57,6 +57,10 @@ INSTALL(FILES openjpeg.h DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers ) +INSTALL( CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink + \"${OPENJPEG_INSTALL_SUBDIR}/openjpeg.h\" + \"\$ENV{DESTDIR}${OPENJPEG_INSTALL_INCLUDE_DIR}/openjpeg.h\")" +) # install man page of the library INSTALL( --- libopenjpeg1.pc.cmake +++ libopenjpeg1.pc.cmake @@ -1,8 +1,8 @@ prefix=@CMAKE_INSTALL_PREFIX@ -bindir=@OPENJPEG_INSTALL_BIN_DIR@ -datadir=@OPENJPEG_INSTALL_DATA_DIR@ -libdir=@OPENJPEG_INSTALL_LIB_DIR@ -includedir=@OPENJPEG_INSTALL_INCLUDE_DIR@ +bindir=${prefix}/@OPENJPEG_INSTALL_BIN_DIR@ +datadir=${prefix}/@OPENJPEG_INSTALL_DATA_DIR@ +libdir=${prefix}/@OPENJPEG_INSTALL_LIB_DIR@ +includedir=${prefix}/@OPENJPEG_INSTALL_INCLUDE_DIR@/@OPENJPEG_INSTALL_SUBDIR@ Name: openjpeg Description: JPEG2000 files library