-
Notifications
You must be signed in to change notification settings - Fork 7.6k
[libyuv] Find dependency port libjpeg-turbo #12213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| Source: libyuv | ||
| Version: fec9121-1 | ||
| Version: fec9121-2 | ||
| Build-Depends: libjpeg-turbo | ||
| Description: libyuv is an open source project that includes YUV scaling and conversion functionality. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,61 +1,61 @@ | ||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index ed4948f0..9f48ebde 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -2,10 +2,14 @@ | ||
| # Originally created for "roxlu build system" to compile libyuv on windows | ||
| # Run with -DTEST=ON to build unit tests | ||
|
|
||
| -PROJECT ( YUV C CXX ) # "C" is required even for C++ projects | ||
| CMAKE_MINIMUM_REQUIRED( VERSION 2.8 ) | ||
| +CMAKE_POLICY( SET CMP0022 NEW ) | ||
| + | ||
| +PROJECT ( YUV C CXX ) # "C" is required even for C++ projects | ||
| OPTION( TEST "Built unit tests" OFF ) | ||
|
|
||
| +SET( CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON ) | ||
| + | ||
| SET ( ly_base_dir ${PROJECT_SOURCE_DIR} ) | ||
| SET ( ly_src_dir ${ly_base_dir}/source ) | ||
| SET ( ly_inc_dir ${ly_base_dir}/include ) | ||
| @@ -14,6 +18,7 @@ SET ( ly_lib_name yuv ) | ||
| SET ( ly_lib_static ${ly_lib_name} ) | ||
| SET ( ly_lib_shared ${ly_lib_name}_shared ) | ||
|
|
||
| +FILE ( GLOB_RECURSE ly_include_files ${ly_inc_dir}/libyuv/*.h ) | ||
| FILE ( GLOB_RECURSE ly_source_files ${ly_src_dir}/*.cc ) | ||
| LIST ( SORT ly_source_files ) | ||
|
|
||
| @@ -24,6 +29,7 @@ INCLUDE_DIRECTORIES( BEFORE ${ly_inc_dir} ) | ||
|
|
||
| # this creates the static library (.a) | ||
| ADD_LIBRARY ( ${ly_lib_static} STATIC ${ly_source_files} ) | ||
| +SET_TARGET_PROPERTIES( ${ly_lib_static} PROPERTIES PUBLIC_HEADER include/libyuv.h ) | ||
|
|
||
| # this creates the shared library (.so) | ||
| ADD_LIBRARY ( ${ly_lib_shared} SHARED ${ly_source_files} ) | ||
| @@ -38,6 +44,7 @@ TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} ) | ||
| INCLUDE ( FindJPEG ) | ||
| if (JPEG_FOUND) | ||
| include_directories( ${JPEG_INCLUDE_DIR} ) | ||
| + target_link_libraries( ${ly_lib_shared} PUBLIC ${JPEG_LIBRARY} ) | ||
| target_link_libraries( yuvconvert ${JPEG_LIBRARY} ) | ||
| add_definitions( -DHAVE_JPEG ) | ||
| endif() | ||
| @@ -81,10 +88,12 @@ endif() | ||
|
|
||
|
|
||
| # install the conversion tool, .so, .a, and all the header files | ||
| -INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin ) | ||
| -INSTALL ( TARGETS ${ly_lib_static} DESTINATION lib ) | ||
| -INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) | ||
| -INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include ) | ||
| +INSTALL ( TARGETS yuvconvert DESTINATION bin ) | ||
| +INSTALL ( FILES ${ly_include_files} DESTINATION include/libyuv ) | ||
| +INSTALL ( TARGETS ${ly_lib_static} EXPORT libyuv-export DESTINATION lib INCLUDES DESTINATION include PUBLIC_HEADER DESTINATION include ) | ||
| +INSTALL ( TARGETS ${ly_lib_shared} EXPORT libyuv-export LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) | ||
| + | ||
| +INSTALL( EXPORT libyuv-export FILE libyuv-config.cmake DESTINATION share/cmake/libyuv/ EXPORT_LINK_INTERFACE_LIBRARIES ) | ||
|
|
||
| # create the .deb and .rpm packages using cpack | ||
| INCLUDE ( CM_linux_packages.cmake ) | ||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index ed4948f..5b4e112 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -2,10 +2,14 @@ | ||
| # Originally created for "roxlu build system" to compile libyuv on windows | ||
| # Run with -DTEST=ON to build unit tests | ||
| -PROJECT ( YUV C CXX ) # "C" is required even for C++ projects | ||
| CMAKE_MINIMUM_REQUIRED( VERSION 2.8 ) | ||
| +CMAKE_POLICY( SET CMP0022 NEW ) | ||
| + | ||
| +PROJECT ( YUV C CXX ) # "C" is required even for C++ projects | ||
| OPTION( TEST "Built unit tests" OFF ) | ||
| +SET( CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON ) | ||
| + | ||
| SET ( ly_base_dir ${PROJECT_SOURCE_DIR} ) | ||
| SET ( ly_src_dir ${ly_base_dir}/source ) | ||
| SET ( ly_inc_dir ${ly_base_dir}/include ) | ||
| @@ -14,6 +18,7 @@ SET ( ly_lib_name yuv ) | ||
| SET ( ly_lib_static ${ly_lib_name} ) | ||
| SET ( ly_lib_shared ${ly_lib_name}_shared ) | ||
| +FILE ( GLOB_RECURSE ly_include_files ${ly_inc_dir}/libyuv/*.h ) | ||
| FILE ( GLOB_RECURSE ly_source_files ${ly_src_dir}/*.cc ) | ||
| LIST ( SORT ly_source_files ) | ||
| @@ -24,6 +29,7 @@ INCLUDE_DIRECTORIES( BEFORE ${ly_inc_dir} ) | ||
| # this creates the static library (.a) | ||
| ADD_LIBRARY ( ${ly_lib_static} STATIC ${ly_source_files} ) | ||
| +SET_TARGET_PROPERTIES( ${ly_lib_static} PROPERTIES PUBLIC_HEADER include/libyuv.h ) | ||
| # this creates the shared library (.so) | ||
| ADD_LIBRARY ( ${ly_lib_shared} SHARED ${ly_source_files} ) | ||
| @@ -38,6 +44,7 @@ TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} ) | ||
| INCLUDE ( FindJPEG ) | ||
| if (JPEG_FOUND) | ||
| include_directories( ${JPEG_INCLUDE_DIR} ) | ||
| + target_link_libraries( ${ly_lib_shared} PUBLIC ${JPEG_LIBRARY} ) | ||
| target_link_libraries( yuvconvert ${JPEG_LIBRARY} ) | ||
| add_definitions( -DHAVE_JPEG ) | ||
| endif() | ||
| @@ -81,10 +88,12 @@ endif() | ||
| # install the conversion tool, .so, .a, and all the header files | ||
| -INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin ) | ||
| -INSTALL ( TARGETS ${ly_lib_static} DESTINATION lib ) | ||
| -INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) | ||
| -INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include ) | ||
| +INSTALL ( TARGETS yuvconvert DESTINATION bin ) | ||
| +INSTALL ( FILES ${ly_include_files} DESTINATION include/libyuv ) | ||
| +INSTALL ( TARGETS ${ly_lib_static} EXPORT libyuv-targets DESTINATION lib INCLUDES DESTINATION include PUBLIC_HEADER DESTINATION include ) | ||
| +INSTALL ( TARGETS ${ly_lib_shared} EXPORT libyuv-targets LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) | ||
| + | ||
| +INSTALL( EXPORT libyuv-targets DESTINATION share/cmake/libyuv/ EXPORT_LINK_INTERFACE_LIBRARIES ) | ||
| # create the .deb and .rpm packages using cpack | ||
| INCLUDE ( CM_linux_packages.cmake ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| include(CMakeFindDependencyMacro) | ||
| find_dependency(JPEG REQUIRED) | ||
|
|
||
| set(libyuv_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../include") | ||
| include("${CMAKE_CURRENT_LIST_DIR}/libyuv-targets.cmake") | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not require
REQUIRED