Commit 44890c80 authored by Pierre Kraemer's avatar Pierre Kraemer

SCHNApps : CMakeLists debug

parent e739fd2a
......@@ -19,7 +19,7 @@ find_package(QGLViewer REQUIRED)
#======SCHNApps=======#
SET(SCHNApps_ROOT_DIR ${CGoGN_ROOT_DIR}/SCHNApps)
SET(EXECUTABLE_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/plugins/lib)
SET(LIBRARY_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/Plugins)
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/Release Release)
IF (NOT WIN32)
......
......@@ -34,7 +34,7 @@ IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
TARGET_LINK_LIBRARIES( FirstPluginD
${CGoGN_LIBS_D}
${COMMON_LIBS}
${QGLVIEWER_INCLUDE_LIBRARY}
${QGLVIEWER_LIBRARIES}
)
ADD_DEPENDENCIES( FirstPluginD SCHNAppsD )
......@@ -59,7 +59,7 @@ ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
TARGET_LINK_LIBRARIES( FirstPlugin
${CGoGN_LIBS_R}
${COMMON_LIBS}
${QGLVIEWER_INCLUDE_LIBRARY}
${QGLVIEWER_LIBRARIES}
)
ADD_DEPENDENCIES( FirstPlugin SCHNApps )
......
......@@ -21,7 +21,6 @@ PluginDialog::PluginDialog(Window *parent, PluginHash *activePlugins) :
parentWindow(parent),
init(true)
{
// if(!xmlFile.exists())
// {
// System::Error::code= System::Error::NO_PLUGIN_PATH_FILE;
......
......@@ -561,9 +561,7 @@ Plugin *Window::loadPlugin(QString pluginPath)
{
Plugin *plugin = qobject_cast<Plugin *>(pluginObject);
QString pluginName = QFileInfo(pluginPath).fileName();
pluginName.remove(0, 3);
pluginName.remove(pluginName.lastIndexOf(".so"), 3);
QString pluginName = QFileInfo(pluginPath).baseName().remove(0, 3);
//we set the plugin with correct parameters (name, filepath)
plugin->setWindow(this);
......@@ -573,10 +571,8 @@ Plugin *Window::loadPlugin(QString pluginPath)
//then we call its activate() methods
if (plugin->activate(m_initialization))
{
//if it succeeded we reference this plugin
h_plugin.insert(pluginName, plugin);
//method success
return plugin;
}
......@@ -617,7 +613,6 @@ void Window::unloadPlugin(QString pluginName)
}
}
Plugin *Window::checkPluginDependencie(QString name, Plugin *dependantPlugin)
{
//if the plugin is referenced and found
......
......@@ -39,37 +39,41 @@ int GenericMap::m_nbInstances = 0;
GenericMap::GenericMap() : m_nbThreads(1)
{
if(m_attributes_registry_map == NULL)
{
std::cout << "INITIALIZE REGISTRY MAP" << std::endl;
m_attributes_registry_map = new std::map<std::string, RegisteredBaseAttribute*>;
m_nbInstances++;
// register all known types
registerAttribute<Dart>("Dart");
registerAttribute<Mark>("Mark");
// register all known types
registerAttribute<Dart>("Dart");
registerAttribute<Mark>("Mark");
registerAttribute<long>("long");
registerAttribute<int>("int");
registerAttribute<short>("short");
registerAttribute<char>("char");
registerAttribute<long>("long");
registerAttribute<int>("int");
registerAttribute<short>("short");
registerAttribute<char>("char");
registerAttribute<unsigned long>("unsigned long");
registerAttribute<unsigned int>("unsigned int");
registerAttribute<unsigned short>("unsigned short");
registerAttribute<unsigned char>("unsigned char");
registerAttribute<unsigned long>("unsigned long");
registerAttribute<unsigned int>("unsigned int");
registerAttribute<unsigned short>("unsigned short");
registerAttribute<unsigned char>("unsigned char");
registerAttribute<Geom::Vec2f>(Geom::Vec2f::CGoGNnameOfType());
registerAttribute<Geom::Vec3f>(Geom::Vec3f::CGoGNnameOfType());
registerAttribute<Geom::Vec4f>(Geom::Vec4f::CGoGNnameOfType());
registerAttribute<Geom::Vec2f>(Geom::Vec2f::CGoGNnameOfType());
registerAttribute<Geom::Vec3f>(Geom::Vec3f::CGoGNnameOfType());
registerAttribute<Geom::Vec4f>(Geom::Vec4f::CGoGNnameOfType());
registerAttribute<Geom::Vec2d>(Geom::Vec2d::CGoGNnameOfType());
registerAttribute<Geom::Vec3d>(Geom::Vec3d::CGoGNnameOfType());
registerAttribute<Geom::Vec4d>(Geom::Vec4d::CGoGNnameOfType());
registerAttribute<Geom::Vec2d>(Geom::Vec2d::CGoGNnameOfType());
registerAttribute<Geom::Vec3d>(Geom::Vec3d::CGoGNnameOfType());
registerAttribute<Geom::Vec4d>(Geom::Vec4d::CGoGNnameOfType());
registerAttribute<Geom::Matrix33f>(Geom::Matrix33f::CGoGNnameOfType());
registerAttribute<Geom::Matrix44f>(Geom::Matrix44f::CGoGNnameOfType());
registerAttribute<Geom::Matrix33f>(Geom::Matrix33f::CGoGNnameOfType());
registerAttribute<Geom::Matrix44f>(Geom::Matrix44f::CGoGNnameOfType());
registerAttribute<Geom::Matrix33d>(Geom::Matrix33d::CGoGNnameOfType());
registerAttribute<Geom::Matrix44d>(Geom::Matrix44d::CGoGNnameOfType());
registerAttribute<Geom::Matrix33d>(Geom::Matrix33d::CGoGNnameOfType());
registerAttribute<Geom::Matrix44d>(Geom::Matrix44d::CGoGNnameOfType());
}
m_nbInstances++;
for(unsigned int i = 0; i < NB_ORBITS; ++i)
{
......@@ -108,7 +112,6 @@ GenericMap::~GenericMap()
m_attribs[i].clear(true) ;
}
for(std::multimap<AttributeMultiVectorGen*, AttributeHandlerGen*>::iterator it = attributeHandlers.begin(); it != attributeHandlers.end(); ++it)
(*it).second->setInvalid() ;
attributeHandlers.clear() ;
......@@ -126,7 +129,7 @@ GenericMap::~GenericMap()
// clean type registry if necessary
m_nbInstances--;
if (m_nbInstances<=0)
if (m_nbInstances <= 0)
{
for (std::map<std::string, RegisteredBaseAttribute*>::iterator it = m_attributes_registry_map->begin(); it != m_attributes_registry_map->end(); ++it)
delete it->second;
......
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