Commit Graph

47 Commits

Author SHA1 Message Date
Stephen Kelly 5f210672da QtDialog: Fix Qt 5 build on non-Windows.
The Qt5Core_QTMAIN_LIBRARIES variable is defined to the Qt5::WinMain
target on Windows, and undefined elsewhere.
2014-03-19 15:38:02 +01:00
Stephen Kelly 61c60b239c QtDialog: Avoid linking to Qt4 WinMain when using Qt 5.
Override the QT_QTMAIN_LIBRARY cache variable with a regular
variable in the Qt 5 configuration. This avoids linking with the
Qt 4 version of the WinMain library.
2014-03-17 14:15:14 +01:00
Brad King 8ad8a9b1a6 cmake-gui: Reference LGPLv2.1 when redistributing Qt
Download http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt and place
it as Licenses/LGPLv2.1.txt in our source tree.  When building cmake-gui,
use option CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL to enable notification
in the "About" dialog of how the distribution of Qt is licensed.
Install the license file as ${CMAKE_ROOT}/Licenses/LGPLv2.1.txt so that
the dialog can display a path to it.
2013-11-21 11:04:24 -05:00
Brad King d592fc48cd Merge topic 'cmake-distribution-config'
06b0dbe OS X: Drop version number from CMake.app bundle name (#11693)
84af42b Configure NSIS-packaged CMake version and install destination
7655029 Configure NSIS-packaged CMake documentation link in Start Menu
2013-11-13 11:36:46 -05:00
Brad King 621ba1fd04 cmake-gui: Parse Copyright.txt instead of duplicating notice
Set the cmake-gui MACOSX_BUNDLE_COPYRIGHT property by parsing the
copyright notice line out of Copyright.txt instead of duplicating it.
2013-11-12 16:35:17 -05:00
Brad King 06b0dbe061 OS X: Drop version number from CMake.app bundle name (#11693)
Always name the application bundle "CMake.app".  Users can rename it
after installation if they wish.  This is the typical approach used by
OS X applications, including Xcode.  It allows CMake to be upgraded
without manually re-running CMake in every build tree to update the path
to CMake.  It also makes the executable location in the CMake build tree
more predicatable.
2013-11-12 15:47:06 -05:00
Brad King d1526f825e Refactor internal resource location APIs and initialization
Rename cmSystemTools::FindExecutableDirectory to FindCMakeResources.
Teach it to compute the locations of cmake, ctest, cpack, ccmake, and
cmake-gui executables, and the location of CMAKE_ROOT.  Provide this
information from static cmSystemTools::Get<resource>() methods.
Refactor code that needs these locations to use the new APIs.

Teach FindCMakeResources to use the OS X system API to lookup the
executable location.  When running from the CMake build tree itself,
leave a file in the tree that FindCMakeResources can use to read the
location of the source tree.  This avoids the need to compile the source
tree location into a binary that may be installed and used without the
source tree.

Teach the QtDialog on OS X to create a "cmake-gui" symlink in the build
tree next to "cmake" and the other tools, as is already done in the
install tree for the application bundle.  This ensures a consistent set
of executables are available in one directory.
2013-11-12 08:23:35 -05:00
Brad King dcf1b64569 OS X: Set CMake.app bundle Info.plist fields (#11694)
Use the Apple Info.plist reference documentation:

 Core Foundation Keys
 https://developer.apple.com/library/mac/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html

 Launch Services Keys
 https://developer.apple.com/library/mac/documentation/general/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html

 Cocoa Keys
 https://developer.apple.com/library/mac/documentation/general/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html

modify the Info.plist we create for cmake-gui to add/set fields

 CFBundleShortVersionString = The release-version-number string
 LSApplicationCategoryType  = UTI that categorizes the app for the App Store
 NSHumanReadableCopyright   = Specifies the copyright notice

and drop fields

 CFBundleGetInfoString
 CFBundleLongVersionString
 LSRequiresCarbon

Also prepare to set

 CFBundleVersion            = The build-version-number string

but leave it commented out as TBD (To Be Determined) for now.

The version fields must have form <major>.<minor>.<patch> with integer
components.  While at it, rename the bundle to end in ".<patch>" instead
of "-<patch>" so that it is consistent with the version number and does
not look like a packaging increment suffix.
2013-10-08 12:32:28 -04:00
Brad King 8120e13f40 cmake-gui: Fix build rules for Qt5 on Windows
Set policy CMP0020 to NEW to get WinMain from Qt.  Fix the documentation
custom command PATH for cmake-gui to find the Qt5 DLLs.
2013-08-07 09:59:33 -04:00
Stephen Kelly 5144f6fb11 cmake-gui: Use -fPIE if required by Qt. 2013-03-12 18:41:15 -04:00
Stephen Kelly 92b6d85519 Enable deprecated API when using Qt 5.
The QAbstractItemModel::reset() method is deprecated in Qt 5, and
therefore not part of the API by default (on non-Windows).

The replacement for it is beginResetModel/endResetModel which are
available from Qt 4.6 onwards.

The minimum version of Qt required is currently 4.4, so enable the
deprecated API instead of changing that.
2012-09-23 20:13:06 +02:00
Stephen Kelly 25a4f56754 Build with Qt5 if it is found. 2012-08-22 12:58:43 +02:00
Stephen Kelly 066e85893f Replace two include_directories with a setting. 2012-08-21 13:36:26 +02:00
Stephen Kelly 32a572564a Remove an if which is always true.
CMake based CMake build requires version 2.8.2 as of version 2.8.9.
2012-08-21 13:36:26 +02:00
Stephen Kelly 0b6625c605 Move variable setting down to where it relates to. 2012-08-21 13:36:26 +02:00
Stephen Kelly 8ab312b693 Use CMake platform variables instead of Qt ones.
The Qt ones no longer exist in Qt 5.
2012-08-21 13:36:21 +02:00
Stephen Kelly bd728f6fee Add a return-after-error if an old Qt is found.
No need for an else after a return.
2012-08-21 11:08:04 +02:00
Kitware Robot 9db3116226 Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot 77543bde41 Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:

cmake --help-command-list |
grep -v "cmake version" |
while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Nicolas Despres aff0029ee3 Ensure 3rd party libraries are writable.
This patch fixes CMake.Install when Qt4 is installed read-only by packaging
system like Homebrew.
2012-07-17 14:03:05 +02:00
Clinton Stimpson 131eed6607 cmake-gui: Improve interrupt granularity to fix bug 12649.
Instead of enabling interrupt only when a progress or message callback is called, add a new callback specifically for
interrupt.  This new callback is called from GetFatalErrorOccured() so cmake-gui can immediately report interrupt status
instead of calling queuing a call to cmSystemTools::SetFatalErrorOccured() and waiting for the progress or message
callback to be called to process that queued call.
2012-01-02 11:07:43 -07:00
Clinton Stimpson 249a9bb44d cmake-gui: use BundleUtilities in place of custom script.
BundleUtilities is better supported and allows including
shared Qt libs on other platforms.  Also removed limitation
of static Qt for windows build of cmake-gui.
2010-10-14 13:58:43 -06:00
Clinton Stimpson 691d8784a7 BUG: Fix bug #9894. Make higher resolution CMake icon available as an application icon. On Mac, the higher resolution one is used in the dock. 2009-12-11 00:35:33 -05:00
Brad King 96afb12087 Convert CMake to OSI-approved BSD License
This converts the CMake license to a pure 3-clause OSI-approved BSD
License.  We drop the previous license clause requiring modified
versions to be plainly marked.  We also update the CMake copyright to
cover the full development time range.
2009-09-28 11:43:28 -04:00
Brad King 36bb624907 Fix installation when built by CMake 2.4
CMake 2.4 generates old-style cmake_install.cmake code including calls
to the file(INSTALL) command with the COMPONENTS argument.  We need to
set CMAKE_INSTALL_SELF_2_4 for the whole install tree to prevent the
command from complaining in this special case.  Previously this was
needed only in the QtDialog directory, but now it is needed in the
entire tree.
2009-07-31 08:27:36 -04:00
Bill Hoffman f24e8e9d2a ENH: take cmake-gui out of beta 2009-02-13 16:28:10 -05:00
Brad King 86aeefc7c9 COMP: Fix installation of cmake-gui by CMake 2.4
When CMake 2.4 generates the build tree for CMake itself it asks the
built CMake to install itself using the rules that 2.4 generated.  Since
the install rules use undocumented commands that are not compatible from
2.4 to 2.6 we need a special case to avoid failure.  This sets a special
indicator variable in the install rules that enables a compatibility
hack to support the old install rule format.
2009-01-05 11:05:57 -05:00
Clinton Stimpson 64b377d707 ENH:
For bug #7191.
Improvements to the dialog that sets up the first configure.
Fixing the large size of it by breaking it up into a wizard.
Also incorporated suggestions from bug report.
2008-12-16 15:00:17 -05:00
Clinton Stimpson f8f4140b6c ENH: Add cross compiling support in the GUI in the same dialog that prompts for
the generator on the first configure.  It either ask for a toolchain file
      or asks for all the information a toolchain file might contain.

      Also added option for setting non-default compilers if not cross compiling.
      Fixes #6849.

      Also a bit of code cleanup and re-organizing.
2008-05-15 19:21:01 -04:00
Bill Hoffman fb62f79163 ENH: make sure cmake-gui builds with cmake 2.4.X 2008-04-08 11:30:47 -04:00
Bill Hoffman 45ce11a075 ENH: install the mac application bundle into /Applications directly with no enclosing folder 2008-04-04 16:02:50 -04:00
Bill Hoffman b125a2ae7b ENH: add KDE desktop stuff 2008-03-11 17:27:41 -04:00
Bill Hoffman ee2a13b11f ENH: install working with symlink qt tool 2008-02-19 14:26:20 -05:00
Bill Hoffman 4a9517a688 ENH: add mac install symlink option to dialog 2008-02-19 14:06:10 -05:00
Bill Hoffman ef537ffec7 ENH: have cpack work with DESTDIR install and ingest qt framework libs into cmake-gui 2008-02-18 10:26:28 -05:00
Bill Hoffman 22927ede1e ENH: support for cpack and install of cmake-gui as mac app bundle 2008-02-16 13:05:03 -05:00
Bill Hoffman b558f12bfa ENH: do not expand regular vars here 2008-02-12 17:22:55 -05:00
Bill Hoffman f6014938cb ENH: make it so cmake-gui only installs if qt is static on windows 2008-02-09 09:53:52 -05:00
Bill Hoffman 9afb2100c1 ENH: for windows only allow a static qt for install and NSIS of cmake-gui 2008-02-07 11:43:20 -05:00
Bill Hoffman 0c3607eafc ENH: change name of qt-dialog 2008-02-06 09:17:03 -05:00
Clinton Stimpson 0fcf365137 ENH: Add install command for executable. 2007-11-19 14:08:57 -05:00
Clinton Stimpson a81896eaed ENH: Add ability to add cache entries (even before first configure). 2007-11-12 23:54:49 -05:00
Clinton Stimpson 96e11b3f90 ENH: Allow build with Qt 4.2.
4.3 dependence fell out when errors go to output
      window instead of message box blocking cmake thread.
2007-11-12 13:54:29 -05:00
Clinton Stimpson 00cfa0ebed ENH: For Mac OSX -- add app icon, and implement find of cmake executable. 2007-11-06 23:00:23 -05:00
Clinton Stimpson 77ad85a6ab ENH: Add interrupt button near progress bar.
Implement help button.
      Implement cancel button.
      Add scrollable output window.
      Replace ON/OFF & combobox editors with checkboxes.
      Tab/backtab in cache table jumps between values (not names and values)
      Add tooltips to show help strings.
      Add application icon and qtmain for Windows.

BUG:  Fix save of cache values on configure.
2007-11-03 10:30:52 -04:00
Clinton Stimpson 5927a261d0 COMP: Fix build on Windows. 2007-11-02 14:12:54 -04:00
Clinton Stimpson 800cbd0550 ENH: Beginnings of a Qt UI for CMake. 2007-11-02 11:50:17 -04:00