From 4d98b83c170ac6fb90e3e23fa1480556d0505dfd Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 3 Dec 2011 23:00:12 +0100 Subject: [PATCH] Use plural form for CMake variables. Change-Id: Idc0cd360e09046a5746c9f7366c7fd4b982058fe Reviewed-by: Oswald Buddenhagen --- mkspecs/cmake/Qt5BasicConfig.cmake.in | 3 +-- tests/manual/cmake/pass1/CMakeLists.txt | 2 +- tests/manual/cmake/pass2/CMakeLists.txt | 2 +- tests/manual/cmake/pass3/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/mkspecs/cmake/Qt5BasicConfig.cmake.in b/mkspecs/cmake/Qt5BasicConfig.cmake.in index 69f101c..4435b79 100644 --- a/mkspecs/cmake/Qt5BasicConfig.cmake.in +++ b/mkspecs/cmake/Qt5BasicConfig.cmake.in @@ -5,8 +5,7 @@ set(Qt5$${CMAKE_MODULE_NAME}_VERSION_MAJOR "$$eval(QT.$${MODULE}.MAJOR_VERSION)" set(Qt5$${CMAKE_MODULE_NAME}_VERSION_MINOR "$$eval(QT.$${MODULE}.MINOR_VERSION)") set(Qt5$${CMAKE_MODULE_NAME}_VERSION_PATCH "$$eval(QT.$${MODULE}.PATCH_VERSION)") -set(Qt5$${CMAKE_MODULE_NAME}_LIBRARY Qt5::$${CMAKE_MODULE_NAME}) - +set(Qt5$${CMAKE_MODULE_NAME}_LIBRARIES Qt5::$${CMAKE_MODULE_NAME}) set(Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS \"${_qt5_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5_install_prefix}/$$CMAKE_INCLUDE_DIR/Qt$${CMAKE_MODULE_NAME}\") string(TOUPPER "$${CMAKE_MODULE_NAME}" _CMAKE_MODULE_NAME_UPPER) diff --git a/tests/manual/cmake/pass1/CMakeLists.txt b/tests/manual/cmake/pass1/CMakeLists.txt index 3ccca1e..c41a904 100644 --- a/tests/manual/cmake/pass1/CMakeLists.txt +++ b/tests/manual/cmake/pass1/CMakeLists.txt @@ -13,7 +13,7 @@ macro(qt5_use_package _target _package) # TODO: Handle public/private keywords? find_package(Qt5${_package} ${ARG1}) if (Qt5${_package}_FOUND) - target_link_libraries(${_target} ${Qt5${_package}_LIBRARY}) + target_link_libraries(${_target} ${Qt5${_package}_LIBRARIES}) include_directories(${Qt5${_package}_INCLUDE_DIRS}) # set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES ${Qt5${_package}_INCLUDE_DIRS}) set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS ${Qt5${_package}_COMPILE_DEFINITIONS}) diff --git a/tests/manual/cmake/pass2/CMakeLists.txt b/tests/manual/cmake/pass2/CMakeLists.txt index 31ddfa9..153b038 100644 --- a/tests/manual/cmake/pass2/CMakeLists.txt +++ b/tests/manual/cmake/pass2/CMakeLists.txt @@ -10,4 +10,4 @@ include_directories(${Qt5Core_INCLUDE_DIRS}) qt5_wrap_cpp(moc_files myobject.h) add_executable(myobject myobject.cpp ${moc_files}) -target_link_libraries(myobject ${Qt5Core_LIBRARY}) +target_link_libraries(myobject ${Qt5Core_LIBRARIES}) diff --git a/tests/manual/cmake/pass3/CMakeLists.txt b/tests/manual/cmake/pass3/CMakeLists.txt index cbc448b..8c39b4f 100644 --- a/tests/manual/cmake/pass3/CMakeLists.txt +++ b/tests/manual/cmake/pass3/CMakeLists.txt @@ -15,4 +15,4 @@ qt5_wrap_cpp(moc_files mywidget.h) qt5_wrap_ui(ui_files mywidget.ui) add_executable(mywidget mywidget.cpp ${moc_files} ${ui_files}) -target_link_libraries(mywidget ${Qt5Core_LIBRARY} ${Qt5Gui_LIBRARY} ${Qt5Widgets_LIBRARY}) +target_link_libraries(mywidget ${Qt5Widgets_LIBRARIES}) -- 2.7.4