[138700] trunk/dports/devel/cmake
michaelld at macports.org
michaelld at macports.org
Thu Jul 16 11:59:54 PDT 2015
Revision: 138700
https://trac.macports.org/changeset/138700
Author: michaelld at macports.org
Date: 2015-07-16 11:59:54 -0700 (Thu, 16 Jul 2015)
Log Message:
-----------
cmake:
+ update devel to 20150713 (g413a13);
+ when building with +gui, which uses Qt[45] and c++11, use an appropriate compiler for the selected stdlib that is c++11 compliant; see also < https://bugreports.qt.io/browse/QTBUG-28097 >;
+ redo conditional variants to use "required" keyword such that they are always visible;
+ fix Qt4 GUI patches for release and devel versions;
+ if +gui and +docs and +python27, also build the Qt-based help docs.
Modified Paths:
--------------
trunk/dports/devel/cmake/Portfile
Added Paths:
-----------
trunk/dports/devel/cmake/files/patch-qt4gui.devel.diff
trunk/dports/devel/cmake/files/patch-qt4gui.release.diff
Removed Paths:
-------------
trunk/dports/devel/cmake/files/patch-qt4gui.diff
Modified: trunk/dports/devel/cmake/Portfile
===================================================================
--- trunk/dports/devel/cmake/Portfile 2015-07-16 16:53:02 UTC (rev 138699)
+++ trunk/dports/devel/cmake/Portfile 2015-07-16 18:59:54 UTC (rev 138700)
@@ -47,12 +47,12 @@
} else {
# devel
- version 20150705
+ version 20150715
set dist_branch 3.3
- set dist_date 20150629
- set dist_hash g5fdda
- checksums rmd160 d84fa304f4f1a9d450b220bd3bd38206acb50a2a \
- sha256 21db430677a43fa00d94d5064ad474962a79f4f68c7a9584e40de6b359601346
+ set dist_date 20150713
+ set dist_hash g413a13
+ checksums rmd160 9d78c31b41609b8883d01bab71869c098f965f02 \
+ sha256 f484e94ee206391ba46d56e3d217fa151397ca6796864750a6a31d7f8393561c
master_sites http://www.cmake.org/files/dev/
distname ${name}-${dist_branch}.${dist_date}-${dist_hash}
@@ -170,28 +170,61 @@
variant gui description {Build Qt-based cmake-gui} {
configure.args-append --qt-gui
-}
-if {[variant_isset gui]} {
+ # when building the GUI with Qt, CMake uses C++11. So, make sure
+ # the compiler used is c++11 compliant.
+
+ if {${configure.cxx_stdlib} eq "libstdc++"} {
- 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}
+ # *clang* when using libstdc++ do not seem to support C++11;
+ # C++11 support seems to need GCC 4.7+ when using libstdc++;
+ # could use C++0x support on GCC4.[56], but just ignore it since
+ # there are newer compilers already in place as defaults.
+
+ # Blacklist GCC compilers not supporting C++11 and all CLANG.
+ # This is probably not necessary, but it's good practice.
+
+ compiler.blacklist-append *clang* {*gcc-3*} {*gcc-4.[0-6]}
+
+ # and whitelist those we do want to use. wish there were a better way.
+ # these will be used in the order provided.
+
+ compiler.whitelist macports-gcc-4.9 macports-gcc-4.8 macports-gcc-4.7
+
+ } else {
+
+ # using libc++;
+ # Blacklist Clang not supporting C++11 in some form and all GCC.
+ # Just use the cxx11 PortGroup for this specific case.
+
+ PortGroup cxx11 1.0
+
}
+}
- 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}
+variant qt4 conflicts qt5 requires gui description {Build Qt GUI using Qt4} {
+ PortGroup qt4 1.0
+ if {${subport} eq ${name}} {
+ patchfiles-append patch-qt4gui.release.diff
+ } else {
+ patchfiles-append patch-qt4gui.devel.diff
}
+ configure.args-append --qt-qmake=${qt_qmake_cmd}
+}
+variant qt5 conflicts qt4 requires gui 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 gui]} {
if {![variant_isset qt4] && ![variant_isset qt5]} {
default_variants +qt4
}
if {![variant_isset qt4] && ![variant_isset qt5]} {
- ui_error "\n\nYou must select either the +qt4 or +qt5 variant when building the GUI.\n"
+ ui_error "\n\nYou must select either the +qt4 or +qt5 variant when using variant +gui.\n"
return -code error "Invalid variant selection"
}
} else {
@@ -205,26 +238,34 @@
--sphinx-html
}
-if {[variant_isset docs]} {
+variant python27 conflicts python34 requires docs description {Build documentation using Sphinx from Python 2.7} {
+ depends_build-append port:py27-sphinx
+ configure.args-append \
+ --sphinx-build=${prefix}/bin/sphinx-build-2.7
+}
- variant python27 conflicts python34 description {Build documentation using Sphinx from Python 2.7} {
- depends_build-append port:py27-sphinx
- configure.args-append \
- --sphinx-build=${prefix}/bin/sphinx-build-2.7
- }
+variant python34 conflicts python27 requires docs description {Build documentation using Sphinx from Python 3.4} {
+ depends_build-append port:py34-sphinx
+ configure.args-append \
+ --sphinx-build=${prefix}/bin/sphinx-build-3.4
+}
- variant python34 conflicts python27 description {Build documentation using Sphinx from Python 3.4} {
- depends_build-append port:py34-sphinx
+if {[variant_isset gui] && [variant_isset docs]} {
+ # Qt help docs seem to work only with Python 2.7
+ # as of 3.2.3 and 20150715.
+ if {[variant_isset python27]} {
configure.args-append \
- --sphinx-build=${prefix}/bin/sphinx-build-3.4
+ --sphinx-qthelp
}
+}
+if {[variant_isset docs]} {
if {![variant_isset python27] && ![variant_isset python34]} {
default_variants +python27
}
if {![variant_isset python27] && ![variant_isset python34]} {
- ui_error "\n\nYou must select either the +python27 or +python34 variant when building docs.\n"
+ ui_error "\n\nYou must select either the +python27 or +python34 variant when using variant +docs.\n"
return -code error "Invalid variant selection"
}
}
Copied: trunk/dports/devel/cmake/files/patch-qt4gui.devel.diff (from rev 138678, trunk/dports/devel/cmake/files/patch-qt4gui.diff)
===================================================================
--- trunk/dports/devel/cmake/files/patch-qt4gui.devel.diff (rev 0)
+++ trunk/dports/devel/cmake/files/patch-qt4gui.devel.diff 2015-07-16 18:59:54 UTC (rev 138700)
@@ -0,0 +1,133 @@
+--- Source/QtDialog/CMakeLists.txt.orig
++++ Source/QtDialog/CMakeLists.txt
+@@ -15,60 +15,6 @@
+ cmake_policy(SET CMP0020 NEW) # Drop when CMake >= 2.8.11 required
+ endif()
+ CMake_OPTIONAL_COMPONENT(cmake-gui)
+-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 "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
+-
+- # 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 "${_qt_plugin_name}" LOCATION)
+- if(EXISTS "${_qt_plugin_path}")
+- get_filename_component(_qt_plugin_file "${_qt_plugin_path}" NAME)
+- get_filename_component(_qt_plugin_type "${_qt_plugin_path}" PATH)
+- get_filename_component(_qt_plugin_type "${_qt_plugin_type}" NAME)
+- set(_qt_plugin_dest "PlugIns/${_qt_plugin_type}")
+- install(FILES "${_qt_plugin_path}"
+- DESTINATION "${_qt_plugin_dest}"
+- ${COMPONENT})
+- set(${_qt_plugins_var}
+- "${${_qt_plugins_var}};\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${_qt_plugin_dest}/${_qt_plugin_file}")
+- else()
+- message(FATAL_ERROR "QT plugin ${_qt_plugin_name} not found")
+- endif()
+- endmacro()
+- install_qt5_plugin("Qt5::QCocoaIntegrationPlugin" QT_PLUGINS)
+- file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
+- "[Paths]\nPlugins = PlugIns\n")
+- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
+- DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources"
+- ${COMPONENT})
+- endif()
+-
+- if(WIN32 AND TARGET Qt5::Core)
+- get_property(_Qt5_Core_LOCATION TARGET Qt5::Core PROPERTY LOCATION)
+- get_filename_component(Qt_BIN_DIR "${_Qt5_Core_LOCATION}" PATH)
+- endif()
+-else()
+ set(QT_MIN_VERSION "4.4.0")
+ find_package(Qt4 REQUIRED)
+ if(NOT QT4_FOUND)
+@@ -86,7 +32,6 @@
+ set(Qt_BIN_DIR ${_Qt_BIN_DIR})
+ endif()
+ endif()
+-endif()
+
+ set(SRCS
+ AddCacheEntry.cxx
+@@ -124,7 +69,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 +86,13 @@
+
+ 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 "${CMake_SOURCE_DIR}/Copyright.txt" copyright_line
+ LIMIT_COUNT 1 REGEX "^Copyright 2000-20[0-9][0-9] Kitware")
+
+@@ -192,18 +137,18 @@
+ ${COMPONENT})
+ endif()
+
+-if(APPLE)
++if(APPLEBUNDLE)
+ install(CODE "
+ execute_process(COMMAND ln -s \"../MacOS/CMake\" cmake-gui
+ WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)
+ " ${COMPONENT})
+ 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 "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/cmake-gui${CMAKE_EXECUTABLE_SUFFIX}")
+- if(APPLE)
++ if(APPLEBUNDLE)
+ set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/CMake")
+ endif()
+ install(CODE "
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -561,12 +561,6 @@
+ set(CMAKE_BUNDLE_VERSION
+ "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
+ set(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}")
+- # make sure CMAKE_INSTALL_PREFIX ends in /
+- if(NOT CMAKE_INSTALL_PREFIX MATCHES "/$")
+- set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/")
+- endif()
+- set(CMAKE_INSTALL_PREFIX
+- "${CMAKE_INSTALL_PREFIX}CMake.app/Contents")
+ endif()
+
+ set(QT_NEED_RPATH FALSE)
Deleted: trunk/dports/devel/cmake/files/patch-qt4gui.diff
===================================================================
--- trunk/dports/devel/cmake/files/patch-qt4gui.diff 2015-07-16 16:53:02 UTC (rev 138699)
+++ trunk/dports/devel/cmake/files/patch-qt4gui.diff 2015-07-16 18:59:54 UTC (rev 138700)
@@ -1,132 +0,0 @@
---- 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 >= 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 "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
--
-- # 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 "${_qt_plugin_name}" LOCATION)
-- if(EXISTS "${_qt_plugin_path}")
-- get_filename_component(_qt_plugin_file "${_qt_plugin_path}" NAME)
-- get_filename_component(_qt_plugin_type "${_qt_plugin_path}" PATH)
-- get_filename_component(_qt_plugin_type "${_qt_plugin_type}" NAME)
-- set(_qt_plugin_dest "${CMAKE_INSTALL_PREFIX}/PlugIns/${_qt_plugin_type}")
-- install(FILES "${_qt_plugin_path}"
-- DESTINATION "${_qt_plugin_dest}")
-- set(${_qt_plugins_var}
-- "${${_qt_plugins_var}};${_qt_plugin_dest}/${_qt_plugin_file}")
-- else()
-- message(FATAL_ERROR "QT plugin ${_qt_plugin_name} not found")
-- endif()
-- endmacro()
-- install_qt5_plugin("Qt5::QCocoaIntegrationPlugin" QT_PLUGINS)
-- file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
-- "[Paths]\nPlugins = PlugIns\n")
-- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
-- DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources")
-- endif()
--
-- if(WIN32 AND TARGET Qt5::Core)
-- get_property(_Qt5_Core_LOCATION TARGET Qt5::Core PROPERTY LOCATION)
-- get_filename_component(Qt_BIN_DIR "${_Qt5_Core_LOCATION}" PATH)
-- endif()
--else()
- set(QT_MIN_VERSION "4.4.0")
- 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 "${CMake_SOURCE_DIR}/Copyright.txt" copyright_line
- LIMIT_COUNT 1 REGEX "^Copyright 2000-20[0-9][0-9] Kitware")
-
-@@ -179,16 +126,16 @@ if(UNIX)
- install(FILES cmakecache.xml DESTINATION share/mime/packages )
- endif()
-
--if(APPLE)
-+if(APPLEBUNDLE)
- install(CODE "execute_process(COMMAND ln -s \"../MacOS/CMake\" cmake-gui
- WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)")
- 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 "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/cmake-gui${CMAKE_EXECUTABLE_SUFFIX}")
-- if(APPLE)
-+ if(APPLEBUNDLE)
- set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/CMake")
- endif()
- install(CODE "
---- CMakeLists.txt.orig
-+++ CMakeLists.txt
-@@ -505,15 +505,6 @@
- set(CMAKE_BUNDLE_VERSION
- "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
- set(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}")
-- # make sure CMAKE_INSTALL_PREFIX ends in /
-- string(LENGTH "${CMAKE_INSTALL_PREFIX}" LEN)
-- math(EXPR LEN "${LEN} -1" )
-- string(SUBSTRING "${CMAKE_INSTALL_PREFIX}" ${LEN} 1 ENDCH)
-- if(NOT "${ENDCH}" STREQUAL "/")
-- set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/")
-- endif()
-- set(CMAKE_INSTALL_PREFIX
-- "${CMAKE_INSTALL_PREFIX}CMake.app/Contents")
- endif()
-
- set(QT_NEED_RPATH FALSE)
Copied: trunk/dports/devel/cmake/files/patch-qt4gui.release.diff (from rev 138699, trunk/dports/devel/cmake/files/patch-qt4gui.diff)
===================================================================
--- trunk/dports/devel/cmake/files/patch-qt4gui.release.diff (rev 0)
+++ trunk/dports/devel/cmake/files/patch-qt4gui.release.diff 2015-07-16 18:59:54 UTC (rev 138700)
@@ -0,0 +1,132 @@
+--- 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 >= 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 "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
+-
+- # 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 "${_qt_plugin_name}" LOCATION)
+- if(EXISTS "${_qt_plugin_path}")
+- get_filename_component(_qt_plugin_file "${_qt_plugin_path}" NAME)
+- get_filename_component(_qt_plugin_type "${_qt_plugin_path}" PATH)
+- get_filename_component(_qt_plugin_type "${_qt_plugin_type}" NAME)
+- set(_qt_plugin_dest "${CMAKE_INSTALL_PREFIX}/PlugIns/${_qt_plugin_type}")
+- install(FILES "${_qt_plugin_path}"
+- DESTINATION "${_qt_plugin_dest}")
+- set(${_qt_plugins_var}
+- "${${_qt_plugins_var}};${_qt_plugin_dest}/${_qt_plugin_file}")
+- else()
+- message(FATAL_ERROR "QT plugin ${_qt_plugin_name} not found")
+- endif()
+- endmacro()
+- install_qt5_plugin("Qt5::QCocoaIntegrationPlugin" QT_PLUGINS)
+- file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
+- "[Paths]\nPlugins = PlugIns\n")
+- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
+- DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources")
+- endif()
+-
+- if(WIN32 AND TARGET Qt5::Core)
+- get_property(_Qt5_Core_LOCATION TARGET Qt5::Core PROPERTY LOCATION)
+- get_filename_component(Qt_BIN_DIR "${_Qt5_Core_LOCATION}" PATH)
+- endif()
+-else()
+ set(QT_MIN_VERSION "4.4.0")
+ 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 "${CMake_SOURCE_DIR}/Copyright.txt" copyright_line
+ LIMIT_COUNT 1 REGEX "^Copyright 2000-20[0-9][0-9] Kitware")
+
+@@ -179,16 +126,16 @@ if(UNIX)
+ install(FILES cmakecache.xml DESTINATION share/mime/packages )
+ endif()
+
+-if(APPLE)
++if(APPLEBUNDLE)
+ install(CODE "execute_process(COMMAND ln -s \"../MacOS/CMake\" cmake-gui
+ WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)")
+ 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 "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/cmake-gui${CMAKE_EXECUTABLE_SUFFIX}")
+- if(APPLE)
++ if(APPLEBUNDLE)
+ set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/CMake")
+ endif()
+ install(CODE "
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -505,15 +505,6 @@
+ set(CMAKE_BUNDLE_VERSION
+ "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
+ set(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}")
+- # make sure CMAKE_INSTALL_PREFIX ends in /
+- string(LENGTH "${CMAKE_INSTALL_PREFIX}" LEN)
+- math(EXPR LEN "${LEN} -1" )
+- string(SUBSTRING "${CMAKE_INSTALL_PREFIX}" ${LEN} 1 ENDCH)
+- if(NOT "${ENDCH}" STREQUAL "/")
+- set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/")
+- endif()
+- set(CMAKE_INSTALL_PREFIX
+- "${CMAKE_INSTALL_PREFIX}CMake.app/Contents")
+ endif()
+
+ set(QT_NEED_RPATH FALSE)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150716/b838ba04/attachment.html>
More information about the macports-changes
mailing list