Changed: Plugins specs and plugins installation

This commit is contained in:
kervala 2012-09-24 14:02:33 +02:00
parent f2e15ab93b
commit 671234b330
16 changed files with 48 additions and 26 deletions

View file

@ -7,13 +7,20 @@
# This tells the application(s) where to find the installed data.
IF(WIN32)
SET(OVQT_PLUGIN_SPECS_DIR "plugins")
SET(OVQT_PLUGIN_DIR "plugins")
ELSEIF(APPLE)
# TODO: under Mac OS X, don't install but copy files in application package
SET(OVQT_PLUGIN_SPECS_DIR "plugins")
SET(OVQT_PLUGIN_DIR "plugins")
ELSE(WIN32)
SET(OVQT_PLUGIN_DIR ${NL_SHARE_PREFIX}/object_viewer_qt/plugins)
ADD_DEFINITIONS(-DDATA_DIR="\\"${NL_SHARE_ABSOLUTE_PREFIX}/object_viewer_qt\\"" -DPLUGINS_DIR="\\"${NL_LIB_ABSOLUTE_PREFIX}/object_viewer_qt\\"")
SET(OVQT_PLUGIN_SPECS_DIR ${NL_SHARE_PREFIX}/object_viewer_qt/plugins)
SET(OVQT_PLUGIN_DIR ${NL_LIB_PREFIX}/object_viewer_qt)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/ovqt_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/ovqt_config.h)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
ADD_DEFINITIONS(-DHAVE_OVQT_CONFIG_H)
ENDIF(WIN32)
IF(UNIX AND WITH_STATIC)

View file

@ -0,0 +1,7 @@
#ifndef OVQT_CONFIG_H
#define OVQT_CONFIG_H
#define DATA_DIR "${NL_SHARE_ABSOLUTE_PREFIX}/object_viewer_qt"
#define PLUGINS_DIR "${NL_LIB_ABSOLUTE_PREFIX}/object_viewer_qt"
#endif

View file

@ -35,6 +35,10 @@
#include "config.h"
#endif
#ifdef HAVE_OVQT_CONFIG_H
#include "ovqt_config.h"
#endif
namespace ExtensionSystem
{
const char *const PLUGIN_SPEC_NAME = "name";

View file

@ -41,6 +41,10 @@
#include <QtGui/QFileDialog>
#include <QtGui/QInputDialog>
#ifdef HAVE_OVQT_CONFIG_H
#include "ovqt_config.h"
#endif
static const char *appNameC = "ObjectViewerQt";
// nel_qt log file name

View file

@ -44,6 +44,6 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_bnp_manager)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS})
INSTALL(TARGETS ovqt_plugin_bnp_manager LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_bnp_manager.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(TARGETS ovqt_plugin_bnp_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_bnp_manager.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d)

View file

@ -56,5 +56,5 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_core)
ADD_DEFINITIONS(-DCORE_LIBRARY ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS})
INSTALL(TARGETS ovqt_plugin_core LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_core.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_core.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d)

View file

@ -40,6 +40,6 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_disp_sheet_id)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS})
INSTALL(TARGETS ovqt_plugin_disp_sheet_id LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_disp_sheet_id.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(TARGETS ovqt_plugin_disp_sheet_id LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_disp_sheet_id.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d)

View file

@ -38,6 +38,6 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_example)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS})
INSTALL(TARGETS ovqt_plugin_example LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_example.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(TARGETS ovqt_plugin_example LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_example.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d)

View file

@ -44,6 +44,6 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_georges_editor)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS})
INSTALL(TARGETS ovqt_plugin_georges_editor LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_georges_editor.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(TARGETS ovqt_plugin_georges_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_georges_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d)

View file

@ -45,6 +45,6 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_landscape_editor)
ADD_DEFINITIONS(-DLANDSCAPE_EDITOR_LIBRARY ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS})
INSTALL(TARGETS ovqt_plugin_landscape_editor LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d)
#INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_landscape_editor.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(TARGETS ovqt_plugin_landscape_editor LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
#INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_landscape_editor.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d)

View file

@ -36,6 +36,6 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_log)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS})
INSTALL(TARGETS ovqt_plugin_log LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_log.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(TARGETS ovqt_plugin_log LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_log.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d)

View file

@ -46,6 +46,6 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_mission_compiler)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS})
INSTALL(TARGETS ovqt_plugin_mission_compiler LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_mission_compiler.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(TARGETS ovqt_plugin_mission_compiler LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_mission_compiler.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d)

View file

@ -163,6 +163,6 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_object_viewer)
ADD_DEFINITIONS(-DQT_NO_KEYWORDS ${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS})
INSTALL(TARGETS ovqt_plugin_object_viewer LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_object_viewer.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(TARGETS ovqt_plugin_object_viewer LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_object_viewer.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d)

View file

@ -29,6 +29,6 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_sheet_builder)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS})
INSTALL(TARGETS ovqt_plugin_sheet_builder LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_sheet_builder.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(TARGETS ovqt_plugin_sheet_builder LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_sheet_builder.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d)

View file

@ -48,6 +48,6 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_translation_manager)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS})
INSTALL(TARGETS ovqt_plugin_translation_manager LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_translation_manager.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(TARGETS ovqt_plugin_translation_manager LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_translation_manager.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d)

View file

@ -42,6 +42,6 @@ NL_ADD_LIB_SUFFIX(ovqt_plugin_zone_painter)
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED ${QT_DEFINITIONS})
INSTALL(TARGETS ovqt_plugin_zone_painter LIBRARY DESTINATION ${NL_LIB_PREFIX} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_zone_painter.xml DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(TARGETS ovqt_plugin_zone_painter LIBRARY DESTINATION ${OVQT_PLUGIN_DIR} RUNTIME DESTINATION bin ARCHIVE DESTINATION ${OVQT_PLUGIN_DIR} COMPONENT tools3d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/ovqt_plugin_zone_painter.xml DESTINATION ${OVQT_PLUGIN_SPECS_DIR} COMPONENT tools3d)