summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2012-10-22 06:56:41 +0000
committerAndrew Stitcher <astitcher@apache.org>2012-10-22 06:56:41 +0000
commit0c95a63008ee6b575e5defe860232e91675802db (patch)
treed54fb12e95d72d8efec8a6bf1978aeea55adea09 /qpid/cpp/src
parent7d437d2c16aee1e8bb5675e3bfc412fed93780bf (diff)
downloadqpid-python-0c95a63008ee6b575e5defe860232e91675802db.tar.gz
QPID-3633: Make cmake the primary build tool for the cpp tree
- Make the installed pkgconfig files have the correct paths embedded. - Use install variables that should be compatible with the variables set by rpmbuild's %cmake macro git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1400780 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/CMakeLists.txt29
-rw-r--r--qpid/cpp/src/Makefile.am1
-rw-r--r--qpid/cpp/src/config.h.cmake2
3 files changed, 14 insertions, 18 deletions
diff --git a/qpid/cpp/src/CMakeLists.txt b/qpid/cpp/src/CMakeLists.txt
index a1b1741dc8..ce94c0a318 100644
--- a/qpid/cpp/src/CMakeLists.txt
+++ b/qpid/cpp/src/CMakeLists.txt
@@ -1474,19 +1474,18 @@ add_subdirectory(qpid/store)
add_subdirectory(tests)
# Support for pkg-config
-if (UNIX)
- add_custom_target(pkgconfig ALL echo DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qpid.pc.in
- ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc)
- install (FILES ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc
- DESTINATION ${QPID_INSTALL_LIBDIR}/pkgconfig
- COMPONENT ${QPID_COMPONENT_COMMON})
-
- add_dependencies(pkgconfig ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qmf2.pc.in
- ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc)
- install (FILES ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc
- DESTINATION ${QPID_INSTALL_LIBDIR}/pkgconfig
- COMPONENT ${QPID_COMPONENT_COMMON})
-endif (UNIX)
+# Compatible variable names used in the pkg config files also for autoconf
+set (prefix ${CMAKE_INSTALL_PREFIX})
+set (exec_prefix ${CMAKE_INSTALL_PREFIX})
+set_absolute_install_path (libdir ${LIB_INSTALL_DIR})
+set_absolute_install_path (includedir ${INCLUDE_INSTALL_DIR})
+set (VERSION ${QPID_VERSION})
+
+#add_custom_target(pkgconfig ALL echo DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc)
+#add_dependencies(pkgconfig ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc)
+configure_file(qpid.pc.in qpid.pc @ONLY)
+configure_file(qmf2.pc.in qmf2.pc @ONLY)
+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc
+ DESTINATION ${LIB_INSTALL_DIR}/pkgconfig
+ COMPONENT ${QPID_COMPONENT_COMMON})
diff --git a/qpid/cpp/src/Makefile.am b/qpid/cpp/src/Makefile.am
index ba2d6a9219..d166e412e2 100644
--- a/qpid/cpp/src/Makefile.am
+++ b/qpid/cpp/src/Makefile.am
@@ -129,7 +129,6 @@ INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(srcdir) -I=$(bu
# Destination for intalled programs and tests defined here
#
qpidexecdir = $(libexecdir)/qpid
-AM_CXXFLAGS += -DQPID_LIBEXEC_DIR=\"$(qpidexecdir)\"
qpidexec_PROGRAMS =
qpidexec_SCRIPTS =
qpidtestdir = $(qpidexecdir)/tests
diff --git a/qpid/cpp/src/config.h.cmake b/qpid/cpp/src/config.h.cmake
index f55f68afde..5c8c56c749 100644
--- a/qpid/cpp/src/config.h.cmake
+++ b/qpid/cpp/src/config.h.cmake
@@ -37,8 +37,6 @@
#cmakedefine QPIDC_MODULE_DIR "${QPIDC_MODULE_DIR}"
#cmakedefine QPIDD_MODULE_DIR "${QPIDD_MODULE_DIR}"
-#cmakedefine QPID_LIBEXEC_DIR "${QPID_LIBEXEC_DIR}"
-
#define QPID_SHLIB_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}"
#define QPID_MODULE_PREFIX
#cmakedefine QPID_DEBUG_POSTFIX "${QPID_DEBUG_POSTFIX}"