-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Freeimage/libraw/lcms debug build fixes (#3643)
* Patch libraw-local FindLCMS2.cmake to handle debug postfix * Remove library statement from def as name is incorrect for debug builds https://msdn.microsoft.com/en-us/library/d91k01sh.aspx claims it is required, but works fine (better) without. * Patch FindLibRaw.cmake to handle debug postfix * [lcms] Use vcpkg_from_github()'s PATCHES parameter
- Loading branch information
1 parent
6d4223f
commit b286cd5
Showing
6 changed files
with
123 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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: lcms | ||
Version: 2.8-4 | ||
Version: 2.8-5 | ||
Build-Depends: | ||
Description: Little CMS. |
This file contains 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 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,8 @@ | ||
--- a/src/lcms2.def 2016-07-20 09:46:01.000000000 +0200 | ||
+++ b/src/lcms2.def 2018-06-02 02:11:04.135781600 +0200 | ||
@@ -1,5 +1,3 @@ | ||
-LIBRARY LCMS2.DLL | ||
- | ||
EXPORTS | ||
|
||
_cms15Fixed16toDouble = _cms15Fixed16toDouble |
This file contains 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,39 @@ | ||
--- a/cmake/modules/FindLibRaw.cmake 2016-11-02 07:09:50.000000000 +0100 | ||
+++ b/cmake/modules/FindLibRaw.cmake 2018-06-02 02:50:10.501142400 +0200 | ||
@@ -31,18 +31,34 @@ | ||
PATH_SUFFIXES libraw | ||
) | ||
|
||
-FIND_LIBRARY(LibRaw_LIBRARIES NAMES raw | ||
+FIND_LIBRARY(LibRaw_LIBRARY_RELEASE NAMES raw | ||
HINTS | ||
${PC_LIBRAW_LIBDIR} | ||
${PC_LIBRAW_LIBRARY_DIRS} | ||
) | ||
|
||
-FIND_LIBRARY(LibRaw_r_LIBRARIES NAMES raw_r | ||
+FIND_LIBRARY(LibRaw_LIBRARY_DEBUG NAMES rawd | ||
+ HINTS | ||
+ ${PC_LIBRAW_LIBDIR} | ||
+ ${PC_LIBRAW_LIBRARY_DIRS} | ||
+ ) | ||
+ | ||
+select_library_configurations(LibRaw) | ||
+ | ||
+FIND_LIBRARY(LibRaw_r_LIBRARY_RELEASE NAMES raw_r | ||
HINTS | ||
${PC_LIBRAW_R_LIBDIR} | ||
${PC_LIBRAW_R_LIBRARY_DIRS} | ||
) | ||
|
||
+FIND_LIBRARY(LibRaw_r_LIBRARY_DEBUG NAMES raw_rd | ||
+ HINTS | ||
+ ${PC_LIBRAW_R_LIBDIR} | ||
+ ${PC_LIBRAW_R_LIBRARY_DIRS} | ||
+ ) | ||
+ | ||
+select_library_configurations(LibRaw_r) | ||
+ | ||
IF(LibRaw_INCLUDE_DIR) | ||
FILE(READ ${LibRaw_INCLUDE_DIR}/libraw_version.h _libraw_version_content) | ||
|
This file contains 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,66 @@ | ||
--- a/cmake/modules/FindLCMS2.cmake 2016-11-02 07:09:50.000000000 +0100 | ||
+++ b/cmake/modules/FindLCMS2.cmake 2018-06-02 00:43:27.309100600 +0200 | ||
@@ -13,7 +13,6 @@ | ||
# Redistribution and use is allowed according to the terms of the BSD license. | ||
# For details see the accompanying LICENSE file. | ||
|
||
- | ||
# use pkg-config to get the directories and then use these values | ||
# in the FIND_PATH() and FIND_LIBRARY() calls | ||
if(NOT WIN32) | ||
@@ -29,18 +28,30 @@ | ||
PATH_SUFFIXES lcms2 liblcms2 | ||
) | ||
|
||
-find_library(LCMS2_LIBRARIES NAMES lcms2 liblcms2 lcms-2 liblcms-2 | ||
+include(SelectLibraryConfigurations) | ||
+ | ||
+find_library(LCMS2_LIBRARY_RELEASE NAMES lcms2 liblcms2 lcms-2 liblcms-2 | ||
+ PATHS | ||
+ ${PC_LCMS2_LIBDIR} | ||
+ ${PC_LCMS2_LIBRARY_DIRS} | ||
+ PATH_SUFFIXES lcms2 | ||
+) | ||
+ | ||
+find_library(LCMS2_LIBRARY_DEBUG NAMES lcms2d liblcms2d lcms-2d liblcms-2d | ||
PATHS | ||
${PC_LCMS2_LIBDIR} | ||
${PC_LCMS2_LIBRARY_DIRS} | ||
PATH_SUFFIXES lcms2 | ||
) | ||
|
||
-if(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES) | ||
+select_library_configurations(LCMS2) | ||
+ | ||
+ | ||
+if(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARY) | ||
set(LCMS2_FOUND TRUE) | ||
-else(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES) | ||
+else(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARY) | ||
set(LCMS2_FOUND FALSE) | ||
-endif(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES) | ||
+endif(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARY) | ||
|
||
if(LCMS2_FOUND) | ||
file(READ ${LCMS2_INCLUDE_DIR}/lcms2.h LCMS2_VERSION_CONTENT) | ||
@@ -50,11 +61,11 @@ | ||
if(NOT LCMS2_FIND_QUIETLY) | ||
string(SUBSTRING ${LCMS2_VERSION} 0 1 LCMS2_MAJOR_VERSION) | ||
string(SUBSTRING ${LCMS2_VERSION} 1 2 LCMS2_MINOR_VERSION) | ||
- message(STATUS "Found lcms version ${LCMS2_MAJOR_VERSION}.${LCMS2_MINOR_VERSION}, ${LCMS2_LIBRARIES}") | ||
+ message(STATUS "Found lcms version ${LCMS2_MAJOR_VERSION}.${LCMS2_MINOR_VERSION}, ${LCMS2_LIBRARY}") | ||
endif(NOT LCMS2_FIND_QUIETLY) | ||
else(LCMS2_VERSION_MATCH) | ||
if(NOT LCMS2_FIND_QUIETLY) | ||
- message(STATUS "Found lcms2 but failed to find version ${LCMS2_LIBRARIES}") | ||
+ message(STATUS "Found lcms2 but failed to find version ${LCMS2_LIBRARY}") | ||
endif(NOT LCMS2_FIND_QUIETLY) | ||
set(LCMS2_VERSION NOTFOUND) | ||
endif(LCMS2_VERSION_MATCH) | ||
@@ -68,5 +79,5 @@ | ||
endif(NOT LCMS2_FIND_QUIETLY) | ||
endif(LCMS2_FOUND) | ||
|
||
-mark_as_advanced(LCMS2_INCLUDE_DIR LCMS2_LIBRARIES LCMS2_VERSION) | ||
+mark_as_advanced(LCMS2_INCLUDE_DIR LCMS2_LIBRARY LCMS2_VERSION) | ||
|
This file contains 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