-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[libraw] Re-fix non-thread-safe library installation, always export pkgconfig files, add usage #19593
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
[libraw] Re-fix non-thread-safe library installation, always export pkgconfig files, add usage #19593
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
12ca3de
[libraw] Re-fix non-thread-safe library installation, always export p…
4a3c6a2
format manifest and version
d9054df
Update ports/libraw/portfile.cmake
JackBoosY 0ea0d0a
Update ports/libraw/portfile.cmake
JackBoosY b584c21
Update ports/libraw/portfile.cmake
JackBoosY bd8dce0
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
4159f2d
Merge branch 'dev/jack/19580' of https://github.com/JackBoosY/vcpkg i…
5476a16
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
f23da17
update version
525a6ce
version
7432f4b
Fix wrapper and usage
3a77d63
version
f5aa95c
apply suggestions
cb7ebc4
version
956aabb
Fix cmake install path
80ff9a7
version
1bd1529
Fix usage
af7dcaf
version
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 |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index 47f3869..136549b 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -544,7 +544,7 @@ SET_TARGET_PROPERTIES(raw_r PROPERTIES OUTPUT_NAME "raw_r") | ||
| # -- Files to install ------------------------------------------------------------------------------------- | ||
|
|
||
| # Configure and install data file for packaging. | ||
| -IF(NOT WIN32) | ||
| +IF(1) | ||
| CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/data/libraw.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libraw.pc @ONLY) | ||
| INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libraw.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig) | ||
|
|
||
| @@ -570,8 +570,8 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/libraw/libraw.h | ||
| # Install Shared binary files. | ||
| INSTALL(TARGETS raw | ||
| RUNTIME DESTINATION bin | ||
| - LIBRARY DESTINATION lib${LIB_SUFFIX} | ||
| - ARCHIVE DESTINATION lib${LIB_SUFFIX} | ||
| + LIBRARY DESTINATION lib${LIB_SUFFIX}/manual-link | ||
| + ARCHIVE DESTINATION lib${LIB_SUFFIX}/manual-link | ||
| ) | ||
|
|
||
| INSTALL(TARGETS raw_r | ||
| diff --git a/cmake/data/libraw.pc.cmake b/cmake/data/libraw.pc.cmake | ||
| index aede5f2..ffeefc2 100644 | ||
| --- a/cmake/data/libraw.pc.cmake | ||
| +++ b/cmake/data/libraw.pc.cmake | ||
| @@ -1,6 +1,6 @@ | ||
| prefix=@CMAKE_INSTALL_PREFIX@ | ||
| exec_prefix=${prefix} | ||
| -libdir=${prefix}/lib@LIB_SUFFIX@ | ||
| +libdir=${prefix}/lib@LIB_SUFFIX@/manual-link | ||
| includedir=${prefix}/include/libraw | ||
|
|
||
| Name: @PROJECT_NAME@ |
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 |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| The package libraw is compatible with built-in CMake targets: | ||
|
|
||
| find_package(LibRaw REQUIRED) | ||
| # For non-thread-safe version | ||
| target_compile_definitions(main PRIVATE ${LibRaw_DEFINITIONS}) | ||
| target_include_directories(main PRIVATE ${LibRaw_INCLUDE_DIR}) | ||
| target_link_libraries(main PRIVATE ${LibRaw_LIBRARIES}) | ||
| # For thread-safe version | ||
| target_compile_definitions(main PRIVATE ${LibRaw_r_DEFINITIONS}) | ||
| target_include_directories(main PRIVATE ${LibRaw_INCLUDE_DIR}) | ||
| target_link_libraries(main PRIVATE ${LibRaw_r_LIBRARIES}) |
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,7 +1,12 @@ | ||
| set(LIBRAW_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) | ||
| list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) | ||
| _find_package(${ARGS}) | ||
| find_package(Jasper REQUIRED) | ||
| if (Jasper_FOUND) | ||
| list(APPEND LibRaw_LIBRARIES ${JASPER_LIBRARIES}) | ||
| list(APPEND LibRaw_r_LIBRARIES ${JASPER_LIBRARIES}) | ||
| endif () | ||
| set(CMAKE_MODULE_PATH ${LIBRAW_PREV_MODULE_PATH}) | ||
|
|
||
| if (@VCPKG_LIBRARY_LINKAGE@ STREQUAL "static") | ||
| find_package(Jasper REQUIRED) | ||
| if (Jasper_FOUND) | ||
| list(APPEND LibRaw_LIBRARIES ${JASPER_LIBRARIES}) | ||
| list(APPEND LibRaw_r_LIBRARIES ${JASPER_LIBRARIES}) | ||
| endif () | ||
| endif() |
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,11 +1,15 @@ | ||
| { | ||
| "name": "libraw", | ||
| "version-string": "201903", | ||
| "port-version": 4, | ||
| "port-version": 5, | ||
| "description": "raw image decoder library", | ||
| "homepage": "https://www.libraw.org", | ||
| "dependencies": [ | ||
| "jasper", | ||
| "lcms" | ||
| "lcms", | ||
| { | ||
| "name": "vcpkg-cmake", | ||
| "host": true | ||
| } | ||
| ] | ||
| } |
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
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.
@ras0219-msft, I noticed you added it before, could you help confirm?