vcpkg/ports/opencolorio/0001-lcms-dependency-search.patch
Jack·Boos·Yu fa1823dcad
[opencolorio-tools] Separate feature application to avoid circular dependency (#12420)
* [opencolorio-tools] Separate feature application to avoid circular dependency

* [opencolorio] Remove oiio related patch

* [opencolorio] Do not make tools

* [opencolorio-tools] make sure share folder is clean

* [docs] Add format document

* improve the error message

* Check the error message

* Finish test

* Update ports/opencolorio/portfile.cmake

Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>

* Use vcpkg_copy_tools

Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
2020-08-10 16:05:26 -07:00

41 lines
1.2 KiB
Diff

diff --git a/src/apps/ociobakelut/CMakeLists.txt b/src/apps/ociobakelut/CMakeLists.txt
index d31b4e3..2b57d1c 100644
--- a/src/apps/ociobakelut/CMakeLists.txt
+++ b/src/apps/ociobakelut/CMakeLists.txt
@@ -5,6 +5,35 @@ if(LCMS_FOUND AND (LCMS_VERSION VERSION_EQUAL 2.1 OR LCMS_VERSION VERSION_GREATE
FIND_PACKAGE_MESSAGE(LCMS "Found lcms: ${LCMS_LIBRARIES}"
"${LCMS_INCLUDE_DIR}")
else()
+ find_path(LCMS_INCLUDE_DIRS
+ NAMES
+ lcms2.h
+ lcms2_plugin.h
+ HINTS
+ ${LCMS_INCLUDEDIR}
+ ${LCMS_INCLUDE_DIRS}
+ )
+
+ find_library(LCMS_LIBRARIES
+ LIBRARY_NAMES
+ lcms
+ lcms2
+ HINTS
+ ${LCMS_LIBRARY_DIRS}
+ )
+
+ get_filename_component(LCMS_LIBRARY_DIRS ${LCMS_LIBRARIES} DIRECTORY)
+
+ find_package_handle_standard_args(LCMS
+ REQUIRED_VARS
+ LCMS_LIBRARIES
+ LCMS_LIBRARY_DIRS
+ LCMS_INCLUDE_DIRS
+ )
+ mark_as_advanced(LCMS_LIBRARIES LCMS_INCLUDE_DIRS LCMS_LIBRARY_DIRS LCMS_FOUND)
+endif()
+
+if(NOT LCMS_FOUND)
find_package(Git)
if(NOT GIT_EXECUTABLE)
message("Git not found, could not build external LCMS as we cannot apply patch")