summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--qtinterface/TQt.pc.cmake6
2 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bfc8f05..f1fcddb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -749,6 +749,10 @@ endforeach( LIB ${PKGCONFIG_QT_LIBRARIES} )
##### write TQt.pc ##############################
+string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_EXEC_PREFIX ${EXEC_INSTALL_PREFIX} )
+string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_INCLUDE_DIR ${INCLUDE_INSTALL_DIR} )
+string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_LIB_DIR ${LIB_INSTALL_DIR} )
+
configure_file( qtinterface/TQt.pc.cmake qtinterface/TQt.pc @ONLY )
diff --git a/qtinterface/TQt.pc.cmake b/qtinterface/TQt.pc.cmake
index cca5221..f7d8786 100644
--- a/qtinterface/TQt.pc.cmake
+++ b/qtinterface/TQt.pc.cmake
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=${prefix}
-libdir=${prefix}/@LIB_INSTALL_DIR@
-includedir=${prefix}/@INCLUDE_INSTALL_DIR@
+exec_prefix=@PC_EXEC_PREFIX@
+libdir=@PC_LIB_DIR@
+includedir=@PC_INCLUDE_DIR@
Name: TQt
Description: Interface and abstraction library for Qt and Trinity