Commit 4691193e authored by seryc's avatar seryc
Browse files

UPDATE: Add QtTest module in the CMake Macro NEEDS_QT_MODULES

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@2190 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 17c482b5
......@@ -40,7 +40,7 @@
#! \endcode
#!
#! \param DISABLED means this is a default application is NOT to be compiled automatically
#! \param NEEDS_QT_MODULES add this if your library depends on Qt modules, such as QtCore, QtGui, QtMultimedia, QtNetwork, QtOpenGL, QtScript, QtScriptTools, QtSql, QtSvg, QtWebkit, QtXml, QtXmlPatterns, QtDeclarative
#! \param NEEDS_QT_MODULES add this if your library depends on Qt modules, such as QtCore, QtGui, QtMultimedia, QtNetwork, QtOpenGL, QtScript, QtScriptTools, QtSql, QtSvg, QtWebkit, QtXml, QtXmlPatterns, QtDeclarative, QtTest
#! \param NEEDS_ITK means this application requires ITK to be compiled / run.
#! \param NEEDS_CEP_LIBRARIES list of needed camitk CEP libraries
#! \param NEEDS_COMPONENT_EXTENSION list of needed component extensions
......@@ -656,7 +656,7 @@ macro(camitk_application)
# QT MODULES
set(QT_MODULES_LIBRARIES)
if(${APPLICATION_NAME_CMAKE}_NEEDS_QT_MODULES)
find_package(Qt4 "4.7" COMPONENTS QtCore QtGui QtXml QtXmlPatterns QtWebkit QtOpenGL QtScript QtSQL QtNetwork REQUIRED)
find_package(Qt4 "4.7" COMPONENTS QtCore QtGui QtXml QtXmlPatterns QtWebkit QtOpenGL QtScript QtSQL QtNetwork QtTest REQUIRED)
if(NOT QT4_FOUND)
message(SEND_ERROR "${APPLICATION_NAME} : Failed to find Qt 4.7 or greater. This is needed by CamiTK.")
endif()
......
......@@ -80,6 +80,18 @@ macro(camitk_library)
${ARGN}
)
#########################################################################
# #
# Consider moc sources files #
# #
# * if you use Q_OBJECT in your classes #
# #
#########################################################################
file(GLOB_RECURSE MOC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/moc_*.cxx)
message(WARNING "CMAKE_CURRENT_BINARY_DIR = ${CMAKE_CURRENT_BINARY_DIR}")
set(${DEFAULT_LIBRARY_NAME_CMAKE}_SOURCES ${${DEFAULT_LIBRARY_NAME_CMAKE}_SOURCES} ${MOC_SRCS})
message(WARNING "${DEFAULT_LIBRARY_NAME_CMAKE}_SOURCES = ${${DEFAULT_LIBRARY_NAME_CMAKE}_SOURCES}")
#########################################################################
......@@ -654,7 +666,7 @@ macro(camitk_library)
# ADDITIONAL QT MODULES
set(QT_MODULES_LIBRARIES)
if(${DEFAULT_LIBRARY_NAME_CMAKE}_NEEDS_QT_MODULES)
find_package(Qt4 "4.7" COMPONENTS QtCore QtGui QtXml QtXmlPatterns QtWebkit QtOpenGL QtScript QtSQL QtNetwork REQUIRED)
find_package(Qt4 "4.7" COMPONENTS QtCore QtGui QtXml QtXmlPatterns QtWebkit QtOpenGL QtScript QtSQL QtNetwork QtTest REQUIRED)
if(NOT QT4_FOUND)
message(SEND_ERROR "${DEFAULT_LIBRARY_NAME} : Failed to find Qt 4.7 or greater. This is needed by CamiTK.")
endif()
......
Supports Markdown
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