summaryrefslogtreecommitdiff
path: root/Modules/UseQt4.cmake
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 13:47:32 -0400
committerBrad King <brad.king@kitware.com>2012-08-13 14:19:16 -0400
commit77543bde41b0e52c3959016698b529835945d62d (patch)
treeff63e5fbec326c4a5d821e7496c6d2cb52f75b92 /Modules/UseQt4.cmake
parent7bbaa4283de26864b2e55e819db0884771585467 (diff)
downloadcmake-77543bde41b0e52c3959016698b529835945d62d.tar.gz
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
Diffstat (limited to 'Modules/UseQt4.cmake')
-rw-r--r--Modules/UseQt4.cmake148
1 files changed, 74 insertions, 74 deletions
diff --git a/Modules/UseQt4.cmake b/Modules/UseQt4.cmake
index d4852a0834..260c3cd292 100644
--- a/Modules/UseQt4.cmake
+++ b/Modules/UseQt4.cmake
@@ -16,93 +16,93 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-ADD_DEFINITIONS(${QT_DEFINITIONS})
-SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG QT_DEBUG)
-SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG)
-SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG)
-SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG)
-IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
- SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_DEBUG)
-ENDIF()
+add_definitions(${QT_DEFINITIONS})
+set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG QT_DEBUG)
+set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG)
+set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG)
+set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG)
+if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
+ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_DEBUG)
+endif()
-INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})
+include_directories(${QT_INCLUDE_DIR})
-SET(QT_LIBRARIES "")
-SET(QT_LIBRARIES_PLUGINS "")
+set(QT_LIBRARIES "")
+set(QT_LIBRARIES_PLUGINS "")
-IF (QT_USE_QTMAIN)
- IF (Q_WS_WIN)
- SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY})
- ENDIF (Q_WS_WIN)
-ENDIF (QT_USE_QTMAIN)
+if (QT_USE_QTMAIN)
+ if (Q_WS_WIN)
+ set(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY})
+ endif (Q_WS_WIN)
+endif (QT_USE_QTMAIN)
-IF(QT_DONT_USE_QTGUI)
- SET(QT_USE_QTGUI 0)
-ELSE(QT_DONT_USE_QTGUI)
- SET(QT_USE_QTGUI 1)
-ENDIF(QT_DONT_USE_QTGUI)
+if(QT_DONT_USE_QTGUI)
+ set(QT_USE_QTGUI 0)
+else(QT_DONT_USE_QTGUI)
+ set(QT_USE_QTGUI 1)
+endif(QT_DONT_USE_QTGUI)
-IF(QT_DONT_USE_QTCORE)
- SET(QT_USE_QTCORE 0)
-ELSE(QT_DONT_USE_QTCORE)
- SET(QT_USE_QTCORE 1)
-ENDIF(QT_DONT_USE_QTCORE)
+if(QT_DONT_USE_QTCORE)
+ set(QT_USE_QTCORE 0)
+else(QT_DONT_USE_QTCORE)
+ set(QT_USE_QTCORE 1)
+endif(QT_DONT_USE_QTCORE)
-IF (QT_USE_QT3SUPPORT)
- ADD_DEFINITIONS(-DQT3_SUPPORT)
-ENDIF (QT_USE_QT3SUPPORT)
+if (QT_USE_QT3SUPPORT)
+ add_definitions(-DQT3_SUPPORT)
+endif (QT_USE_QT3SUPPORT)
# list dependent modules, so dependent libraries are added
-SET(QT_QT3SUPPORT_MODULE_DEPENDS QTGUI QTSQL QTXML QTNETWORK QTCORE)
-SET(QT_QTSVG_MODULE_DEPENDS QTGUI QTXML QTCORE)
-SET(QT_QTUITOOLS_MODULE_DEPENDS QTGUI QTXML QTCORE)
-SET(QT_QTHELP_MODULE_DEPENDS QTGUI QTSQL QTXML QTNETWORK QTCORE)
-IF(QT_QTDBUS_FOUND)
- SET(QT_PHONON_MODULE_DEPENDS QTGUI QTDBUS QTCORE)
-ELSE(QT_QTDBUS_FOUND)
- SET(QT_PHONON_MODULE_DEPENDS QTGUI QTCORE)
-ENDIF(QT_QTDBUS_FOUND)
-SET(QT_QTDBUS_MODULE_DEPENDS QTXML QTCORE)
-SET(QT_QTXMLPATTERNS_MODULE_DEPENDS QTNETWORK QTCORE)
-SET(QT_QAXCONTAINER_MODULE_DEPENDS QTGUI QTCORE)
-SET(QT_QAXSERVER_MODULE_DEPENDS QTGUI QTCORE)
-SET(QT_QTSCRIPTTOOLS_MODULE_DEPENDS QTGUI QTCORE)
-SET(QT_QTWEBKIT_MODULE_DEPENDS QTXMLPATTERNS QTGUI QTCORE)
-SET(QT_QTDECLARATIVE_MODULE_DEPENDS QTSCRIPT QTSVG QTSQL QTXMLPATTERNS QTGUI QTCORE)
-SET(QT_QTMULTIMEDIA_MODULE_DEPENDS QTGUI QTCORE)
-SET(QT_QTOPENGL_MODULE_DEPENDS QTGUI QTCORE)
-SET(QT_QTSCRIPT_MODULE_DEPENDS QTCORE)
-SET(QT_QTGUI_MODULE_DEPENDS QTCORE)
-SET(QT_QTTEST_MODULE_DEPENDS QTCORE)
-SET(QT_QTXML_MODULE_DEPENDS QTCORE)
-SET(QT_QTSQL_MODULE_DEPENDS QTCORE)
-SET(QT_QTNETWORK_MODULE_DEPENDS QTCORE)
+set(QT_QT3SUPPORT_MODULE_DEPENDS QTGUI QTSQL QTXML QTNETWORK QTCORE)
+set(QT_QTSVG_MODULE_DEPENDS QTGUI QTXML QTCORE)
+set(QT_QTUITOOLS_MODULE_DEPENDS QTGUI QTXML QTCORE)
+set(QT_QTHELP_MODULE_DEPENDS QTGUI QTSQL QTXML QTNETWORK QTCORE)
+if(QT_QTDBUS_FOUND)
+ set(QT_PHONON_MODULE_DEPENDS QTGUI QTDBUS QTCORE)
+else(QT_QTDBUS_FOUND)
+ set(QT_PHONON_MODULE_DEPENDS QTGUI QTCORE)
+endif(QT_QTDBUS_FOUND)
+set(QT_QTDBUS_MODULE_DEPENDS QTXML QTCORE)
+set(QT_QTXMLPATTERNS_MODULE_DEPENDS QTNETWORK QTCORE)
+set(QT_QAXCONTAINER_MODULE_DEPENDS QTGUI QTCORE)
+set(QT_QAXSERVER_MODULE_DEPENDS QTGUI QTCORE)
+set(QT_QTSCRIPTTOOLS_MODULE_DEPENDS QTGUI QTCORE)
+set(QT_QTWEBKIT_MODULE_DEPENDS QTXMLPATTERNS QTGUI QTCORE)
+set(QT_QTDECLARATIVE_MODULE_DEPENDS QTSCRIPT QTSVG QTSQL QTXMLPATTERNS QTGUI QTCORE)
+set(QT_QTMULTIMEDIA_MODULE_DEPENDS QTGUI QTCORE)
+set(QT_QTOPENGL_MODULE_DEPENDS QTGUI QTCORE)
+set(QT_QTSCRIPT_MODULE_DEPENDS QTCORE)
+set(QT_QTGUI_MODULE_DEPENDS QTCORE)
+set(QT_QTTEST_MODULE_DEPENDS QTCORE)
+set(QT_QTXML_MODULE_DEPENDS QTCORE)
+set(QT_QTSQL_MODULE_DEPENDS QTCORE)
+set(QT_QTNETWORK_MODULE_DEPENDS QTCORE)
# Qt modules (in order of dependence)
-FOREACH(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN
+foreach(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN
QAXSERVER QAXCONTAINER QTDECLARATIVE QTSCRIPT QTSVG QTUITOOLS QTHELP
QTWEBKIT PHONON QTSCRIPTTOOLS QTMULTIMEDIA QTXMLPATTERNS QTGUI QTTEST
QTDBUS QTXML QTSQL QTNETWORK QTCORE)
- IF (QT_USE_${module} OR QT_USE_${module}_DEPENDS)
- IF (QT_${module}_FOUND)
- IF(QT_USE_${module})
- STRING(REPLACE "QT" "" qt_module_def "${module}")
- ADD_DEFINITIONS(-DQT_${qt_module_def}_LIB)
- INCLUDE_DIRECTORIES(${QT_${module}_INCLUDE_DIR})
- ENDIF(QT_USE_${module})
- SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIBRARY})
- SET(QT_LIBRARIES_PLUGINS ${QT_LIBRARIES_PLUGINS} ${QT_${module}_PLUGINS})
- IF(QT_IS_STATIC)
- SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIB_DEPENDENCIES})
- ENDIF(QT_IS_STATIC)
- FOREACH(depend_module ${QT_${module}_MODULE_DEPENDS})
- SET(QT_USE_${depend_module}_DEPENDS 1)
- ENDFOREACH(depend_module ${QT_${module}_MODULE_DEPENDS})
- ELSE (QT_${module}_FOUND)
- MESSAGE("Qt ${module} library not found.")
- ENDIF (QT_${module}_FOUND)
- ENDIF (QT_USE_${module} OR QT_USE_${module}_DEPENDS)
+ if (QT_USE_${module} OR QT_USE_${module}_DEPENDS)
+ if (QT_${module}_FOUND)
+ if(QT_USE_${module})
+ string(REPLACE "QT" "" qt_module_def "${module}")
+ add_definitions(-DQT_${qt_module_def}_LIB)
+ include_directories(${QT_${module}_INCLUDE_DIR})
+ endif(QT_USE_${module})
+ set(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIBRARY})
+ set(QT_LIBRARIES_PLUGINS ${QT_LIBRARIES_PLUGINS} ${QT_${module}_PLUGINS})
+ if(QT_IS_STATIC)
+ set(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIB_DEPENDENCIES})
+ endif(QT_IS_STATIC)
+ foreach(depend_module ${QT_${module}_MODULE_DEPENDS})
+ set(QT_USE_${depend_module}_DEPENDS 1)
+ endforeach(depend_module ${QT_${module}_MODULE_DEPENDS})
+ else (QT_${module}_FOUND)
+ message("Qt ${module} library not found.")
+ endif (QT_${module}_FOUND)
+ endif (QT_USE_${module} OR QT_USE_${module}_DEPENDS)
-ENDFOREACH(module)
+endforeach(module)