On 02.02.2011 13:43, Eric Noulard wrote:
2011/2/2 Peter Kümmel<syntheti...@gmx.net>:
CMake 2.8.3:
When I install with "mingw32-make install/strip"
the installed files are stripped.
But when I set CPACK_STRIP_FILES to 1 and
use NSIS with "mingw32-make package" the binaries
are not stripped.
CPackConfig.cmake looks correct:
SET(CPACK_BINARY_NSIS "ON")
...
SET(CPACK_CMAKE_GENERATOR "MinGW Makefiles")
...
SET(CPACK_STRIP_FILES "1")
Is this a bug, or is there a simple fix.
Should work for any generator.
Could you try with a fresh clean build tree?
Would you try with ZIP or any other CPack generator?
Could you confirm you are on Windows?
Would you be able to give 2.8.4-rc2 a try?
http://www.cmake.org/files/v2.8/?C=M;O=D
(to be sure the problem is there too).
Tried on Windows with master and a fresh clean build and
it is still there.
The problem is a missing slash in the generated install rule
in cmake_install.cmake:
IF(CMAKE_INSTALL_DO_STRIP)
EXECUTE_PROCESS(COMMAND ".../strip.exe"
"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}...")
ENDIF(CMAKE_INSTALL_DO_STRIP)
DESTDIR is a path without a slash at the end.
Attached patch helps, but I don't know if this ts the right place to add the
fix.
Better would be when the if checks if the unpacked variable starts with a slash.
Or maybe checking CPACK_TEMPORARY_INSTALL_DIRECTORY?
Peter
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index 33ffbfb..1e0e45b 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -418,7 +418,7 @@ std::string cmInstallTargetGenerator::GetDestDirPath(std::string const& file)
// Construct the path of the file on disk after installation on
// which tweaks may be performed.
std::string toDestDirPath = "$ENV{DESTDIR}";
- if(file[0] != '/' && file[0] != '$')
+ if(file[0] != '/' /*&& file[0] != '$'*/)
{
toDestDirPath += "/";
}
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake