Commit e442ce7f authored by Sylvain Thery's avatar Sylvain Thery

resolve pb of path loading for plugins

parent abad6c04
......@@ -28,7 +28,7 @@ IF(WIN32)
ENDIF()
ELSE()
SET(EXECUTABLE_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE})
SET(LIBRARY_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE})
# SET(LIBRARY_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE})
link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE} )
ENDIF()
......
cmake_minimum_required(VERSION 2.8)
Project(Plugins)
IF(WIN32)
IF (CGoGN_WITH_QTCREATOR)
SET(LIBRARY_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/lib/plugins/${CMAKE_BUILD_TYPE})
link_directories( ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE} )
ELSE()
SET(LIBRARY_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/lib/plugins)
link_directories( ${CGoGN_ROOT_DIR}/bin/${ConfigurationName} )
ENDIF()
ELSE()
SET(LIBRARY_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/lib/plugins/${CMAKE_BUILD_TYPE})
link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE} )
ENDIF()
ADD_SUBDIRECTORY(surface_import)
ADD_SUBDIRECTORY(surface_render)
ADD_SUBDIRECTORY(surface_renderVector)
......
......@@ -7,12 +7,6 @@ if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
endif()
IF(WIN32 AND (NOT(CGoGN_WITH_QTCREATOR)))
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/)
ELSE()
SET(LIBRARY_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE})
ENDIF()
ADD_LIBRARY( ${PLUGIN_NAME} SHARED
${PLUGIN_FILES}
${PLUGIN_UIC_FILES}
......
......@@ -4,10 +4,23 @@ project(SCHNAppsLib)
IF(WIN32 AND (NOT (CGoGN_WITH_QTCREATOR)))
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/plugins_default_directory.h
\#define\ PLUGINS_DEFAULT_DIRECTORY\ \"${CGoGN_ROOT_DIR}/bin/\" ) # NOT POSSIBLE TO KNOW IF WE ARE IN DEBUG OR RELEASE
\#define\ PLUGINS_DEFAULT_DIRECTORY\ \"${SCHNApps_ROOT_DIR}/lib/plugins/\" )
ELSE()
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/plugins_default_directory.h
\#define\ PLUGINS_DEFAULT_DIRECTORY\ \"${SCHNApps_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE}\" )
\#define\ PLUGINS_DEFAULT_DIRECTORY\ \"${SCHNApps_ROOT_DIR}/lib/plugins/${CMAKE_BUILD_TYPE}\" )
ENDIF()
IF(WIN32)
IF (CGoGN_WITH_QTCREATOR)
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE})
link_directories( ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE} )
ELSE()
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin)
link_directories( ${CGoGN_ROOT_DIR}/bin/${ConfigurationName} )
ENDIF()
ELSE()
SET(LIBRARY_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE})
link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE} )
ENDIF()
# SCHNApps files to compile in a lib for dll access from plugins
......
......@@ -364,7 +364,16 @@ void SCHNApps::splitView(const QString& name, Qt::Orientation orientation)
void SCHNApps::registerPluginsDirectory(const QString& path)
{
#ifdef WIN32
#ifdef _DEBUG
QDir directory(path+QString("Debug/");
#else
QDir directory(path + QString("Release/"));
#endif
#else
QDir directory(path);
#endif
if(directory.exists())
{
QStringList filters;
......
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