<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[133527] trunk/dports/devel/cmake</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/133527">133527</a></dd>
<dt>Author</dt> <dd>michaelld@macports.org</dd>
<dt>Date</dt> <dd>2015-03-04 07:33:09 -0800 (Wed, 04 Mar 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>cmake:
+ fix +gui variant, per ticket #46902;
+ when +gui, add +qt4 and +qt5 options;
+ add patches for each +qt# variant, which looks for just that version of Qt and issues a fatal error if not found.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsdevelcmakePortfile">trunk/dports/devel/cmake/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportsdevelcmakefilespatchqt4guidiff">trunk/dports/devel/cmake/files/patch-qt4gui.diff</a></li>
<li><a href="#trunkdportsdevelcmakefilespatchqt5guidiff">trunk/dports/devel/cmake/files/patch-qt5gui.diff</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkdportsdevelcmakefilespatchCMakeListstxtdiff">trunk/dports/devel/cmake/files/patch-CMakeLists.txt.diff</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsdevelcmakePortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/devel/cmake/Portfile (133526 => 133527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/cmake/Portfile        2015-03-04 14:54:47 UTC (rev 133526)
+++ trunk/dports/devel/cmake/Portfile        2015-03-04 15:33:09 UTC (rev 133527)
</span><span class="lines">@@ -118,12 +118,36 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-variant gui description {Qt4 based cmake-gui} {
-    PortGroup qt4 1.0
-    patchfiles-append patch-CMakeLists.txt.diff
-    configure.args-append --qt-gui --qt-qmake=${qt_qmake_cmd}
</del><ins>+variant gui description {Build Qt-based cmake-gui} {
+    configure.args-append --qt-gui
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+if {[variant_isset gui]} {
+
+    variant qt4 conflicts qt5 description {Build Qt GUI using Qt4} {
+        PortGroup qt4 1.0
+        patchfiles-append patch-qt4gui.diff
+        configure.args-append --qt-qmake=${qt_qmake_cmd}
+    }
+
+    variant qt5 conflicts qt4 description {Build Qt GUI using Qt5} {
+        PortGroup qt5 1.0
+        patchfiles-append patch-qt5gui.diff
+        configure.args-append --qt-qmake=${qt_qmake_cmd}
+    }
+
+    if {![variant_isset qt4] &amp;&amp; ![variant_isset qt5]} {
+        default_variants +qt4
+    }
+
+    if {![variant_isset qt4] &amp;&amp; ![variant_isset qt5]} {
+        ui_error &quot;\n\nYou must select either the +qt4 or +qt5 variant when building the GUI.\n&quot;
+        return -code error &quot;Invalid variant selection&quot;
+    }
+} else {
+    configure.args-append --no-qt-gui
+}
+
</ins><span class="cx"> variant docs description {Build documentation: HTML and manpages} {
</span><span class="cx">     configure.args-append \
</span><span class="cx">         --mandir=share/man \
</span></span></pre></div>
<a id="trunkdportsdevelcmakefilespatchCMakeListstxtdiff"></a>
<div class="delfile"><h4>Deleted: trunk/dports/devel/cmake/files/patch-CMakeLists.txt.diff (133526 => 133527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/cmake/files/patch-CMakeLists.txt.diff        2015-03-04 14:54:47 UTC (rev 133526)
+++ trunk/dports/devel/cmake/files/patch-CMakeLists.txt.diff        2015-03-04 15:33:09 UTC (rev 133527)
</span><span class="lines">@@ -1,56 +0,0 @@
</span><del>---- CMakeLists.txt.orig
-+++ CMakeLists.txt
-@@ -476,7 +476,7 @@ if(BUILD_CursesDialog)
- endif()

- if(BUILD_QtDialog)
--  if(APPLE)
-+  if(FALSE)
-     set(CMAKE_BUNDLE_VERSION
-       &quot;${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}&quot;)
-     set(CMAKE_BUNDLE_LOCATION &quot;${CMAKE_INSTALL_PREFIX}&quot;)
---- Source/QtDialog/CMakeLists.txt
-+++ Source/QtDialog/CMakeLists.txt
-@@ -99,7 +99,7 @@ set(SRCS ${SRCS} ${UI_SRCS} ${MOC_SRCS} ${RC_SRCS})
- if(WIN32)
-   set(SRCS ${SRCS} CMakeSetup.rc)
- endif()
--if(APPLE)
-+if(FALSE)
-   set(SRCS ${SRCS} CMakeSetup.icns)
-   set(MACOSX_BUNDLE_ICON_FILE CMakeSetup.icns)
-   set_source_files_properties(CMakeSetup.icns PROPERTIES
-@@ -115,13 +115,13 @@ endif()

- set(CMAKE_INCLUDE_CURRENT_DIR ON)

--add_executable(cmake-gui WIN32 MACOSX_BUNDLE ${SRCS})
-+add_executable(cmake-gui WIN32 ${SRCS})
- target_link_libraries(cmake-gui CMakeLib ${QT_QTMAIN_LIBRARY} ${CMake_QT_LIBRARIES})
- if(Qt_BIN_DIR)
-   set_property(TARGET cmake-gui PROPERTY Qt_BIN_DIR ${Qt_BIN_DIR})
- endif()

--if(APPLE)
-+if(FALSE)
-   file(STRINGS &quot;${CMake_SOURCE_DIR}/Copyright.txt&quot; copyright_line
-     LIMIT_COUNT 1 REGEX &quot;^Copyright 2000-20[0-9][0-9] Kitware&quot;)

-@@ -153,7 +153,7 @@ if(UNIX)
-   install(FILES cmakecache.xml DESTINATION share/mime/packages )
- endif()

--if(APPLE)
-+if(FALSE)
-   set(CMAKE_POSTFLIGHT_SCRIPT
-     &quot;${CMake_BINARY_DIR}/Source/QtDialog/postflight.sh&quot;)
-   set(CMAKE_POSTUPGRADE_SCRIPT
-@@ -166,7 +166,7 @@ if(APPLE)
-                 WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)&quot;)
- endif()

--if(APPLE OR WIN32)
-+if(WIN32)
-   # install rules for including 3rd party libs such as Qt
-   # if a system Qt is used (e.g. installed in /usr/lib/), it will not be included in the installation
-   set(fixup_exe &quot;\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/cmake-gui${CMAKE_EXECUTABLE_SUFFIX}&quot;)
</del></span></pre></div>
<a id="trunkdportsdevelcmakefilespatchqt4guidiff"></a>
<div class="addfile"><h4>Added: trunk/dports/devel/cmake/files/patch-qt4gui.diff (0 => 133527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/cmake/files/patch-qt4gui.diff                                (rev 0)
+++ trunk/dports/devel/cmake/files/patch-qt4gui.diff        2015-03-04 15:33:09 UTC (rev 133527)
</span><span class="lines">@@ -0,0 +1,132 @@
</span><ins>+--- Source/QtDialog/CMakeLists.txt.orig
++++ Source/QtDialog/CMakeLists.txt
+@@ -14,58 +14,6 @@ project(QtDialog)
+ if(POLICY CMP0020)
+   cmake_policy(SET CMP0020 NEW) # Drop when CMake &gt;= 2.8.11 required
+ endif()
+-find_package(Qt5Widgets QUIET)
+-if (Qt5Widgets_FOUND)
+-  include_directories(${Qt5Widgets_INCLUDE_DIRS})
+-  add_definitions(${Qt5Widgets_DEFINITONS})
+-  macro(qt4_wrap_ui)
+-    qt5_wrap_ui(${ARGN})
+-  endmacro()
+-  macro(qt4_wrap_cpp)
+-    qt5_wrap_cpp(${ARGN})
+-  endmacro()
+-  macro(qt4_add_resources)
+-    qt5_add_resources(${ARGN})
+-  endmacro()
+-  set(CMake_QT_LIBRARIES ${Qt5Widgets_LIBRARIES})
+-  set(QT_QTMAIN_LIBRARY ${Qt5Core_QTMAIN_LIBRARIES})
+-
+-  # Remove this when the minimum version of Qt is 4.6.
+-  add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0)
+-
+-  set(CMAKE_CXX_FLAGS &quot;${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}&quot;)
+-
+-  # We need to install Cocoa platform plugin and add qt.conf for Qt5 on Mac.
+-  # FIXME: This should be part of Qt5 CMake scripts, but unfortunatelly
+-  # Qt5 Mac support is missing there.
+-  if(APPLE)
+-    macro(install_qt5_plugin _qt_plugin_name _qt_plugins_var)
+-      get_target_property(_qt_plugin_path &quot;${_qt_plugin_name}&quot; LOCATION)
+-      if(EXISTS &quot;${_qt_plugin_path}&quot;)
+-        get_filename_component(_qt_plugin_file &quot;${_qt_plugin_path}&quot; NAME)
+-        get_filename_component(_qt_plugin_type &quot;${_qt_plugin_path}&quot; PATH)
+-        get_filename_component(_qt_plugin_type &quot;${_qt_plugin_type}&quot; NAME)
+-        set(_qt_plugin_dest &quot;${CMAKE_INSTALL_PREFIX}/PlugIns/${_qt_plugin_type}&quot;)
+-        install(FILES &quot;${_qt_plugin_path}&quot;
+-          DESTINATION &quot;${_qt_plugin_dest}&quot;)
+-        set(${_qt_plugins_var}
+-          &quot;${${_qt_plugins_var}};${_qt_plugin_dest}/${_qt_plugin_file}&quot;)
+-      else()
+-        message(FATAL_ERROR &quot;QT plugin ${_qt_plugin_name} not found&quot;)
+-      endif()
+-    endmacro()
+-    install_qt5_plugin(&quot;Qt5::QCocoaIntegrationPlugin&quot; QT_PLUGINS)
+-    file(WRITE &quot;${CMAKE_CURRENT_BINARY_DIR}/qt.conf&quot;
+-      &quot;[Paths]\nPlugins = PlugIns\n&quot;)
+-    install(FILES &quot;${CMAKE_CURRENT_BINARY_DIR}/qt.conf&quot;
+-      DESTINATION &quot;${CMAKE_INSTALL_PREFIX}/Resources&quot;)
+-  endif()
+-
+-  if(WIN32 AND TARGET Qt5::Core)
+-    get_property(_Qt5_Core_LOCATION TARGET Qt5::Core PROPERTY LOCATION)
+-    get_filename_component(Qt_BIN_DIR &quot;${_Qt5_Core_LOCATION}&quot; PATH)
+-  endif()
+-else()
+   set(QT_MIN_VERSION &quot;4.4.0&quot;)
+   find_package(Qt4 REQUIRED)
+   if(NOT QT4_FOUND)
+@@ -83,7 +31,6 @@ else()
+       set(Qt_BIN_DIR ${_Qt_BIN_DIR})
+     endif()
+   endif()
+-endif()

+ set(SRCS
+   AddCacheEntry.cxx
+@@ -125,7 +72,7 @@ set(SRCS ${SRCS} ${UI_SRCS} ${MOC_SRCS} ${RC_SRCS})
+ if(WIN32)
+   set(SRCS ${SRCS} CMakeSetup.rc)
+ endif()
+-if(APPLE)
++if(APPLEBUNDLE)
+   set(SRCS ${SRCS} CMakeSetup.icns)
+   set(MACOSX_BUNDLE_ICON_FILE CMakeSetup.icns)
+   set_source_files_properties(CMakeSetup.icns PROPERTIES
+@@ -141,13 +88,13 @@ endif()

+ set(CMAKE_INCLUDE_CURRENT_DIR ON)

+-add_executable(cmake-gui WIN32 MACOSX_BUNDLE ${SRCS})
++add_executable(cmake-gui WIN32 ${SRCS})
+ target_link_libraries(cmake-gui CMakeLib ${QT_QTMAIN_LIBRARY} ${CMake_QT_LIBRARIES})
+ if(Qt_BIN_DIR)
+   set_property(TARGET cmake-gui PROPERTY Qt_BIN_DIR ${Qt_BIN_DIR})
+ endif()

+-if(APPLE)
++if(APPLEBUNDLE)
+   file(STRINGS &quot;${CMake_SOURCE_DIR}/Copyright.txt&quot; copyright_line
+     LIMIT_COUNT 1 REGEX &quot;^Copyright 2000-20[0-9][0-9] Kitware&quot;)

+@@ -179,16 +126,16 @@ if(UNIX)
+   install(FILES cmakecache.xml DESTINATION share/mime/packages )
+ endif()

+-if(APPLE)
++if(APPLEBUNDLE)
+   install(CODE &quot;execute_process(COMMAND ln -s \&quot;../MacOS/CMake\&quot; cmake-gui
+                 WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)&quot;)
+ endif()

+-if(APPLE OR WIN32)
++if(APPLEBUNDLE OR WIN32)
+   # install rules for including 3rd party libs such as Qt
+   # if a system Qt is used (e.g. installed in /usr/lib/), it will not be included in the installation
+   set(fixup_exe &quot;\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/cmake-gui${CMAKE_EXECUTABLE_SUFFIX}&quot;)
+-  if(APPLE)
++  if(APPLEBUNDLE)
+     set(fixup_exe &quot;\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/CMake&quot;)
+   endif()
+   install(CODE &quot;
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -505,15 +505,6 @@
+       set(CMAKE_BUNDLE_VERSION
+         &quot;${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}&quot;)
+       set(CMAKE_BUNDLE_LOCATION &quot;${CMAKE_INSTALL_PREFIX}&quot;)
+-      # make sure CMAKE_INSTALL_PREFIX ends in /
+-      string(LENGTH &quot;${CMAKE_INSTALL_PREFIX}&quot; LEN)
+-      math(EXPR LEN &quot;${LEN} -1&quot; )
+-      string(SUBSTRING &quot;${CMAKE_INSTALL_PREFIX}&quot; ${LEN} 1 ENDCH)
+-      if(NOT &quot;${ENDCH}&quot; STREQUAL &quot;/&quot;)
+-        set(CMAKE_INSTALL_PREFIX &quot;${CMAKE_INSTALL_PREFIX}/&quot;)
+-      endif()
+-      set(CMAKE_INSTALL_PREFIX
+-        &quot;${CMAKE_INSTALL_PREFIX}CMake.app/Contents&quot;)
+     endif()

+     set(QT_NEED_RPATH FALSE)
</ins></span></pre></div>
<a id="trunkdportsdevelcmakefilespatchqt5guidiff"></a>
<div class="addfile"><h4>Added: trunk/dports/devel/cmake/files/patch-qt5gui.diff (0 => 133527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/cmake/files/patch-qt5gui.diff                                (rev 0)
+++ trunk/dports/devel/cmake/files/patch-qt5gui.diff        2015-03-04 15:33:09 UTC (rev 133527)
</span><span class="lines">@@ -0,0 +1,103 @@
</span><ins>+--- Source/QtDialog/CMakeLists.txt.orig
++++ Source/QtDialog/CMakeLists.txt
+@@ -15,7 +15,10 @@ if(POLICY CMP0020)
+   cmake_policy(SET CMP0020 NEW) # Drop when CMake &gt;= 2.8.11 required
+ endif()
+ find_package(Qt5Widgets QUIET)
+-if (Qt5Widgets_FOUND)
++if (NOT Qt5Widgets_FOUND)
++  message(FATAL_ERROR &quot;Qt5 required but not found&quot;)
++endif()
++
+   include_directories(${Qt5Widgets_INCLUDE_DIRS})
+   add_definitions(${Qt5Widgets_DEFINITONS})
+   macro(qt4_wrap_ui)
+@@ -65,25 +68,6 @@ if (Qt5Widgets_FOUND)
+     get_property(_Qt5_Core_LOCATION TARGET Qt5::Core PROPERTY LOCATION)
+     get_filename_component(Qt_BIN_DIR &quot;${_Qt5_Core_LOCATION}&quot; PATH)
+   endif()
+-else()
+-  set(QT_MIN_VERSION &quot;4.4.0&quot;)
+-  find_package(Qt4 REQUIRED)
+-  if(NOT QT4_FOUND)
+-    message(SEND_ERROR &quot;Failed to find Qt 4.4 or greater.&quot;)
+-    return()
+-  endif()
+-
+-  include(${QT_USE_FILE})
+-
+-  set(CMake_QT_LIBRARIES ${QT_LIBRARIES})
+-
+-  if(WIN32 AND EXISTS &quot;${QT_QMAKE_EXECUTABLE}&quot;)
+-    get_filename_component(_Qt_BIN_DIR &quot;${QT_QMAKE_EXECUTABLE}&quot; PATH)
+-    if(EXISTS &quot;${_Qt_BIN_DIR}/QtCore4.dll&quot;)
+-      set(Qt_BIN_DIR ${_Qt_BIN_DIR})
+-    endif()
+-  endif()
+-endif()

+ set(SRCS
+   AddCacheEntry.cxx
+@@ -125,7 +72,7 @@
+ if(WIN32)
+   set(SRCS ${SRCS} CMakeSetup.rc)
+ endif()
+-if(APPLE)
++if(APPLEBUNDLE)
+   set(SRCS ${SRCS} CMakeSetup.icns)
+   set(MACOSX_BUNDLE_ICON_FILE CMakeSetup.icns)
+   set_source_files_properties(CMakeSetup.icns PROPERTIES
+@@ -141,13 +88,13 @@ endif()

+ set(CMAKE_INCLUDE_CURRENT_DIR ON)

+-add_executable(cmake-gui WIN32 MACOSX_BUNDLE ${SRCS})
++add_executable(cmake-gui WIN32 ${SRCS})
+ target_link_libraries(cmake-gui CMakeLib ${QT_QTMAIN_LIBRARY} ${CMake_QT_LIBRARIES})
+ if(Qt_BIN_DIR)
+   set_property(TARGET cmake-gui PROPERTY Qt_BIN_DIR ${Qt_BIN_DIR})
+ endif()

+-if(APPLE)
++if(APPLEBUNDLE)
+   file(STRINGS &quot;${CMake_SOURCE_DIR}/Copyright.txt&quot; copyright_line
+     LIMIT_COUNT 1 REGEX &quot;^Copyright 2000-20[0-9][0-9] Kitware&quot;)

+@@ -179,16 +126,16 @@
+   install(FILES cmakecache.xml DESTINATION share/mime/packages )
+ endif()

+-if(APPLE)
++if(APPLEBUNDLE)
+   install(CODE &quot;execute_process(COMMAND ln -s \&quot;../MacOS/CMake\&quot; cmake-gui
+                 WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)&quot;)
+ endif()

+-if(APPLE OR WIN32)
++if(APPLEBUNDLE OR WIN32)
+   # install rules for including 3rd party libs such as Qt
+   # if a system Qt is used (e.g. installed in /usr/lib/), it will not be included in the installation
+   set(fixup_exe &quot;\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/cmake-gui${CMAKE_EXECUTABLE_SUFFIX}&quot;)
+-  if(APPLE)
++  if(APPLEBUNDLE)
+     set(fixup_exe &quot;\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/CMake&quot;)
+   endif()
+   install(CODE &quot;
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -505,15 +505,6 @@
+       set(CMAKE_BUNDLE_VERSION
+         &quot;${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}&quot;)
+       set(CMAKE_BUNDLE_LOCATION &quot;${CMAKE_INSTALL_PREFIX}&quot;)
+-      # make sure CMAKE_INSTALL_PREFIX ends in /
+-      string(LENGTH &quot;${CMAKE_INSTALL_PREFIX}&quot; LEN)
+-      math(EXPR LEN &quot;${LEN} -1&quot; )
+-      string(SUBSTRING &quot;${CMAKE_INSTALL_PREFIX}&quot; ${LEN} 1 ENDCH)
+-      if(NOT &quot;${ENDCH}&quot; STREQUAL &quot;/&quot;)
+-        set(CMAKE_INSTALL_PREFIX &quot;${CMAKE_INSTALL_PREFIX}/&quot;)
+-      endif()
+-      set(CMAKE_INSTALL_PREFIX
+-        &quot;${CMAKE_INSTALL_PREFIX}CMake.app/Contents&quot;)
+     endif()

+     set(QT_NEED_RPATH FALSE)
</ins></span></pre>
</div>
</div>

</body>
</html>