From c8c307d63833705b21fc4d54ae3b6faa9d012f80 Mon Sep 17 00:00:00 2001 From: Bernd Waibel Date: Tue, 23 Feb 2021 01:12:12 +0100 Subject: [PATCH] fix pkg-config file for PyImath Bug: https://github.com/AcademySoftwareFoundation/Imath/issues/101 Signed-off-by: Bernd Waibel --- src/python/config/CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/python/config/CMakeLists.txt b/src/python/config/CMakeLists.txt index 37449cc2..942d922a 100644 --- a/src/python/config/CMakeLists.txt +++ b/src/python/config/CMakeLists.txt @@ -15,10 +15,10 @@ if(IMATH_INSTALL_PKG_CONFIG) # use a helper function to avoid variable pollution, but pretty simple function(pyimath_pkg_config_help pcinfile) set(prefix ${CMAKE_INSTALL_PREFIX}) - set(exec_prefix ${CMAKE_INSTALL_BINDIR}) - set(libdir ${CMAKE_INSTALL_LIBDIR}) - set(includedir ${CMAKE_INSTALL_INCLUDEDIR}) - set(LIB_SUFFIX_DASH ${OPENEXR_LIB_SUFFIX}) + set(exec_prefix "\${prefix}") + set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") + set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") + set(LIB_SUFFIX_DASH ${IMATH_LIB_SUFFIX}) string(REPLACE ".in" "" pcout ${pcinfile}) configure_file(${pcinfile} ${CMAKE_CURRENT_BINARY_DIR}/${pcout} @ONLY) install( @@ -27,6 +27,8 @@ if(IMATH_INSTALL_PKG_CONFIG) ) endfunction() pyimath_pkg_config_help(../PyImath.pc.in) +else() + message(STATUS "pkg-config generation disabled") endif() # The main export of the configuration - This is the