Commit 8cc4ee64 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

COMP: mapla compilation

parent 4d01dfeb
project( OTBMapla ) project( OTBMapla )
configure_file( src/MaplaWin32.rc.in MaplaWin32.rc ) set(OTBMapla_LIBRARIES OTBMapla)
# folder where ui headers are generated
set( OTBMapla_INCLUDE_DIRS
${OTBMapla_BINARY_DIR}/src
)
otb_module_impl() otb_module_impl()
############################################################################# #############################################################################
set( OTBMapla_SRCS set( OTBMapla_SRCS
main.cxx mvdMaplaApplication.cxx
MaplaApplication.cxx mvdMaplaMainWindow.cxx
MaplaMainWindow.cxx
) )
############################################################################# #############################################################################
set( OTBMapla_HEADERS_MOC set( OTBMapla_HEADERS_MOC
mvdMaplaApplication.h ../include/mvdMaplaApplication.h
mvdMaplaMainWindow.h ../include/mvdMaplaMainWindow.h
# mvdPreferencesDialog.h # mvdPreferencesDialog.h
) )
...@@ -23,19 +22,50 @@ set( OTBMapla_RESOURCES ...@@ -23,19 +22,50 @@ set( OTBMapla_RESOURCES
mvdMaplaMainWindow.qrc mvdMaplaMainWindow.qrc
) )
if (WIN32)
# Windows Resource file need to have the full path to icon
# if the .ico is not in the current dir
set( Mapla_App_WIN32_ICON ${OTB_SOURCE_DIR}/Utilities/Data/Icons/monteverdi.ico)
configure_file(
mvdMaplaWin32.rc.in
mvdMaplaWin32.rc
@ONLY
)
if (MINGW)
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
endif()
# The RC file to be added to source list
set( Mapla_App_WIN32_RC_FILE ${CMAKE_CURRENT_BINARY_DIR}/mvdMaplaWin32.rc )
endif()
############################################################################# #############################################################################
qt4_wrap_cpp( OTBMapla_SRC_MOC ${OTBMapla_HEADERS_MOC} ) qt4_wrap_cpp( OTBMapla_SRC_MOC ${OTBMapla_HEADERS_MOC} )
qt4_wrap_ui( OTBMapla_FORMS_HEADERS ${OTBMapla_FORMS} ) qt4_wrap_ui( OTBMapla_FORMS_HEADERS ${OTBMapla_FORMS} )
qt4_add_resources( OTBMapla_RESOURCES_RCC ${OTBMapla_RESOURCES} ) qt4_add_resources( OTBMapla_RESOURCES_RCC ${OTBMapla_RESOURCES} )
############################################################################# ##########################[Mapla library]####################################
add_executable( mapla ${OTBMapla_SRCS} ) add_library( OTBMapla
STATIC
############################################################################# ${OTBMapla_SRCS}
target_link_libraries( mapla ${OTBMapla_FORMS_HEADERS}
${OTBMapla_SRC_MOC}
)
target_link_libraries( OTBMapla
${OTBMonteverdiCore_LIBRARIES} ${OTBMonteverdiCore_LIBRARIES}
${OTBMonteverdiGUI_LIBRARIES} ${OTBMonteverdiGUI_LIBRARIES}
${OTBQt4_LIBRARIES}
) )
otb_module_target( OTBMapla )
############################################################################# ############################[Mapla executable]###############################
add_executable( mapla
main.cxx
${Mapla_App_WIN32_RC_FILE}
${OTBMapla_RESOURCES_RCC}
)
target_link_libraries( mapla
OTBMapla
)
otb_module_target( mapla ) otb_module_target( mapla )
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