Skip to content

Commit 4069576

Browse files
committed
Cleanup HAI build system
1 parent 8210c90 commit 4069576

7 files changed

Lines changed: 104 additions & 42 deletions

File tree

Applications/HAI/CMakeLists.txt

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
###########################################################################
2+
#
3+
# Library: MSVTK
4+
#
5+
# Copyright (c) Kitware Inc.
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0.txt
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
###########################################################################
20+
121
set(KIT HAI)
222
project(msv${KIT})
323

@@ -64,6 +84,11 @@ target_link_libraries(msv${KIT}
6484
msvQtWidgets
6585
)
6686

87+
install(TARGETS msv${KIT}
88+
RUNTIME DESTINATION ${MSVTK_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
89+
LIBRARY DESTINATION ${MSVTK_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
90+
ARCHIVE DESTINATION ${MSVTK_INSTALL_LIB_DIR} COMPONENT Development
91+
)
6792

6893
# --------------------------------------------------------------------------
6994
# Build the executable
@@ -72,7 +97,7 @@ target_link_libraries(msv${KIT}
7297
add_executable(${KIT}
7398
hai.cxx
7499
)
75-
set_target_properties(${KIT} PROPERTIES OUTPUT_NAME HAI)
100+
set_target_properties(${KIT} PROPERTIES OUTPUT_NAME hai)
76101

77102
target_link_libraries(${KIT}
78103
msv${KIT}
@@ -99,3 +124,16 @@ set(dynamicHeaders
99124
if(BUILD_TESTING)
100125
add_subdirectory(Testing)
101126
endif()
127+
128+
# --------------------------------------------------------------------------
129+
# Install
130+
# --------------------------------------------------------------------------
131+
if(NOT PACKAGE_WITH_BUNDLE)
132+
set(${KIT}_INSTALL_DESTINATION_ARGS RUNTIME DESTINATION ${MSVTK_INSTALL_BIN_DIR})
133+
else()
134+
set(${KIT}_INSTALL_DESTINATION_ARGS RUNTIME DESTINATION ".")
135+
endif()
136+
137+
install(TARGETS ${KIT}
138+
${${KIT}_INSTALL_DESTINATION_ARGS}
139+
COMPONENT Runtime)

Applications/HAI/Resources/UI/msvQHAIAboutDialog.ui

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,10 @@
4242
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
4343
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
4444
p, li { white-space: pre-wrap; }
45-
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
46-
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;MSVTK Library&lt;br /&gt;Copyright (c) Kitware Inc. &lt;/p&gt;
47-
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;VTK &lt;a href=&quot;http://www.vtk.org/copyright.php&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.vtk.org/copyright.php&lt;/span&gt;&lt;/a&gt; &lt;br /&gt;CTK &lt;a href=&quot;https://github.com/commontk/CTK/blob/master/LICENSE&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;https://github.com/commontk/CTK/blob/master/LICENSE&lt;/span&gt;&lt;/a&gt; &lt;/p&gt;
48-
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The application has been written by Michael Jeulin-Lagarrigue and Julien Finet.&lt;br /&gt;Funding for this work comes from the European Commission within the MSV project (FP7-IST-248032)&lt;br /&gt;Different spatial scales (Challenge #Ch1), heterogeneous data type (Challenge #Ch5) and time varying issues(Challenge #Ch9) are handled by the application.&lt;br /&gt;It uses Electro-physiological dataset structured as the following: &lt;/p&gt;
49-
&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;CartoDataFolder/CartoPoints: collection of .vtk files describing sparse 3D points localized on the heart surface for each time step. &lt;/li&gt;
50-
&lt;li style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;CartoDataFolder/CartoSignals: collection of .csv files corresponding to the entire HAI of a subset of points with each parameter being I, II, III, AvR, AvL, AvF, V1, V2, V3, V4, V5 and V6 derivations. &lt;/li&gt;&lt;/ul&gt;
51-
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;It makes the usage of the new VTK pipeline architecture and its temporal pipeline extensions through new modules and widgets added in MSVTK. It also shows and implements the vtkButtons and vtkCharts widgets. &lt;/p&gt;
52-
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The VTK (&amp;gt;5.0) pipeline architecture is needed in order to have time support. Utility classes have been added to MSVTK to ease the use of time in VTK. vtkButtons and vtkCharts widgets are also demo-ed. &lt;br /&gt;Time is represented differently depending on the data type: 3D point clouds are displayed in the VTK render window and animated depending on the HAI coupled time, while the HAIs are represented in a separate VTK chart view(s) as static representations. &lt;br /&gt;3D points for which HAI measurements are recorded are clickable through vtkButtons. vtkButtons are displayed in the VTK render window as cube and linked to the point cloud. Buttons are the connection between the 3D points and the HAI. They are used to display the HAI chart corresponding to the clicked point. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
45+
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
46+
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;MSVTK Library&lt;br /&gt;Copyright (c) Kitware Inc. &lt;/span&gt;&lt;/p&gt;
47+
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;VTK &lt;/span&gt;&lt;a href=&quot;http://www.vtk.org/copyright.php&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.vtk.org/copyright.php&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt; &lt;br /&gt;CTK &lt;/span&gt;&lt;a href=&quot;https://github.com/commontk/CTK/blob/master/LICENSE&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;&quot;&gt;https://github.com/commontk/CTK/blob/master/LICENSE&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;
48+
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;The application has been written by Julien Finet and Michael Jeulin-Lagarrigue.&lt;br /&gt;Funding for this work comes from the European Commission within the MSV project (FP7-IST-248032)&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
5349
</property>
5450
</widget>
5551
</item>
@@ -70,6 +66,7 @@ p, li { white-space: pre-wrap; }
7066
</widget>
7167
<resources>
7268
<include location="../msvQHAI.qrc"/>
69+
<include location="../msvQHAI.qrc"/>
7370
</resources>
7471
<connections>
7572
<connection>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,21 @@
1+
###########################################################################
2+
#
3+
# Library: MSVTK
4+
#
5+
# Copyright (c) Kitware Inc.
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0.txt
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
###########################################################################
20+
121
#add_subdirectory(Cpp)
Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,44 @@
1-
set(KIT ECG)
1+
###########################################################################
2+
#
3+
# Library: MSVTK
4+
#
5+
# Copyright (c) Kitware Inc.
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0.txt
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
###########################################################################
20+
21+
set(KIT HAI)
222
set(KIT_TEST_SRCS
3-
ecgTest1.cxx
4-
msvQECGMainWindowTest1.cxx
5-
msvVTKECGButtonsManagerTest1.cxx
23+
haiTest1.cxx
24+
msvQHAIMainWindowTest1.cxx
625
)
726

8-
create_test_sourcelist(Tests ${KIT}CxxTests.cxx
27+
create_test_sourcelist(Tests msv${KIT}CxxTests.cxx
928
${KIT_TEST_SRCS}
1029
)
1130

1231
set(LIBRARY_NAME msv${KIT})
1332

14-
add_executable(${KIT}CxxTests ${Tests})
15-
target_link_libraries(${KIT}CxxTests ${LIBRARY_NAME})
16-
17-
macro(SIMPLE_TEST TESTNAME)
18-
add_test(NAME ${TESTNAME} COMMAND $<TARGET_FILE:${KIT}CxxTests>
19-
${TESTNAME}
20-
${ARGN})
21-
endmacro()
33+
add_executable(msv${KIT}CxxTests ${Tests})
34+
target_link_libraries(msv${KIT}CxxTests ${LIBRARY_NAME})
2235

2336
#
2437
# Add Tests
2538
#
2639

27-
add_test(
28-
NAME ecgTest1
29-
COMMAND $<TARGET_FILE:${KIT}CxxTests> ecgTest1
30-
--ecg $<TARGET_FILE_DIR:${KIT}CxxTests>
31-
)
32-
33-
SIMPLE_TEST( msvQECGMainWindowTest1 )
34-
SIMPLE_TEST( msvVTKECGButtonsManagerTest1 )
40+
msv_test(ecgTest1
41+
$<TARGET_FILE:msv${KIT}CxxTests> ecgTest1
42+
--ecg $<TARGET_FILE_DIR:msv${KIT}CxxTests>
43+
)
44+
simple_test( msvQHAIMainWindowTest1 )

Applications/HAI/Testing/Cpp/haiTest1.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*==============================================================================
22
3-
Program: MSVECG
3+
Library: MSVTK
44
55
Copyright (c) Kitware Inc.
66
@@ -18,7 +18,7 @@
1818
1919
==============================================================================*/
2020

21-
// QT includes
21+
// Qt includes
2222
#include <QCoreApplication>
2323
#include <QProcess>
2424

@@ -27,11 +27,11 @@
2727
#include <iostream>
2828

2929
// -----------------------------------------------------------------------------
30-
int ecgTest1(int argc, char * argv[])
30+
int haiTest1(int argc, char * argv[])
3131
{
3232
QCoreApplication app(argc, argv);
3333
QString path = (argc > 2) ? ("\"" + QString(argv[2]) + "/") : "";
34-
QString command = QString(path + "ecg\"");
34+
QString command = QString(path + "hai\"");
3535
QProcess process;
3636
process.start(command);
3737
bool res = process.waitForStarted();

Applications/HAI/Testing/Cpp/msvQHAIMainWindowTest1.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@
2222
#include <QApplication>
2323
#include <QTimer>
2424

25-
// ECG includes
26-
#include "msvQECGMainWindow.h"
25+
// HAI includes
26+
#include "msvQHAIMainWindow.h"
2727

2828
// STD includes
2929
#include <cstdlib>
3030

3131
// -----------------------------------------------------------------------------
32-
int msvQECGMainWindowTest1(int argc, char * argv[] )
32+
int msvQHAIMainWindowTest1(int argc, char * argv[] )
3333
{
3434
QApplication app(argc, argv);
3535

36-
msvQECGMainWindow mainWindow;
36+
msvQHAIMainWindow mainWindow;
3737
mainWindow.show();
3838

3939
// Wait until the end of the player

CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,10 +350,7 @@ option(MSVTK_USE_KWSTYLE "Enable sourcecode-based style tests." OFF)
350350
# Will contain a list of sub-directory without option ON or OFF
351351
#
352352
set(MSVTK_PLUGINS_SUBDIRS )
353-
set(MSVTK_APPLICATIONS_SUBDIRS
354-
ECG
355-
HAI
356-
)
353+
set(MSVTK_APPLICATIONS_SUBDIRS )
357354

358355
option(MSVTK_APP_ECG "ECG application to demonstrate vtkButtons" ON)
359356
option(MSVTK_APP_HAI "HAI application to demonstrate vtkPipeline architecture and composite data set" ON)

0 commit comments

Comments
 (0)