Remove OpenColorIOHeaders target and hardcoded install paths (#1471)

* Remove OpenColorIOHeaders target

Signed-off-by: Rémi Achard <remiachard@gmail.com>

* Avoid hardcoding install paths

Signed-off-by: Rémi Achard <remiachard@gmail.com>

* Update remaining hardcoded install paths

Signed-off-by: Rémi Achard <remiachard@gmail.com>

* Replace LIB_SUFFIX by CMAKE_INSTALL_LIBDIR

Signed-off-by: Rémi Achard <remiachard@gmail.com>

Co-authored-by: Patrick Hodoul <patrick.hodoul@autodesk.com>
This commit is contained in:
Rémi Achard
2021-09-09 14:47:20 -04:00
committed by GitHub
co-authored by Patrick Hodoul
parent 959b3f79f5
commit 641abe535f
19 changed files with 245 additions and 272 deletions
-1
View File
@@ -259,7 +259,6 @@ if(OCIO_BUILD_DOCS)
endif()
add_subdirectory(tests)
add_subdirectory(src)
add_subdirectory(include)
add_subdirectory(ext)
+2 -2
View File
@@ -61,8 +61,8 @@ else:
description = "@CMAKE_PROJECT_DESCRIPTION@"
version = "@CMAKE_PROJECT_VERSION@"
version_major = "@OpenColorIO_VERSION_MAJOR@"
version_minor = "@OpenColorIO_VERSION_MAJOR@"
version_patch = "@OpenColorIO_VERSION_MAJOR@"
version_minor = "@OpenColorIO_VERSION_MINOR@"
version_patch = "@OpenColorIO_VERSION_PATCH@"
ocio_namespace = "@OCIO_NAMESPACE@"
author = "Contributors to the {} Project".format(project)
-4
View File
@@ -1,4 +0,0 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenColorIO Project.
add_subdirectory(OpenColorIO)
-32
View File
@@ -1,32 +0,0 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenColorIO Project.
configure_file("OpenColorABI.h.in" "${CMAKE_CURRENT_BINARY_DIR}/OpenColorABI.h" @ONLY)
add_library(OpenColorIOHeaders INTERFACE)
set(BUILD_INCLUDES
${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/OpenColorIO
)
target_include_directories(OpenColorIOHeaders
INTERFACE
"$<BUILD_INTERFACE:${BUILD_INCLUDES}>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
)
add_dependencies(OpenColorIOHeaders "${CMAKE_CURRENT_BINARY_DIR}/OpenColorABI.h")
# public interface
file(GLOB_RECURSE core_export_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
list(APPEND core_export_headers ${CMAKE_CURRENT_BINARY_DIR}/OpenColorABI.h)
install(FILES ${core_export_headers}
DESTINATION include/OpenColorIO)
install(TARGETS OpenColorIOHeaders
EXPORT ${PROJECT_NAME}_EXPORTED_TARGETS
)
+223 -204
View File
@@ -2,171 +2,171 @@
# Copyright Contributors to the OpenColorIO Project.
set(SOURCES
apphelpers/CategoryHelpers.cpp
apphelpers/ColorSpaceHelpers.cpp
apphelpers/DisplayViewHelpers.cpp
apphelpers/LegacyViewingPipeline.cpp
apphelpers/MixingHelpers.cpp
Baker.cpp
BitDepthUtils.cpp
Caching.cpp
ColorSpace.cpp
ColorSpaceSet.cpp
Config.cpp
Context.cpp
ContextVariableUtils.cpp
CPUProcessor.cpp
Display.cpp
DynamicProperty.cpp
Exception.cpp
fileformats/cdl/CDLParser.cpp
fileformats/cdl/CDLReaderHelper.cpp
fileformats/cdl/CDLWriter.cpp
fileformats/ctf/CTFReaderHelper.cpp
fileformats/ctf/CTFReaderUtils.cpp
fileformats/ctf/CTFTransform.cpp
fileformats/ctf/IndexMapping.cpp
fileformats/FileFormat3DL.cpp
fileformats/FileFormatCCC.cpp
fileformats/FileFormatCC.cpp
fileformats/FileFormatCDL.cpp
fileformats/FileFormatCSP.cpp
fileformats/FileFormatCTF.cpp
fileformats/FileFormatDiscreet1DL.cpp
fileformats/FileFormatHDL.cpp
fileformats/FileFormatICC.cpp
fileformats/FileFormatIridasCube.cpp
fileformats/FileFormatIridasItx.cpp
fileformats/FileFormatIridasLook.cpp
fileformats/FileFormatPandora.cpp
fileformats/FileFormatResolveCube.cpp
fileformats/FileFormatSpi1D.cpp
fileformats/FileFormatSpi3D.cpp
fileformats/FileFormatSpiMtx.cpp
fileformats/FileFormatTruelight.cpp
fileformats/FileFormatUtils.cpp
fileformats/FileFormatVF.cpp
fileformats/FormatMetadata.cpp
fileformats/xmlutils/XMLReaderHelper.cpp
fileformats/xmlutils/XMLReaderUtils.cpp
fileformats/xmlutils/XMLWriterUtils.cpp
FileRules.cpp
GPUProcessor.cpp
GpuShader.cpp
GpuShaderDesc.cpp
GpuShaderUtils.cpp
HashUtils.cpp
ImageDesc.cpp
ImagePacking.cpp
Logging.cpp
Look.cpp
LookParse.cpp
MathUtils.cpp
md5/md5.cpp
NamedTransform.cpp
OCIOYaml.cpp
Op.cpp
OpOptimizers.cpp
ops/allocation/AllocationOp.cpp
ops/cdl/CDLOpCPU.cpp
ops/cdl/CDLOpData.cpp
ops/cdl/CDLOpGPU.cpp
ops/cdl/CDLOp.cpp
ops/exponent/ExponentOp.cpp
ops/exposurecontrast/ExposureContrastOpCPU.cpp
ops/exposurecontrast/ExposureContrastOpData.cpp
ops/exposurecontrast/ExposureContrastOpGPU.cpp
ops/exposurecontrast/ExposureContrastOp.cpp
ops/fixedfunction/FixedFunctionOpCPU.cpp
ops/fixedfunction/FixedFunctionOpData.cpp
ops/fixedfunction/FixedFunctionOpGPU.cpp
ops/fixedfunction/FixedFunctionOp.cpp
ops/gamma/GammaOpCPU.cpp
ops/gamma/GammaOpData.cpp
ops/gamma/GammaOpGPU.cpp
ops/gamma/GammaOpUtils.cpp
ops/gamma/GammaOp.cpp
ops/gradingprimary/GradingPrimary.cpp
ops/gradingprimary/GradingPrimaryOpCPU.cpp
ops/gradingprimary/GradingPrimaryOpData.cpp
ops/gradingprimary/GradingPrimaryOpGPU.cpp
ops/gradingprimary/GradingPrimaryOp.cpp
ops/gradingrgbcurve/GradingBSplineCurve.cpp
ops/gradingrgbcurve/GradingRGBCurveOpCPU.cpp
ops/gradingrgbcurve/GradingRGBCurveOpData.cpp
ops/gradingrgbcurve/GradingRGBCurveOpGPU.cpp
ops/gradingrgbcurve/GradingRGBCurveOp.cpp
ops/gradingrgbcurve/GradingRGBCurve.cpp
ops/gradingtone/GradingTone.cpp
ops/gradingtone/GradingToneOpCPU.cpp
ops/gradingtone/GradingToneOpData.cpp
ops/gradingtone/GradingToneOpGPU.cpp
ops/gradingtone/GradingToneOp.cpp
ops/log/LogOpCPU.cpp
ops/log/LogOpData.cpp
ops/log/LogOpGPU.cpp
ops/log/LogOp.cpp
ops/log/LogUtils.cpp
ops/lut1d/Lut1DOp.cpp
ops/lut1d/Lut1DOpCPU.cpp
ops/lut1d/Lut1DOpData.cpp
ops/lut1d/Lut1DOpGPU.cpp
ops/lut3d/Lut3DOp.cpp
ops/lut3d/Lut3DOpCPU.cpp
ops/lut3d/Lut3DOpData.cpp
ops/lut3d/Lut3DOpGPU.cpp
ops/matrix/MatrixOpCPU.cpp
ops/matrix/MatrixOpData.cpp
ops/matrix/MatrixOpGPU.cpp
ops/matrix/MatrixOp.cpp
ops/noop/NoOps.cpp
ops/OpTools.cpp
ops/range/RangeOpCPU.cpp
ops/range/RangeOpData.cpp
ops/range/RangeOpGPU.cpp
ops/range/RangeOp.cpp
ops/reference/ReferenceOpData.cpp
ParseUtils.cpp
PathUtils.cpp
Platform.cpp
Processor.cpp
ScanlineHelper.cpp
Transform.cpp
transforms/AllocationTransform.cpp
transforms/builtins/ACES.cpp
transforms/builtins/BuiltinTransformRegistry.cpp
transforms/builtins/ColorMatrixHelpers.cpp
transforms/builtins/OpHelpers.cpp
transforms/builtins/ArriCameras.cpp
transforms/builtins/CanonCameras.cpp
transforms/builtins/Displays.cpp
transforms/builtins/PanasonicCameras.cpp
transforms/builtins/RedCameras.cpp
transforms/builtins/SonyCameras.cpp
transforms/BuiltinTransform.cpp
transforms/CDLTransform.cpp
transforms/ColorSpaceTransform.cpp
transforms/DisplayViewTransform.cpp
transforms/ExponentTransform.cpp
transforms/ExponentWithLinearTransform.cpp
transforms/ExposureContrastTransform.cpp
transforms/FileTransform.cpp
transforms/FixedFunctionTransform.cpp
transforms/GradingPrimaryTransform.cpp
transforms/GradingRGBCurveTransform.cpp
transforms/GradingToneTransform.cpp
transforms/GroupTransform.cpp
transforms/LogAffineTransform.cpp
transforms/LogCameraTransform.cpp
transforms/LogTransform.cpp
transforms/LookTransform.cpp
transforms/Lut1DTransform.cpp
transforms/Lut3DTransform.cpp
transforms/MatrixTransform.cpp
transforms/RangeTransform.cpp
ViewingRules.cpp
ViewTransform.cpp
SystemMonitor.cpp
apphelpers/CategoryHelpers.cpp
apphelpers/ColorSpaceHelpers.cpp
apphelpers/DisplayViewHelpers.cpp
apphelpers/LegacyViewingPipeline.cpp
apphelpers/MixingHelpers.cpp
Baker.cpp
BitDepthUtils.cpp
Caching.cpp
ColorSpace.cpp
ColorSpaceSet.cpp
Config.cpp
Context.cpp
ContextVariableUtils.cpp
CPUProcessor.cpp
Display.cpp
DynamicProperty.cpp
Exception.cpp
fileformats/cdl/CDLParser.cpp
fileformats/cdl/CDLReaderHelper.cpp
fileformats/cdl/CDLWriter.cpp
fileformats/ctf/CTFReaderHelper.cpp
fileformats/ctf/CTFReaderUtils.cpp
fileformats/ctf/CTFTransform.cpp
fileformats/ctf/IndexMapping.cpp
fileformats/FileFormat3DL.cpp
fileformats/FileFormatCCC.cpp
fileformats/FileFormatCC.cpp
fileformats/FileFormatCDL.cpp
fileformats/FileFormatCSP.cpp
fileformats/FileFormatCTF.cpp
fileformats/FileFormatDiscreet1DL.cpp
fileformats/FileFormatHDL.cpp
fileformats/FileFormatICC.cpp
fileformats/FileFormatIridasCube.cpp
fileformats/FileFormatIridasItx.cpp
fileformats/FileFormatIridasLook.cpp
fileformats/FileFormatPandora.cpp
fileformats/FileFormatResolveCube.cpp
fileformats/FileFormatSpi1D.cpp
fileformats/FileFormatSpi3D.cpp
fileformats/FileFormatSpiMtx.cpp
fileformats/FileFormatTruelight.cpp
fileformats/FileFormatUtils.cpp
fileformats/FileFormatVF.cpp
fileformats/FormatMetadata.cpp
fileformats/xmlutils/XMLReaderHelper.cpp
fileformats/xmlutils/XMLReaderUtils.cpp
fileformats/xmlutils/XMLWriterUtils.cpp
FileRules.cpp
GPUProcessor.cpp
GpuShader.cpp
GpuShaderDesc.cpp
GpuShaderUtils.cpp
HashUtils.cpp
ImageDesc.cpp
ImagePacking.cpp
Logging.cpp
Look.cpp
LookParse.cpp
MathUtils.cpp
md5/md5.cpp
NamedTransform.cpp
OCIOYaml.cpp
Op.cpp
OpOptimizers.cpp
ops/allocation/AllocationOp.cpp
ops/cdl/CDLOpCPU.cpp
ops/cdl/CDLOpData.cpp
ops/cdl/CDLOpGPU.cpp
ops/cdl/CDLOp.cpp
ops/exponent/ExponentOp.cpp
ops/exposurecontrast/ExposureContrastOpCPU.cpp
ops/exposurecontrast/ExposureContrastOpData.cpp
ops/exposurecontrast/ExposureContrastOpGPU.cpp
ops/exposurecontrast/ExposureContrastOp.cpp
ops/fixedfunction/FixedFunctionOpCPU.cpp
ops/fixedfunction/FixedFunctionOpData.cpp
ops/fixedfunction/FixedFunctionOpGPU.cpp
ops/fixedfunction/FixedFunctionOp.cpp
ops/gamma/GammaOpCPU.cpp
ops/gamma/GammaOpData.cpp
ops/gamma/GammaOpGPU.cpp
ops/gamma/GammaOpUtils.cpp
ops/gamma/GammaOp.cpp
ops/gradingprimary/GradingPrimary.cpp
ops/gradingprimary/GradingPrimaryOpCPU.cpp
ops/gradingprimary/GradingPrimaryOpData.cpp
ops/gradingprimary/GradingPrimaryOpGPU.cpp
ops/gradingprimary/GradingPrimaryOp.cpp
ops/gradingrgbcurve/GradingBSplineCurve.cpp
ops/gradingrgbcurve/GradingRGBCurveOpCPU.cpp
ops/gradingrgbcurve/GradingRGBCurveOpData.cpp
ops/gradingrgbcurve/GradingRGBCurveOpGPU.cpp
ops/gradingrgbcurve/GradingRGBCurveOp.cpp
ops/gradingrgbcurve/GradingRGBCurve.cpp
ops/gradingtone/GradingTone.cpp
ops/gradingtone/GradingToneOpCPU.cpp
ops/gradingtone/GradingToneOpData.cpp
ops/gradingtone/GradingToneOpGPU.cpp
ops/gradingtone/GradingToneOp.cpp
ops/log/LogOpCPU.cpp
ops/log/LogOpData.cpp
ops/log/LogOpGPU.cpp
ops/log/LogOp.cpp
ops/log/LogUtils.cpp
ops/lut1d/Lut1DOp.cpp
ops/lut1d/Lut1DOpCPU.cpp
ops/lut1d/Lut1DOpData.cpp
ops/lut1d/Lut1DOpGPU.cpp
ops/lut3d/Lut3DOp.cpp
ops/lut3d/Lut3DOpCPU.cpp
ops/lut3d/Lut3DOpData.cpp
ops/lut3d/Lut3DOpGPU.cpp
ops/matrix/MatrixOpCPU.cpp
ops/matrix/MatrixOpData.cpp
ops/matrix/MatrixOpGPU.cpp
ops/matrix/MatrixOp.cpp
ops/noop/NoOps.cpp
ops/OpTools.cpp
ops/range/RangeOpCPU.cpp
ops/range/RangeOpData.cpp
ops/range/RangeOpGPU.cpp
ops/range/RangeOp.cpp
ops/reference/ReferenceOpData.cpp
ParseUtils.cpp
PathUtils.cpp
Platform.cpp
Processor.cpp
ScanlineHelper.cpp
Transform.cpp
transforms/AllocationTransform.cpp
transforms/builtins/ACES.cpp
transforms/builtins/BuiltinTransformRegistry.cpp
transforms/builtins/ColorMatrixHelpers.cpp
transforms/builtins/OpHelpers.cpp
transforms/builtins/ArriCameras.cpp
transforms/builtins/CanonCameras.cpp
transforms/builtins/Displays.cpp
transforms/builtins/PanasonicCameras.cpp
transforms/builtins/RedCameras.cpp
transforms/builtins/SonyCameras.cpp
transforms/BuiltinTransform.cpp
transforms/CDLTransform.cpp
transforms/ColorSpaceTransform.cpp
transforms/DisplayViewTransform.cpp
transforms/ExponentTransform.cpp
transforms/ExponentWithLinearTransform.cpp
transforms/ExposureContrastTransform.cpp
transforms/FileTransform.cpp
transforms/FixedFunctionTransform.cpp
transforms/GradingPrimaryTransform.cpp
transforms/GradingRGBCurveTransform.cpp
transforms/GradingToneTransform.cpp
transforms/GroupTransform.cpp
transforms/LogAffineTransform.cpp
transforms/LogCameraTransform.cpp
transforms/LogTransform.cpp
transforms/LookTransform.cpp
transforms/Lut1DTransform.cpp
transforms/Lut3DTransform.cpp
transforms/MatrixTransform.cpp
transforms/RangeTransform.cpp
ViewingRules.cpp
ViewTransform.cpp
SystemMonitor.cpp
)
if(NOT WIN32)
@@ -203,57 +203,74 @@ if(BUILD_SHARED_LIBS AND WIN32)
set(SOURCES ${SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
endif()
set(HEADER_LOCATION "${CMAKE_SOURCE_DIR}/include/OpenColorIO")
file(GLOB_RECURSE INSTALL_HEADERS "${HEADER_LOCATION}/*.h")
# Some part of the build process expect to find the ABI header here,
# notably the documentation.
set(ABI_HEADER_LOCATION "${CMAKE_BINARY_DIR}/include/OpenColorIO")
list(APPEND INSTALL_HEADERS ${ABI_HEADER_LOCATION}/OpenColorABI.h)
configure_file("${HEADER_LOCATION}/OpenColorABI.h.in" "${ABI_HEADER_LOCATION}/OpenColorABI.h" @ONLY)
set(BUILD_INCLUDES
${HEADER_LOCATION}/..
${HEADER_LOCATION}
${CMAKE_CURRENT_SOURCE_DIR}
${ABI_HEADER_LOCATION}
)
target_include_directories(OpenColorIO
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC
"$<BUILD_INTERFACE:${BUILD_INCLUDES}>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
)
target_link_libraries(OpenColorIO
PUBLIC
OpenColorIOHeaders
PRIVATE
expat::expat
${OCIO_HALF_LIB}
pystring::pystring
sampleicc::sampleicc
utils::strings
yaml-cpp
PRIVATE
expat::expat
${OCIO_HALF_LIB}
pystring::pystring
sampleicc::sampleicc
utils::strings
yaml-cpp
)
if(APPLE)
target_link_libraries(OpenColorIO
PRIVATE
"-framework Carbon"
"-framework IOKit"
)
target_link_libraries(OpenColorIO
PRIVATE
"-framework Carbon"
"-framework IOKit"
)
endif()
if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(OpenColorIO
PRIVATE
OpenColorIO_SKIP_IMPORTS
)
target_compile_definitions(OpenColorIO
PRIVATE
OpenColorIO_SKIP_IMPORTS
)
else()
# Only exports selected symbols.
target_compile_definitions(OpenColorIO
PRIVATE
OpenColorIO_EXPORTS
)
# Only exports selected symbols.
target_compile_definitions(OpenColorIO
PRIVATE
OpenColorIO_EXPORTS
)
endif()
if(BUILD_SHARED_LIBS OR (OCIO_BUILD_PYTHON AND UNIX))
# The Python bindings is a 'module' which is a dynamic library on Linux
# (i.e. '-fPIC' needed), but a static library on Windows.
# The Python bindings is a 'module' which is a dynamic library on Linux
# (i.e. '-fPIC' needed), but a static library on Windows.
# If supported for the target machine, emit position-independent code
# suitable for dynamic linking.
set_property(TARGET OpenColorIO PROPERTY POSITION_INDEPENDENT_CODE ON)
# If supported for the target machine, emit position-independent code
# suitable for dynamic linking.
set_property(TARGET OpenColorIO PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()
if(OCIO_USE_SSE)
target_compile_definitions(OpenColorIO
PRIVATE
USE_SSE
)
target_compile_definitions(OpenColorIO
PRIVATE
USE_SSE
)
endif()
if(MSVC AND BUILD_TYPE_DEBUG AND BUILD_SHARED_LIBS)
@@ -276,6 +293,7 @@ set_target_properties(OpenColorIO PROPERTIES
COMPILE_FLAGS "${PLATFORM_COMPILE_FLAGS}"
VERSION ${OpenColorIO_VERSION}
SOVERSION ${SOVERSION}
PUBLIC_HEADER "${INSTALL_HEADERS}"
)
if (UNIX AND NOT APPLE)
@@ -287,13 +305,14 @@ if (UNIX AND NOT APPLE)
endif ()
if(MSVC AND BUILD_SHARED_LIBS)
# Install the pdb file if any.
install(FILES $<TARGET_PDB_FILE:${PROJECT_NAME}> DESTINATION bin OPTIONAL)
# Install the pdb file if any.
install(FILES $<TARGET_PDB_FILE:${PROJECT_NAME}> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
endif()
install(TARGETS OpenColorIO
EXPORT ${PROJECT_NAME}_EXPORTED_TARGETS
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
EXPORT ${PROJECT_NAME}_EXPORTED_TARGETS
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/OpenColorIO
)
+1 -1
View File
@@ -40,5 +40,5 @@ target_link_libraries(ociobakelut
)
install(TARGETS ociobakelut
RUNTIME DESTINATION bin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
+1 -1
View File
@@ -28,5 +28,5 @@ target_link_libraries(ociocheck
)
install(TARGETS ociocheck
RUNTIME DESTINATION bin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
+1 -1
View File
@@ -36,5 +36,5 @@ target_link_libraries(ociochecklut
)
install(TARGETS ociochecklut
RUNTIME DESTINATION bin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
+1 -1
View File
@@ -34,5 +34,5 @@ target_link_libraries(ocioconvert
)
install(TARGETS ocioconvert
RUNTIME DESTINATION bin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
+1 -1
View File
@@ -45,5 +45,5 @@ target_link_libraries(ociodisplay
OpenImageIO::OpenImageIO
)
install(TARGETS ociodisplay
RUNTIME DESTINATION bin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
+1 -1
View File
@@ -26,5 +26,5 @@ target_link_libraries(ociolutimage
)
install(TARGETS ociolutimage
RUNTIME DESTINATION bin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
+1 -1
View File
@@ -29,5 +29,5 @@ target_link_libraries(ociomakeclf
)
install(TARGETS ociomakeclf
RUNTIME DESTINATION bin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
+1 -2
View File
@@ -27,6 +27,5 @@ target_link_libraries(ocioperf
)
install(TARGETS ocioperf
RUNTIME DESTINATION bin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
+1 -2
View File
@@ -24,6 +24,5 @@ target_link_libraries(ociowrite
)
install(TARGETS ociowrite
RUNTIME DESTINATION bin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
+1 -1
View File
@@ -155,7 +155,7 @@ set_target_properties(OpenColorIO-JNI
# Installation
install(TARGETS OpenColorIO-JNI
DESTINATION ${CMAKE_INSTALL_EXEC_PREFIX}/lib${LIB_SUFFIX}
DESTINATION ${CMAKE_INSTALL_EXEC_PREFIX}/${CMAKE_INSTALL_LIBDIR}
)
install(FILES ${JNIOCIO_JAR}
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/ocio/
+3 -7
View File
@@ -203,14 +203,10 @@ target_include_directories(PyOpenColorIO
# macOS, to prevent segfaults when potentially working with multiple Python
# installations. See note in:
# https://pybind11.readthedocs.io/en/stable/compiling.html#building-manually
set(PYOCIO_LINK_PUBLIC OpenColorIOHeaders)
if(WIN32)
list(INSERT PYOCIO_LINK_PUBLIC 0 ${Python_LIBRARIES})
endif()
target_link_libraries(PyOpenColorIO
PUBLIC
${PYOCIO_LINK_PUBLIC}
"$<$<BOOL:${WIN32}>:${Python_LIBRARIES}>"
PRIVATE
OpenColorIO
utils::strings
@@ -226,9 +222,9 @@ target_compile_definitions(PyOpenColorIO
)
if(WIN32)
set(_Python_VARIANT_PATH "lib${LIB_SUFFIX}/site-packages")
set(_Python_VARIANT_PATH "${CMAKE_INSTALL_LIBDIR}/site-packages")
else()
set(_Python_VARIANT_PATH "lib${LIB_SUFFIX}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages")
set(_Python_VARIANT_PATH "${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages")
endif()
# Create an internal global variable to access it in another scope but not publicly visible
+3 -3
View File
@@ -90,10 +90,10 @@ if(${OCIO_EGL_HEADLESS})
endif()
install(TARGETS oglapphelpers
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
install(FILES ${INCLUDES}
DESTINATION include/OpenColorIO/oglapphelpers
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/OpenColorIO/oglapphelpers
)
+3 -3
View File
@@ -35,10 +35,10 @@ target_link_libraries(oiiohelpers
)
install(TARGETS oiiohelpers
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/oiiohelpers.h
DESTINATION include/OpenColorIO/oiiohelpers
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/OpenColorIO/oiiohelpers
)
+1 -4
View File
@@ -11,12 +11,10 @@ function(add_ocio_test NAME SOURCES PRIVATE_INCLUDES)
target_compile_definitions(${TEST_BINARY}
PRIVATE
OpenColorIO_SKIP_IMPORTS
)
target_link_libraries(${TEST_BINARY}
PUBLIC
OpenColorIOHeaders
PRIVATE
OpenColorIO
expat::expat
${OCIO_HALF_LIB}
pystring::pystring
@@ -39,7 +37,6 @@ function(add_ocio_test NAME SOURCES PRIVATE_INCLUDES)
if(PRIVATE_INCLUDES)
target_include_directories(${TEST_BINARY}
PRIVATE
"${CMAKE_SOURCE_DIR}/src/OpenColorIO"
"${CMAKE_SOURCE_DIR}/tests/cpu"
)
endif(PRIVATE_INCLUDES)