Skip to content

Commit

Permalink
Fix install paths regressions (#1502)
Browse files Browse the repository at this point in the history
* Fix install directory variable for python bindings

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

* Remove hardcoded lib prefix in RPATH handling

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

Co-authored-by: Patrick Hodoul <patrick.hodoul@autodesk.com>
  • Loading branch information
remia and hodoulp committed Oct 4, 2021
1 parent 25f0a20 commit 93c3689
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ include (CTest)
enable_testing()


###############################################################################
# Provides install directory variables as defined by the GNU Coding Standards.
include(GNUInstallDirs)


###############################################################################
# Forbid in-source build.

Expand Down
4 changes: 2 additions & 2 deletions share/cmake/utils/CompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ if (UNIX AND NOT CMAKE_SKIP_RPATH)
# (i.e. a binary loading a dynamic library) and then from the current directory
# (i.e. dynamic library loading another dynamic library).
if (APPLE)
set(CMAKE_INSTALL_RPATH "@loader_path/../lib;@loader_path")
set(CMAKE_INSTALL_RPATH "@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path")
else()
set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib;$ORIGIN")
set(CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR};$ORIGIN")
endif()
endif()
2 changes: 0 additions & 2 deletions src/OpenColorIO/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,6 @@ 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}")
Expand Down

0 comments on commit 93c3689

Please sign in to comment.