summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/CMakeLists.txt
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 17:50:14 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-13 18:19:16 (GMT)
commit9db3116226cb99fcf54e936c833953abcde9b729 (patch)
treebd755ed9e616bbf1482a894bc7946980d81b7703 /Source/QtDialog/CMakeLists.txt
parent77543bde41b0e52c3959016698b529835945d62d (diff)
downloadCMake-9db3116226cb99fcf54e936c833953abcde9b729.zip
CMake-9db3116226cb99fcf54e936c833953abcde9b729.tar.gz
CMake-9db3116226cb99fcf54e936c833953abcde9b729.tar.bz2
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
Diffstat (limited to 'Source/QtDialog/CMakeLists.txt')
-rw-r--r--Source/QtDialog/CMakeLists.txt20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
index d962d8d..0969aea 100644
--- a/Source/QtDialog/CMakeLists.txt
+++ b/Source/QtDialog/CMakeLists.txt
@@ -15,7 +15,7 @@ find_package(Qt4 REQUIRED)
if(NOT QT4_FOUND)
message(SEND_ERROR "Failed to find Qt 4.4 or greater.")
-else(NOT QT4_FOUND)
+else()
include(${QT_USE_FILE})
set(CMAKE_PACKAGE_QTGUI TRUE)
@@ -58,13 +58,13 @@ else(NOT QT4_FOUND)
set(SRCS ${SRCS} ${UI_SRCS} ${MOC_SRCS} ${RC_SRCS})
if(Q_WS_WIN)
set(SRCS ${SRCS} CMakeSetup.rc)
- endif(Q_WS_WIN)
+ endif()
if(Q_WS_MAC)
set(SRCS ${SRCS} CMakeSetup.icns)
set(MACOSX_BUNDLE_ICON_FILE CMakeSetup.icns)
set_source_files_properties(CMakeSetup.icns PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)
- endif(Q_WS_MAC)
+ endif()
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
@@ -75,10 +75,10 @@ else(NOT QT4_FOUND)
if(APPLE)
set_target_properties(cmake-gui PROPERTIES
OUTPUT_NAME ${CMAKE_BUNDLE_NAME})
- endif(APPLE)
+ endif()
set(CMAKE_INSTALL_DESTINATION_ARGS
BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}")
- endif(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
+ endif()
install(TARGETS cmake-gui RUNTIME DESTINATION bin ${CMAKE_INSTALL_DESTINATION_ARGS})
@@ -88,7 +88,7 @@ else(NOT QT4_FOUND)
install(FILES CMake.desktop DESTINATION share/applications )
install(FILES CMakeSetup32.png DESTINATION share/pixmaps )
install(FILES cmakecache.xml DESTINATION share/mime/packages )
- endif(UNIX)
+ endif()
if(APPLE)
set(CMAKE_POSTFLIGHT_SCRIPT
@@ -101,7 +101,7 @@ else(NOT QT4_FOUND)
"${CMake_BINARY_DIR}/Source/QtDialog/postupgrade.sh")
install(CODE "execute_process(COMMAND ln -s \"../MacOS/${CMAKE_BUNDLE_NAME}\" cmake-gui
WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)")
- endif(APPLE)
+ endif()
if(APPLE OR WIN32)
# install rules for including 3rd party libs such as Qt
@@ -109,15 +109,15 @@ else(NOT QT4_FOUND)
set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/cmake-gui${CMAKE_EXECUTABLE_SUFFIX}")
if(APPLE)
set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/${CMAKE_BUNDLE_NAME}")
- endif(APPLE)
+ endif()
install(CODE "
include(\"${CMake_SOURCE_DIR}/Modules/BundleUtilities.cmake\")
set(BU_CHMOD_BUNDLE_ITEMS ON)
fixup_bundle(\"${fixup_exe}\" \"\" \"${QT_LIBRARY_DIR};${QT_BINARY_DIR}\")
")
- endif(APPLE OR WIN32)
+ endif()
configure_file("${QtDialog_SOURCE_DIR}/QtDialogCPack.cmake.in"
"${QtDialog_BINARY_DIR}/QtDialogCPack.cmake" @ONLY)
-endif(NOT QT4_FOUND)
+endif()