Alan W. Irwin wrote: > (1) How should you replace > > find_package(Qt4 4.8.2 COMPONENTS QtCore QtGui QtSvg)
find_package(Qt5 5.2.1 COMPONENTS Svg) or find_package(Qt5Svg 5.2.1) Packages and targets know their dependencies so you don't have to. > and > > qt4_wrap_cpp( > QT_MOC_OUTFILES > ${CMAKE_SOURCE_DIR}/include/qt.h > OPTIONS ${MOC_OPTIONS} > ) qt5_wrap_cpp( QT_MOC_OUTFILES ${CMAKE_SOURCE_DIR}/include/qt.h OPTIONS ${MOC_OPTIONS} ) Though you can port to AUTOMOC before/after porting to Qt 5 too. > Does Qt5 > still use that directory property apprach for setting compile flags > or is this no longer an issue? Qt 5 provides IMPORTED targets which have the compile flags encoded in them. The flags are consumed by target_link_libraries. http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html target_link_libraries(foo Qt5::Svg) Qt4 provides IMPORTED targets too, so you can already use those before porting to Qt 5 instead of whatever mechanism you currently use. target_link_libraries(foo Qt4::QtSvg) http://www.cmake.org/cmake/help/v3.0/manual/cmake-qt.7.html > target_link_libraries( > plplotqt${LIB_TAG} > plplot${LIB_TAG} > ${MATH_LIB} > ${QT_LIBRARIES} > ) > > How should that command be replaced for the new Qt5 way of doing > things? I recommend listing the IMPORTED target 'leaf' dependencies. target_link_libraries( plplotqt${LIB_TAG} plplot${LIB_TAG} ${MATH_LIB} Qt4::QtSvg # Qt5::Svg ) You can use set(QT_LIBRARIES Qt4::QtSvg) either, but I recommend using the target names directly. Thanks, Steve. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake