@@ -1,93 +1,97 | |||||
1 | /*------------------------------------------------------------------------------ |
|
1 | /*------------------------------------------------------------------------------ | |
2 | -- This file is a part of the QLop Software |
|
2 | -- This file is a part of the QLop Software | |
3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS |
|
3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS | |
4 | -- |
|
4 | -- | |
5 | -- This program is free software; you can redistribute it and/or modify |
|
5 | -- This program is free software; you can redistribute it and/or modify | |
6 | -- it under the terms of the GNU General Public License as published by |
|
6 | -- it under the terms of the GNU General Public License as published by | |
7 | -- the Free Software Foundation; either version 2 of the License, or |
|
7 | -- the Free Software Foundation; either version 2 of the License, or | |
8 | -- (at your option) any later version. |
|
8 | -- (at your option) any later version. | |
9 | -- |
|
9 | -- | |
10 | -- This program is distributed in the hope that it will be useful, |
|
10 | -- This program is distributed in the hope that it will be useful, | |
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | -- GNU General Public License for more details. |
|
13 | -- GNU General Public License for more details. | |
14 | -- |
|
14 | -- | |
15 | -- You should have received a copy of the GNU General Public License |
|
15 | -- You should have received a copy of the GNU General Public License | |
16 | -- along with this program; if not, write to the Free Software |
|
16 | -- along with this program; if not, write to the Free Software | |
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | -------------------------------------------------------------------------------*/ |
|
18 | -------------------------------------------------------------------------------*/ | |
19 | /*-- Author : Alexis Jeandet |
|
19 | /*-- Author : Alexis Jeandet | |
20 | -- Mail : alexis.jeandet@member.fsf.org |
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |
21 | ----------------------------------------------------------------------------*/ |
|
21 | ----------------------------------------------------------------------------*/ | |
22 | #include "MainWindow.h" |
|
22 | #include "MainWindow.h" | |
23 | #include <QProcessEnvironment> |
|
23 | #include <QProcessEnvironment> | |
24 | #include <QThread> |
|
24 | #include <QThread> | |
25 | #include <SqpApplication.h> |
|
25 | #include <SqpApplication.h> | |
26 | #include <qglobal.h> |
|
26 | #include <qglobal.h> | |
27 |
|
27 | |||
28 | #include <PluginManager/PluginManager.h> |
|
28 | #include <PluginManager/PluginManager.h> | |
29 | #include <QDir> |
|
29 | #include <QDir> | |
30 | #include <QtPlugin> |
|
30 | #include <QtPlugin> | |
31 |
|
31 | |||
32 | #include <QLoggingCategory> |
|
32 | #include <QLoggingCategory> | |
33 |
|
33 | |||
34 | Q_LOGGING_CATEGORY(LOG_Main, "Main") |
|
34 | Q_LOGGING_CATEGORY(LOG_Main, "Main") | |
35 |
|
35 | |||
36 | namespace |
|
36 | namespace | |
37 | { |
|
37 | { | |
38 |
|
38 | |||
39 | const auto PLUGIN_DIRECTORY_NAME = QStringLiteral("plugins"); |
|
39 | const auto PLUGIN_DIRECTORY_NAME = QStringLiteral("plugins"); | |
40 |
|
40 | |||
41 |
|
41 | |||
42 | } // namespace |
|
42 | } // namespace | |
43 |
|
43 | |||
44 | int main(int argc, char* argv[]) |
|
44 | int main(int argc, char* argv[]) | |
45 | { |
|
45 | { | |
46 | #ifdef QT_STATICPLUGIN |
|
46 | #ifdef QT_STATICPLUGIN | |
47 | Q_IMPORT_PLUGIN(MockPlugin) |
|
47 | Q_IMPORT_PLUGIN(MockPlugin) | |
48 | Q_IMPORT_PLUGIN(AmdaPlugin) |
|
48 | Q_IMPORT_PLUGIN(AmdaPlugin) | |
49 | Q_INIT_RESOURCE(amdaresources); |
|
49 | Q_INIT_RESOURCE(amdaresources); | |
50 | #endif |
|
50 | #endif | |
51 | Q_INIT_RESOURCE(sqpguiresources); |
|
51 | Q_INIT_RESOURCE(sqpguiresources); | |
52 |
|
52 | |||
53 | SqpApplication::setOrganizationName("LPP"); |
|
53 | SqpApplication::setOrganizationName("LPP"); | |
54 | SqpApplication::setOrganizationDomain("lpp.fr"); |
|
54 | SqpApplication::setOrganizationDomain("lpp.fr"); | |
55 | SqpApplication::setApplicationName("SciQLop"); |
|
55 | SqpApplication::setApplicationName("SciQLop"); | |
56 |
|
56 | |||
57 | QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); |
|
57 | QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); | |
58 |
|
58 | |||
59 | SqpApplication a { argc, argv }; |
|
59 | SqpApplication a { argc, argv }; | |
60 |
|
60 | |||
61 | MainWindow w; |
|
61 | MainWindow w; | |
62 | w.show(); |
|
62 | w.show(); | |
63 |
|
63 | |||
64 | // Loads plugins |
|
64 | // Loads plugins | |
65 | auto pluginDir = QDir { a.applicationDirPath() }; |
|
65 | auto pluginDir = QDir { a.applicationDirPath() }; | |
66 | auto pluginLookupPath = { |
|
66 | auto pluginLookupPath = { | |
|
67 | #if _WIN32 || _WIN64 | |||
|
68 | a.applicationDirPath() + "/SciQLop" | |||
|
69 | #else | |||
67 | a.applicationDirPath() + "/../lib64/SciQLop", |
|
70 | a.applicationDirPath() + "/../lib64/SciQLop", | |
68 | a.applicationDirPath() + "/../lib64/sciqlop", |
|
71 | a.applicationDirPath() + "/../lib64/sciqlop", | |
69 | a.applicationDirPath() + "/../lib/SciQLop", |
|
72 | a.applicationDirPath() + "/../lib/SciQLop", | |
70 | a.applicationDirPath() + "/../lib/sciqlop", |
|
73 | a.applicationDirPath() + "/../lib/sciqlop", | |
|
74 | #endif | |||
71 | }; |
|
75 | }; | |
72 |
|
76 | |||
73 | #if _WIN32 || _WIN64 |
|
77 | #if _WIN32 || _WIN64 | |
74 | pluginDir.mkdir(PLUGIN_DIRECTORY_NAME); |
|
78 | pluginDir.mkdir(PLUGIN_DIRECTORY_NAME); | |
75 | pluginDir.cd(PLUGIN_DIRECTORY_NAME); |
|
79 | pluginDir.cd(PLUGIN_DIRECTORY_NAME); | |
76 | #endif |
|
80 | #endif | |
77 |
|
81 | |||
78 | PluginManager pluginManager {}; |
|
82 | PluginManager pluginManager {}; | |
79 |
|
83 | |||
80 | for (auto&& path : pluginLookupPath) |
|
84 | for (auto&& path : pluginLookupPath) | |
81 | { |
|
85 | { | |
82 | QDir directory { path }; |
|
86 | QDir directory { path }; | |
83 | if (directory.exists()) |
|
87 | if (directory.exists()) | |
84 | { |
|
88 | { | |
85 | qCDebug(LOG_Main()) |
|
89 | qCDebug(LOG_Main()) | |
86 | << QObject::tr("Plugin directory: %1").arg(directory.absolutePath()); |
|
90 | << QObject::tr("Plugin directory: %1").arg(directory.absolutePath()); | |
87 | pluginManager.loadPlugins(directory); |
|
91 | pluginManager.loadPlugins(directory); | |
88 | } |
|
92 | } | |
89 | } |
|
93 | } | |
90 | pluginManager.loadStaticPlugins(); |
|
94 | pluginManager.loadStaticPlugins(); | |
91 |
|
95 | |||
92 | return a.exec(); |
|
96 | return a.exec(); | |
93 | } |
|
97 | } |
@@ -1,93 +1,93 | |||||
1 | include_directories(include) |
|
1 | include_directories(include) | |
2 | FILE (GLOB_RECURSE amdaplugin_SRCS |
|
2 | FILE (GLOB_RECURSE amdaplugin_SRCS | |
3 | include/*.h |
|
3 | include/*.h | |
4 | src/*.cpp |
|
4 | src/*.cpp | |
5 | resources/*.qrc |
|
5 | resources/*.qrc | |
6 | ) |
|
6 | ) | |
7 |
|
7 | |||
8 |
|
8 | |||
9 | set(AMDA_server_type hybrid CACHE STRING "AMDA server type selected at CMake configure time") |
|
9 | set(AMDA_server_type hybrid CACHE STRING "AMDA server type selected at CMake configure time") | |
10 |
|
10 | |||
11 | set(AMDA_SERVER_TYPE "hybrid;amdatest;localhost" CACHE STRING |
|
11 | set(AMDA_SERVER_TYPE "hybrid;amdatest;localhost" CACHE STRING | |
12 | "List of possible for AMDA server type") |
|
12 | "List of possible for AMDA server type") | |
13 |
|
13 | |||
14 | set_property(CACHE AMDA_server_type PROPERTY STRINGS ${AMDA_SERVER_TYPE}) |
|
14 | set_property(CACHE AMDA_server_type PROPERTY STRINGS ${AMDA_SERVER_TYPE}) | |
15 | add_definitions(-DSCIQLOP_AMDA_SERVER="${AMDA_server_type}") |
|
15 | add_definitions(-DSCIQLOP_AMDA_SERVER="${AMDA_server_type}") | |
16 | add_definitions(-DAMDAPLUGIN_LIB) |
|
16 | add_definitions(-DAMDAPLUGIN_LIB) | |
17 | add_definitions(-DAMDA_LIB) |
|
17 | add_definitions(-DAMDA_LIB) | |
18 |
|
18 | |||
19 | add_definitions(-DQT_PLUGIN) |
|
19 | add_definitions(-DQT_PLUGIN) | |
20 | add_definitions(-DSCIQLOP_PLUGIN_JSON_FILE_PATH="${CMAKE_CURRENT_SOURCE_DIR}/resources/amda.json") |
|
20 | add_definitions(-DSCIQLOP_PLUGIN_JSON_FILE_PATH="${CMAKE_CURRENT_SOURCE_DIR}/resources/amda.json") | |
21 | if(NOT BUILD_SHARED_LIBS) |
|
21 | if(NOT BUILD_SHARED_LIBS) | |
22 | add_definitions(-DQT_STATICPLUGIN) |
|
22 | add_definitions(-DQT_STATICPLUGIN) | |
23 | endif() |
|
23 | endif() | |
24 |
|
24 | |||
25 | add_library(amdaplugin ${amdaplugin_SRCS}) |
|
25 | add_library(amdaplugin ${amdaplugin_SRCS}) | |
26 | SET_TARGET_PROPERTIES(amdaplugin PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) |
|
26 | SET_TARGET_PROPERTIES(amdaplugin PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) | |
27 |
|
27 | |||
28 | target_link_libraries(amdaplugin PUBLIC sciqlopgui) |
|
28 | target_link_libraries(amdaplugin PUBLIC sciqlopgui) | |
29 |
|
29 | |||
30 | install(TARGETS amdaplugin |
|
30 | install(TARGETS amdaplugin | |
31 |
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/SciQ |
|
31 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/SciQLop | |
32 |
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/SciQ |
|
32 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/SciQLop | |
33 |
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}/SciQ |
|
33 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}/SciQLop) | |
34 |
|
34 | |||
35 | include(sciqlop_tests) |
|
35 | include(sciqlop_tests) | |
36 |
|
36 | |||
37 | add_definitions(-DAMDA_TESTS_RESOURCES_DIR="${CMAKE_CURRENT_LIST_DIR}/tests-resources") |
|
37 | add_definitions(-DAMDA_TESTS_RESOURCES_DIR="${CMAKE_CURRENT_LIST_DIR}/tests-resources") | |
38 |
|
38 | |||
39 | declare_test(TestAmdaParser TestAmdaParser tests/TestAmdaParser.cpp "amdaplugin;Qt5::Test") |
|
39 | declare_test(TestAmdaParser TestAmdaParser tests/TestAmdaParser.cpp "amdaplugin;Qt5::Test") | |
40 | declare_test(TestAmdaResultParser TestAmdaResultParser tests/TestAmdaResultParser.cpp "amdaplugin;Qt5::Test") |
|
40 | declare_test(TestAmdaResultParser TestAmdaResultParser tests/TestAmdaResultParser.cpp "amdaplugin;Qt5::Test") | |
41 | declare_test(TestAmdaAcquisition TestAmdaAcquisition tests/TestAmdaAcquisition.cpp "amdaplugin;Qt5::Test") |
|
41 | declare_test(TestAmdaAcquisition TestAmdaAcquisition tests/TestAmdaAcquisition.cpp "amdaplugin;Qt5::Test") | |
42 | declare_test(TestAmdaFuzzing TestAmdaFuzzing "tests/TestAmdaFuzzing.cpp;tests/FuzzingValidators.cpp;tests/FuzzingUtils.cpp;tests/FuzzingOperations.cpp;tests/FuzzingDefs.cpp" "amdaplugin;Qt5::Test") |
|
42 | declare_test(TestAmdaFuzzing TestAmdaFuzzing "tests/TestAmdaFuzzing.cpp;tests/FuzzingValidators.cpp;tests/FuzzingUtils.cpp;tests/FuzzingOperations.cpp;tests/FuzzingDefs.cpp" "amdaplugin;Qt5::Test") | |
43 |
|
43 | |||
44 |
|
44 | |||
45 | if(PyWrappers) |
|
45 | if(PyWrappers) | |
46 | if(MINGW) |
|
46 | if(MINGW) | |
47 | add_definitions(-D_hypot=hypot) |
|
47 | add_definitions(-D_hypot=hypot) | |
48 | endif() |
|
48 | endif() | |
49 | pybind11_add_module(pytestamda tests/PyTestAmdaWrapper.cpp) |
|
49 | pybind11_add_module(pytestamda tests/PyTestAmdaWrapper.cpp) | |
50 | target_link_libraries(pytestamda PUBLIC amdaplugin) |
|
50 | target_link_libraries(pytestamda PUBLIC amdaplugin) | |
51 | target_link_libraries(pytestamda PUBLIC pysciqlop) |
|
51 | target_link_libraries(pytestamda PUBLIC pysciqlop) | |
52 |
|
52 | |||
53 |
|
53 | |||
54 | #pybind11_add_module(pytestamdalib SHARED tests/PyTestAmdaWrapper.cpp) |
|
54 | #pybind11_add_module(pytestamdalib SHARED tests/PyTestAmdaWrapper.cpp) | |
55 | add_library(pytestamdalib tests/PyTestAmdaWrapper.cpp) |
|
55 | add_library(pytestamdalib tests/PyTestAmdaWrapper.cpp) | |
56 | target_link_libraries(pytestamdalib PUBLIC pybind11::module) |
|
56 | target_link_libraries(pytestamdalib PUBLIC pybind11::module) | |
57 | target_link_libraries(pytestamdalib PUBLIC pybind11::embed) |
|
57 | target_link_libraries(pytestamdalib PUBLIC pybind11::embed) | |
58 | target_link_libraries(pytestamdalib PUBLIC amdaplugin) |
|
58 | target_link_libraries(pytestamdalib PUBLIC amdaplugin) | |
59 | target_link_libraries(pytestamdalib PUBLIC pysciqlop) |
|
59 | target_link_libraries(pytestamdalib PUBLIC pysciqlop) | |
60 |
|
60 | |||
61 | GET_PROPERTY(CORE_PYTHON_PATH GLOBAL PROPERTY CORE_PYTHON_PATH) |
|
61 | GET_PROPERTY(CORE_PYTHON_PATH GLOBAL PROPERTY CORE_PYTHON_PATH) | |
62 |
|
62 | |||
63 | declare_test(TestAmdaFileParserEmbed TestAmdaFileParserEmbed "tests/PyTestAmdaWrapperExe.cpp" "pytestamdalib") |
|
63 | declare_test(TestAmdaFileParserEmbed TestAmdaFileParserEmbed "tests/PyTestAmdaWrapperExe.cpp" "pytestamdalib") | |
64 | target_compile_definitions(TestAmdaFileParserEmbed PRIVATE -DPYTESTAMDA_SCRIPT="${CMAKE_CURRENT_LIST_DIR}/tests/TestAmdaFileParser.py") |
|
64 | target_compile_definitions(TestAmdaFileParserEmbed PRIVATE -DPYTESTAMDA_SCRIPT="${CMAKE_CURRENT_LIST_DIR}/tests/TestAmdaFileParser.py") | |
65 | set_tests_properties(TestAmdaFileParserEmbed PROPERTIES ENVIRONMENT PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:${CORE_PYTHON_PATH}) |
|
65 | set_tests_properties(TestAmdaFileParserEmbed PROPERTIES ENVIRONMENT PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:${CORE_PYTHON_PATH}) | |
66 |
|
66 | |||
67 |
|
67 | |||
68 | declare_test(TestAmdaDownloadEmbed TestAmdaDownloadEmbed "tests/PyTestAmdaWrapperExe.cpp" "pytestamdalib") |
|
68 | declare_test(TestAmdaDownloadEmbed TestAmdaDownloadEmbed "tests/PyTestAmdaWrapperExe.cpp" "pytestamdalib") | |
69 | target_compile_definitions(TestAmdaDownloadEmbed PRIVATE -DPYTESTAMDA_SCRIPT="${CMAKE_CURRENT_LIST_DIR}/tests/TestAmdaDownload.py") |
|
69 | target_compile_definitions(TestAmdaDownloadEmbed PRIVATE -DPYTESTAMDA_SCRIPT="${CMAKE_CURRENT_LIST_DIR}/tests/TestAmdaDownload.py") | |
70 | set_tests_properties(TestAmdaDownloadEmbed PROPERTIES ENVIRONMENT PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:${CORE_PYTHON_PATH}) |
|
70 | set_tests_properties(TestAmdaDownloadEmbed PROPERTIES ENVIRONMENT PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:${CORE_PYTHON_PATH}) | |
71 |
|
71 | |||
72 |
|
72 | |||
73 | declare_test(TestAmdaMiniFuzzEmbed TestAmdaMiniFuzzEmbed "tests/PyTestAmdaWrapperExe.cpp" "pytestamdalib") |
|
73 | declare_test(TestAmdaMiniFuzzEmbed TestAmdaMiniFuzzEmbed "tests/PyTestAmdaWrapperExe.cpp" "pytestamdalib") | |
74 | target_compile_definitions(TestAmdaMiniFuzzEmbed PRIVATE -DPYTESTAMDA_SCRIPT="${CMAKE_CURRENT_LIST_DIR}/tests/TestAmdaMiniFuzz.py") |
|
74 | target_compile_definitions(TestAmdaMiniFuzzEmbed PRIVATE -DPYTESTAMDA_SCRIPT="${CMAKE_CURRENT_LIST_DIR}/tests/TestAmdaMiniFuzz.py") | |
75 | set_tests_properties(TestAmdaMiniFuzzEmbed PROPERTIES ENVIRONMENT PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:${CORE_PYTHON_PATH}) |
|
75 | set_tests_properties(TestAmdaMiniFuzzEmbed PROPERTIES ENVIRONMENT PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:${CORE_PYTHON_PATH}) | |
76 |
|
76 | |||
77 |
|
77 | |||
78 | find_package(PythonInterp 3 REQUIRED) |
|
78 | find_package(PythonInterp 3 REQUIRED) | |
79 |
|
79 | |||
80 | add_test(NAME TestAmdaFileParser |
|
80 | add_test(NAME TestAmdaFileParser | |
81 | COMMAND ${PYTHON_EXECUTABLE} |
|
81 | COMMAND ${PYTHON_EXECUTABLE} | |
82 | ${CMAKE_CURRENT_LIST_DIR}/tests/TestAmdaFileParser.py |
|
82 | ${CMAKE_CURRENT_LIST_DIR}/tests/TestAmdaFileParser.py | |
83 | TestAmdaFileParser) |
|
83 | TestAmdaFileParser) | |
84 | set_tests_properties(TestAmdaFileParser PROPERTIES ENVIRONMENT PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:${CORE_PYTHON_PATH}) |
|
84 | set_tests_properties(TestAmdaFileParser PROPERTIES ENVIRONMENT PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:${CORE_PYTHON_PATH}) | |
85 |
|
85 | |||
86 |
|
86 | |||
87 | add_test(NAME TestAmdaDownload |
|
87 | add_test(NAME TestAmdaDownload | |
88 | COMMAND ${PYTHON_EXECUTABLE} |
|
88 | COMMAND ${PYTHON_EXECUTABLE} | |
89 | ${CMAKE_CURRENT_LIST_DIR}/tests/TestAmdaDownload.py |
|
89 | ${CMAKE_CURRENT_LIST_DIR}/tests/TestAmdaDownload.py | |
90 | TestAmdaDownload) |
|
90 | TestAmdaDownload) | |
91 | set_tests_properties(TestAmdaDownload PROPERTIES ENVIRONMENT PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:${CORE_PYTHON_PATH}) |
|
91 | set_tests_properties(TestAmdaDownload PROPERTIES ENVIRONMENT PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:${CORE_PYTHON_PATH}) | |
92 |
|
92 | |||
93 | endif(PyWrappers) |
|
93 | endif(PyWrappers) |
@@ -1,37 +1,37 | |||||
1 | include_directories(include) |
|
1 | include_directories(include) | |
2 | FILE (GLOB_RECURSE mockplugin_SRCS |
|
2 | FILE (GLOB_RECURSE mockplugin_SRCS | |
3 | include/*.h |
|
3 | include/*.h | |
4 | src/*.cpp |
|
4 | src/*.cpp | |
5 | resources/*.qrc |
|
5 | resources/*.qrc | |
6 | ) |
|
6 | ) | |
7 |
|
7 | |||
8 | add_definitions(-DQT_PLUGIN) |
|
8 | add_definitions(-DQT_PLUGIN) | |
9 | add_definitions(-DPLUGIN_JSON_FILE_PATH="${CMAKE_CURRENT_SOURCE_DIR}/resources/mockplugin.json") |
|
9 | add_definitions(-DPLUGIN_JSON_FILE_PATH="${CMAKE_CURRENT_SOURCE_DIR}/resources/mockplugin.json") | |
10 | if(NOT BUILD_SHARED_LIBS) |
|
10 | if(NOT BUILD_SHARED_LIBS) | |
11 | add_definitions(-DQT_STATICPLUGIN) |
|
11 | add_definitions(-DQT_STATICPLUGIN) | |
12 | endif() |
|
12 | endif() | |
13 |
|
13 | |||
14 | add_library(mockplugin ${mockplugin_SRCS}) |
|
14 | add_library(mockplugin ${mockplugin_SRCS}) | |
15 | SET_TARGET_PROPERTIES(mockplugin PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) |
|
15 | SET_TARGET_PROPERTIES(mockplugin PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) | |
16 |
|
16 | |||
17 | target_link_libraries(mockplugin sciqlopgui) |
|
17 | target_link_libraries(mockplugin sciqlopgui) | |
18 |
|
18 | |||
19 | install(TARGETS mockplugin |
|
19 | install(TARGETS mockplugin | |
20 |
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/SciQ |
|
20 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/SciQLop | |
21 |
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/SciQ |
|
21 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/SciQLop | |
22 |
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}/SciQ |
|
22 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}/SciQLop) | |
23 |
|
23 | |||
24 | include(sciqlop_tests) |
|
24 | include(sciqlop_tests) | |
25 |
|
25 | |||
26 | add_definitions(-DMOCKPLUGIN_TESTS_RESOURCES_DIR="${CMAKE_CURRENT_LIST_DIR}/tests-resources") |
|
26 | add_definitions(-DMOCKPLUGIN_TESTS_RESOURCES_DIR="${CMAKE_CURRENT_LIST_DIR}/tests-resources") | |
27 | add_definitions(-DMOCKPLUGIN_LIB) |
|
27 | add_definitions(-DMOCKPLUGIN_LIB) | |
28 |
|
28 | |||
29 | #declare_test(TestCosinusAcquisition TestCosinusAcquisition tests/TestCosinusAcquisition.cpp "mockplugin;Qt5::Test") |
|
29 | #declare_test(TestCosinusAcquisition TestCosinusAcquisition tests/TestCosinusAcquisition.cpp "mockplugin;Qt5::Test") | |
30 | if(PyWrappers) |
|
30 | if(PyWrappers) | |
31 | if(MINGW) |
|
31 | if(MINGW) | |
32 | add_definitions(-D_hypot=hypot) |
|
32 | add_definitions(-D_hypot=hypot) | |
33 | endif() |
|
33 | endif() | |
34 | pybind11_add_module(pytestmockplugin tests/PyTestMockPluginWrapper.cpp) |
|
34 | pybind11_add_module(pytestmockplugin tests/PyTestMockPluginWrapper.cpp) | |
35 | target_link_libraries(pytestmockplugin PUBLIC mockplugin) |
|
35 | target_link_libraries(pytestmockplugin PUBLIC mockplugin) | |
36 | target_link_libraries(pytestmockplugin PUBLIC pysciqlop) |
|
36 | target_link_libraries(pytestmockplugin PUBLIC pysciqlop) | |
37 | endif() |
|
37 | endif() |
General Comments 0
You need to be logged in to leave comments.
Login now