Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit f48a8c07 authored by saubatn's avatar saubatn
Browse files

UPDATED : CMake configuration on SDK + Modeling ok.

parent 411bebbd
#--------------------------------------------
# Modeling extension project
#--------------------------------------------
cmake_minimum_required(VERSION 2.6)
# Mini find CamiTK inside SDK
set(CAMITK_DIR ${CMAKE_BINARY_DIR})
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CAMITK_DIR}/share/${CAMITK_SHORT_VERSION_STRING}/cmake)
......
project(benchmark)
if(MML_GENERATE_GUI)
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
set(benchmark_LIBRARIES ${QT_LIBRARIES})
set(QT_COMPONENTS Core Gui Xml XmlPatterns Widgets Help UiTools OpenGL OpenGLExtensions)
find_package(Qt5 COMPONENTS ${QT_COMPONENTS} REQUIRED)
if (Qt5_FOUND)
# cmake_policy(SET CMP0020 NEW) # policy for Qt core linking to qtmain.lib
message(STATUS "Modeling application benchmark: found Qt ${Qt5_VERSION}.")
set(QT_INCLUDE_DIRS ${Qt5Widgets_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Xml_INCLUDE_DIRS} ${Qt5XmlPatterns_INCLUDE_DIRS} ${Qt5Declarative_INCLUDE_DIRS} ${Qt5Help_INCLUDE_DIRS} ${Qt5UiTools_INCLUDE_DIRS} ${Qt5OpenGL_INCLUDE_DIRS} ${Qt5OpenGLExtensions_INCLUDE_DIRS})
include_directories(${QT_INCLUDE_DIRS})
else()
message(SEND_ERROR "Modeling application benchmark: Failed to find Qt 5.x. This is needed by ${LIBRARY_TARGET_NAME}.")
endif()
add_definitions(-DMML_GENERATE_GUI)
endif()
set(benchmark_LIBRARIES
${MML_DEPENDENCY}
${benchmark_LIBRARIES}
)
set(HEADERS
)
......@@ -23,6 +25,7 @@ set(SRCS
include_directories(${MML_INCLUDE_DIRECTORIES})
link_directories(${MML_LINK_DIRECTORIES})
add_executable(benchmark ${SRCS})
target_link_libraries(benchmark ${benchmark_LIBRARIES})
qt5_use_modules(benchmark ${QT_COMPONENTS})
target_link_libraries(benchmark ${MML_DEPENDENCY})
add_dependencies(benchmark ${MONITORING_DEPENDENCY})
project(benchmarkgui)
if(MML_GENERATE_GUI)
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
set(benchmarkgui_LIBRARIES ${QT_LIBRARIES})
set(QT_COMPONENTS Core Gui Xml XmlPatterns Widgets Help UiTools OpenGL OpenGLExtensions)
find_package(Qt5 COMPONENTS ${QT_COMPONENTS} REQUIRED)
if (Qt5_FOUND)
# cmake_policy(SET CMP0020 NEW) # policy for Qt core linking to qtmain.lib
message(STATUS "Modeling application benchmarkgui: found Qt ${Qt5_VERSION}.")
set(QT_INCLUDE_DIRS ${Qt5Widgets_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Xml_INCLUDE_DIRS} ${Qt5XmlPatterns_INCLUDE_DIRS} ${Qt5Declarative_INCLUDE_DIRS} ${Qt5Help_INCLUDE_DIRS} ${Qt5UiTools_INCLUDE_DIRS} ${Qt5OpenGL_INCLUDE_DIRS} ${Qt5OpenGLExtensions_INCLUDE_DIRS})
include_directories(${QT_INCLUDE_DIRS})
else()
message(SEND_ERROR "Modeling application benchmarkgui: Failed to find Qt 5.x. This is needed by ${LIBRARY_TARGET_NAME}.")
endif()
add_definitions(-DMML_GENERATE_GUI)
endif()
set(benchmarkgui_LIBRARIES
${benchmarkgui_LIBRARIES}
${MML_DEPENDENCY}
${MONITORING_GUI_DEPENDENCY}
)
......@@ -24,5 +30,6 @@ set(SRCS
include_directories(${MML_INCLUDE_DIRECTORIES})
link_directories(${MML_LINK_DIRECTORIES})
add_executable(benchmarkgui ${SRCS})
qt5_use_modules(benchmarkgui ${QT_COMPONENTS})
target_link_libraries(benchmarkgui ${benchmarkgui_LIBRARIES})
add_dependencies(benchmarkgui ${MONITORING_DEPENDENCY})
project(paramExplorer)
if(MML_GENERATE_GUI)
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
set(paramExplorer_LIBRARIES ${QT_LIBRARIES})
set(QT_COMPONENTS Core Gui Xml XmlPatterns Widgets Help UiTools OpenGL OpenGLExtensions)
find_package(Qt5 COMPONENTS ${QT_COMPONENTS} REQUIRED)
if (Qt5_FOUND)
# cmake_policy(SET CMP0020 NEW) # policy for Qt core linking to qtmain.lib
message(STATUS "Modeling application paramExplorer: found Qt ${Qt5_VERSION}.")
set(QT_INCLUDE_DIRS ${Qt5Widgets_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Xml_INCLUDE_DIRS} ${Qt5XmlPatterns_INCLUDE_DIRS} ${Qt5Declarative_INCLUDE_DIRS} ${Qt5Help_INCLUDE_DIRS} ${Qt5UiTools_INCLUDE_DIRS} ${Qt5OpenGL_INCLUDE_DIRS} ${Qt5OpenGLExtensions_INCLUDE_DIRS})
include_directories(${QT_INCLUDE_DIRS})
else()
message(SEND_ERROR "Modeling application paramExplorer: Failed to find Qt 5.x. This is needed by ${LIBRARY_TARGET_NAME}.")
endif()
add_definitions(-DMML_GENERATE_GUI)
endif()
set(paramExplorer_LIBRARIES
${paramExplorer_LIBRARIES}
${MML_DEPENDENCY}
)
......@@ -23,5 +29,6 @@ set(SRCS
include_directories(${MML_INCLUDE_DIRECTORIES})
link_directories(${MML_LINK_DIRECTORIES})
add_executable(paramExplorer ${SRCS})
qt5_use_modules(paramExplorer ${QT_COMPONENTS})
target_link_libraries(paramExplorer ${paramExplorer_LIBRARIES})
add_dependencies(paramExplorer ${MONITORING_DEPENDENCY})
project(pml2mmlOut)
if(MML_GENERATE_GUI)
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
set(pml2mmlOut_LIBRARIES ${QT_LIBRARIES})
set(QT_COMPONENTS Core Gui Xml XmlPatterns Widgets Help UiTools OpenGL OpenGLExtensions)
find_package(Qt5 COMPONENTS ${QT_COMPONENTS} REQUIRED)
if (Qt5_FOUND)
# cmake_policy(SET CMP0020 NEW) # policy for Qt core linking to qtmain.lib
message(STATUS "Modeling application pml2mmlOut: found Qt ${Qt5_VERSION}.")
set(QT_INCLUDE_DIRS ${Qt5Widgets_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Xml_INCLUDE_DIRS} ${Qt5XmlPatterns_INCLUDE_DIRS} ${Qt5Declarative_INCLUDE_DIRS} ${Qt5Help_INCLUDE_DIRS} ${Qt5UiTools_INCLUDE_DIRS} ${Qt5OpenGL_INCLUDE_DIRS} ${Qt5OpenGLExtensions_INCLUDE_DIRS})
include_directories(${QT_INCLUDE_DIRS})
else()
message(SEND_ERROR "Modeling application pml2mmlOut: Failed to find Qt 5.x. This is needed by ${LIBRARY_TARGET_NAME}.")
endif()
add_definitions(-DMML_GENERATE_GUI)
endif()
set(pml2mmlOut_LIBRARIES
${MML_DEPENDENCY}
${pml2mmlOut_LIBRARIES}
)
set(HEADERS
......@@ -23,5 +29,6 @@ set(SRCS
include_directories(${MML_INCLUDE_DIRECTORIES})
link_directories(${MML_LINK_DIRECTORIES})
add_executable(pml2mmlOut ${SRCS})
qt5_use_modules(pml2mmlOut ${QT_COMPONENTS})
target_link_libraries(pml2mmlOut ${pml2mmlOut_LIBRARIES})
add_dependencies(pml2mmlOut ${MONITORING_DEPENDENCY})
project(LML)
cmake_minimum_required(VERSION 2.6)
# Is this tool is compiled inside or outside CamiTK (as a standalone)?
if (NOT CEP_NAME STREQUAL "modeling")
# if this tool is compiled independently from CamiTK
......
......@@ -5,9 +5,6 @@ if (NOT CEP_NAME STREQUAL "modeling")
message(SEND_ERROR "Compilation of MML outside CamiTK SDK not implemented yet. Please contact authors")
endif()
# see cmake --help-policy CMP0022 for more information
cmake_minimum_required(VERSION 2.6)
# for generating GUI
option(MML_GENERATE_GUI "Generates MML GUI for CamiTK action" ON)
......
......@@ -8,10 +8,10 @@ set(monitoringgui_UIS
MonitoringDialog.ui
)
qt4_wrap_ui(monitoringgui_UIS_H ${monitoringgui_UIS})
qt5_wrap_ui(monitoringgui_UIS_H ${monitoringgui_UIS})
# qt4_wrap_cpp(monitoringgui_MOCS ${monitoringgui_MOC_SRCS}) Not needed if AUTOMOC is set to ON (CMake therefore handle moc automatically)
qt4_add_resources(monitoringgui_QRC MonitoringGuiIcons.qrc)
qt5_add_resources(monitoringgui_QRC MonitoringGuiIcons.qrc)
set(monitoringgui_HEADERS_TO_EXPORT
MonitoringGuiManager.h
......@@ -30,7 +30,6 @@ set(monitoringgui_SRCS
MonitoringDialog.cpp
MonitoringDriver.cpp
${monitoringgui_HEADERS}
${monitoringgui_MOCS}
${monitoringgui_MOC_UI}
)
......@@ -44,7 +43,7 @@ camitk_library( STATIC
NEEDS_CEP_LIBRARIES monitoring mmlschema pml pmlschema lml lmlschema
HEADERS_TO_INSTALL ${monitoringgui_HEADERS_TO_EXPORT}
INCLUDE_DIRECTORIES ${MML_INCLUDE_DIRECTORIES}
NEEDS_QT_MODULES
NEEDS_QT
CEP_NAME CEP_MODELING
DESCRIPTION "Allows one to monitor a biomechanical deformation using a GUI."
)
project(PML)
cmake_minimum_required(VERSION 2.6)
# Is this tool is compiled inside or outside CAMITK (as a standalone)?
if (NOT CEP_NAME STREQUAL "modeling")
......
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