Commit 17728493 authored by promayon's avatar promayon
Browse files

NEW mml is now better integrated in CamiTK (mmlschema is separated from...

NEW mml is now better integrated in CamiTK (mmlschema is separated from monitoring, applications are separated from lib)
    this makes it easier to manage from now on
NEW lml now using lmlschema (moved from incubator/modeling, thanks to Nicolas great work), libxml2 not needed anymore in lml
FIXED (tentative) mml compilation on windows
FIXED various little bits in mml and apps


git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@2055 ec899d31-69d1-42ba-9299-647d76f65fb3
parent a80d2148
......@@ -13,6 +13,14 @@ include(SofaSupport.cmake)
# uncomment the following line for old versions of sofa: at your own risk!
#include(SofaLegacySupport.cmake)
# For packaging on windows, dash cannot be used as separator
# => replace it by underscore
if (PACKAGING_NSIS)
set(TARGET_NAME_SEPARATOR _)
else()
set(TARGET_NAME_SEPARATOR -)
endif()
camitk_extension_project(NAME "modeling"
CONTACT "Celine.Fouard@imag.fr,Emmanuel.Promayon@imag.fr"
DESCRIPTION "The modeling CamiTK Extension Project contains all the action and component extensions that are useful for biomechanical processing. It provides the LML, PML and MML libraries, and the related components and actions."
......
camitk_extension(ACTION_EXTENSION
NEEDS_LIBXML2
NEEDS_XSD
NEEDS_CEP_LIBRARIES pml mmlschema monitoringgui monitoring lml
NEEDS_CEP_LIBRARIES pml lml lmlschema monitoring monitoringgui mmlschema
NEEDS_COMPONENT_EXTENSION physicalmodel mmlcomponent vtkmesh physicalmodel msh
CEP_NAME CEP_MODELING
DESCRIPTION "Action MML features algorithms applicable on MML components."
TEST_APPLICATION ${APPLICATION_TEST_ACTION}
TEST_FILES BigEndian.hdr
# TEST_FILES BigEndian.hdr
)
\ No newline at end of file
......@@ -9,6 +9,15 @@
# Find applications
get_subdirectories(APPLICATIONS_LIST)
# -- Define for subdirectory usage (test and tools)
# create some useful variables for subdirectories applications
# This lines have to be below the camitk_application macro call
set(LML_DEPENDENCY library${TARGET_NAME_SEPARATOR}lml)
set(LMLSCHEMA_DEPENDENCY library${TARGET_NAME_SEPARATOR}lmlschema)
set(LML_DEPENDENCIES ${LML_DEPENDENCY} ${LMLSCHEMA_DEPENDENCY})
set(PML_DEPENDENCY library${TARGET_NAME_SEPARATOR}pml)
set(PMLLML_DEPENDENCY ${PML_DEPENDENCY} ${LML_DEPENDENCY} ${LMLSCHEMA_DEPENDENCY})
# --- add every given application
foreach(APPLICATION_NAME ${APPLICATIONS_LIST})
add_subdirectory(${APPLICATION_NAME})
......
set(LMLTEST_TARGET_NAME library${TARGET_NAME_SEPARATOR}lmltest)
set (SRCS lmltest.cpp)
include_directories(${CAMITK_INCLUDE_DIR}/libraries)
link_directories(${CAMITK_LINK_DIRECTORIES})
add_executable(${LMLTEST_TARGET_NAME} ${SRCS})
target_link_libraries(${LMLTEST_TARGET_NAME} ${LML_LIBRARIES})
add_dependencies(${LMLTEST_TARGET_NAME} ${LML_LIBRARY_NAME})
target_link_libraries(${LMLTEST_TARGET_NAME} ${LML_DEPENDENCIES}) # both lml and lmlschema are needed
add_dependencies(${LMLTEST_TARGET_NAME} ${LML_DEPENDENCY}) # as lml depends on lmlschema, only lml needed here
#----------
# Testing
......
......@@ -24,9 +24,9 @@
****************************************************************************/
// include the needed files
#include <Loads.h>
#include <Translation.h>
#include <Force.h>
#include <lml/Loads.h>
#include <lml/Translation.h>
#include <lml/Force.h>
#include <string>
#include <string.h>
#include <ostream>
......
# generation benchmark binary is optionnal
# MML applications
# The mml applications are not defined as camitk applications
# (they do not use the camitk_application macro)
# because they are not publicly published yet...
# => includes, libraries and link path have to be defined manually
# and used in the subdirectories CMakeLists.txt
# respectively with:
# include_directories(${MML_INCLUDE_DIRECTORIES})
# set(applicationname_LIBRARIES ${MML_LIBRARIES} ...)
# link_directories(${MML_LINK_DIRECTORIES})
# To publish them as camitk application, the following would be needed:
# - a global naming (such as camitk-mml-appname)
# - a man page
# - for GUI app: an icon, a .desktop file etc...
set(MML_INCLUDE_DIRECTORIES
${CAMITK_INCLUDE_DIRECTORIES}
${CAMITK_INCLUDE_DIR}/libraries
${MMLSCHEMA_INCLUDE_DIR}
${CAMITK_INCLUDE_DIR}/libraries/mmlschema
${CAMITK_INCLUDE_DIR}/libraries/monitoring
${CAMITK_INCLUDE_DIR}/libraries/pml
${CAMITK_INCLUDE_DIR}/libraries/lml
......@@ -30,20 +38,29 @@ set(MML_LINK_DIRECTORIES
${SOFA_LIB_DIR}
)
if(MML_GENERATE_GUI)
find_package(Qt4 REQUIRED)
add_definitions(-DMML_GENERATE_GUI)
add_subdirectory(gui)
endif()
set(MMLSCHEMA_INCLUDE_DIR ${CAMITK_INCLUDE_DIR}/libraries/mmlschema)
# define names of the mml libraries globally
set(MMLSCHEMA_DEPENDENCY library${TARGET_NAME_SEPARATOR}mmlschema)
set(MONITORING_DEPENDENCY library${TARGET_NAME_SEPARATOR}monitoring)
set(MONITORING_GUI_DEPENDENCY library${TARGET_NAME_SEPARATOR}monitoringgui)
set(MML_DEPENDENCY ${MONITORING_DEPENDENCY} ${MMLSCHEMA_DEPENDENCY} ${PMLLML_DEPENDENCY})
option(MML_GENERATE_BENCHMARK "Generates benchmark binary" OFF)
if(MML_GENERATE_BENCHMARK)
add_subdirectory(benchmark)
endif()
if(MML_GENERATE_GUI)
option(MML_GENERATE_BENCHMARKGUI "Generates benchmarkgui binary" OFF)
if(MML_GENERATE_BENCHMARKGUI)
add_subdirectory(benchmarkgui)
endif()
endif()
if(SOFA_SUPPORT)
option(MML_GENERATE_SCN2PML "Generates scn2pml binary" OFF)
if(MML_GENERATE_SCN2PML)
if(MML_GENERATE_SCN2PML)
add_subdirectory(scn2pml)
endif()
endif()
......
......@@ -4,10 +4,11 @@ if(MML_GENERATE_GUI)
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
set(benchmark_LIBRARIES ${QT_LIBRARIES})
add_definitions(-DMML_GENERATE_GUI)
endif()
set(benchmark_LIBRARIES
${MML_LIBRARIES}
${MML_DEPENDENCY}
${benchmark_LIBRARIES}
)
......@@ -20,16 +21,8 @@ set(SRCS
)
include_directories(${MML_INCLUDE_DIRECTORIES})
link_directories(${MML_LINK_DIRECTORIES})
add_executable(benchmark ${SRCS})
message(STATUS " : benchmark_LIBRARIES = ${benchmark_LIBRARIES}")
target_link_libraries(benchmark ${benchmark_LIBRARIES})
add_custom_target(benchmakBin ALL)
add_dependencies(benchmark ${MONITORING_LIBRARY_NAME})
add_dependencies(benchmark ${MONITORING_DEPENDENCY})
......@@ -26,7 +26,6 @@
#include <memory> // std::auto_ptr
#include <iostream>
#include <MonitorIn.hxx>
#include <MonitoringManager.h>
#include <MonitoringManagerFactory.h>
......@@ -47,7 +46,7 @@ main (int argc, char* argv[]) {
#ifdef MML_GENERATE_GUI
QApplication app(argc, argv);
#endif
MonitoringManager* c=MonitoringManagerFactory::createManager(argv[1]);
MonitoringManager* c = MonitoringManagerFactory::createManager(argv[1]);
c->simulate();
delete c;
......
project(benchmarkgui)
if(MML_GENERATE_GUI)
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
set(benchmarkgui_LIBRARIES ${QT_LIBRARIES})
add_definitions(-DMML_GENERATE_GUI)
endif()
set(benchmarkgui_LIBRARIES
${benchmarkgui_LIBRARIES}
${MML_DEPENDENCY}
${MONITORING_GUI_DEPENDENCY}
)
set(HEADERS
)
set(SRCS
benchmarkgui.cpp
${HEADERS}
)
include_directories(${MML_INCLUDE_DIRECTORIES})
link_directories(${MML_LINK_DIRECTORIES})
add_executable(benchmarkgui ${SRCS})
target_link_libraries(benchmarkgui ${benchmarkgui_LIBRARIES})
add_dependencies(benchmarkgui ${MONITORING_DEPENDENCY})
......@@ -24,16 +24,14 @@
****************************************************************************/
#include <QApplication>
#include "MonitoringGuiManager.h"
#include <monitoringgui/MonitoringGuiManager.h>
using namespace std;
int
main (int argc, char* argv[]) {
int main (int argc, char* argv[]) {
// just instanciate MonitoringGuiManager
QApplication app(argc, argv);
MonitoringGuiManager* manager=new MonitoringGuiManager();
MonitoringGuiManager* manager = new MonitoringGuiManager();
return app.exec();
delete manager;
}
\ No newline at end of file
......@@ -4,12 +4,12 @@ if(MML_GENERATE_GUI)
find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})
set(paramExplorer_LIBRARIES ${QT_LIBRARIES})
add_definitions(-DMML_GENERATE_GUI)
endif()
set(paramExplorer_LIBRARIES
${paramExplorer_LIBRARIES}
${MML_LIBRARIES}
${MONITORING_LIBRARY_NAME}
${paramExplorer_LIBRARIES}
${MML_DEPENDENCY}
)
set(HEADERS
......@@ -21,13 +21,7 @@ set(SRCS
)
include_directories(${MML_INCLUDE_DIRECTORIES})
link_directories(${MML_LINK_DIRECTORIES})
add_executable(paramExplorer ${SRCS})
target_link_libraries(paramExplorer ${paramExplorer_LIBRARIES})
add_custom_target(paramExplorerBin ALL)
add_dependencies(paramExplorer ${MONITORING_LIBRARY_NAME})
add_dependencies(paramExplorer ${MONITORING_DEPENDENCY})
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