summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/BuildInstallSettings.cmake12
-rw-r--r--qpid/cpp/CMakeLists.txt15
-rw-r--r--qpid/cpp/docs/api/CMakeLists.txt8
3 files changed, 31 insertions, 4 deletions
diff --git a/qpid/cpp/BuildInstallSettings.cmake b/qpid/cpp/BuildInstallSettings.cmake
index 6bd883e754..23cc24c96c 100644
--- a/qpid/cpp/BuildInstallSettings.cmake
+++ b/qpid/cpp/BuildInstallSettings.cmake
@@ -132,6 +132,16 @@ function(set_absolute_install_path var input)
endif ()
endfunction(set_absolute_install_path)
+# Figure out the default library suffix
+if (NOT DEFINED LIB_SUFFIX)
+ get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
+ if (${LIB64} STREQUAL "TRUE" AND ${CMAKE_SIZEOF_VOID_P} STREQUAL "8")
+ set(LIB_SUFFIX 64)
+ else()
+ set(LIB_SUFFIX "")
+ endif()
+endif()
+
# In rpm builds the build sets some variables:
# CMAKE_INSTALL_PREFIX - this is a standard cmake variable
# INCLUDE_INSTALL_DIR
@@ -141,7 +151,7 @@ endfunction(set_absolute_install_path)
# So make these cached variables and the specific variables non cached and
# derived from them.
set (INCLUDE_INSTALL_DIR include CACHE PATH "Include file directory")
- set (LIB_INSTALL_DIR lib CACHE PATH "Library object file directory")
+ set (LIB_INSTALL_DIR lib${LIB_SUFFIX} CACHE PATH "Library object file directory")
set (SYSCONF_INSTALL_DIR etc CACHE PATH "System read only configuration directory")
set (SHARE_INSTALL_DIR share CACHE PATH "Shared read only data directory")
set (DOC_INSTALL_DIR ${SHARE_INSTALL_DIR}/doc/${CMAKE_PROJECT_NAME}-${QPID_VERSION_FULL} CACHE PATH "Shared read only data directory")
diff --git a/qpid/cpp/CMakeLists.txt b/qpid/cpp/CMakeLists.txt
index 5e83c267eb..0a3b1149ba 100644
--- a/qpid/cpp/CMakeLists.txt
+++ b/qpid/cpp/CMakeLists.txt
@@ -25,6 +25,12 @@ endif(COMMAND cmake_policy)
include(BuildInstallSettings.cmake)
+if (${CMAKE_VERSION} VERSION_LESS "2.8.0")
+ set (OPTIONAL_ARG "")
+else()
+ set (OPTIONAL_ARG OPTIONAL)
+endif()
+
set (qpidc_version ${QPID_VERSION_MAJOR}.${QPID_VERSION_MINOR})
enable_testing()
@@ -78,6 +84,15 @@ set(CPACK_PACKAGE_VERSION_MINOR "${QPID_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "0")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "qpidc-${qpidc_version}")
+# Add custom target for docs since we don't include a cmake file there directly.
+# If we can't use OPTIONAL in the install command then we have to make the docs
+# every time so that the install target succeeds
+if (OPTIONAL_ARG)
+ add_custom_target(docs)
+else (OPTIONAL_ARG)
+ add_custom_target(docs ALL)
+endif (OPTIONAL_ARG)
+
add_subdirectory(managementgen)
add_subdirectory(src)
add_subdirectory(etc)
diff --git a/qpid/cpp/docs/api/CMakeLists.txt b/qpid/cpp/docs/api/CMakeLists.txt
index 1c2e72394c..828d706b91 100644
--- a/qpid/cpp/docs/api/CMakeLists.txt
+++ b/qpid/cpp/docs/api/CMakeLists.txt
@@ -28,13 +28,15 @@ if (GEN_DOXYGEN)
${CMAKE_CURRENT_BINARY_DIR}/user.doxygen)
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/developer.doxygen.in
${CMAKE_CURRENT_BINARY_DIR}/developer.doxygen)
- add_custom_target (docs-user-api ALL COMMAND ${DOXYGEN_EXECUTABLE} user.doxygen)
- add_custom_target (docs-developer ALL COMMAND ${DOXYGEN_EXECUTABLE} developer.doxygen)
+ add_custom_target (docs-user-api COMMAND ${DOXYGEN_EXECUTABLE} user.doxygen)
+ add_custom_target (docs-developer COMMAND ${DOXYGEN_EXECUTABLE} developer.doxygen)
+ add_dependencies (docs docs-developer docs-user-api)
# HTML files are generated to ./html - put those in the install.
install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
DESTINATION ${QPID_INSTALL_DOCDIR}/api/html
- COMPONENT ${QPID_COMPONENT_CLIENT_INCLUDE})
+ COMPONENT ${QPID_COMPONENT_CLIENT_INCLUDE}
+ ${OPTIONAL_ARG})
if (CPACK_GENERATOR STREQUAL "NSIS")
set (CPACK_NSIS_MENU_LINKS
"${QPID_INSTALL_HTMLDIR}/index.html" "Qpid C++ API Documentation"