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