diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2012-10-30 18:51:41 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2012-10-30 18:51:41 +0000 |
| commit | 30efe723a2a4d0f6b077045369405c1bd1636b47 (patch) | |
| tree | 0dc592db6ff6be27c9319927b306a327da0b72c3 /qpid/cpp/CMakeLists.txt | |
| parent | 5c0678e6dc9f4006b7d9ca5d0d41881d5b554b50 (diff) | |
| download | qpid-python-30efe723a2a4d0f6b077045369405c1bd1636b47.tar.gz | |
NO-JIRA: shamelessly stole some cmake improvements from proton:
- Don't generate the docs all the time (unless we have to)
- Take a guess as to whether to use lib or lib64 to install libraries
(This can be overridden in distribution package builds)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1403812 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/CMakeLists.txt')
| -rw-r--r-- | qpid/cpp/CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
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) |
