Commit 5011e67b authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

fix cmake files to avoid policy warnings ( remove usage of the obsolete qt5_use_modules)

parent d0a4d13c
......@@ -38,6 +38,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
## #################################################################
## Install prefix
## #################################################################
......@@ -114,6 +115,8 @@ option(DTK_BUILD_SUPPORT_PLOT "Build support layer" false)
## ###################################################################
## Test setup
## ###################################################################
find_program( CTEST_MEMORYCHECK_COMMAND valgrind )
set( CTEST_MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full" )
enable_testing()
if(DTK_ENABLE_COVERAGE)
......@@ -131,9 +134,11 @@ endif(DTK_ENABLE_COVERAGE)
## #################################################################
find_package(Qt5Core REQUIRED)
find_package(Qt5Concurrent REQUIRED)
find_package(Qt5Quick REQUIRED)
find_package(Qt5Network REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Test REQUIRED)
find_package(Qt5Xml REQUIRED)
find_package(Qt5Declarative REQUIRED)
......
......@@ -26,9 +26,9 @@ target_link_libraries(${PROJECT_NAME}
dtkLog
)
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Concurrent)
qt5_use_modules(${PROJECT_NAME} Network)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Network)
## #################################################################
## Source file layout in development environments like Visual Studio
......
......@@ -23,7 +23,7 @@ project(dtkCreator)
## Sources
## #################################################################
set(${PROJECT_NAME}_HEADERS_MOC
set(${PROJECT_NAME}_HEADERS
dtkCreatorMainWindow.h
dtkCreatorMainWindow_p.h)
......@@ -51,7 +51,6 @@ endif(NOT MSVC)
qt5_add_RESOURCES(${PROJECT_NAME}_SOURCES_QRC ${${PROJECT_NAME}_RESOURCES})
add_executable(${PROJECT_NAME} MACOSX_BUNDLE WIN32
${${PROJECT_NAME}_SOURCES_WRAP}
${${PROJECT_NAME}_SOURCES_QRC}
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
......@@ -73,9 +72,9 @@ target_link_libraries(${PROJECT_NAME}
"-framework Cocoa")
endif(APPLE)
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Gui)
qt5_use_modules(${PROJECT_NAME} Widgets)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Gui)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
## #################################################################
## Source file layout in development environments like Visual Studio
......
......@@ -32,7 +32,7 @@ set(${PROJECT_NAME}_SOURCES
add_executable(${PROJECT_NAME}
${${PROJECT_NAME}_SOURCES})
qt5_use_modules(${PROJECT_NAME} Core)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
## #################################################################
## Installation
......
......@@ -26,10 +26,10 @@ target_link_libraries(${PROJECT_NAME}
dtkLog
)
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Network)
qt5_use_modules(${PROJECT_NAME} Gui)
qt5_use_modules(${PROJECT_NAME} Quick)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Network)
target_link_libraries(${PROJECT_NAME} Qt5::Gui)
target_link_libraries(${PROJECT_NAME} Qt5::Quick)
## #################################################################
## Source file layout in development environments like Visual Studio
......
......@@ -38,8 +38,8 @@ target_link_libraries(${PROJECT_NAME}
dtkDistributed
dtkLog)
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Network)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Network)
## #################################################################
## Source file layout in development environments like Visual Studio
......
......@@ -27,8 +27,8 @@ target_link_libraries(${PROJECT_NAME}
dtkLog
)
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Network)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Network)
## #################################################################
## Source file layout in development environments like Visual Studio
......
......@@ -114,8 +114,8 @@ add_executable(${PROJECT_NAME}
## Link rules
## ###################################################################
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Xml)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Xml)
## ###################################################################
## Install rules - targets
......
......@@ -37,7 +37,7 @@ target_link_libraries(${PROJECT_NAME}
dtkCore
dtkLog)
qt5_use_modules(${PROJECT_NAME} Core)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
## #################################################################
## Source file layout in development environments like Visual Studio
......
......@@ -220,10 +220,10 @@ set(${PROJECT_NAME}_RCC dtkComposer.qrc)
## Build rules
## #################################################################
qt5_add_resources(${PROJECT_NAME}_QRC ${${PROJECT_NAME}_RCC})
qt5_add_resources(${PROJECT_NAME}_SOURCES_QRC ${${PROJECT_NAME}_RCC})
add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_QRC}
${${PROJECT_NAME}_SOURCES_QRC}
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
......@@ -235,12 +235,12 @@ set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTA
## Link rules
## ###################################################################
qt5_use_modules(${PROJECT_NAME} Concurrent)
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Gui)
qt5_use_modules(${PROJECT_NAME} Network)
qt5_use_modules(${PROJECT_NAME} Widgets)
qt5_use_modules(${PROJECT_NAME} Xml)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Concurrent)
target_link_libraries(${PROJECT_NAME} Qt5::Gui)
target_link_libraries(${PROJECT_NAME} Qt5::Network)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
target_link_libraries(${PROJECT_NAME} Qt5::Xml)
target_link_libraries(${PROJECT_NAME} dtkLog)
target_link_libraries(${PROJECT_NAME} dtkCore)
......
......@@ -413,10 +413,10 @@ if(DTK_HAVE_FFMPEG AND DTK_BUILD_VIDEO)
target_link_libraries(${PROJECT_NAME} dtkVideo)
endif(DTK_HAVE_FFMPEG AND DTK_BUILD_VIDEO)
qt5_use_modules(${PROJECT_NAME} Concurrent)
qt5_use_modules(${PROJECT_NAME} Network)
qt5_use_modules(${PROJECT_NAME} Widgets)
qt5_use_modules(${PROJECT_NAME} Xml)
target_link_libraries(${PROJECT_NAME} Qt5::Concurrent)
target_link_libraries(${PROJECT_NAME} Qt5::Network)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
target_link_libraries(${PROJECT_NAME} Qt5::Xml)
## #################################################################
## Target properties
......
......@@ -54,8 +54,8 @@ target_link_libraries(${PROJECT_NAME}
## Link rules
## ###################################################################
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Widgets)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
## #################################################################
## Target properties
......
......@@ -78,7 +78,6 @@ add_library(${PROJECT_NAME} SHARED
## Link rules
## ###################################################################
qt5_use_modules(${PROJECT_NAME} Core)
if (DTK_HAVE_ZLIB)
target_link_libraries(${PROJECT_NAME} ${ZLIB_LIBRARIES} )
......@@ -86,6 +85,8 @@ endif (DTK_HAVE_ZLIB)
target_link_libraries(${PROJECT_NAME} dtkMeta dtkLog)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
## #################################################################
## Target properties
## #################################################################
......
......@@ -142,10 +142,10 @@ add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_HEADERS}
)
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Gui)
qt5_use_modules(${PROJECT_NAME} Network)
qt5_use_modules(${PROJECT_NAME} Widgets)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Gui)
target_link_libraries(${PROJECT_NAME} Qt5::Network)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
target_link_libraries(${PROJECT_NAME}
dtkLog
......
......@@ -32,8 +32,10 @@ set(${PROJECT_NAME}_HEADERS
dtkDistributedArrayNavigator.h
dtkDistributedBufferManager
dtkDistributedBufferManager.h
dtkDistributedBufferManagerSequential.h
dtkDistributedCommunicator
dtkDistributedCommunicator.h
dtkDistributedCommunicatorSequential.h
dtkDistributedCommunicatorStatus.h
dtkDistributedContainer.h
dtkDistributedController.h
......@@ -69,6 +71,7 @@ set(${PROJECT_NAME}_SOURCES
dtkDistributedApplication.cpp
dtkDistributedBufferManager.cpp
dtkDistributedCommunicator.cpp
dtkDistributedCommunicatorSequential.cpp
dtkDistributedCommunicatorStatus.cpp
dtkDistributedController.cpp
dtkDistributedCoreApplication.cpp
......@@ -102,10 +105,10 @@ set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTA
## Link rules
## ###################################################################
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Network)
qt5_use_modules(${PROJECT_NAME} Widgets)
qt5_use_modules(${PROJECT_NAME} Xml)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Network)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
target_link_libraries(${PROJECT_NAME} Qt5::Xml)
target_link_libraries(${PROJECT_NAME} dtkCore)
target_link_libraries(${PROJECT_NAME} dtkLog)
......
......@@ -128,9 +128,9 @@ add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_HEADERS}
)
qt5_use_modules(${PROJECT_NAME} Widgets)
qt5_use_modules(${PROJECT_NAME} Network)
qt5_use_modules(${PROJECT_NAME} Xml)
target_link_libraries(${PROJECT_NAME} Qt5::Network)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
target_link_libraries(${PROJECT_NAME} Qt5::Xml)
target_link_libraries(${PROJECT_NAME}
dtkCoreSupport
......
......@@ -129,11 +129,11 @@ endif(APPLE)
## Link rules
## ###################################################################
qt5_use_modules(${PROJECT_NAME} Declarative)
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Gui)
qt5_use_modules(${PROJECT_NAME} Quick)
qt5_use_modules(${PROJECT_NAME} Widgets)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Declarative)
target_link_libraries(${PROJECT_NAME} Qt5::Gui)
target_link_libraries(${PROJECT_NAME} Qt5::Quick)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
## #################################################################
## Target properties
......
......@@ -43,7 +43,7 @@ add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_HEADERS}
)
qt5_use_modules(${PROJECT_NAME} Core)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
## #################################################################
## Target properties
......
......@@ -50,7 +50,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTA
## LINK rules
## ###################################################################
qt5_use_modules(${PROJECT_NAME} Core)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} dtkCore)
target_link_libraries(${PROJECT_NAME} dtkLog)
......
......@@ -43,7 +43,7 @@ target_link_libraries(${PROJECT_NAME}
## Link rules
## ###################################################################
qt5_use_modules(${PROJECT_NAME} Core)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
## #################################################################
## Target properties
......
......@@ -44,7 +44,7 @@ add_library(${PROJECT_NAME} SHARED
## Link rules
## ###################################################################
qt5_use_modules(${PROJECT_NAME} Core)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
## ###################################################################
## Target properties
......
......@@ -72,8 +72,8 @@ target_link_libraries(${PROJECT_NAME}
## Link rules
## ###################################################################
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Widgets)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
## #################################################################
## Target properties
......
......@@ -58,7 +58,7 @@ add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_HEADERS}
)
qt5_use_modules(${PROJECT_NAME} Core)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME}
dtkCore
......
......@@ -67,9 +67,9 @@ target_link_libraries(${PROJECT_NAME}
## Link rules
## ###################################################################
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Gui)
qt5_use_modules(${PROJECT_NAME} Widgets)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Gui)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
## ###################################################################
## Target properties
......
......@@ -49,11 +49,11 @@ add_executable(${PROJECT_NAME}
## Link rules
## ###################################################################
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Test)
qt5_use_modules(${PROJECT_NAME} Xml)
qt5_use_modules(${PROJECT_NAME} Gui)
qt5_use_modules(${PROJECT_NAME} Widgets)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Gui)
target_link_libraries(${PROJECT_NAME} Qt5::Test)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
target_link_libraries(${PROJECT_NAME} Qt5::Xml)
target_link_libraries(${PROJECT_NAME} dtkComposer)
target_link_libraries(${PROJECT_NAME} dtkLog)
......
......@@ -60,9 +60,9 @@ add_executable(${PROJECT_NAME}
## Link rules
## ###################################################################
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Gui)
qt5_use_modules(${PROJECT_NAME} Test)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Gui)
target_link_libraries(${PROJECT_NAME} Qt5::Test)
target_link_libraries(${PROJECT_NAME} dtkCore)
......
......@@ -48,8 +48,8 @@ add_executable(${PROJECT_NAME}
## Link rules
## ###################################################################
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Test)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Test)
target_link_libraries(${PROJECT_NAME} dtkLog)
......
......@@ -48,9 +48,9 @@ add_executable(${PROJECT_NAME}
## Link rules
## ###################################################################
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Gui)
qt5_use_modules(${PROJECT_NAME} Test)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Gui)
target_link_libraries(${PROJECT_NAME} Qt5::Test)
target_link_libraries(${PROJECT_NAME} dtkMath)
......
......@@ -54,9 +54,9 @@ add_executable(${PROJECT_NAME}
## Link rules
## ###################################################################
qt5_use_modules(${PROJECT_NAME} Core)
qt5_use_modules(${PROJECT_NAME} Gui)
qt5_use_modules(${PROJECT_NAME} Test)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::Gui)
target_link_libraries(${PROJECT_NAME} Qt5::Test)
target_link_libraries(${PROJECT_NAME} dtkMeta dtkCore)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment