Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit ca8882d9 authored by Julien Wintz's avatar Julien Wintz

Fixed install rules for dtk.

Towards using either build tree or install tree in e.g. dtk-imaging.
parent 39bc98c1
......@@ -42,15 +42,11 @@ set(CMAKE_MODULE_PATH
set_directory_properties(PROPERTIES TEST_INCLUDE_FILE "@CMAKE_BINARY_DIR@/dtkSetTestEnvironment.cmake")
find_package(Qt5 REQUIRED COMPONENTS Core Concurrent Network Quick Svg Test Widgets Xml NO_DEFAULT_PATH)
set(dtk_MODULE_PATH "@CMAKE_BINARY_DIR@")
set(dtk_INSTALL_DOCS @dtk_INSTALL_DOCS@)
set(dtk_CONFIG_DOCS @dtk_CONFIG_DOCS@)
set(dtk_WRAP_BASE "@CMAKE_BINARY_DIR@/dtk_base.i")
set(dtk_WRAP_CORE "@CMAKE_BINARY_DIR@/dtkCore.i")
set(dtk_WRAP_WIDGETS "@CMAKE_BINARY_DIR@/dtkWidgets.i")
set(dtk_WRAP_QVARIANT "@CMAKE_BINARY_DIR@/QVariant.i")
set(dtk_INSTALL_DOCS "@dtk_INSTALL_DOCS@")
set(dtk_CONFIG_DOCS "@dtk_CONFIG_DOCS@")
set(dtk_WRAP_PREFIX "@CMAKE_SOURCE_DIR@/wrp")
## ###################################################################
## Options
......
......@@ -34,27 +34,13 @@ set(CMAKE_MODULE_PATH
set(DTK_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
set(dtk_INSTALL_DOCS "@CMAKE_INSTALL_PREFIX@/doc")
set(dtk_WRAP_BASE "@CMAKE_INSTALL_PREFIX@/include/swig/dtk_base.i")
set(dtk_WRAP_CORE "@CMAKE_INSTALL_PREFIX@/include/swig/dtkCore.i")
set(dtk_WRAP_WIDGETS "@CMAKE_INSTALL_PREFIX@/include/swig/dtkWidgets.i")
set(dtk_WRAP_QVARIANT "@CMAKE_INSTALL_PREFIX@/include/swig/QVariant.i")
set(dtk_WRAP_PREFIX "@CMAKE_INSTALL_PREFIX@/wrp")
include("@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/cmake/dtk/dtkDepends.cmake")
include("@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/cmake/dtk/dtkWrap.cmake")
set_directory_properties(PROPERTIES TEST_INCLUDE_FILE "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/cmake/dtk/dtkSetTestEnvironment.cmake")
find_package(Qt5 REQUIRED COMPONENTS
Core
Concurrent
Network
Quick
Svg
Test
Widgets
Xml)
## ###################################################################
## Options
## ###################################################################
......
......@@ -102,8 +102,6 @@ if(SWIG_FOUND)
"-c++"
"-module" ${name}
${include_dirs}
"-I${PROJECT_SOURCE_DIR}/.."
"-I${PROJECT_SOURCE_DIR}/src"
"-outdir" ${CMAKE_CURRENT_BINARY_DIR}
"-o" ${wrap_output}
${input}
......
......@@ -120,7 +120,7 @@ if(DTK_BUILD_WRAPPERS)
set(${PROJECT_NAME}_WRAP_DEPENDS ${${PROJECT_NAME}_WRAP_DEPENDS} ${CMAKE_BINARY_DIR}/dtkCore.i)
if (DTK_WRAPPING_PYTHON AND PYTHONLIBS_FOUND)
dtk_wrap(${PROJECT_NAME} ${PROJECT_NAME}_SOURCES_WRAP dtkcore python ${PROJECT_SOURCE_DIR}/dtkCore.i "${${PROJECT_NAME}_WRAP_DEPENDS}" ".")
dtk_wrap(${PROJECT_NAME} ${PROJECT_NAME}_SOURCES_WRAP dtkcore python ${PROJECT_SOURCE_DIR}/dtkCore.i "${${PROJECT_NAME}_WRAP_DEPENDS}" "${CMAKE_SOURCE_DIR}/src;${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_SOURCE_DIR}/wrp/dtkBase;${CMAKE_SOURCE_DIR}/wrp/QtCore")
endif()
if (DTK_WRAPPING_TCL AND TCL_FOUND)
......
......@@ -14,8 +14,8 @@
%module(directors="1") dtkcore
%include "dtk_base.i"
%include "qrunnable.i"
%include <dtk_base.i>
%include <qrunnable.i>
%{
......
......@@ -48,7 +48,7 @@ if(DTK_BUILD_WRAPPERS AND SWIG_FOUND)
if (DTK_WRAPPING_PYTHON)
if (PYTHONLIBS_FOUND)
dtk_wrap(${PROJECT_NAME} ${PROJECT_NAME}_SOURCES_WRAP dtklog python ${PROJECT_SOURCE_DIR}/dtkLog.i "${${PROJECT_NAME}_WRAP_DEPENDS}" ".")
dtk_wrap(${PROJECT_NAME} ${PROJECT_NAME}_SOURCES_WRAP dtklog python ${PROJECT_SOURCE_DIR}/dtkLog.i "${${PROJECT_NAME}_WRAP_DEPENDS}" "${CMAKE_SOURCE_DIR}/src;${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_SOURCE_DIR}/wrp/dtkBase;${CMAKE_SOURCE_DIR}/wrp/QtCore")
endif()
endif()
......
......@@ -134,7 +134,7 @@ if(DTK_BUILD_WRAPPERS)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dtkWidgets.i ${CMAKE_BINARY_DIR}/dtkWidgets.i COPYONLY)
if (DTK_WRAPPING_PYTHON AND PYTHONLIBS_FOUND)
dtk_wrap(${PROJECT_NAME} ${PROJECT_NAME}_SOURCES_WRAP dtkwidgets python ${PROJECT_SOURCE_DIR}/dtkWidgets.i "${${PROJECT_NAME}_WRAP_DEPENDS}" ".")
dtk_wrap(${PROJECT_NAME} ${PROJECT_NAME}_SOURCES_WRAP dtkwidgets python ${PROJECT_SOURCE_DIR}/dtkWidgets.i "${${PROJECT_NAME}_WRAP_DEPENDS}" "${CMAKE_SOURCE_DIR}/src;${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_SOURCE_DIR}/wrp/dtkBase;${CMAKE_SOURCE_DIR}/wrp/dtkWidgets;${CMAKE_SOURCE_DIR}/wrp/QtCore;${CMAKE_SOURCE_DIR}/wrp/QtWidgets")
endif()
if (DTK_WRAPPING_TCL AND TCL_FOUND)
dtk_wrap(${PROJECT_NAME} ${PROJECT_NAME}_SOURCES_WRAP dtkwidgets tcl ${PROJECT_SOURCE_DIR}/dtkWidgets.i "${${PROJECT_NAME}_WRAP_DEPENDS}" ".")
......@@ -304,7 +304,6 @@ install(FILES ${${PROJECT_NAME}_HEADERS}
install(FILES ${${PROJECT_NAME}_MODULES} DESTINATION modules)
install(FILES ${CMAKE_BINARY_DIR}/dtkWidgets.i DESTINATION include/swig)
## ###################################################################
## Install rules - targets
## ###################################################################
......
/* dtkApplication.h ---
*
* Author: Nicolas Niclausse
* Copyright (C) 2015 - Nicolas Niclausse, Inria.
* Created: 2015/02/04 12:01:21
*/
// Version: $Id$
//
//
/* Commentary:
*
*/
// Commentary:
//
//
/* Change log:
*
*/
// Change Log:
//
//
// Code:
#pragma once
#include <dtkWidgetsExport.h>
#include <dtkLog>
#include <QApplication>
#include <QtCore>
#include <QtWidgets>
class dtkApplicationPrivate;
class DTKWIDGETS_EXPORT dtkApplication: public QApplication
{
public:
dtkApplication(int& argc, char **argv);
dtkApplication(int& argc, char **argv);
virtual ~dtkApplication(void);
public:
......@@ -36,10 +36,11 @@ public:
public:
static dtkApplication *create(int& argc, char *argv[]) {
for (int i = 0; i < argc; i++)
for (int i = 0; i < argc; i++) {
if (!qstrcmp(argv[i], "-nw") || !qstrcmp(argv[i], "--nw") || !qstrcmp(argv[i], "-no-window") || !qstrcmp(argv[i], "--no-window") || !qstrcmp(argv[i], "-h") || !qstrcmp(argv[i], "--help") || !qstrcmp(argv[i], "--version")) {
qputenv("QT_QPA_PLATFORM", QByteArrayLiteral("minimal"));
}
}
return new dtkApplication(argc, argv);
}
......@@ -52,3 +53,5 @@ protected:
dtkApplicationPrivate *d;
};
//
// dtkApplication.h ends here
......@@ -12,9 +12,10 @@
##
### Code:
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qt_core.i ${CMAKE_BINARY_DIR}/qt_core.i COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/QVariant.i ${CMAKE_BINARY_DIR}/QVariant.i COPYONLY)
install(FILES ${CMAKE_BINARY_DIR}/QVariant.i DESTINATION include/swig)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/qt_core.i DESTINATION wrp/QtCore/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/qrunnable.i DESTINATION wrp/QtCore/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/QVariant.i DESTINATION wrp/QtCore/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/QObject.h DESTINATION wrp/QtCore/)
######################################################################
### CMakeLists.txt ends here
......@@ -12,7 +12,11 @@
##
### Code:
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qt_widgets.i ${CMAKE_BINARY_DIR}/qt_widgets.i COPYONLY)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/QBoxLayout.h DESTINATION wrp/QtWidgets/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/QVBoxLayout.h DESTINATION wrp/QtWidgets/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/QLayout.h DESTINATION wrp/QtWidgets/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/QWidget.h DESTINATION wrp/QtWidgets/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/qt_widgets.i DESTINATION wrp/QtWidgets/)
######################################################################
### CMakeLists.txt ends here
......@@ -12,8 +12,7 @@
##
### Code:
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dtk_base.i ${CMAKE_BINARY_DIR}/dtk_base.i COPYONLY)
install(FILES ${CMAKE_BINARY_DIR}/dtk_base.i DESTINATION include/swig)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dtk_base.i DESTINATION wrp/dtkBase/)
######################################################################
### CMakeLists.txt ends here
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