ENH: add CPACK_PROJECT_CONFIG_FILE option to CPack
This commit is contained in:
parent
fb621feefc
commit
e65c40f94a
@ -4,6 +4,9 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
|||||||
SET(CMAKE_INSTALL_MFC_LIBRARIES 1)
|
SET(CMAKE_INSTALL_MFC_LIBRARIES 1)
|
||||||
INCLUDE(InstallRequiredSystemLibraries)
|
INCLUDE(InstallRequiredSystemLibraries)
|
||||||
ENDIF(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake")
|
ENDIF(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake")
|
||||||
|
CONFIGURE_FILE("${CMake_SOURCE_DIR}/CMakeCPackOptions.cmake.in"
|
||||||
|
"${CMake_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY)
|
||||||
|
SET(CPACK_PROJECT_CONFIG_FILE "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake")
|
||||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake is a build tool")
|
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake is a build tool")
|
||||||
SET(CPACK_PACKAGE_VENDOR "Kitware")
|
SET(CPACK_PACKAGE_VENDOR "Kitware")
|
||||||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
|
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
# all CPACK_ variables from the cmake project
|
|
||||||
@_CPACK_OTHER_VARIABLES_@
|
|
||||||
|
|
||||||
if(CPACK_GENERATOR MATCHES "NSIS")
|
if(CPACK_GENERATOR MATCHES "NSIS")
|
||||||
# set the install/unistall icon used for the installer itself
|
# set the install/unistall icon used for the installer itself
|
||||||
# There is a bug in NSI that does not handle full unix paths properly.
|
# There is a bug in NSI that does not handle full unix paths properly.
|
||||||
@ -31,3 +28,9 @@ if(CPACK_GENERATOR MATCHES "NSIS")
|
|||||||
SET(CPACK_NSIS_CONTACT @CPACK_PACKAGE_CONTACT@)
|
SET(CPACK_NSIS_CONTACT @CPACK_PACKAGE_CONTACT@)
|
||||||
SET(CPACK_NSIS_MODIFY_PATH ON)
|
SET(CPACK_NSIS_MODIFY_PATH ON)
|
||||||
endif(CPACK_GENERATOR MATCHES "NSIS")
|
endif(CPACK_GENERATOR MATCHES "NSIS")
|
||||||
|
|
||||||
|
if(CPACK_GENERATOR MATCHES "CygwinSource")
|
||||||
|
# when packaging source make sure the .build directory is not included
|
||||||
|
SET(CPACK_SOURCE_IGNORE_FILES
|
||||||
|
"/CVS/" "/\\.build/" "/\\.svn/" "\\.swp$" "\\.#" "/#" "~$")
|
||||||
|
endif(CPACK_GENERATOR MATCHES "CygwinSource")
|
@ -1,8 +0,0 @@
|
|||||||
# All CPACK_ variables from the cmake project
|
|
||||||
@_CPACK_OTHER_VARIABLES_@
|
|
||||||
|
|
||||||
if(CPACK_GENERATOR MATCHES "CygwinSource")
|
|
||||||
# when packaging source make sure the .build directory is not included
|
|
||||||
SET(CPACK_SOURCE_IGNORE_FILES
|
|
||||||
"/CVS/" "/\\.build/" "/\\.svn/" "\\.swp$" "\\.#" "/#" "~$")
|
|
||||||
endif(CPACK_GENERATOR MATCHES "CygwinSource")
|
|
@ -60,7 +60,6 @@ void cmCPackGenericGenerator::DisplayVerboseOutput(const char* msg,
|
|||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
int cmCPackGenericGenerator::PrepareNames()
|
int cmCPackGenericGenerator::PrepareNames()
|
||||||
{
|
{
|
||||||
this->SetOption("CPACK_GENERATOR", this->Name.c_str());
|
|
||||||
|
|
||||||
std::string tempDirectory = this->GetOption("CPACK_PACKAGE_DIRECTORY");
|
std::string tempDirectory = this->GetOption("CPACK_PACKAGE_DIRECTORY");
|
||||||
tempDirectory += "/_CPack_Packages/";
|
tempDirectory += "/_CPack_Packages/";
|
||||||
@ -754,6 +753,15 @@ int cmCPackGenericGenerator::Initialize(const char* name, cmMakefile* mf,
|
|||||||
"Cannot initialize the generator" << std::endl);
|
"Cannot initialize the generator" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
// set the running generator name
|
||||||
|
this->SetOption("CPACK_GENERATOR", this->Name.c_str());
|
||||||
|
// Load the project specific config file
|
||||||
|
const char* config =
|
||||||
|
this->GetOption("CPACK_PROJECT_CONFIG_FILE");
|
||||||
|
if(config)
|
||||||
|
{
|
||||||
|
mf->ReadListFile(config);
|
||||||
|
}
|
||||||
int result = this->InitializeInternal();
|
int result = this->InitializeInternal();
|
||||||
if (cmSystemTools::GetErrorOccuredFlag())
|
if (cmSystemTools::GetErrorOccuredFlag())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user