ENH: have cpack work with DESTDIR install and ingest qt framework libs into cmake-gui

This commit is contained in:
Bill Hoffman 2008-02-18 10:26:28 -05:00
parent c51a45466d
commit ef537ffec7
3 changed files with 22 additions and 4 deletions

View File

@ -536,6 +536,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
"- Install project: " << installProjectName << std::endl);
cmake cm;
cm.AddCMakePaths();
cm.SetProgressCallback(cmCPackGeneratorProgress, this);
cmGlobalGenerator gg;
gg.SetCMakeInstance(&cm);
@ -596,7 +597,6 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
{
mf->AddDefinition("CMAKE_INSTALL_DO_STRIP", "1");
}
int res = mf->ReadListFile(0, installFile.c_str());
if ( cmSystemTools::GetErrorOccuredFlag() || !res )
{

View File

@ -40,7 +40,7 @@ otool -L output.
")
ENDIF(NOT DEFINED input_file)
message("ingest ${input_file}")
SET(eol_char "E")
IF(APPLE)
@ -49,7 +49,6 @@ IF(APPLE)
SET(dep_regex "^\t([^\t]+) \\(compatibility version ([0-9]+.[0-9]+.[0-9]+), current version ([0-9]+.[0-9]+.[0-9]+)\\)${eol_char}$")
ENDIF(APPLE)
MESSAGE("")
MESSAGE("# Script \"${CMAKE_CURRENT_LIST_FILE}\" running...")
MESSAGE("")
@ -151,6 +150,20 @@ FOREACH(d ${deps})
IF(d_is_embedded_lib)
SET(embedded_deps ${embedded_deps} "${d}")
ELSE(d_is_embedded_lib)
# if the non system lib is not found then try to look for it
# in the standard framework search path for OSX
IF(NOT EXISTS "${d}")
SET(FRAMEWORK_SEARCH "/Library/Frameworks"
"/System/Library/Frameworks" )
SET(__FOUND )
FOREACH(f ${FRAMEWORK_SEARCH})
SET(newd "${f}/${d}")
IF(EXISTS "${newd}" AND NOT __FOUND)
SET(d "${newd}")
SET(__FOUND TRUE)
ENDIF(EXISTS "${newd}" AND NOT __FOUND)
ENDFOREACH(f)
ENDIF(NOT EXISTS "${d}")
SET(nonsystem_deps ${nonsystem_deps} "${d}")
ENDIF(d_is_embedded_lib)
ENDIF(d_is_system_lib)
@ -214,6 +227,7 @@ MACRO(COPY_LIBRARY_INTO_BUNDLE clib_bundle clib_libsrc clib_dstlibs clib_fixups)
# (This technique will not work for frameworks that have necessary
# resource or auxiliary files...)
#
MESSAGE("Copy: ${CMAKE_COMMAND} -E copy \"${fw_src}\" \"${fw_dstdir}/${fwlibname}\"")
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy
"${fw_src}" "${fw_dstdir}/${fwlibname}"
)

View File

@ -64,6 +64,10 @@ ELSE(NOT QT4_FOUND)
INSTALL(TARGETS cmake-gui RUNTIME DESTINATION bin
${CMAKE_INSTALL_DESTINATION_ARGS})
ENDIF(CMAKE_PACKAGE_QTGUI)
IF(APPLE)
INSTALL(CODE "set(input_file
\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/cmake-gui\")")
INSTALL(SCRIPT "${CMake_SOURCE_DIR}/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake")
ENDIF(APPLE)
ENDIF(NOT QT4_FOUND)