Skip to content
Snippets Groups Projects
Commit 509dbaee authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

ENH: avoid rewriting OTBOpenGL.cmake

parent 1e4f54d2
No related branches found
No related tags found
No related merge requests found
......@@ -47,17 +47,17 @@ function(patch_cmake_files)
install_without_message("${PATCH_STAGE_DIR}" "lib/cmake")
file( GLOB otb_opengl
"${SUPERBUILD_INSTALL_DIR}/lib/cmake/OTB*/Modules/OTBOpenGL.cmake" )
if(EXISTS ${otb_opengl})
file(STRINGS "${otb_opengl}" otb_opengl_cmake)
set(otb_opengl_cmake_NEW)
foreach(line ${otb_opengl_cmake})
if( NOT line MATCHES "/usr")
list(APPEND otb_opengl_cmake_NEW "${line}\n")
endif()
endforeach()
endif()
file(WRITE "${otb_opengl}" ${otb_opengl_cmake_NEW})
# file( GLOB otb_opengl
# "${SUPERBUILD_INSTALL_DIR}/lib/cmake/OTB*/Modules/OTBOpenGL.cmake" )
# if(EXISTS ${otb_opengl})
# file(STRINGS "${otb_opengl}" otb_opengl_cmake)
# set(otb_opengl_cmake_NEW)
# foreach(line ${otb_opengl_cmake})
# if( NOT line MATCHES "/usr")
# list(APPEND otb_opengl_cmake_NEW "${line}\n")
# endif()
# endforeach()
# endif()
# file(WRITE "${otb_opengl}" ${otb_opengl_cmake_NEW})
endfunction()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment