Skip to content

Commit

Permalink
Fix pkgconfig installation on non-windows platforms
Browse files Browse the repository at this point in the history
Signed-off-by: Rémi Achard <[email protected]>
  • Loading branch information
remia committed Aug 25, 2020
1 parent 88da49d commit 3fc9deb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/OpenColorIO/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,12 @@ if(NOT WIN32)

# Install the pkg-config file.

include(GNUInstallDirs)

set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix "\${prefix}")
set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
set(exec_prefix "${prefix}")
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 ${libdir}/pkgconfig)
endif()
Expand Down

0 comments on commit 3fc9deb

Please sign in to comment.