Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VTK Examples
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VTK
VTK Examples
Commits
6b4a7b6e
Commit
6b4a7b6e
authored
6 years ago
by
Bill Lorensen
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Qt support for new vtk modules.
Former-commit-id:
972fef6e
parent
b380dbe1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMake/WikiPolicies.cmake
+1
-0
1 addition, 0 deletions
CMake/WikiPolicies.cmake
src/Admin/ScrapeRepo
+14
-3
14 additions, 3 deletions
src/Admin/ScrapeRepo
src/Admin/VTKQtCMakeLists
+22
-3
22 additions, 3 deletions
src/Admin/VTKQtCMakeLists
src/Cxx/Qt/CMakeLists.txt
+1
-0
1 addition, 0 deletions
src/Cxx/Qt/CMakeLists.txt
with
38 additions
and
6 deletions
CMake/WikiPolicies.cmake
+
1
−
0
View file @
6b4a7b6e
...
...
@@ -8,6 +8,7 @@ foreach(p
CMP0025
# CMake 3.0
CMP0043
# CMake 3.0
CMP0053
# CMake 3.1
CMP0071
)
if
(
POLICY
${
p
}
)
cmake_policy
(
SET
${
p
}
NEW
)
...
...
This diff is collapsed.
Click to expand it.
src/Admin/ScrapeRepo
+
14
−
3
View file @
6b4a7b6e
...
...
@@ -315,8 +315,9 @@ def FillCMakeLists(S, Name, ExtraNames, Components):
return
reg
def
FillQtCMakeLists
(
S
,
Name
):
reg
=
re
.
sub
(
r
'
XXX
'
,
Name
,
S
)
def
FillQtCMakeLists
(
S
,
Name
,
Components
):
r1
=
re
.
sub
(
r
'
XXX
'
,
Name
,
S
)
reg
=
re
.
sub
(
r
'
ZZZ
'
,
Components
,
r1
)
return
reg
#####################################################################
...
...
@@ -669,7 +670,17 @@ for lang, langExt in Languages.items():
CMakeFile
=
open
(
RepoDir
+
"
/Admin/VTKQtCMakeLists
"
,
'
r
'
)
CMakeContents
=
CMakeFile
.
read
()
CMakeFile
.
close
()
cmake
=
FillQtCMakeLists
(
CMakeContents
,
ExampleName
)
# Create component lines
Components
=
""
for
component
in
components
:
if
"
vtk
"
in
component
:
Components
+=
"
\n
"
+
component
else
:
Components
+=
"
\n
"
+
"
vtk
"
+
component
# If there are no components found, assume we need then all
# This occurs when the source file includes another Cxx file
#print("Components: " + Components)
cmake
=
FillQtCMakeLists
(
CMakeContents
,
ExampleName
,
Components
)
else
:
CMakeFile
=
open
(
RepoDir
+
"
/Admin/VTKCMakeLists
"
,
'
r
'
)
CMakeContents
=
CMakeFile
.
read
()
...
...
This diff is collapsed.
Click to expand it.
src/Admin/VTKQtCMakeLists
+
22
−
3
View file @
6b4a7b6e
###CMakeLists.txt
```cmake
cmake_minimum_required(VERSION
2.8
)
cmake_minimum_required(VERSION
3.3 FATAL_ERROR
)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
...
...
@@ -8,8 +8,27 @@ endif()
PROJECT(XXX)
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
find_package(VTK COMPONENTS ZZZ))
if (NOT VTK_FOUND)
message("Skipping XXX: ${VTK_NOT_FOUND_MESSAGE}")
return ()
endif()
message (STATUS "VTK_VERSION: ${VTK_VERSION}")
if (VTK_VERSION VERSION_LESS "8.90.0")
# old system
include(${VTK_USE_FILE})
add_executable(XXX MACOSX_BUNDLE XXX.cxx )
target_link_libraries(XXX PRIVATE ${VTK_LIBRARIES})
else ()
# include all components
add_executable(XXX MACOSX_BUNDLE XXX.cxx )
target_link_libraries(XXX PRIVATE ${VTK_LIBRARIES})
# vtk_module_autoinit is needed
vtk_module_autoinit(
TARGETS XXX
MODULES ${VTK_LIBRARIES}
)
endif ()
if(${VTK_VERSION} VERSION_GREATER "6" AND VTK_QT_VERSION VERSION_GREATER "4")
# Instruct CMake to run moc automatically when needed.
...
...
This diff is collapsed.
Click to expand it.
src/Cxx/Qt/CMakeLists.txt
+
1
−
0
View file @
6b4a7b6e
...
...
@@ -6,6 +6,7 @@ foreach(p
CMP0025
# CMake 3.0
CMP0043
# CMake 3.0
CMP0053
# CMake 3.1
CMP0071
)
if
(
POLICY
${
p
}
)
cmake_policy
(
SET
${
p
}
NEW
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment