[jxrlib] include a find package script for cmake for downstream projects (#5226)

* [jxrlib] include a find package script for cmake for downstream projects

* [jxrlib] bump control
This commit is contained in:
Stefano Sinigardi 2019-02-01 20:05:11 +01:00 committed by Victor Romero
parent 2c5efa81ca
commit 3980ac5abd
3 changed files with 32 additions and 1 deletions

View File

@ -1,3 +1,3 @@
Source: jxrlib
Version: 1.1-4
Version: 1.1-5
Description: Open source implementation of the jpegxr image format standard.

View File

@ -0,0 +1,28 @@
# - Find JXR
# Find the JXR library
# This module defines
# JXR_INCLUDE_DIRS, where to find jxrlib/JXRGlue.h
# JXR_LIBRARIES, the libraries needed to use JXR
#
find_path(JXR_INCLUDE_DIRS
NAMES JXRGlue.h
PATH_SUFFIXES jxrlib
)
mark_as_advanced(JXR_INCLUDE_DIRS)
include(SelectLibraryConfigurations)
find_library(JPEGXR_LIBRARY_RELEASE NAMES jpegxr PATH_SUFFIXES lib)
find_library(JPEGXR_LIBRARY_DEBUG NAMES jpegxrd PATH_SUFFIXES lib)
select_library_configurations(JPEGXR)
find_library(JXRGLUE_LIBRARY_RELEASE NAMES jxrglue PATH_SUFFIXES lib)
find_library(JXRGLUE_LIBRARY_DEBUG NAMES jxrglued PATH_SUFFIXES lib)
select_library_configurations(JXRGLUE)
set(JXR_LIBRARIES ${JPEGXR_LIBRARY} ${JXRGLUE_LIBRARY})
mark_as_advanced(JXR_LIBRARIES)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JXR DEFAULT_MSG JXR_INCLUDE_DIRS JXR_LIBRARIES)

View File

@ -28,4 +28,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jxrlib)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/jxrlib/LICENSE ${CURRENT_PACKAGES_DIR}/share/jxrlib/copyright)
#install FindJXR.cmake file
file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindJXR.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/JXR)
vcpkg_copy_pdbs()