diff options
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake (renamed from Modules/CMakeIngestOSXBundleLibraries.cmake) | 18 | ||||
-rw-r--r-- | Source/QtDialog/CMakeLists.txt | 6 |
3 files changed, 22 insertions, 4 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index ec34058..6c79af4 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -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 ) { diff --git a/Modules/CMakeIngestOSXBundleLibraries.cmake b/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake index 65bd839..3c15c2b 100644 --- a/Modules/CMakeIngestOSXBundleLibraries.cmake +++ b/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake @@ -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}" ) diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 31d8309..726f42e 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -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) |