| Attached Files | CMake-QtAssistant.sh [^] (7,676 bytes) 2008-06-04 09:49
docs.patch [^] (11,185 bytes) 2009-10-30 16:13 [Show Content] [Hide Content]Index: Source/cmConfigure.cmake.h.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmConfigure.cmake.h.in,v
retrieving revision 1.16
diff -u -r1.16 cmConfigure.cmake.h.in
--- Source/cmConfigure.cmake.h.in 28 Sep 2009 15:42:02 -0000 1.16
+++ Source/cmConfigure.cmake.h.in 30 Oct 2009 20:03:54 -0000
@@ -20,3 +20,4 @@
#define CMAKE_ROOT_DIR "${CMake_SOURCE_DIR}"
#define CMAKE_BUILD_DIR "${CMake_BINARY_DIR}"
#define CMAKE_DATA_DIR "@CMAKE_DATA_DIR@"
+#define CMAKE_DOC_DIR "@CMAKE_DOC_DIR@"
Index: Utilities/CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/CMakeLists.txt,v
retrieving revision 1.26
diff -u -r1.26 CMakeLists.txt
--- Utilities/CMakeLists.txt 28 Sep 2009 15:43:20 -0000 1.26
+++ Utilities/CMakeLists.txt 30 Oct 2009 20:03:54 -0000
@@ -11,7 +11,8 @@
#=============================================================================
SUBDIRS(Doxygen KWStyle)
-MAKE_DIRECTORY(${CMake_BINARY_DIR}/Docs)
+SET(BUILD_DOC_DIR "${CMake_BINARY_DIR}${CMAKE_DOC_DIR}")
+MAKE_DIRECTORY(${BUILD_DOC_DIR})
# Add a documentation target.
SET(DOC_FILES "")
@@ -22,23 +23,23 @@
# only generate the documentation if the target is actually built
IF(CMD)
ADD_CUSTOM_COMMAND(
- OUTPUT ${CMake_BINARY_DIR}/Docs/${target}.txt
+ OUTPUT ${BUILD_DOC_DIR}/${target}.txt
${${target}-PATH} # Possibly set PATH, see below.
COMMAND ${CMD}
- ARGS --help-full ${CMake_BINARY_DIR}/Docs/${target}.txt
- --help-full ${CMake_BINARY_DIR}/Docs/${target}.html
- --help-full ${CMake_BINARY_DIR}/Docs/${target}.1
- --help-full ${CMake_BINARY_DIR}/Docs/${target}.docbook
+ ARGS --help-full ${BUILD_DOC_DIR}/${target}.txt
+ --help-full ${BUILD_DOC_DIR}/${target}.html
+ --help-full ${BUILD_DOC_DIR}/${target}.1
+ --help-full ${BUILD_DOC_DIR}/${target}.docbook
DEPENDS ${target}
MAIN_DEPENDENCY ${dependency}
)
- INSTALL_FILES(${CMAKE_MAN_DIR}/man1 FILES ${CMake_BINARY_DIR}/Docs/${target}.1)
+ INSTALL_FILES(${CMAKE_MAN_DIR}/man1 FILES ${BUILD_DOC_DIR}/${target}.1)
INSTALL_FILES(${CMAKE_DOC_DIR} FILES
- ${CMake_BINARY_DIR}/Docs/${target}.txt
- ${CMake_BINARY_DIR}/Docs/${target}.html
- ${CMake_BINARY_DIR}/Docs/${target}.docbook
+ ${BUILD_DOC_DIR}/${target}.txt
+ ${BUILD_DOC_DIR}/${target}.html
+ ${BUILD_DOC_DIR}/${target}.docbook
)
- SET(DOC_FILES ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/${target}.txt)
+ SET(DOC_FILES ${DOC_FILES} ${BUILD_DOC_DIR}/${target}.txt)
ENDIF(CMD)
ENDMACRO(ADD_DOCS target dependency)
@@ -66,60 +67,60 @@
GET_TARGET_PROPERTY(CMD cmake LOCATION)
ADD_CUSTOM_COMMAND(
- OUTPUT ${CMake_BINARY_DIR}/Docs/cmake.txt
+ OUTPUT ${BUILD_DOC_DIR}/cmake.txt
COMMAND ${CMD}
- ARGS --copyright ${CMake_BINARY_DIR}/Docs/Copyright.txt
- --help-full ${CMake_BINARY_DIR}/Docs/cmake.txt
- --help-full ${CMake_BINARY_DIR}/Docs/cmake.html
- --help-full ${CMake_BINARY_DIR}/Docs/cmake.1
- --help-full ${CMake_BINARY_DIR}/Docs/cmake.docbook
- --help-policies ${CMake_BINARY_DIR}/Docs/cmake-policies.txt
- --help-policies ${CMake_BINARY_DIR}/Docs/cmake-policies.html
- --help-policies ${CMake_BINARY_DIR}/Docs/cmakepolicies.1
- --help-properties ${CMake_BINARY_DIR}/Docs/cmake-properties.txt
- --help-properties ${CMake_BINARY_DIR}/Docs/cmake-properties.html
- --help-properties ${CMake_BINARY_DIR}/Docs/cmakeprops.1
- --help-variables ${CMake_BINARY_DIR}/Docs/cmake-variables.txt
- --help-variables ${CMake_BINARY_DIR}/Docs/cmake-variables.html
- --help-variables ${CMake_BINARY_DIR}/Docs/cmakevars.1
- --help-modules ${CMake_BINARY_DIR}/Docs/cmake-modules.txt
- --help-modules ${CMake_BINARY_DIR}/Docs/cmake-modules.html
- --help-modules ${CMake_BINARY_DIR}/Docs/cmakemodules.1
- --help-commands ${CMake_BINARY_DIR}/Docs/cmake-commands.txt
- --help-commands ${CMake_BINARY_DIR}/Docs/cmake-commands.html
- --help-commands ${CMake_BINARY_DIR}/Docs/cmakecommands.1
- --help-compatcommands ${CMake_BINARY_DIR}/Docs/cmake-compatcommands.txt
- --help-compatcommands ${CMake_BINARY_DIR}/Docs/cmake-compatcommands.html
- --help-compatcommands ${CMake_BINARY_DIR}/Docs/cmakecompat.1
+ ARGS --copyright ${BUILD_DOC_DIR}/Copyright.txt
+ --help-full ${BUILD_DOC_DIR}/cmake.txt
+ --help-full ${BUILD_DOC_DIR}/cmake.html
+ --help-full ${BUILD_DOC_DIR}/cmake.1
+ --help-full ${BUILD_DOC_DIR}/cmake.docbook
+ --help-policies ${BUILD_DOC_DIR}/cmake-policies.txt
+ --help-policies ${BUILD_DOC_DIR}/cmake-policies.html
+ --help-policies ${BUILD_DOC_DIR}/cmakepolicies.1
+ --help-properties ${BUILD_DOC_DIR}/cmake-properties.txt
+ --help-properties ${BUILD_DOC_DIR}/cmake-properties.html
+ --help-properties ${BUILD_DOC_DIR}/cmakeprops.1
+ --help-variables ${BUILD_DOC_DIR}/cmake-variables.txt
+ --help-variables ${BUILD_DOC_DIR}/cmake-variables.html
+ --help-variables ${BUILD_DOC_DIR}/cmakevars.1
+ --help-modules ${BUILD_DOC_DIR}/cmake-modules.txt
+ --help-modules ${BUILD_DOC_DIR}/cmake-modules.html
+ --help-modules ${BUILD_DOC_DIR}/cmakemodules.1
+ --help-commands ${BUILD_DOC_DIR}/cmake-commands.txt
+ --help-commands ${BUILD_DOC_DIR}/cmake-commands.html
+ --help-commands ${BUILD_DOC_DIR}/cmakecommands.1
+ --help-compatcommands ${BUILD_DOC_DIR}/cmake-compatcommands.txt
+ --help-compatcommands ${BUILD_DOC_DIR}/cmake-compatcommands.html
+ --help-compatcommands ${BUILD_DOC_DIR}/cmakecompat.1
DEPENDS cmake
MAIN_DEPENDENCY ${CMake_SOURCE_DIR}/Utilities/Doxygen/authors.txt
)
INSTALL_FILES(${CMAKE_MAN_DIR}/man1 FILES
- ${CMake_BINARY_DIR}/Docs/cmake.1
- ${CMake_BINARY_DIR}/Docs/cmakecommands.1
- ${CMake_BINARY_DIR}/Docs/cmakecompat.1
- ${CMake_BINARY_DIR}/Docs/cmakeprops.1
- ${CMake_BINARY_DIR}/Docs/cmakepolicies.1
- ${CMake_BINARY_DIR}/Docs/cmakevars.1
- ${CMake_BINARY_DIR}/Docs/cmakemodules.1)
+ ${BUILD_DOC_DIR}/cmake.1
+ ${BUILD_DOC_DIR}/cmakecommands.1
+ ${BUILD_DOC_DIR}/cmakecompat.1
+ ${BUILD_DOC_DIR}/cmakeprops.1
+ ${BUILD_DOC_DIR}/cmakepolicies.1
+ ${BUILD_DOC_DIR}/cmakevars.1
+ ${BUILD_DOC_DIR}/cmakemodules.1)
INSTALL_FILES(${CMAKE_DOC_DIR} FILES
- ${CMake_BINARY_DIR}/Docs/cmake.txt
- ${CMake_BINARY_DIR}/Docs/cmake.html
- ${CMake_BINARY_DIR}/Docs/cmake.docbook
- ${CMake_BINARY_DIR}/Docs/cmake-policies.txt
- ${CMake_BINARY_DIR}/Docs/cmake-policies.html
- ${CMake_BINARY_DIR}/Docs/cmake-properties.txt
- ${CMake_BINARY_DIR}/Docs/cmake-properties.html
- ${CMake_BINARY_DIR}/Docs/cmake-variables.txt
- ${CMake_BINARY_DIR}/Docs/cmake-variables.html
- ${CMake_BINARY_DIR}/Docs/cmake-modules.txt
- ${CMake_BINARY_DIR}/Docs/cmake-modules.html
- ${CMake_BINARY_DIR}/Docs/cmake-commands.txt
- ${CMake_BINARY_DIR}/Docs/cmake-commands.html
- ${CMake_BINARY_DIR}/Docs/cmake-compatcommands.txt
- ${CMake_BINARY_DIR}/Docs/cmake-compatcommands.html )
+ ${BUILD_DOC_DIR}/cmake.txt
+ ${BUILD_DOC_DIR}/cmake.html
+ ${BUILD_DOC_DIR}/cmake.docbook
+ ${BUILD_DOC_DIR}/cmake-policies.txt
+ ${BUILD_DOC_DIR}/cmake-policies.html
+ ${BUILD_DOC_DIR}/cmake-properties.txt
+ ${BUILD_DOC_DIR}/cmake-properties.html
+ ${BUILD_DOC_DIR}/cmake-variables.txt
+ ${BUILD_DOC_DIR}/cmake-variables.html
+ ${BUILD_DOC_DIR}/cmake-modules.txt
+ ${BUILD_DOC_DIR}/cmake-modules.html
+ ${BUILD_DOC_DIR}/cmake-commands.txt
+ ${BUILD_DOC_DIR}/cmake-commands.html
+ ${BUILD_DOC_DIR}/cmake-compatcommands.txt
+ ${BUILD_DOC_DIR}/cmake-compatcommands.html )
# Drive documentation generation.
-ADD_CUSTOM_TARGET(documentation ALL DEPENDS ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/cmake.txt )
+ADD_CUSTOM_TARGET(documentation ALL DEPENDS ${DOC_FILES} ${BUILD_DOC_DIR}/cmake.txt )
Index: Source/QtDialog/CMakeSetupDialog.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.cxx,v
retrieving revision 1.66
diff -u -r1.66 CMakeSetupDialog.cxx
--- Source/QtDialog/CMakeSetupDialog.cxx 30 Oct 2009 19:02:25 -0000 1.66
+++ Source/QtDialog/CMakeSetupDialog.cxx 30 Oct 2009 20:03:54 -0000
@@ -11,6 +11,7 @@
============================================================================*/
#include "CMakeSetupDialog.h"
+
#include <QFileDialog>
#include <QProgressBar>
#include <QMessageBox>
@@ -25,14 +26,15 @@
#include <QDragEnterEvent>
#include <QMimeData>
#include <QUrl>
+#include <QDesktopServices>
#include <QShortcut>
-#include <QMacInstallDialog.h>
#include "QCMake.h"
#include "QCMakeCacheView.h"
#include "AddCacheEntry.h"
#include "FirstConfigure.h"
#include "cmVersion.h"
+#include "QMacInstallDialog.h"
QCMakeThread::QCMakeThread(QObject* p)
: QThread(p), CMakeInstance(NULL)
@@ -141,6 +143,14 @@
QObject::connect(a, SIGNAL(triggered(bool)),
this, SLOT(doHelp()));
+ a = HelpMenu->addAction(tr("CMake Help"));
+ QObject::connect(a, SIGNAL(triggered(bool)),
+ this, SLOT(openCMakeHelp()));
+
+ a = HelpMenu->addAction(tr("CPack Help"));
+ QObject::connect(a, SIGNAL(triggered(bool)),
+ this, SLOT(openCPackHelp()));
+
QShortcut* filterShortcut = new QShortcut(QKeySequence::Find, this);
QObject::connect(filterShortcut, SIGNAL(activated()),
this, SLOT(startSearch()));
@@ -1048,4 +1058,23 @@
this->CacheValues->setSearchFilter(str);
}
+void CMakeSetupDialog::openCMakeHelp()
+{
+ QDir cmDocDir(QApplication::applicationDirPath());
+ cmDocDir.cd(".." CMAKE_DOC_DIR); // out of /bin dir and into docs
+ QFileInfo f(cmDocDir, "cmake.html");
+ QString p = f.absoluteFilePath();
+ p = QString("file:///%1").arg(p);
+ QDesktopServices::openUrl(QUrl(p, QUrl::TolerantMode));
+}
+
+void CMakeSetupDialog::openCPackHelp()
+{
+ QDir cmDocDir(QApplication::applicationDirPath());
+ cmDocDir.cd(".." CMAKE_DOC_DIR); // out of /bin dir and into docs
+ QFileInfo f(cmDocDir, "cpack.html");
+ QString p = f.absoluteFilePath();
+ p = QString("file:///%1").arg(p);
+ QDesktopServices::openUrl(QUrl(p, QUrl::TolerantMode));
+}
Index: Source/QtDialog/CMakeSetupDialog.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.h,v
retrieving revision 1.32
diff -u -r1.32 CMakeSetupDialog.h
--- Source/QtDialog/CMakeSetupDialog.h 28 Sep 2009 15:43:17 -0000 1.32
+++ Source/QtDialog/CMakeSetupDialog.h 30 Oct 2009 20:03:54 -0000
@@ -74,6 +74,9 @@
void showUserChanges();
void setSearchFilter(const QString& str);
+ void openCMakeHelp();
+ void openCPackHelp();
+
protected:
enum State { Interrupting, ReadyConfigure, ReadyGenerate, Configuring, Generating };
|