Don't use the pri depends line for link dependencies.

That is not what depends is for.

Change-Id: Iabf93e890f009bd6c8fcc18dde1891bf20a493f1
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
Stephen Kelly 2012-03-27 01:54:21 +02:00 committed by Qt by Nokia
parent 4a6bf9d941
commit df43b9a06a
4 changed files with 8 additions and 8 deletions

View File

@ -17,10 +17,6 @@ defineReplace(cmakeModuleList) {
CMAKE_MODULE_NAME = $$cmakeModuleName($${MODULE})
CMAKE_MODULE_DEPS = $$cmakeModuleList($$eval(QT.$${MODULE}.depends))
CMAKE_PARTIAL_MODULE_DEPS = $$replace(CMAKE_MODULE_DEPS, ";", ";Qt5::")
!isEmpty(CMAKE_PARTIAL_MODULE_DEPS):CMAKE_QT5_MODULE_DEPS = "Qt5::$${CMAKE_PARTIAL_MODULE_DEPS}"
CMAKE_QT_INSTALL_PREFIX = $$replace($$list($$[QT_INSTALL_PREFIX]), \\\\, /)/
CMAKE_QT_INSTALL_PREFIX_ESCAPED = "^$$re_escape($$CMAKE_QT_INSTALL_PREFIX)"

View File

@ -83,7 +83,8 @@ else()
message("CMake version older than 2.8.7. Not running test \"pass1\"")
endif()
expect_pass(pass2)
expect_pass(pass3)
# Modules do not currently find their own dependencies.
# expect_pass(pass3)
expect_fail(fail4)
expect_fail(fail5)
expect_pass("pass(needsquoting)6")

View File

@ -9,14 +9,14 @@ find_package(Qt5Widgets REQUIRED)
include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
add_definitions(${Qt5Core_DEFINITIONS})
add_definitions(${Qt5Core_DEFINITIONS} ${Qt5Gui_DEFINITIONS} ${Qt5Widgets_DEFINITIONS})
set(CMAKE_INCLUDE_CURRENT_DIR ON)
qt5_wrap_cpp(moc_files mywidget.h)
qt5_wrap_ui(ui_files mywidget.ui)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")
add_executable(mywidget mywidget.cpp ${moc_files} ${ui_files})
target_link_libraries(mywidget ${Qt5Widgets_LIBRARIES})
target_link_libraries(mywidget ${Qt5Widgets_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Core_LIBRARIES})

View File

@ -43,6 +43,9 @@ endmacro()
add_executable(two two.cpp)
add_executable(three three.cpp)
qt5_use_package(two Core)
qt5_use_package(two Test)
qt5_use_package(three Widgets)
qt5_use_package(three Gui)
qt5_use_package(three Core)
qt5_use_package(three Test)