|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r52957 - branches/release/tools/build/CMake
From: dgregor_at_[hidden]
Date: 2009-05-13 00:00:32
Author: dgregor
Date: 2009-05-13 00:00:31 EDT (Wed, 13 May 2009)
New Revision: 52957
URL: http://svn.boost.org/trac/boost/changeset/52957
Log:
Attempt to work around a package-building problem with the CMake-generated NSIS script
Text files modified:
branches/release/tools/build/CMake/BoostCore.cmake | 9 ++++++---
branches/release/tools/build/CMake/BoostUtils.cmake | 14 ++++++++++++++
2 files changed, 20 insertions(+), 3 deletions(-)
Modified: branches/release/tools/build/CMake/BoostCore.cmake
==============================================================================
--- branches/release/tools/build/CMake/BoostCore.cmake (original)
+++ branches/release/tools/build/CMake/BoostCore.cmake 2009-05-13 00:00:31 EDT (Wed, 13 May 2009)
@@ -181,7 +181,8 @@
endif (THIS_PROJECT_DESCRIPTION)
# Create a component group for this library
- cpack_add_component_group(${libname}
+ fix_cpack_component_name(CPACK_COMPONENT_GROUP_NAME ${libname})
+ cpack_add_component_group(${CPACK_COMPONENT_GROUP_NAME}
DISPLAY_NAME "${LIBNAME}"
DESCRIPTION ${THIS_PROJECT_DESCRIPTION})
endif ()
@@ -212,9 +213,10 @@
endforeach(DEP)
# Tell CPack about the headers component
+ fix_cpack_component_name(CPACK_COMPONENT_GROUP_NAME ${libname})
cpack_add_component(${libname}_headers
DISPLAY_NAME "Header files"
- GROUP ${libname}
+ GROUP ${CPACK_COMPONENT_GROUP_NAME}
DEPENDS ${THIS_PROJECT_HEADER_DEPENDS})
endif ()
endif ()
@@ -768,9 +770,10 @@
endforeach(DEP)
if (COMMAND cpack_add_component)
+ fix_cpack_component_name(CPACK_COMPONENT_GROUP_NAME ${libname})
cpack_add_component(${LIB_COMPONENT}
DISPLAY_NAME "${VARIANT_DISPLAY_NAME}"
- GROUP ${libname}
+ GROUP ${CPACK_COMPONENT_GROUP_NAME}
DEPENDS ${THIS_LIB_COMPONENT_DEPENDS})
endif ()
endif(NOT THIS_LIB_NO_INSTALL)
Modified: branches/release/tools/build/CMake/BoostUtils.cmake
==============================================================================
--- branches/release/tools/build/CMake/BoostUtils.cmake (original)
+++ branches/release/tools/build/CMake/BoostUtils.cmake 2009-05-13 00:00:31 EDT (Wed, 13 May 2009)
@@ -211,3 +211,17 @@
set(${LIST} ${${LIST}} PARENT_SCOPE)
endfunction(topological_sort)
+
+# Small little hack that tweaks a component name (as used for CPack)
+# to make sure to avoid certain names that cause problems. Sets the
+# variable named varname to the "sanitized" name.
+#
+# FIXME: This is a complete hack. We probably need to fix the CPack
+# generators (NSIS in particular) to get rid of the need for this.
+macro(fix_cpack_component_name varname name)
+ if (${name} STREQUAL "foreach")
+ set(${varname} "boost_foreach")
+ else()
+ set(${varname} ${name})
+ endif()
+endmacro()
\ No newline at end of file
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk