Commit 4067944f authored by Stéphane Albert's avatar Stéphane Albert

ENH: Configured MVD2 to build and deploy (Linux, Windows) with QtSql and SQLite driver plugin.

parent 22a60c9e
......@@ -6,13 +6,13 @@ macro( deploy_qt_conf TARGET_NAME )
TARGET ${TARGET_NAME}
PRE_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -D QT_TRANSLATIONS_DIR:PATH=${QT_TRANSLATIONS_DIR}
-D Monteverdi2_SOURCE_DIR:PATH=${Monteverdi2_SOURCE_DIR}
-D TARGET_DIR:PATH=$<TARGET_FILE_DIR:${TARGET_NAME}>
-P ${Monteverdi2_SOURCE_DIR}/CMake/DeployQtConfScript.cmake
ARGS -D QT_TRANSLATIONS_DIR:PATH=${QT_TRANSLATIONS_DIR}
-D QT_PLUGINS_DIR:PATH=${QT_PLUGINS_DIR}
-D Monteverdi2_SOURCE_DIR:PATH=${Monteverdi2_SOURCE_DIR}
-D TARGET_DIR:PATH=$<TARGET_FILE_DIR:${TARGET_NAME}>
-P ${Monteverdi2_SOURCE_DIR}/CMake/DeployQtConfScript.cmake
COMMENT "Deploying qt.conf in ${TARGET_NAME} build dir"
VERBATIM
)
endmacro()
[Paths]
Translations=@QT_TRANSLATIONS_DIR@
\ No newline at end of file
Translations=@QT_TRANSLATIONS_DIR@
Plugins=@QT_PLUGINS_DIR@
......@@ -58,13 +58,18 @@ find_package( OpenGL REQUIRED )
#----------------------------------------------------------------------------
# Qt4
set(QT_USE_IMPORTED_TARGETS ON)
find_package( Qt4 REQUIRED QtCore QtGui QtOpenGL QtMain QtXml )
find_package( Qt4 REQUIRED QtCore QtGui QtOpenGL QtMain QtSql QtXml )
include( ${QT_USE_FILE} )
if( QT_FOUND )
message( "Qt plugins dir: '${QT_PLUGINS_DIR}'" )
message( "Qt translations dir: '${QT_TRANSLATIONS_DIR}'" )
endif( QT_FOUND )
#----------------------------------------------------------------------------
# Qwt
find_package(Qwt REQUIRED)
if(QWT_FOUND)
# message( ${QWT_LIBRARIES} )
if(WIN32)
add_definitions(-DQWT_DLL)
endif(WIN32)
......
......@@ -89,6 +89,7 @@ add_library(Monteverdi2_Core
target_link_libraries(Monteverdi2_Core
OTBIO
Qt4::QtCore
Qt4::QtSql
Qt4::QtXml
)
......
[Paths]
Translations=../../share/qt4/translations
......@@ -103,10 +103,14 @@ install(FILES ${QT_TRANSLATIONS_FILES}
DESTINATION share/qt4/translations
COMPONENT Resources)
install(FILES ${QT_PLUGINS_DIR}/sqldrivers/qsqlite4.dll
DESTINATION lib/qt4/plugins/sqldrivers/
COMPONENT Runtime)
install(FILES qt.conf
DESTINATION bin
COMPONENT Resources)
install(FILES ${Monteverdi2_SOURCE_DIR}/Packaging/Windows/monteverdi2.bat
DESTINATION bin
COMPONENT Runtime)
......
[Paths]
Translations=../share/qt4/translations
\ No newline at end of file
Translations=../share/qt4/translations
Plugins=../lib/qt4/plugins
\ No newline at end of file
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