mirror of https://github.com/microsoft/vcpkg.git
[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>
This commit is contained in:
parent
634c1043b0
commit
fa1823dcad
|
|
@ -0,0 +1,40 @@
|
|||
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")
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
diff --git a/src/apps/ocioconvert/CMakeLists.txt b/src/apps/ocioconvert/CMakeLists.txt
|
||||
index 82b0792..7d16bdf 100644
|
||||
--- a/src/apps/ocioconvert/CMakeLists.txt
|
||||
+++ b/src/apps/ocioconvert/CMakeLists.txt
|
||||
@@ -6,16 +6,23 @@ if (OIIO_FOUND)
|
||||
${OIIO_INCLUDES}
|
||||
${ILMBASE_INCLUDES}
|
||||
)
|
||||
-
|
||||
+
|
||||
file(GLOB_RECURSE share_src_files "${CMAKE_SOURCE_DIR}/src/apps/share/*.cpp")
|
||||
-
|
||||
+
|
||||
add_executable(ocioconvert ${share_src_files} main.cpp)
|
||||
-
|
||||
+
|
||||
+ target_compile_options(ocioconvert
|
||||
+ PRIVATE
|
||||
+ $<$<CXX_COMPILER_ID:MSVC>:
|
||||
+ /Zc:__cplusplus # Enable updated __cplusplus macro
|
||||
+ >
|
||||
+ )
|
||||
+
|
||||
set_target_properties(ocioconvert PROPERTIES COMPILE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
|
||||
|
||||
target_link_libraries(ocioconvert ${OIIO_LIBRARIES} ${CMAKE_DL_LIBS})
|
||||
-
|
||||
+
|
||||
target_link_OCIO(ocioconvert)
|
||||
-
|
||||
+
|
||||
install(TARGETS ocioconvert EXPORT OpenColorIO DESTINATION ${CMAKE_INSTALL_EXEC_PREFIX}/bin)
|
||||
endif()
|
||||
diff --git a/src/apps/ociodisplay/CMakeLists.txt b/src/apps/ociodisplay/CMakeLists.txt
|
||||
index d11b9e1..0f27d86 100644
|
||||
--- a/src/apps/ociodisplay/CMakeLists.txt
|
||||
+++ b/src/apps/ociodisplay/CMakeLists.txt
|
||||
@@ -11,6 +11,13 @@ if (OIIO_FOUND)
|
||||
|
||||
add_executable(ociodisplay main.cpp)
|
||||
|
||||
+ target_compile_options(ociodisplay
|
||||
+ PRIVATE
|
||||
+ $<$<CXX_COMPILER_ID:MSVC>:
|
||||
+ /Zc:__cplusplus # Enable updated __cplusplus macro
|
||||
+ >
|
||||
+ )
|
||||
+
|
||||
# set_target_properties(ociodisplay PROPERTIES INSTALL_RPATH ${OIIO_LIBRARIES} )
|
||||
set_target_properties(ociodisplay PROPERTIES COMPILE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
|
||||
target_link_libraries(ociodisplay ${GLEW_LIBRARIES} ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${OIIO_LIBRARIES})
|
||||
diff --git a/src/apps/ociolutimage/CMakeLists.txt b/src/apps/ociolutimage/CMakeLists.txt
|
||||
index 528333f..821155d 100644
|
||||
--- a/src/apps/ociolutimage/CMakeLists.txt
|
||||
+++ b/src/apps/ociolutimage/CMakeLists.txt
|
||||
@@ -6,16 +6,23 @@ if (OIIO_FOUND)
|
||||
${OIIO_INCLUDES}
|
||||
${ILMBASE_INCLUDES}
|
||||
)
|
||||
-
|
||||
+
|
||||
file(GLOB_RECURSE share_src_files "${CMAKE_SOURCE_DIR}/src/apps/share/*.cpp")
|
||||
-
|
||||
+
|
||||
add_executable(ociolutimage ${share_src_files} main.cpp)
|
||||
-
|
||||
+
|
||||
+ target_compile_options(ociolutimage
|
||||
+ PRIVATE
|
||||
+ $<$<CXX_COMPILER_ID:MSVC>:
|
||||
+ /Zc:__cplusplus # Enable updated __cplusplus macro
|
||||
+ >
|
||||
+ )
|
||||
+
|
||||
set_target_properties(ociolutimage PROPERTIES COMPILE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
|
||||
|
||||
target_link_libraries(ociolutimage ${OIIO_LIBRARIES} ${CMAKE_DL_LIBS})
|
||||
-
|
||||
+
|
||||
target_link_OCIO(ociolutimage)
|
||||
-
|
||||
+
|
||||
install(TARGETS ociolutimage EXPORT OpenColorIO DESTINATION ${CMAKE_INSTALL_EXEC_PREFIX}/bin)
|
||||
endif()
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/src/core/Config.cpp b/src/core/Config.cpp
|
||||
index f5cb379..5ea178e 100644
|
||||
--- a/src/core/Config.cpp
|
||||
+++ b/src/core/Config.cpp
|
||||
@@ -330,7 +330,7 @@ OCIO_NAMESPACE_ENTER
|
||||
sanitytext_ = rhs.sanitytext_;
|
||||
|
||||
cacheids_ = rhs.cacheids_;
|
||||
- cacheidnocontext_ = cacheidnocontext_;
|
||||
+ cacheidnocontext_ = rhs.cacheidnocontext_;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e4f3119..5cfa601 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -244,34 +244,49 @@ else(USE_EXTERNAL_TINYXML)
|
||||
endif()
|
||||
set_target_properties(TINYXML_LIB PROPERTIES FOLDER External)
|
||||
endif(USE_EXTERNAL_TINYXML)
|
||||
-
|
||||
+
|
||||
###############################################################################
|
||||
### YAML ###
|
||||
|
||||
if(USE_EXTERNAL_YAML)
|
||||
- # Set minimum yaml version for non-patched sources.
|
||||
- set(YAML_VERSION_MIN "0.3.0")
|
||||
- include(FindPkgConfig)
|
||||
- pkg_check_modules(PC_YAML_CPP REQUIRED QUIET yaml-cpp)
|
||||
- find_path(YAML_CPP_INCLUDE_DIR yaml-cpp/yaml.h
|
||||
- HINTS ${PC_YAML_CPP_INCLUDEDIR} ${PC_YAML_CPP_INCLUDE_DIRS} )
|
||||
- find_library(YAML_CPP_LIBRARY LIBRARY_NAMES yaml-cpp libyaml-cpp
|
||||
- HINTS ${PC_YAML_CPP_LIBRARY_DIRS} )
|
||||
- set(YAML_CPP_LIBRARIES ${YAML_CPP_LIBRARY})
|
||||
- set(YAML_CPP_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR})
|
||||
- set(YAML_CPP_VERSION ${PC_YAML_CPP_VERSION})
|
||||
-
|
||||
- if(YAML_CPP_VERSION VERSION_LESS ${YAML_VERSION_MIN})
|
||||
- message(FATAL_ERROR "ERROR: yaml-cpp ${YAML_VERSION_MIN} or greater is required.")
|
||||
- endif()
|
||||
+ find_package(yaml-cpp 0.3.0)
|
||||
+ if(yaml-cpp_FOUND)
|
||||
+ include(FindPackageMessage)
|
||||
+
|
||||
+ set(YAML_CPP_FOUND ${yaml-cpp_FOUND})
|
||||
+ set(YAML_CPP_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR})
|
||||
+ set(YAML_CPP_VERSION ${yaml-cpp_VERSION})
|
||||
+ set(YAML_CPP_LIBRARIES yaml-cpp)
|
||||
+
|
||||
+ find_package_message(yaml-cpp
|
||||
+ "Found yaml ${YAML_CPP_VERSION}: ${YAML_CPP_INCLUDE_DIRS}"
|
||||
+ "${YAML_CPP_INCLUDE_DIRS}:${YAML_CPP_LIBRARIES}"
|
||||
+ )
|
||||
+ else()
|
||||
+ # Set minimum yaml version for non-patched sources.
|
||||
+ set(YAML_VERSION_MIN "0.3.0")
|
||||
+ include(FindPkgConfig)
|
||||
+ pkg_check_modules(PC_YAML_CPP REQUIRED QUIET yaml-cpp)
|
||||
+ find_path(YAML_CPP_INCLUDE_DIR yaml-cpp/yaml.h
|
||||
+ HINTS ${PC_YAML_CPP_INCLUDEDIR} ${PC_YAML_CPP_INCLUDE_DIRS} )
|
||||
+ find_library(YAML_CPP_LIBRARY LIBRARY_NAMES yaml-cpp libyaml-cpp
|
||||
+ HINTS ${PC_YAML_CPP_LIBRARY_DIRS} )
|
||||
+ set(YAML_CPP_LIBRARIES ${YAML_CPP_LIBRARY})
|
||||
+ set(YAML_CPP_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR})
|
||||
+ set(YAML_CPP_VERSION ${PC_YAML_CPP_VERSION})
|
||||
+
|
||||
+ if(YAML_CPP_VERSION VERSION_LESS ${YAML_VERSION_MIN})
|
||||
+ message(FATAL_ERROR "ERROR: yaml-cpp ${YAML_VERSION_MIN} or greater is required.")
|
||||
+ endif()
|
||||
|
||||
- find_package_handle_standard_args(yaml-cpp
|
||||
- REQUIRED_VARS YAML_CPP_LIBRARIES YAML_CPP_INCLUDE_DIRS )
|
||||
- set(YAML_CPP_FOUND ${YAML-CPP_FOUND})
|
||||
- mark_as_advanced(YAML_CPP_INCLUDE_DIR YAML_CPP_LIBRARY YAML-CPP_FOUND)
|
||||
+ find_package_handle_standard_args(yaml-cpp
|
||||
+ REQUIRED_VARS YAML_CPP_LIBRARIES YAML_CPP_INCLUDE_DIRS )
|
||||
+ set(YAML_CPP_FOUND ${YAML-CPP_FOUND})
|
||||
+ mark_as_advanced(YAML_CPP_INCLUDE_DIR YAML_CPP_LIBRARY YAML-CPP_FOUND)
|
||||
+ endif()
|
||||
|
||||
if(YAML_CPP_FOUND)
|
||||
- if(YAML_CPP_VERSION VERSION_GREATER "0.5.0")
|
||||
+ if(YAML_CPP_VERSION VERSION_GREATER "0.5.0" AND YAML_CPP_VERSION VERSION_LESS "0.6.0")
|
||||
# Need to also get the boost headers here, as yaml-cpp 0.5.0+ requires them.
|
||||
# Don't bother doing this step if we are already including the boost headers for shared_ptr
|
||||
if(NOT OCIO_USE_BOOST_PTR)
|
||||
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
|
||||
index 4b931ef..12a1dbf 100644
|
||||
--- a/src/core/CMakeLists.txt
|
||||
+++ b/src/core/CMakeLists.txt
|
||||
@@ -77,7 +77,14 @@ endif()
|
||||
if(OCIO_BUILD_STATIC)
|
||||
list(REMOVE_ITEM core_src_files ${CMAKE_SOURCE_DIR}/src/core/UnitTest.cpp)
|
||||
add_library(OpenColorIO_STATIC STATIC ${EXTERNAL_OBJECTS} ${core_src_files})
|
||||
- add_dependencies(OpenColorIO_STATIC TINYXML_LIB YAML_CPP_LIB)
|
||||
+ add_dependencies(OpenColorIO_STATIC TINYXML_LIB)
|
||||
+
|
||||
+ if(USE_EXTERNAL_YAML)
|
||||
+ target_link_libraries(OpenColorIO_STATIC ${YAML_CPP_LIBRARIES})
|
||||
+ else(USE_EXTERNAL_YAML)
|
||||
+ add_dependencies(OpenColorIO_STATIC YAML_CPP_LIB)
|
||||
+ endif()
|
||||
+
|
||||
if(EXTERNAL_LIBRARIES)
|
||||
target_link_libraries(OpenColorIO_STATIC ${EXTERNAL_LIBRARIES})
|
||||
endif()
|
||||
diff --git a/src/core/OCIOYaml.cpp b/src/core/OCIOYaml.cpp
|
||||
index aeee4d1..f1c662d 100644
|
||||
--- a/src/core/OCIOYaml.cpp
|
||||
+++ b/src/core/OCIOYaml.cpp
|
||||
@@ -69,7 +69,7 @@ namespace YAML {
|
||||
|
||||
#ifdef WIN32
|
||||
#pragma warning( push )
|
||||
-#pragma warning( disable: 4146 )
|
||||
+#pragma warning( disable: 4146 4251 )
|
||||
#endif
|
||||
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
|
||||
index 45e55f9..f4b687d 100644
|
||||
--- a/src/core/CMakeLists.txt
|
||||
+++ b/src/core/CMakeLists.txt
|
||||
@@ -77,7 +77,12 @@ endif()
|
||||
if(OCIO_BUILD_STATIC)
|
||||
list(REMOVE_ITEM core_src_files ${CMAKE_SOURCE_DIR}/src/core/UnitTest.cpp)
|
||||
add_library(OpenColorIO_STATIC STATIC ${EXTERNAL_OBJECTS} ${core_src_files})
|
||||
- add_dependencies(OpenColorIO_STATIC TINYXML_LIB)
|
||||
+
|
||||
+ if(USE_EXTERNAL_TINYXML)
|
||||
+ target_link_libraries(OpenColorIO_STATIC ${TINYXML_LIBRARIES})
|
||||
+ else(USE_EXTERNAL_TINYXML)
|
||||
+ add_dependencies(OpenColorIO_STATIC TINYXML_LIB)
|
||||
+ endif(USE_EXTERNAL_TINYXML)
|
||||
|
||||
if(USE_EXTERNAL_YAML)
|
||||
target_link_libraries(OpenColorIO_STATIC ${YAML_CPP_LIBRARIES})
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5cfa601..f79807c 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -475,7 +475,8 @@ endif()
|
||||
if(OCIO_BUILD_APPS AND (OCIO_BUILD_STATIC OR OCIO_BUILD_SHARED) )
|
||||
|
||||
# Try to find OpenImageIO (OIIO) and OpenGL stuff
|
||||
- OCIOFindOpenImageIO()
|
||||
+ find_package(OpenImageIO CONFIG REQUIRED)
|
||||
+ set(OIIO_LIBRARIES OpenImageIO::OpenImageIO OpenImageIO::OpenImageIO_Util)
|
||||
|
||||
if(OIIO_FOUND)
|
||||
add_subdirectory(src/apps/ocioconvert)
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
Source: opencolorio-tools
|
||||
Version: 1.1.1
|
||||
Homepage: https://opencolorio.org/
|
||||
Description: OpenColorIO applications, same source with port OpenColorIO.
|
||||
Build-Depends: openimageio[opencolorio]
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
# Note: Should be maintained simultaneously with opencolorio!
|
||||
SET(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
set(_BUILD_SHARED OFF)
|
||||
set(_BUILD_STATIC ON)
|
||||
else()
|
||||
set(_BUILD_SHARED ON)
|
||||
set(_BUILD_STATIC OFF)
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO imageworks/OpenColorIO
|
||||
REF v1.1.1
|
||||
SHA512 bed722f9ddce1887d28aacef2882debccd7c3f3c0c708d2723fea58a097de9f02721af9e85453e089ffda5406aef593ab6536c6886307823c132aa787e492e33
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0001-lcms-dependency-search.patch
|
||||
0002-msvc-cpluscplus.patch
|
||||
0003-osx-self-assign-field.patch
|
||||
0004-yaml-dependency-search.patch
|
||||
0005-tinyxml-dependency-search.patch
|
||||
0006-oiio-dependency-search.patch
|
||||
)
|
||||
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_PATH "${PYTHON3}" DIRECTORY)
|
||||
vcpkg_add_to_path(PREPEND ${PYTHON3_PATH})
|
||||
|
||||
# TODO(theblackunknown) build additional targets based on feature
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DOCIO_BUILD_APPS=ON
|
||||
-DOCIO_BUILD_SHARED:BOOL=${_BUILD_SHARED}
|
||||
-DOCIO_BUILD_STATIC:BOOL=${_BUILD_STATIC}
|
||||
-DOCIO_BUILD_TRUELIGHT:BOOL=OFF
|
||||
-DOCIO_BUILD_NUKE:BOOL=OFF
|
||||
-DOCIO_BUILD_DOCS:BOOL=OFF
|
||||
-DOCIO_BUILD_TESTS:BOOL=OFF
|
||||
-DOCIO_BUILD_PYGLUE:BOOL=OFF
|
||||
-DOCIO_BUILD_JNIGLUE:BOOL=OFF
|
||||
-DOCIO_STATIC_JNIGLUE:BOOL=OFF
|
||||
-DUSE_EXTERNAL_TINYXML:BOOL=ON
|
||||
-DUSE_EXTERNAL_YAML:BOOL=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_copy_tools(TOOL_NAMES ociobakelut ociocheck)
|
||||
|
||||
# Clean redundant files
|
||||
file(REMOVE_RECURSE
|
||||
${CURRENT_PACKAGES_DIR}/debug
|
||||
${CURRENT_PACKAGES_DIR}/include
|
||||
${CURRENT_PACKAGES_DIR}/bin
|
||||
${CURRENT_PACKAGES_DIR}/lib
|
||||
${CURRENT_PACKAGES_DIR}/cmake
|
||||
${CURRENT_PACKAGES_DIR}/share)
|
||||
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/OpenColorIOConfig.cmake)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/src/apps/ociobakelut/CMakeLists.txt b/src/apps/ociobakelut/CMakeLists.txt
|
||||
index d31b4e3..778b631 100644
|
||||
index d31b4e3..2b57d1c 100644
|
||||
--- a/src/apps/ociobakelut/CMakeLists.txt
|
||||
+++ b/src/apps/ociobakelut/CMakeLists.txt
|
||||
@@ -5,6 +5,34 @@ if(LCMS_FOUND AND (LCMS_VERSION VERSION_EQUAL 2.1 OR LCMS_VERSION VERSION_GREATE
|
||||
@@ -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()
|
||||
|
|
@ -18,6 +18,7 @@ index d31b4e3..778b631 100644
|
|||
+ find_library(LCMS_LIBRARIES
|
||||
+ LIBRARY_NAMES
|
||||
+ lcms
|
||||
+ lcms2
|
||||
+ HINTS
|
||||
+ ${LCMS_LIBRARY_DIRS}
|
||||
+ )
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5cfa601..f79807c 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -475,7 +475,8 @@ endif()
|
||||
if(OCIO_BUILD_APPS AND (OCIO_BUILD_STATIC OR OCIO_BUILD_SHARED) )
|
||||
|
||||
# Try to find OpenImageIO (OIIO) and OpenGL stuff
|
||||
- OCIOFindOpenImageIO()
|
||||
+ find_package(OpenImageIO CONFIG REQUIRED)
|
||||
+ set(OIIO_LIBRARIES OpenImageIO::OpenImageIO OpenImageIO::OpenImageIO_Util)
|
||||
|
||||
if(OIIO_FOUND)
|
||||
add_subdirectory(src/apps/ocioconvert)
|
||||
|
|
@ -1,9 +1,6 @@
|
|||
Source: opencolorio
|
||||
Version: 1.1.1-2
|
||||
Version: 1.1.1
|
||||
Port-Version: 3
|
||||
Homepage: https://opencolorio.org/
|
||||
Description: OpenColorIO (OCIO) is a complete color management solution geared towards motion picture production with an emphasis on visual effects and computer animation. OCIO provides a straightforward and consistent user experience across all supporting applications while allowing for sophisticated back-end configuration options suitable for high-end production usage. OCIO is compatible with the Academy Color Encoding Specification (ACES) and is LUT-format agnostic, supporting many popular formats.
|
||||
Build-Depends: glew[core], freeglut[core], lcms[core], yaml-cpp[core], tinyxml[core]
|
||||
|
||||
Feature: applications
|
||||
Description: Enable OpenColorIO tools
|
||||
Build-Depends: openimageio[core], openexr[core]
|
||||
Build-Depends: glew[core], freeglut[core], lcms[core], yaml-cpp[core], tinyxml[core]
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
# Note: Should be maintained simultaneously with opencolorio-tools!
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
set(_BUILD_SHARED OFF)
|
||||
set(_BUILD_STATIC ON)
|
||||
|
|
@ -20,12 +21,6 @@ vcpkg_from_github(
|
|||
0005-tinyxml-dependency-search.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(
|
||||
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
applications OCIO_BUILD_APPS
|
||||
)
|
||||
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_PATH "${PYTHON3}" DIRECTORY)
|
||||
vcpkg_add_to_path(PREPEND ${PYTHON3_PATH})
|
||||
|
|
@ -36,7 +31,7 @@ vcpkg_configure_cmake(
|
|||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-DOCIO_BUILD_APPS=OFF
|
||||
-DOCIO_BUILD_SHARED:BOOL=${_BUILD_SHARED}
|
||||
-DOCIO_BUILD_STATIC:BOOL=${_BUILD_STATIC}
|
||||
-DOCIO_BUILD_TRUELIGHT:BOOL=OFF
|
||||
|
|
@ -56,33 +51,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake")
|
|||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if("applications" IN_LIST FEATURES)
|
||||
# port applications to tools
|
||||
file(MAKE_DIRECTORY
|
||||
"${CURRENT_PACKAGES_DIR}/tools/${PORT}"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}"
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE _TOOLS
|
||||
"${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
|
||||
)
|
||||
foreach(_TOOL IN LISTS _TOOLS)
|
||||
get_filename_component(_NAME ${_TOOL} NAME)
|
||||
file(RENAME "${_TOOL}" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/${_NAME}")
|
||||
endforeach()
|
||||
|
||||
file(GLOB_RECURSE _TOOLS
|
||||
"${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
|
||||
)
|
||||
foreach(_TOOL IN LISTS _TOOLS)
|
||||
get_filename_component(_NAME ${_TOOL} NAME)
|
||||
file(RENAME "${_TOOL}" "${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/${_NAME}")
|
||||
endforeach()
|
||||
|
||||
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
||||
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}")
|
||||
endif()
|
||||
|
||||
# Clean redundant files
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
|
|
|||
Loading…
Reference in New Issue