Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion share/dev/windows/ocio.bat
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ IF NOT EXIST "!PYTHON_PATH!" (
if !DO_CONFIGURE!==1 (
echo Running CMake...
cmake -B "!BUILD_PATH!"^
-DCMAKE_INSTALL_PREFIX=!INSTALL_PATH!^
-DOCIO_INSTALL_EXT_PACKAGES=ALL^
-DCMAKE_BUILD_TYPE=!CMAKE_BUILD_TYPE!^
-DGLEW_ROOT="!GLEW_ROOT!"^
Expand Down Expand Up @@ -231,7 +232,7 @@ if Not "%CMAKE_CONFIGURE_STATUS%"=="Failed" (
rem Run cmake --install only if cmake --build was successful.
if Not "%CMAKE_BUILD_STATUS%"=="Failed" (
rem Install OCIO
cmake --install !BUILD_PATH! --config !CMAKE_BUILD_TYPE! --prefix !INSTALL_PATH!
cmake --install !BUILD_PATH! --config !CMAKE_BUILD_TYPE!
if not ErrorLevel 1 (
set CMAKE_INSTALL_STATUS=Ok
) else (
Expand Down
26 changes: 19 additions & 7 deletions src/OpenColorIO/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,18 +174,30 @@ set(SOURCES
SystemMonitor.cpp
)

if(NOT WIN32)
# Install the pkg-config file.

# Install the pkg-config file.
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix "\${prefix}")

set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix "\${prefix}")
# CMAKE_INSTALL_LIBDIR is not guaranteed to be relative.
# Not using cmake_path function since it is only available from CMake ≥ 3.20.
if(IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}")
set(libdir "${CMAKE_INSTALL_LIBDIR}")
else()
set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
set(includedir "\${exec_prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
configure_file(res/OpenColorIO.pc.in ${CMAKE_CURRENT_BINARY_DIR}/OpenColorIO.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/OpenColorIO.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
endif()

# CMAKE_INSTALL_INCLUDEDIR is not guaranteed to be relative.
# Not using cmake_path function since it is only available from CMake ≥ 3.20.
if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}")
set(includedir "${CMAKE_INSTALL_INCLUDEDIR}")
else()
set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
endif()

configure_file(res/OpenColorIO.pc.in ${CMAKE_CURRENT_BINARY_DIR}/OpenColorIO.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/OpenColorIO.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

add_library(OpenColorIO ${SOURCES})

# Require at least a C++11 compatible compiler for consumer projects.
Expand Down
11 changes: 0 additions & 11 deletions src/OpenColorIO/pkgconfig/OpenColorIO.pc.in

This file was deleted.