[CMake] CPack RPM with COMPONENTS packaging
Theodore Papadopoulo
Theodore.Papadopoulo at inria.fr
Wed Mar 20 13:50:39 EDT 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Actually, this patch works better... and is much simpler.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlFJ9u8ACgkQEr8WrU8nPV03XwCcDO8TyaiY7q1ppkRCIUvbBHYW
7uoAnR8aWighqflrUUkUK0AdgnjFOmg+
=rV+J
-----END PGP SIGNATURE-----
-------------- next part --------------
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index fa79e1b..d2df516 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -837,6 +837,10 @@ endif()
# - either because the user asked for it : CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
# - or the user did not provide one : NOT CPACK_RPM_USER_BINARY_SPECFILE
#
+if(CPACK_RPM_PACKAGE_COMPONENT AND CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_USER_BINARY_SPECFILE)
+ set(CPACK_RPM_USER_BINARY_SPECFILE ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_USER_BINARY_SPECFILE})
+endif()
+
if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE)
file(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in
"# -*- rpm-spec -*-
@@ -902,9 +906,9 @@ mv \"\@CPACK_TOPLEVEL_DIRECTORY\@/tmpBBroot\" $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
-${CPACK_RPM_INSTALL_FILES}
-${CPACK_RPM_ABSOLUTE_INSTALL_FILES}
-${CPACK_RPM_USER_INSTALL_FILES}
+\@CPACK_RPM_INSTALL_FILES\@
+\@CPACK_RPM_ABSOLUTE_INSTALL_FILES\@
+\@CPACK_RPM_USER_INSTALL_FILES\@
%changelog
\@CPACK_RPM_SPEC_CHANGELOG\@
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx
index 7ce0032..ac1b034 100644
--- a/Source/cmFindBase.cxx
+++ b/Source/cmFindBase.cxx
@@ -138,6 +138,7 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn)
size_t size = argsIn.size();
std::vector<std::string> args;
bool foundDoc = false;
+ bool foundForce = false;
for(unsigned int j = 0; j < size; ++j)
{
if(foundDoc || argsIn[j] != "DOC" )
@@ -150,6 +151,9 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn)
cmSystemTools::GetPath(args, argsIn[j].c_str());
}
}
+ else if (argsIn[j]=="FORCE") {
+ foundForce = true;
+ }
else
{
args.push_back(argsIn[j]);
@@ -175,7 +179,7 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn)
return false;
}
this->VariableName = args[0];
- if(this->CheckForVariableInCache())
+ if(!foundForce && this->CheckForVariableInCache())
{
this->AlreadyInCache = true;
return true;
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx
index 4af7e11..ef947d0 100644
--- a/Source/cmFindLibraryCommand.cxx
+++ b/Source/cmFindLibraryCommand.cxx
@@ -112,7 +112,9 @@ bool cmFindLibraryCommand
}
if(this->Makefile->GetCMakeInstance()
- ->GetPropertyAsBool("FIND_LIBRARY_USE_LIB64_PATHS"))
+ ->GetPropertyAsBool("FIND_LIBRARY_USE_LIB64_PATHS") &&
+ !this->Makefile->GetCMakeInstance()
+ ->GetPropertyAsBool("CMAKE_BUILD32"))
{
// add special 64 bit paths if this is a 64 bit compile.
if(this->Makefile->PlatformIs64Bit())
diff --git a/Tests/MFC/mfc1/res/mfc1Doc.ico b/Tests/MFC/mfc1/res/mfc1Doc.ico
old mode 100755
new mode 100644
diff --git a/Utilities/cmzlib/zlib.h b/Utilities/cmzlib/zlib.h
old mode 100755
new mode 100644
More information about the CMake
mailing list