##// END OF EJS Templates
Merge pull request 163 from SCIQLOP-Initialisation develop...
perrinel -
r259:b21e8bfbb401 merge
parent child
Show More
@@ -67,6 +67,11 set_property(TARGET ${EXECUTABLE_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
67 target_link_libraries(${EXECUTABLE_NAME}
67 target_link_libraries(${EXECUTABLE_NAME}
68 ${LIBRARIES})
68 ${LIBRARIES})
69
69
70 INSTALL(TARGETS ${EXECUTABLE_NAME}
71 RUNTIME DESTINATION ${INSTALL_BINARY_DIR}
72 LIBRARY DESTINATION ${INSTALL_BINARY_DIR}
73 ARCHIVE DESTINATION ${INSTALL_BINARY_DIR}
74 )
70 # Link with Qt5 modules
75 # Link with Qt5 modules
71 qt5_use_modules(${EXECUTABLE_NAME} Core Widgets)
76 qt5_use_modules(${EXECUTABLE_NAME} Core Widgets)
72
77
@@ -31,8 +31,19
31 namespace {
31 namespace {
32
32
33 /// Name of the directory containing the plugins
33 /// Name of the directory containing the plugins
34
35 #if _WIN32 || _WIN64
34 const auto PLUGIN_DIRECTORY_NAME = QStringLiteral("plugins");
36 const auto PLUGIN_DIRECTORY_NAME = QStringLiteral("plugins");
37 #endif
38
35
39
40 #if __GNUC__
41 #if __x86_64__ || __ppc64__
42 #define ENVIRONMENT64
43 #else
44 #define ENVIRONMENT32
45 #endif
46 #endif
36 } // namespace
47 } // namespace
37
48
38 int main(int argc, char *argv[])
49 int main(int argc, char *argv[])
@@ -46,9 +57,19 int main(int argc, char *argv[])
46
57
47 // Loads plugins
58 // Loads plugins
48 auto pluginDir = QDir{sqpApp->applicationDirPath()};
59 auto pluginDir = QDir{sqpApp->applicationDirPath()};
60 #if _WIN32 || _WIN64
49 pluginDir.mkdir(PLUGIN_DIRECTORY_NAME);
61 pluginDir.mkdir(PLUGIN_DIRECTORY_NAME);
50 pluginDir.cd(PLUGIN_DIRECTORY_NAME);
62 pluginDir.cd(PLUGIN_DIRECTORY_NAME);
63 #endif
64
51
65
66 #if __GNUC__
67 #if __x86_64__ || __ppc64__
68 pluginDir.cd("../lib64/SciQlop");
69 #else
70 pluginDir.cd("../lib/SciQlop");
71 #endif
72 #endif
52 qCDebug(LOG_PluginManager())
73 qCDebug(LOG_PluginManager())
53 << QObject::tr("Plugin directory: %1").arg(pluginDir.absolutePath());
74 << QObject::tr("Plugin directory: %1").arg(pluginDir.absolutePath());
54
75
@@ -1,17 +1,3
1 #
2 # Sciqlop_modules.cmake
3 #
4 # Set ouptut directories
5 #
6 SET (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist)
7 SET (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist)
8 IF (UNIX)
9 SET (CONFIG_OUTPUT_PATH $ENV{HOME}/.config/QtProject)
10 ELSEIF(WIN32)
11 SET (CONFIG_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist/app/QtProject)
12 ELSE()
13 SET (CONFIG_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist)
14 ENDIF()
15
1
16 if(BUILD_TESTS)
2 if(BUILD_TESTS)
17 INCLUDE ("cmake/sciqlop_code_coverage.cmake")
3 INCLUDE ("cmake/sciqlop_code_coverage.cmake")
@@ -44,6 +44,30 else()
44 set(libRootDirForceValue)
44 set(libRootDirForceValue)
45 endif()
45 endif()
46
46
47 #
48 # Sciqlop_modules.cmake
49 #
50 # Set ouptut directories
51 #
52 IF (UNIX)
53 # 32 or 64 bits compiler
54 IF( CMAKE_SIZEOF_VOID_P EQUAL 8 )
55 SET(defaultLib "lib64/sciqlop")
56 ELSE()
57 SET(defaultLib "lib/sciqlop")
58 ENDIF()
59 SET (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin)
60 SET (CONFIG_OUTPUT_PATH $ENV{HOME}/.config/QtProject)
61 SET (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/${defaultLib})
62 ELSEIF(WIN32)
63 SET (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist)
64 SET (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist)
65 SET (CONFIG_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist/app/QtProject)
66 ELSE()
67 SET (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist)
68 SET (CONFIG_OUTPUT_PATH $ENV{HOME}/.config/QtProject)
69 SET (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist)
70 ENDIF()
47
71
48
72
49 #
73 #
@@ -54,33 +78,51 OPTION (BUILD_SHARED_LIBS "Build the shared libraries" ON)
54 # Generate position independant code (-fPIC)
78 # Generate position independant code (-fPIC)
55 SET(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
79 SET(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
56
80
57 #
81
58 # Configure installation directories
82
59 #
83 # Configuration for make install
84
85 set(PROJECT_PLUGIN_PREFIX "SciQlop")
86
60 IF (UNIX)
87 IF (UNIX)
88 SET(CMAKE_INSTALL_PREFIX "/usr/local/${PROJECT_PLUGIN_PREFIX}")
61 SET(defaultBin "bin")
89 SET(defaultBin "bin")
62 SET(defaultInc "include/sciqlop")
90 SET(defaultInc "include/sciqlop")
63
91
64 # 32 or 64 bits compiler
92 # 32 or 64 bits compiler
65 IF( CMAKE_SIZEOF_VOID_P EQUAL 8 )
93 IF( CMAKE_SIZEOF_VOID_P EQUAL 8 )
66 SET(defaultLib "lib64/sciqlop")
94 SET(defaultLib "lib64")
95 SET(defaultPluginsLib "lib64/${PROJECT_PLUGIN_PREFIX}")
67 ELSE()
96 ELSE()
68 SET(defaultLib "lib/sciqlop")
97 SET(defaultLib "lib/")
98 SET(defaultPluginsLib "lib/${PROJECT_PLUGIN_PREFIX}")
69 ENDIF()
99 ENDIF()
70
100
71 SET(defaultDoc "share/docs/sciqlop")
101 SET(defaultDoc "share/docs/${PROJECT_PLUGIN_PREFIX}")
72 ELSE()
102 ELSE()
73 SET(defaultBin "bin")
103 SET(defaultBin "bin")
74 SET(defaultInc "include/sciqlop")
104 SET(defaultInc "include/${PROJECT_PLUGIN_PREFIX}")
75 SET(defaultLib "lib/sciqlop")
105 SET(defaultLib "lib")
76 SET(defaultDoc "docs/sciqlop")
106 SET(defaultPluginsLib "lib/${PROJECT_PLUGIN_PREFIX}")
107 SET(defaultDoc "docs/${PROJECT_PLUGIN_PREFIX}")
77 ENDIF()
108 ENDIF()
78
109
79 SET(INSTALL_BINARY_DIR "${defaultBin}" CACHE STRING
110 SET(INSTALL_BINARY_DIR "${defaultBin}" CACHE STRING
80 "Installation directory for binaries")
111 "Installation directory for binaries")
81 SET(INSTALL_LIBRARY_DIR "${defaultLib}" CACHE STRING
112 SET(INSTALL_LIBRARY_DIR "${defaultLib}" CACHE STRING
82 "Installation directory for libraries")
113 "Installation directory for libraries")
114 SET(INSTALL_PLUGINS_LIBRARY_DIR "${defaultPluginsLib}" CACHE STRING
115 "Installation directory for libraries")
83 SET(INSTALL_INCLUDE_DIR "${defaultInc}" CACHE STRING
116 SET(INSTALL_INCLUDE_DIR "${defaultInc}" CACHE STRING
84 "Installation directory for headers")
117 "Installation directory for headers")
85 SET(INSTALL_DOCUMENTATION_DIR "${defaultDoc}" CACHE STRING
118 SET(INSTALL_DOCUMENTATION_DIR "${defaultDoc}" CACHE STRING
86 "Installation directory for documentations")
119 "Installation directory for documentations")
120
121
122 # Set the rpath when installing
123 SET(CMAKE_SKIP_BUILD_RPATH FALSE)
124 SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
125 SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBRARY_DIR}")
126 SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
127
128 message("Install RPATH: ${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBRARY_DIR}")
@@ -41,6 +41,12 set_property(TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
41 TARGET_LINK_LIBRARIES(${SQPCORE_LIBRARY_NAME})
41 TARGET_LINK_LIBRARIES(${SQPCORE_LIBRARY_NAME})
42 qt5_use_modules(${SQPCORE_LIBRARY_NAME} Core)
42 qt5_use_modules(${SQPCORE_LIBRARY_NAME} Core)
43
43
44 INSTALL(TARGETS ${SQPCORE_LIBRARY_NAME}
45 RUNTIME DESTINATION ${INSTALL_BINARY_DIR}
46 LIBRARY DESTINATION ${INSTALL_LIBRARY_DIR}
47 ARCHIVE DESTINATION ${INSTALL_LIBRARY_DIR}
48 )
49
44 # From cmake documentation: http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html
50 # From cmake documentation: http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html
45 # Entries in the COMPILE_DEFINITIONS are prefixed with -D or /D and added to the compile line in an unspecified order.
51 # Entries in the COMPILE_DEFINITIONS are prefixed with -D or /D and added to the compile line in an unspecified order.
46 # The DEFINE_SYMBOL target property is also added as a compile definition as a special convenience case for SHARED and MODULE library targets
52 # The DEFINE_SYMBOL target property is also added as a compile definition as a special convenience case for SHARED and MODULE library targets
@@ -1,5 +1,7
1 #include <DataSource/DataSourceItemAction.h>
1 #include <DataSource/DataSourceItemAction.h>
2
2
3 #include <functional>
4
3 Q_LOGGING_CATEGORY(LOG_DataSourceItemAction, "DataSourceItemAction")
5 Q_LOGGING_CATEGORY(LOG_DataSourceItemAction, "DataSourceItemAction")
4
6
5 struct DataSourceItemAction::DataSourceItemActionPrivate {
7 struct DataSourceItemAction::DataSourceItemActionPrivate {
@@ -67,6 +67,12 set_property(TARGET ${SQPGUI_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
67 TARGET_LINK_LIBRARIES(${SQPGUI_LIBRARY_NAME} ${LIBRARIES})
67 TARGET_LINK_LIBRARIES(${SQPGUI_LIBRARY_NAME} ${LIBRARIES})
68 qt5_use_modules(${SQPGUI_LIBRARY_NAME} Core Widgets PrintSupport)
68 qt5_use_modules(${SQPGUI_LIBRARY_NAME} Core Widgets PrintSupport)
69
69
70
71 INSTALL(TARGETS ${SQPGUI_LIBRARY_NAME}
72 RUNTIME DESTINATION ${INSTALL_BINARY_DIR}
73 LIBRARY DESTINATION ${INSTALL_LIBRARY_DIR}
74 ARCHIVE DESTINATION ${INSTALL_LIBRARY_DIR}
75 )
70 add_dependencies(${SQPGUI_LIBRARY_NAME} ${SQPCORE_LIBRARY_NAME})
76 add_dependencies(${SQPGUI_LIBRARY_NAME} ${SQPCORE_LIBRARY_NAME})
71
77
72
78
@@ -19,6 +19,12 FILE (GLOB_RECURSE MODULE_SOURCES
19
19
20 ADD_LIBRARY(${SQPPLUGIN_LIBRARY_NAME} ${MODULE_SOURCES})
20 ADD_LIBRARY(${SQPPLUGIN_LIBRARY_NAME} ${MODULE_SOURCES})
21
21
22 INSTALL(TARGETS ${SQPPLUGIN_LIBRARY_NAME}
23 RUNTIME DESTINATION ${INSTALL_BINARY_DIR}
24 LIBRARY DESTINATION ${INSTALL_LIBRARY_DIR}
25 ARCHIVE DESTINATION ${INSTALL_LIBRARY_DIR}
26 )
27
22
28
23 # Add the files to the list of files to be analyzed
29 # Add the files to the list of files to be analyzed
24 LIST(APPEND CHECKSTYLE_INPUT_FILES ${MODULE_SOURCES})
30 LIST(APPEND CHECKSTYLE_INPUT_FILES ${MODULE_SOURCES})
@@ -49,6 +49,13 ADD_LIBRARY(${SQPMOCKPLUGIN_LIBRARY_NAME} ${MODULE_SOURCES})
49 set_property(TARGET ${SQPMOCKPLUGIN_LIBRARY_NAME} PROPERTY CXX_STANDARD 14)
49 set_property(TARGET ${SQPMOCKPLUGIN_LIBRARY_NAME} PROPERTY CXX_STANDARD 14)
50 set_property(TARGET ${SQPMOCKPLUGIN_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
50 set_property(TARGET ${SQPMOCKPLUGIN_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
51
51
52 INSTALL(TARGETS ${SQPMOCKPLUGIN_LIBRARY_NAME}
53 RUNTIME DESTINATION ${INSTALL_BINARY_DIR}
54 LIBRARY DESTINATION ${INSTALL_PLUGINS_LIBRARY_DIR}
55 ARCHIVE DESTINATION ${INSTALL_PLUGINS_LIBRARY_DIR}
56 )
57
58
52 TARGET_LINK_LIBRARIES(${SQPMOCKPLUGIN_LIBRARY_NAME} ${LIBRARIES})
59 TARGET_LINK_LIBRARIES(${SQPMOCKPLUGIN_LIBRARY_NAME} ${LIBRARIES})
53 qt5_use_modules(${SQPMOCKPLUGIN_LIBRARY_NAME} Core Widgets)
60 qt5_use_modules(${SQPMOCKPLUGIN_LIBRARY_NAME} Core Widgets)
54
61
General Comments 0
You need to be logged in to leave comments. Login now