Skip to content
Snippets Groups Projects
Commit e1ea1dc9 authored by Jean-Christophe Fillion-Robin's avatar Jean-Christophe Fillion-Robin
Browse files

STYLE: Refactor top-level CMakeLists into sections and improve reported messages

Report message are like the following:

```
-- VTKWikiExamples: Building VTKWikiExamples stand-alone
-- VTKWikiExamples: Building VTKWikiExamples stand-alone - yes
-- VTKWikiExamples: Setting executables prefix
-- VTKWikiExamples: Setting executables prefix - no
-- VTKWikiExamples: VTK VERSION: 8.1.0(OpenGL2)
[...]
```

or

```
[...]
-- VTKWikiExamples: Building VTKWikiExamples stand-alone
-- VTKWikiExamples: Building VTKWikiExamples stand-alone - no
-- VTKWikiExamples: Setting executables prefix
-- VTKWikiExamples: Setting executables prefix - yes [prefix: wiki]
[...]
```


Former-commit-id: 33514a73
parent dc9a0a88
No related branches found
No related tags found
No related merge requests found
......@@ -5,23 +5,49 @@ endif()
PROJECT(WikiExamples)
if (Module_WikiExamples)
message(STATUS "VTKWikiExamples: Building VTKWikiExamples as a Remote VTK Module")
message(STATUS "VTKWikiExamples: All executables will have a \"wiki\" prefix")
set(WIKI wiki)
# Display type of build
set(_msg "VTKWikiExamples: Building VTKWikiExamples stand-alone")
message(STATUS "${_msg}")
if(VTK_BINARY_DIR)
message(STATUS "${_msg} - no")
else()
message(STATUS "${_msg} - yes")
endif()
# Display build properties
set(_msg "VTKWikiExamples: Setting executables prefix")
message(STATUS "${_msg}")
if(VTK_BINARY_DIR)
set(WIKI "wiki")
message(STATUS "${_msg} - yes [prefix: ${WIKI}]")
else()
set(WIKI "")
message(STATUS "${_msg} - no")
endif()
if(Module_WikiExamples)
#
# This is a VTK remote module build
#
vtk_module_impl()
if(NOT EXISTS "${VTK_BINARY_DIR}/VTKConfig.cmake")
return()
endif()
find_package(VTK PATHS ${VTK_BINARY_DIR})
include(${VTK_USE_FILE})
else()
message(STATUS "VTKWikiExamples: Building VTKWikiExamples stand-alone")
# See if VTK is using OpenGL or OpenGL2
#
# This is a stand-alone build
#
# See if VTK is using OpenGL or OpenGL2
find_package(VTK CONFIG)
if (NOT VTK_RENDERING_BACKEND)
set(VTK_RENDERING_BACKEND OpenGL)
endif()
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
endif()
......
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