forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[opencolorio/lcms] Fix dependency (microsoft#21960)
- Loading branch information
Showing
8 changed files
with
129 additions
and
6 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
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,102 @@ | ||
diff --git a/share/cmake/modules/FindExtPackages.cmake b/share/cmake/modules/FindExtPackages.cmake | ||
index 86a0225..4df4656 100644 | ||
--- a/share/cmake/modules/FindExtPackages.cmake | ||
+++ b/share/cmake/modules/FindExtPackages.cmake | ||
@@ -26,15 +26,15 @@ set(CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY ON CACHE BOOL | ||
|
||
# expat | ||
# https://github.com/libexpat/libexpat | ||
-find_package(expat 2.2.8 REQUIRED) | ||
+find_package(expat CONFIG REQUIRED) | ||
|
||
# yaml-cpp | ||
# https://github.com/jbeder/yaml-cpp | ||
-find_package(yaml-cpp 0.6.3 REQUIRED) | ||
+find_package(yaml-cpp CONFIG REQUIRED) | ||
|
||
# pystring | ||
# https://github.com/imageworks/pystring | ||
-find_package(pystring 1.1.3 REQUIRED) | ||
+find_package(pystring CONFIG REQUIRED) | ||
|
||
# Half | ||
# NOTE: OCIO_USE_IMATH_HALF needs to be an integer for use in utils/Half.h.in | ||
@@ -42,7 +42,7 @@ if(NOT OCIO_USE_OPENEXR_HALF) | ||
|
||
# Imath (>=3.0) | ||
# https://github.com/AcademySoftwareFoundation/Imath | ||
- find_package(Imath 3.1.2 REQUIRED) | ||
+ find_package(Imath CONFIG REQUIRED) | ||
|
||
set(OCIO_HALF_LIB Imath::Imath CACHE STRING "Half library target" FORCE) | ||
set(OCIO_USE_IMATH_HALF "1" CACHE STRING "Whether 'half' type will be sourced from the Imath library (>=v3.0)" FORCE) | ||
@@ -65,7 +65,7 @@ if(OCIO_BUILD_APPS) | ||
|
||
# lcms2 | ||
# https://github.com/mm2/Little-CMS | ||
- find_package(lcms2 2.2 REQUIRED) | ||
+ find_package(lcms2 CONFIG REQUIRED) | ||
endif() | ||
|
||
if(OCIO_BUILD_OPENFX) | ||
diff --git a/src/OpenColorIO/CMakeLists.txt b/src/OpenColorIO/CMakeLists.txt | ||
index be50b7b..c66191e 100644 | ||
--- a/src/OpenColorIO/CMakeLists.txt | ||
+++ b/src/OpenColorIO/CMakeLists.txt | ||
@@ -204,7 +204,9 @@ if(BUILD_SHARED_LIBS AND WIN32) | ||
endif() | ||
|
||
target_include_directories(OpenColorIO | ||
- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} | ||
+ PUBLIC | ||
+ "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>" | ||
+ "$<INSTALL_INTERFACE:include>" | ||
) | ||
|
||
target_link_libraries(OpenColorIO | ||
@@ -214,8 +216,8 @@ target_link_libraries(OpenColorIO | ||
expat::expat | ||
${OCIO_HALF_LIB} | ||
pystring::pystring | ||
- sampleicc::sampleicc | ||
- utils::strings | ||
+ "$<BUILD_INTERFACE:sampleicc::sampleicc>" | ||
+ "$<BUILD_INTERFACE:utils::strings>" | ||
yaml-cpp | ||
) | ||
|
||
@@ -229,13 +231,13 @@ endif() | ||
|
||
if(NOT BUILD_SHARED_LIBS) | ||
target_compile_definitions(OpenColorIO | ||
- PRIVATE | ||
+ PUBLIC | ||
OpenColorIO_SKIP_IMPORTS | ||
) | ||
else() | ||
# Only exports selected symbols. | ||
target_compile_definitions(OpenColorIO | ||
- PRIVATE | ||
+ PUBLIC | ||
OpenColorIO_EXPORTS | ||
) | ||
endif() | ||
diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in | ||
index eebb2c1..7147dc3 100644 | ||
--- a/src/cmake/Config.cmake.in | ||
+++ b/src/cmake/Config.cmake.in | ||
@@ -2,4 +2,14 @@ | ||
|
||
include(CMakeFindDependencyMacro) | ||
|
||
+find_dependency(expat CONFIG REQUIRED) | ||
+find_dependency(imath CONFIG REQUIRED) | ||
+find_dependency(pystring CONFIG REQUIRED) | ||
+find_dependency(yaml-cpp CONFIG REQUIRED) | ||
+ | ||
+if(@OCIO_BUILD_APPS@) | ||
+ find_dependency(lcms2 CONFIG REQUIRED) | ||
+ find_dependency(GLEW) | ||
+endif() | ||
+ | ||
include(${CMAKE_CURRENT_LIST_DIR}/@[email protected]) |
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
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
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