Skip to content

Commit

Permalink
A few more fixes and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Martin committed Aug 28, 2015
1 parent 7a55f24 commit 42fe909
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
13 changes: 6 additions & 7 deletions CMake/vtkAndroid.cmake
Expand Up @@ -53,6 +53,11 @@ else()
set(VTK_BUILD_COMMAND BUILD_COMMAND make)
endif()

set(BUILD_ALWAYS_STRING)
if(${CMAKE_VERSION} GREATER 3.0)
set(BUILD_ALWAYS_STRING BUILD_ALWAYS 1)
endif()

# Compile a minimal VTK for its compile tools
macro(compile_vtk_tools)
ExternalProject_Add(
Expand All @@ -63,7 +68,7 @@ macro(compile_vtk_tools)
${VTK_BUILD_COMMAND} vtkCompileTools
${BUILD_ALWAYS_STRING}
INSTALL_DIR ${INSTALL_DIR}/vtk-compile-tools
CMAKE_CACHE_ARGS
CMAKE_ARGS
-DCMAKE_BUILD_TYPE:STRING=Release
-DVTK_BUILD_ALL_MODULES:BOOL=OFF
-DVTK_Group_Rendering:BOOL=OFF
Expand Down Expand Up @@ -124,11 +129,6 @@ set(android_cmake_flags
-DModule_vtkRenderingFreeType:BOOL=OFF
)

set(BUILD_ALWAYS_STRING)
if(${CMAKE_VERSION} GREATER 3.0)
set(BUILD_ALWAYS_STRING "BUILD_ALWAYS 1")
endif()

macro(crosscompile target toolchain_file)
ExternalProject_Add(
${target}
Expand All @@ -142,7 +142,6 @@ macro(crosscompile target toolchain_file)
-DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}/${target}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_TOOLCHAIN_FILE:PATH=CMake/${toolchain_file}
CMAKE_CACHE_ARGS
-DANDROID_NDK:PATH=${ANDROID_NDK}
-DVTKCompileTools_DIR:PATH=${BUILD_DIR}/vtk-compile-tools
${android_cmake_flags}
Expand Down
12 changes: 8 additions & 4 deletions CMake/vtkiOS.cmake
Expand Up @@ -41,6 +41,11 @@ else()
set(VTK_BUILD_COMMAND BUILD_COMMAND make)
endif()

set(BUILD_ALWAYS_STRING)
if(${CMAKE_VERSION} GREATER 3.0)
set(BUILD_ALWAYS_STRING BUILD_ALWAYS 1)
endif()

# Compile a minimal VTK for its compile tools
macro(compile_vtk_tools)
ExternalProject_Add(
Expand All @@ -49,7 +54,7 @@ macro(compile_vtk_tools)
PREFIX ${PREFIX_DIR}/vtk-compile-tools
BINARY_DIR ${BUILD_DIR}/vtk-compile-tools
${VTK_BUILD_COMMAND} vtkCompileTools
BUILD_ALWAYS 1
${BUILD_ALWAYS_STRING}
INSTALL_DIR ${INSTALL_DIR}/vtk-compile-tools
CMAKE_CACHE_ARGS
-DCMAKE_BUILD_TYPE:STRING=Release
Expand Down Expand Up @@ -80,7 +85,7 @@ mark_as_advanced(
set(ios_cmake_flags
-DBUILD_SHARED_LIBS:BOOL=OFF
-DBUILD_TESTING:BOOL=OFF
-DBUILD_EXAMPLES:BOOL=ON
-DBUILD_EXAMPLES:BOOL=${BUILD_EXAMPLES}
-DVTK_RENDERING_BACKEND:STRING=OpenGL2
-DOPENGL_ES_VERSION:STRING=${OPENGL_ES_VERSION}
-DVTK_Group_Rendering:BOOL=OFF
Expand Down Expand Up @@ -115,14 +120,13 @@ macro(crosscompile target toolchain_file archs)
BINARY_DIR ${BUILD_DIR}/${target}
INSTALL_DIR ${INSTALL_DIR}/${target}
DEPENDS vtk-compile-tools
BUILD_ALWAYS 1
${BUILD_ALWAYS_STRING}
CMAKE_ARGS
-DCMAKE_CROSSCOMPILING:BOOL=ON
#-DCMAKE_OSX_ARCHITECTURES:STRING=${archs}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=CMake/${toolchain_file}
-DVTKCompileTools_DIR:PATH=${BUILD_DIR}/vtk-compile-tools
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}/${target}
${ios_cmake_flags}
)
Expand Down
8 changes: 4 additions & 4 deletions CMakeLists.txt
Expand Up @@ -98,6 +98,10 @@ include(vtkVersion)
set(VTK_VERSION
"${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}")

#-----------------------------------------------------------------------------
# Do we want examples built?
OPTION(BUILD_EXAMPLES "Build VTK examples." OFF)

option(VTK_IOS_BUILD "Build vtk.framework for iOS" OFF)
if (VTK_IOS_BUILD)
include(vtkiOS)
Expand Down Expand Up @@ -434,10 +438,6 @@ INCLUDE(vtkTestStreamsLibrary)
# Dispatch the build into the proper subdirectories.
SET(VTK_HAS_EXODUS 1)

#-----------------------------------------------------------------------------
# Provide a few configuration options.
OPTION(BUILD_EXAMPLES "Build VTK examples." OFF)

#-----------------------------------------------------------------------------
# Configure files with settings for use by the build.

Expand Down

0 comments on commit 42fe909

Please sign in to comment.