Commit 7470a259 authored by Brad King's avatar Brad King
Browse files

ENH: Updated to modern VTK CMake code standards.

parent 1e8366ac
CMAKE_MINIMUM_REQUIRED(VERSION 1.6)
CMAKE_MINIMUM_REQUIRED(VERSION 2.0)
# Set the project/library name here. Classes should be declared as
# "class vtkLocal_EXPORT vtkFoo", where vtkLocal is the name of the
......@@ -23,11 +23,15 @@ SET(vtkLocal_LIBS
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR})
# Setup output paths.
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE PATH
"Single output directory for building all libraries.")
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE PATH
"Single output directory for building all executables.")
MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH)
# Find and load VTK settings.
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
FIND_PACKAGE(VTK REQUIRED)
INCLUDE(${VTK_USE_FILE})
# Give user option of building shared or static libraries. Default to
......@@ -43,14 +47,6 @@ ELSE(BUILD_SHARED_LIBS)
SET(VTKLOCAL_BUILD_SHARED_LIBS_CONFIG 0)
ENDIF(BUILD_SHARED_LIBS)
SET (LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE PATH
"Single output directory for building all libraries.")
SET (EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE PATH
"Single output directory for building all executables.")
MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH)
IF(VTK_FOUND)
# If this is a build tree, provide an option for putting this
# project's executables and libraries in with VTK's.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment