Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Utkarsh Ayachit
ParaView-Superbuild
Commits
93b165f2
Commit
93b165f2
authored
Sep 13, 2016
by
Chuck Atkins
Browse files
Move ParaView CMake file fixup to a step in ParaView's build
parent
97f7b388
Changes
3
Hide whitespace changes
Inline
Side-by-side
projects/paraview.cmake
View file @
93b165f2
...
...
@@ -172,3 +172,15 @@ endif ()
if
(
DEFINED CMAKE_BUILD_TYPE_save
)
set
(
CMAKE_BUILD_TYPE
"
${
CMAKE_BUILD_TYPE_save
}
"
)
endif
()
if
(
paraview_install_development_files
)
find_program
(
SED_EXECUTABLE sed
)
mark_as_advanced
(
SED_EXECUTABLE
)
if
(
SED_EXECUTABLE
)
superbuild_project_add_step
(
"fixupcmakepaths"
COMMAND
"
${
CMAKE_COMMAND
}
"
-P
"
${
CMAKE_CURRENT_LIST_DIR
}
/scripts/paraview.fixupcmakepaths.cmake"
DEPENDEES install
WORKING_DIRECTORY <INSTALL_DIR>
)
endif
()
endif
()
projects/scripts/paraview.fixupcmakepaths.cmake
0 → 100644
View file @
93b165f2
file
(
GLOB pv_cmake_dir
"
${
CMAKE_CURRENT_BINARY_DIR
}
/lib/cmake/paraview-*"
)
file
(
GLOB cmake_files
"
${
pv_cmake_dir
}
/ParaViewTargets*.cmake"
"
${
pv_cmake_dir
}
/VTKConfig.cmake"
)
foreach
(
cmake_file IN LISTS cmake_files
)
execute_process
(
COMMAND sed -e
"s|
${
CMAKE_CURRENT_BINARY_DIR
}
|
\$
{_IMPORT_PREFIX}|g"
-i
"
${
cmake_file
}
"
RESULT_VARIABLE RES
)
if
(
NOT RES EQUAL 0
)
message
(
FATAL_ERROR
"Failed to patch
${
cmake_file
}
"
)
endif
()
endforeach
()
set
(
cmake_file
"
${
pv_cmake_dir
}
/Modules/vtkCommonCore.cmake"
)
execute_process
(
COMMAND sed -e
"s|
${
CMAKE_CURRENT_BINARY_DIR
}
|
\$
{VTK_INSTALL_PREFIX}|g"
-i
"
${
cmake_file
}
"
RESULT_VARIABLE RES
)
if
(
NOT RES EQUAL 0
)
message
(
FATAL_ERROR
"Failed to patch
${
cmake_file
}
"
)
endif
()
projects/unix/paraviewsdk.bundle.cmake
View file @
93b165f2
...
...
@@ -5,17 +5,6 @@ include(paraview.bundle.common)
set
(
plugins_file
"
${
CMAKE_CURRENT_BINARY_DIR
}
/paraview.plugins"
)
paraview_add_plugin
(
"
${
plugins_file
}
"
${
paraview_plugins
}
)
# Workaround to patch any hard-coded paths to the build folder
install
(
CODE
"
file(GLOB_RECURSE cmake_files
\"
${
superbuild_install_location
}
/lib/*.cmake
\"
)
foreach (cmake_file IN LISTS cmake_files)
execute_process(
COMMAND sed
-i
-e
\"
s|
${
superbuild_install_location
}
|
\\\$
{_IMPORT_PREFIX}|g
\"
\$
{cmake_file})
endforeach ()"
COMPONENT superbuild
)
get_filename_component
(
real_superbuild_install_location
"
${
superbuild_install_location
}
"
REALPATH
)
# Install ParaView CMake files
...
...
@@ -97,7 +86,6 @@ foreach (cmake_file IN LISTS cmake_files)
file
(
STRINGS
"
${
cmake_file
}
"
lines REGEX
"
\\\$
{_IMPORT_PREFIX}[^;
\\\"
>]+"
)
foreach
(
line IN LISTS lines
)
string
(
REGEX MATCHALL
"
\\\$
{_IMPORT_PREFIX}[^;
\\\"
>]+"
fnames
"
${
line
}
"
)
list
(
APPEND libraries_referenced_by_cmake
${
fnames
}
)
endforeach
()
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment