Commit 898c34bd authored by Sreekanth Arikatla's avatar Sreekanth Arikatla
Browse files

Merge branch 'bray/cmake_improvements' into 'master'

CMake Improvements

See merge request iMSTK/iMSTK!365
parents f60fc673 d8d9bc01
set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_MODULE_PATH} )
include(ExternalProject)
include(imstkSolveDependencies)
......@@ -10,53 +9,26 @@ if(NOT GIT_EXECUTABLE)
endif()
#-----------------------------------------------------------------------------
# Output Directories
# CMake global args
#-----------------------------------------------------------------------------
if(NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${${PROJECT_NAME}_LIB_DIR})
endif()
if(NOT DEFINED CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${${PROJECT_NAME}_LIB_DIR})
endif()
if(NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${${PROJECT_NAME}_BIN_DIR})
if(MSVC)
# Allow the MP flag to get set externally
set(iMSTK_ENABLE_MULTI_PROCESS_BUILDS ON CACHE BOOL "Enable multi-process builds")
set(PROCESSOR_COUNT "$ENV{NUMBER_OF_PROCESSORS}")
set(iMSTK_NUM_BUILD_PROCESSES ${PROCESSOR_COUNT} CACHE STRING "The maximum number of processes for the /MP flag")
if(${PROJECT}_ENABLE_MULTI_PROCESS_BUILDS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP${iMSTK_NUM_BUILD_PROCESSES}" CACHE STRING INTERNAL FORCE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP${iMSTK_NUM_BUILD_PROCESSES}" CACHE STRING INTERNAL FORCE)
endif()
endif()
mark_as_superbuild(
VARS
CMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH
CMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH
CMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH
ALL_PROJECTS
)
#-----------------------------------------------------------------------------
# Search Directories
#-----------------------------------------------------------------------------
list(APPEND CMAKE_LIBRARY_PATH
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}
${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}
)
list(APPEND CMAKE_PROGRAM_PATH
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}
)
list(APPEND CMAKE_INCLUDE_PATH "") # Populated in each External_*.cmake
mark_as_superbuild(
VARS
CMAKE_LIBRARY_PATH
CMAKE_PROGRAM_PATH
CMAKE_INCLUDE_PATH
ALL_PROJECTS
)
#-----------------------------------------------------------------------------
# CMake global args
#-----------------------------------------------------------------------------
mark_as_superbuild(
VARS
CMAKE_BUILD_TYPE
CMAKE_DEBUG_POSTFIX
CMAKE_INSTALL_PREFIX
CMAKE_MODULE_PATH
CMAKE_PREFIX_PATH
CMAKE_C_COMPILER
CMAKE_CXX_COMPILER
CMAKE_C_FLAGS
......@@ -101,26 +73,36 @@ ExternalProject_Include_Dependencies( ${PROJECT_NAME}
SUPERBUILD_VAR ${PROJECT_NAME}_SUPERBUILD
)
set(VTK_PATCH_COMMAND)
if(VTK_REPO_SOURCE EQUAL "8.2")
set(VTK_PATCH_COMMAND ${CMAKE_COMMAND}
-DVTK_SOURCE_DIR=${VTK_SOURCE_DIR}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-P ${CMAKE_SOURCE_DIR}/CMake/External/Patches/vtk-8.2.cmake)
endif()
#-----------------------------------------------------------------------------
# Inner build of the main project
#-----------------------------------------------------------------------------
ExternalProject_Add( ${PROJECT_NAME}
${${PROJECT_NAME}_EP_ARGS}
DOWNLOAD_COMMAND ""
INSTALL_COMMAND ""
SOURCE_DIR ${${PROJECT_NAME}_SOURCE_DIR}
BINARY_DIR ${CMAKE_BINARY_DIR}/Innerbuild
${COMMON_CMAKE_EP_ARGS}
CMAKE_ARGS
-DBUILD_EXAMPLES:BOOL=${BUILD_EXAMPLES}
-DBUILD_TESTING:BOOL=${BUILD_TESTING}
-DPHYSX_CONFIGURATION:STRING=${${PROJECT_NAME}_PHYSX_CONFIGURATION}
-D${PROJECT_NAME}_SUPERBUILD:BOOL=OFF
-D${PROJECT_NAME}_USE_OMNI:BOOL=${${PROJECT_NAME}_USE_OMNI}
-D${PROJECT_NAME}_USE_ODE:BOOL=${${PROJECT_NAME}_USE_ODE}
-DODE_ROOT_DIR:PATH=${ODE_ROOT_DIR}
-D${PROJECT_NAME}_USE_OpenHaptics:BOOL=${${PROJECT_NAME}_USE_OpenHaptics}
-D${PROJECT_NAME}_USE_Vulkan:BOOL=${${PROJECT_NAME}_USE_Vulkan}
-D${PROJECT_NAME}_ENABLE_AUDIO:BOOL=${${PROJECT_NAME}_ENABLE_AUDIO}
-D${PROJECT_NAME}_ENABLE_VR:BOOL=${${PROJECT_NAME}_ENABLE_VR}
DEPENDS ${${PROJECT_NAME}_DEPENDENCIES}
PATCH_COMMAND
COMMAND ${VTK_PATCH_COMMAND}
# Always build these non standard configurations
)
#-----------------------------------------------------------------------------
......
......@@ -5,7 +5,6 @@ include(imstkAddExternalProject)
imstk_add_external_project( Assimp
GIT_REPOSITORY https://gitlab.kitware.com/iMSTK/assimp.git
GIT_TAG ce3d6a91d2e0e945493c0fdeb162b50c9034e5f9
INSTALL_COMMAND ${SKIP_STEP_COMMAND}
CMAKE_CACHE_ARGS
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
-DASSIMP_BUILD_ASSIMP_TOOLS:BOOL=OFF
......
......@@ -5,9 +5,6 @@ include(imstkAddExternalProject)
imstk_add_external_project( Eigen
GIT_REPOSITORY https://github.com/eigenteam/eigen-git-mirror.git
GIT_TAG 3.3.3
CONFIGURE_COMMAND ${SKIP_STEP_COMMAND}
BUILD_COMMAND ${SKIP_STEP_COMMAND}
INSTALL_COMMAND ${SKIP_STEP_COMMAND}
RELATIVE_INCLUDE_PATH ""
DEPENDENCIES ""
#VERBOSE
......
......@@ -14,20 +14,24 @@ set(FTD2XX_EXTRACT_DIR ${FTD2XX_PREFIX}/ftd2xx-2.12.18)
# Set install commands
#-----------------------------------------------------------------------------
set(ftd2xx_libdir "i386")
if(${CMAKE_GENERATOR} MATCHES "Win64")
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
set(ftd2xx_libdir "amd64")
set(ftd2xx_dll_suffix "64")
endif()
set(copy_ftd2xx_dll_command
set(copy_ftd2xx_headers_command
${CMAKE_COMMAND} -E copy
${FTD2XX_EXTRACT_DIR}/${ftd2xx_libdir}/ftd2xx${ftd2xx_dll_suffix}.dll
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/ftd2xx.dll
${FTD2XX_EXTRACT_DIR}/ftd2xx.h
${CMAKE_INSTALL_PREFIX}/include/ftd2xx/ftd2xx.h
)
set(copy_ftd2xx_lib_command
${CMAKE_COMMAND} -E copy
${FTD2XX_EXTRACT_DIR}/${ftd2xx_libdir}/ftd2xx.lib
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/ftd2xx.lib
${CMAKE_INSTALL_PREFIX}/lib/ftd2xx.lib
)
set(copy_ftd2xx_dll_command
${CMAKE_COMMAND} -E copy
${FTD2XX_EXTRACT_DIR}/${ftd2xx_libdir}/ftd2xx64.dll
${CMAKE_INSTALL_PREFIX}/bin/ftd2xx64.dll
)
#-----------------------------------------------------------------------------
......@@ -44,7 +48,8 @@ imstk_add_external_project( FTD2XX
CONFIGURE_COMMAND ${SKIP_STEP_COMMAND}
BUILD_COMMAND ${SKIP_STEP_COMMAND}
INSTALL_COMMAND
${copy_ftd2xx_lib_command}
COMMAND ${copy_ftd2xx_headers_command}
COMMAND ${copy_ftd2xx_lib_command}
COMMAND ${copy_ftd2xx_dll_command}
RELATIVE_INCLUDE_PATH "/"
#VERBOSE
......
......@@ -5,7 +5,6 @@ include(imstkAddExternalProject)
imstk_add_external_project( GoogleTest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG dc043e1ca6bd509a92452ed54e817b6979869372
INSTALL_COMMAND ${SKIP_STEP_COMMAND}
CMAKE_CACHE_ARGS
-DBUILD_GMOCK:BOOL=ON
-DBUILD_GTEST:BOOL=ON
......
......@@ -10,13 +10,12 @@ include(imstkAddExternalProject)
imstk_add_external_project( LibNiFalcon
GIT_REPOSITORY https://gitlab.kitware.com/iMSTK/libnifalcon.git
GIT_TAG 47586d4e21c987fb9e3ce822bf707c53e8fc4e52
INSTALL_COMMAND ${SKIP_STEP_COMMAND}
CMAKE_CACHE_ARGS
-DBUILD_TESTING:BOOL=OFF
-DBUILD_EXAMPLES:BOOL=OFF
-DBUILD_SWIG_BINDINGS:BOOL=OFF
-DBUILD_SHARED:BOOL=OFF
DEPENDENCIES ${LIBNIFALCON_DEPENDENCIES}
RELATIVE_INCLUDE_PATH "include"
RELATIVE_INCLUDE_PATH "include/ftd2xx"
#VERBOSE
)
\ No newline at end of file
......@@ -14,28 +14,24 @@ set(Libusb_EXTRACT_DIR ${Libusb_PREFIX}/libusb-1.0.20)
# Set install commands
#-----------------------------------------------------------------------------
set(libusb_libdir "MS32")
set(libusb_exedir "bin32")
if(${CMAKE_GENERATOR} MATCHES "Win64")
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
set(libusb_libdir "MS64")
set(libusb_exedir "bin64")
endif()
set(copy_libusb_headers_command
${CMAKE_COMMAND} -E copy_directory
${Libusb_EXTRACT_DIR}/include
${CMAKE_INSTALL_PREFIX}/include
)
set(copy_libusb_lib_command
${CMAKE_COMMAND} -E copy
${Libusb_EXTRACT_DIR}/${libusb_libdir}/dll/libusb-1.0.lib
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/libusb-1.0.lib
${CMAKE_INSTALL_PREFIX}/lib/libusb-1.0.lib
)
set(copy_libusb_dll_command
${CMAKE_COMMAND} -E copy
${Libusb_EXTRACT_DIR}/${libusb_libdir}/dll/libusb-1.0.dll
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/libusb-1.0.dll
)
set(copy_libusb_pdb_command
${CMAKE_COMMAND} -E copy
${Libusb_EXTRACT_DIR}/${libusb_libdir}/dll/libusb-1.0.pdb
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/libusb-1.0.pdb
${CMAKE_INSTALL_PREFIX}/bin/
)
#-----------------------------------------------------------------------------
......@@ -52,9 +48,9 @@ imstk_add_external_project( Libusb
CONFIGURE_COMMAND ${SKIP_STEP_COMMAND}
BUILD_COMMAND ${SKIP_STEP_COMMAND}
INSTALL_COMMAND
${copy_libusb_lib_command}
COMMAND ${copy_libusb_headers_command}
COMMAND ${copy_libusb_lib_command}
COMMAND ${copy_libusb_dll_command}
COMMAND ${copy_libusb_pdb_command}
RELATIVE_INCLUDE_PATH "include/libusb-1.0"
#VERBOSE
)
#----------------------------------------------------------
# ODE does not have a cmake version.
# Use of this file is a workaround to create a mode for setting
# up iMSTK to build with ODE.
# This piece of code also sets other necessary directories.
# It is assumed that ODE was compiled with double precision.
#
# When ODE is configured with cmake (in future),
# this script should be updated.
#----------------------------------------------------------
set(USE_SYSTEM_ODE 1 CACHE BOOL "Use system ODE" FORCE)
#-----------------------------------------------------------------------------
# Add External Project
#-----------------------------------------------------------------------------
include(imstkAddExternalProject)
imstk_add_external_project( ODE
DOWNLOAD_COMMAND ${SKIP_STEP_COMMAND}
CONFIGURE_COMMAND ${SKIP_STEP_COMMAND}
BUILD_COMMAND ${SKIP_STEP_COMMAND}
INSTALL_COMMAND ${SKIP_STEP_COMMAND}
RELATIVE_INCLUDE_PATH ""
DEPENDENCIES ""
#VERBOSE
)
mark_as_superbuild(ODE_INCLUDE_DIR)
mark_as_superbuild(ODE_LIBRARY)
#-----------------------------------------------------------------------------
if(WIN32)
# Since on windows there is no support for Runtime Path, we need to copy
# the ODE shared library.
if(NOT DEFINED ODE_SHARED_LIBRARY)
get_filename_component(_dir ${ODE_LIBRARY} DIRECTORY)
get_filename_component(_name_we ${ODE_LIBRARY} NAME_WE)
set(ODE_SHARED_LIBRARY "${_dir}/${_name_we}.dll")
if(NOT EXISTS "${ODE_SHARED_LIBRARY}")
message(FATAL_ERROR "ODE_SHARED_LIBRARY corresponds to a nonexistent file. ODE_SHARED_LIBRARY is '${ODE_SHARED_LIBRARY}'")
endif()
endif()
set(_dest "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/")
ExternalProject_Add_Step( ODE copy_shared_library
COMMAND ${CMAKE_COMMAND} -E make_directory ${_dest}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ODE_SHARED_LIBRARY} ${_dest}
COMMENT "Copy ODE shared library into ${_dest}"
DEPENDERS download
USES_TERMINAL 1
)
endif()
if(NOT WIN32)
message(WARNING "System not supported. Currently, only Windows is supported for External_OpenHaptics.cmake.")
return()
endif()
#-----------------------------------------------------------------------------
# Set install commands
#-----------------------------------------------------------------------------
if(WIN32)
set(open_haptics_libdir "Win32")
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
set(open_haptics_libdir "x64")
endif()
set(lib_ext "lib")
set(bin_ext "dll")
endif()
# Header Directories
set(open_haptics_headers_dest ${CMAKE_INSTALL_PREFIX}/include/OpenHaptics)
set(open_haptics_headers_dir ${OPENHAPTICS_ROOT_DIR}/include/)
set(open_haptics_util_headers_dir ${OPENHAPTICS_ROOT_DIR}/utilities/include/)
# Library Directories
set(open_haptics_libs_dest ${CMAKE_INSTALL_PREFIX}/lib/)
set(open_haptics_libs_dir ${OPENHAPTICS_ROOT_DIR}/lib/${open_haptics_libdir}/Release)
set(open_haptics_util_libs_dir ${OPENHAPTICS_ROOT_DIR}/utilities/lib/${open_haptics_libdir}/Release)
# Binary Directory
set(open_haptics_bin_dest ${CMAKE_INSTALL_PREFIX}/bin/)
#-----------------------------------------------------------------------------
# Add External Project
#-----------------------------------------------------------------------------
include(imstkAddExternalProject)
imstk_add_external_project( OpenHaptics
SOURCE_DIR ${OPENHAPTICS_ROOT_DIR}
UPDATE_COMMAND ${SKIP_STEP_COMMAND}
CONFIGURE_COMMAND ${SKIP_STEP_COMMAND}
BUILD_COMMAND ${SKIP_STEP_COMMAND}
INSTALL_COMMAND
COMMAND ${CMAKE_COMMAND} -E copy_directory ${open_haptics_headers_dir} ${open_haptics_headers_dest}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${open_haptics_util_headers_dir} ${open_haptics_headers_dest}
COMMAND ${CMAKE_COMMAND} -E copy ${open_haptics_libs_dir}/hd.${lib_ext} ${open_haptics_libs_dest}
COMMAND ${CMAKE_COMMAND} -E copy ${open_haptics_libs_dir}/hd.${bin_ext} ${open_haptics_bin_dest}
COMMAND ${CMAKE_COMMAND} -E copy ${open_haptics_libs_dir}/hl.${lib_ext} ${open_haptics_libs_dest}
COMMAND ${CMAKE_COMMAND} -E copy ${open_haptics_libs_dir}/hl.${bin_ext} ${open_haptics_bin_dest}
COMMAND ${CMAKE_COMMAND} -E copy ${open_haptics_util_libs_dir}/hdu.${lib_ext} ${open_haptics_libs_dest}
COMMAND ${CMAKE_COMMAND} -E copy ${open_haptics_util_libs_dir}/hlu.${lib_ext} ${open_haptics_libs_dest}
RELATIVE_INCLUDE_PATH "/"
#VERBOSE
)
......@@ -4,10 +4,10 @@
include(imstkAddExternalProject)
imstk_add_external_project( PThreads
GIT_REPOSITORY https://gitlab.kitware.com/iMSTK/libpthread.git
GIT_TAG 26bdc33be9786a9ffbfcec806c857ea208c37201
GIT_TAG 660654b332126834a20db43ca649e43fdcd32016
# This is the iMSTK branch
CMAKE_CACHE_ARGS
-DBUILD_TESTING:BOOL=OFF
INSTALL_COMMAND ${SKIP_STEP_COMMAND}
RELATIVE_INCLUDE_PATH "include"
DEPENDENCIES ""
#VERBOSE
......
#-----------------------------------------------------------------------------
# Add External Project
#-----------------------------------------------------------------------------
include(imstkAddExternalProject)
imstk_define_external_dirs( PhysX )
if(WIN32)
set(PHYSX_TARGET_BUILD_PLATFORM windows)
elseif(APPLE)
set(PHYSX_TARGET_BUILD_PLATFORM mac)
else()
set(PHYSX_TARGET_BUILD_PLATFORM linux)
endif()
set(PHYSX_iMSTK_INSTALL "${CMAKE_COMMAND}"
-DPhysX_INSTALL_DIR=${PhysX_BINARY_DIR}/install
-DiMSTK_INSTALL_DIR=${CMAKE_INSTALL_PREFIX}
-P ${CMAKE_SOURCE_DIR}/CMake/External/Patches/physx.cmake)
imstk_add_external_project( PhysX
#URL https://github.com/NVIDIAGameWorks/PhysX/archive/4.1.zip
#URL_MD5 79004323c3c39152a6c0491967e0a609
#URL_MD5 32fdaddc4ad4e7e637faa86311eb1803
#DOWNLOAD_DIR ${PhysX_TMP_DIR}
GIT_REPOSITORY https://gitlab.kitware.com/iMSTK/PhysX.git
GIT_TAG 78481093a259101c2a1846370f749ea35cae80e2
GIT_SHALLOW TRUE
SOURCE_SUBDIR ./physx/compiler/public
CMAKE_CACHE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${PhysX_BINARY_DIR}/install
-DPXSHARED_INSTALL_PREFIX:PATH=${PhysX_BINARY_DIR}/install
-DTARGET_BUILD_PLATFORM:STRING=${PHYSX_TARGET_BUILD_PLATFORM}
-DPX_OUTPUT_ARCH:STRING=x86 # Either x86 or arm, only used for naming conventions (postfix)
-DPHYSX_ROOT_DIR:PATH=${PhysX_SOURCE_DIR}/physx
-DCMAKEMODULES_PATH:PATH=${PhysX_SOURCE_DIR}/externals/CMakeModules
-DCMAKEMODULES_VERSION:STRING=1.27 # Must be set, but does not do anything...
-DPXSHARED_PATH:PATH=${PhysX_SOURCE_DIR}/pxshared
-DPX_OUTPUT_LIB_DIR:PATH=${PhysX_BINARY_DIR}
-DPX_OUTPUT_BIN_DIR:PATH=${PhysX_BINARY_DIR}
-DPX_BUILDSNIPPETS:BOOL=FALSE
-DPX_BUILDPUBLICSAMPLES:BOOL=FALSE
-DPX_GENERATE_STATIC_LIBRARIES:BOOL=TRUE
-DNV_USE_DEBUG_WINCRT:BOOL=TRUE
-DPX_FLOAT_POINT_PRECISE_MATH:BOOL=TRUE
-DNV_FORCE_64BIT_SUFFIX:BOOL=TRUE
-DNV_FORCE_32BIT_SUFFIX:BOOL=FALSE
-DNV_USE_GAMEWORKS_OUTPUT_DIRS:BOOL=TRUE
-DNV_APPEND_CONFIG_NAME:BOOL=TRUE
#VERBOSE
BUILD_COMMAND
COMMAND "${CMAKE_COMMAND}" --build . --config release
COMMAND "${CMAKE_COMMAND}" --build . --config profile
COMMAND "${CMAKE_COMMAND}" --build . --config checked
COMMAND "${CMAKE_COMMAND}" --build . --config debug
INSTALL_COMMAND
COMMAND "${CMAKE_COMMAND}" --build . --target install --config release
COMMAND "${CMAKE_COMMAND}" --build . --target install --config profile
COMMAND "${CMAKE_COMMAND}" --build . --target install --config checked
COMMAND "${CMAKE_COMMAND}" --build . --target install --config debug
COMMAND ${PHYSX_iMSTK_INSTALL}
)
......@@ -2,13 +2,41 @@
# Add External Project
#-----------------------------------------------------------------------------
include(imstkAddExternalProject)
imstk_define_external_dirs( SCCD )
if(MSVC)
set(config_dir "$(Configuration)")
endif()
set(copy_sccd_headers_command
${CMAKE_COMMAND} -E copy_directory
${SCCD_SOURCE_DIR}/inc
${CMAKE_INSTALL_PREFIX}/include/sccd
)
if(WIN32)
set(copy_sccd_lib_command
${CMAKE_COMMAND} -E copy
${SCCD_BINARY_DIR}/src/${config_dir}/sccd$<$<CONFIG:Debug>:d>.lib
${CMAKE_INSTALL_PREFIX}/lib
)
else()
set(copy_sccd_lib_command
${CMAKE_COMMAND} -E copy
${SCCD_BINARY_DIR}/src/${config_dir}/libsccd$<$<CONFIG:Debug>:d>.a
${CMAKE_INSTALL_PREFIX}/lib
)
endif()
imstk_add_external_project( SCCD
GIT_REPOSITORY https://gitlab.kitware.com/iMSTK/SCCD.git
GIT_TAG 760854d53f4db6fd1d1a073aabd2d3ecb32506b5
INSTALL_COMMAND ${SKIP_STEP_COMMAND}
CMAKE_CACHE_ARGS
-DBUILD_SAMPLE_APP:BOOL=OFF
RELATIVE_INCLUDE_PATH "inc"
INSTALL_COMMAND
COMMAND ${copy_sccd_headers_command}
COMMAND ${copy_sccd_lib_command}
DEPENDENCIES
Eigen
#VERBOSE
......
......@@ -5,7 +5,6 @@ include(imstkAddExternalProject)
imstk_add_external_project( SFML
GIT_REPOSITORY https://github.com/SFML/SFML.git
GIT_TAG 2.4.2
INSTALL_COMMAND ${SKIP_STEP_COMMAND}
CMAKE_CACHE_ARGS
-DSFML_BUILD_AUDIO:BOOL=ON
-DSFML_BUILD_GRAPHICS:BOOL=OFF
......
......@@ -6,7 +6,6 @@ include(imstkAddExternalProject)
imstk_add_external_project( Uncrustify
GIT_REPOSITORY https://github.com/uncrustify/uncrustify.git
GIT_TAG uncrustify-0.64
INSTALL_COMMAND ${SKIP_STEP_COMMAND}
CMAKE_CACHE_ARGS
RELATIVE_INCLUDE_PATH ""
DEPENDENCIES ""
......
......@@ -4,13 +4,14 @@
set(VRPN_DEPENDENCIES "LibNiFalcon")
if(WIN32)
list(APPEND VRPN_DEPENDENCIES "Libusb")
list(APPEND VRPN_DEPENDENCIES "FTD2XX")
endif(WIN32)
#-----------------------------------------------------------------------------
# Phantom Omni
#-----------------------------------------------------------------------------
option(${PROJECT_NAME}_USE_OMNI "Build OpenHaptics to support the Phantom Omni in VRPN." OFF)
if(${${PROJECT_NAME}_USE_OMNI})
option(${PROJECT_NAME}_USE_OpenHaptics "Build OpenHaptics to support the Phantom Omni in VRPN." OFF)
if(${${PROJECT_NAME}_USE_OpenHaptics})
message(STATUS "Superbuild - VRPN => ENABLING Phantom Omni support")
if(NOT DEFINED OPENHAPTICS_ROOT_DIR OR NOT EXISTS ${OPENHAPTICS_ROOT_DIR})
set(OPENHAPTICS_ROOT_DIR "$ENV{OH_SDK_BASE}" CACHE PATH "Path to OpenHaptics install directory." FORCE)
......@@ -31,23 +32,23 @@ endif()
include(imstkAddExternalProject)
imstk_add_external_project( VRPN
GIT_REPOSITORY https://gitlab.kitware.com/iMSTK/vrpn.git
GIT_TAG ae5672fc163d9753ac9fa559b5c862ed9e32e6ff
INSTALL_COMMAND ${SKIP_STEP_COMMAND}
GIT_TAG 021396b8770e6f14cb14427345d0b74479a32d82
# This is the improve-openhaptics-rebase branch
CMAKE_CACHE_ARGS
-DBUILD_TESTING:BOOL=OFF
-DVRPN_SUBPROJECT_BUILD:BOOL=ON
-DVRPN_BUILD_CLIENTS:BOOL=OFF
-DVRPN_BUILD_CLIENT_LIBRARY:BOOL=ON
-DVRPN_BUILD_SERVER_LIBRARY:BOOL=ON
-DVRPN_INSTALL:BOOL=OFF
-DVRPN_INSTALL:BOOL=ON
-DVRPN_BUILD_PYTHON:BOOL=OFF
-DVRPN_USE_GPM_MOUSE:BOOL=OFF
-DVRPN_USE_LIBUSB_1_0:BOOL=ON
-DVRPN_USE_HID:BOOL=ON
-DVRPN_USE_LIBNIFALCON:BOOL=ON
-DVRPN_BUILD_SERVERS:BOOL=${${PROJECT_NAME}_USE_OMNI}
-DVRPN_USE_PHANTOM_SERVER:BOOL=${${PROJECT_NAME}_USE_OMNI}
-DVRPN_USE_HDAPI:BOOL=${${PROJECT_NAME}_USE_OMNI}
-DVRPN_BUILD_SERVERS:BOOL=${${PROJECT_NAME}_USE_OpenHaptics}
-DVRPN_USE_PHANTOM_SERVER:BOOL=${${PROJECT_NAME}_USE_OpenHaptics}
-DVRPN_USE_HDAPI:BOOL=${${PROJECT_NAME}_USE_OpenHaptics}
-DOPENHAPTICS_ROOT_DIR:PATH=${OPENHAPTICS_ROOT_DIR}
DEPENDENCIES ${VRPN_DEPENDENCIES}
RELATIVE_INCLUDE_PATH ""
......
......@@ -2,9 +2,53 @@
# Dependencies
#-----------------------------------------------------------------------------
set(VTK_DEPENDENCIES "")
set(VTK_ENABLE_OPENVR "NO")
if(${${PROJECT_NAME}_ENABLE_VR})
list(APPEND VTK_DEPENDENCIES "openvr")
endif(${${PROJECT_NAME}_ENABLE_VR})
set(VTK_ENABLE_OPENVR "YES")
endif()
set(${PROJECT_NAME}_VTK_REPO_SOURCE "8.2" CACHE STRING "Select VTK Source Branch/Tag")
set(VTK_SOURCES "8.2;8.9;master;release;nightly-master" CACHE INTERNAL "List of available VTK branch,tags to get")
set_property(CACHE ${PROJECT_NAME}_VTK_REPO_SOURCE PROPERTY STRINGS ${VTK_SOURCES})
set(VTK_GIT_TAG)
if(${PROJECT_NAME}_VTK_REPO_SOURCE EQUAL "8.2")
set(VTK_MODULE_SETTINGS
-DModule_vtkRenderingOpenGL2:BOOL=ON
-DModule_vtkIOXML:BOOL=ON
-DModule_vtkIOLegacy:BOOL=ON
-DModule_vtkIOPLY:BOOL=ON
-DModule_vtkIOGeometry:BOOL=ON
-DModule_vtkInteractionStyle:BOOL=ON
-DModule_vtkRenderingAnnotation:BOOL=ON
-DModule_vtkRenderingOpenVR:BOOL=${${PROJECT_NAME}_ENABLE_VR}
-DModule_vtkInteractionWidgets:BOOL=ON
-DModule_vtkglew:BOOL=ON
-DModule_vtkRenderingContext2D:BOOL=ON
)
set(VTK_GIT_TAG "v8.2.0")
else()
set(VTK_MODULE_SETTINGS
-DVTK_MODULE_ENABLE_VTK_RenderingOpenGL2:STRING=YES
-DVTK_MODULE_ENABLE_VTK_IOXML:STRING=YES
-DVTK_MODULE_ENABLE_VTK_IOLegacy:STRING=YES
-DVTK_MODULE_ENABLE_VTK_IOPLY:STRING=YES
-DVTK_MODULE_ENABLE_VTK_IOGeometry:STRING=YES
-DVTK_MODULE_ENABLE_VTK_InteractionStyle:STRING=YES
-DVTK_MODULE_ENABLE_VTK_RenderingAnnotation:STRING=YES
-DVTK_MODULE_ENABLE_VTK_RenderingOpenVR:STRING=${VTK_ENABLE_OPENVR}
-DVTK_MODULE_ENABLE_VTK_InteractionWidgets:STRING=YES
-DVTK_MODULE_ENABLE_VTK_glew:STRING=YES
-DVTK_MODULE_ENABLE_VTK_RenderingContext2D:STRING=YES
)
if(${PROJECT_NAME}_VTK_REPO_SOURCE EQUAL "8.9")
set(VTK_GIT_TAG "9b6a039f43404053a0653f742148d123f6ada7d6")
else()
set(VTK_GIT_TAG "origin/${VTK_GIT_TAG}")
endif()
endif()
#-----------------------------------------------------------------------------
# Add External Project
......@@ -12,28 +56,18 @@ endif(${${PROJECT_NAME}_ENABLE_VR})
include(imstkAddExternalProject)
imstk_add_external_project( VTK
GIT_REPOSITORY https://gitlab.kitware.com/vtk/vtk.git
GIT_TAG v8.2.0
INSTALL_COMMAND ${SKIP_STEP_COMMAND}
GIT_TAG ${VTK_GIT_TAG}
CMAKE_ARGS
-DBUILD_EXAMPLES:BOOL=OFF
-DBUILD_TESTING:BOOL=OFF
-DVTK_Group_StandAlone:BOOL=OFF
-DVTK_Group_Rendering:BOOL=OFF
-DModule_vtkRenderingOpenGL2:BOOL=ON
-DModule_vtkIOXML:BOOL=ON
-DModule_vtkIOLegacy:BOOL=ON
-DModule_vtkIOPLY:BOOL=ON
-DModule_vtkIOGeometry:BOOL=ON
-DModule_vtkInteractionStyle:BOOL=ON
-DModule_vtkRenderingAnnotation:BOOL=ON
-DModule_vtkRenderingOpenVR:BOOL=${${PROJECT_NAME}_ENABLE_VR}
-DModule_vtkInteractionWidgets:BOOL=ON
-DModule_vtkglew:BOOL=ON
-DModule_vtkRenderingContext2D:BOOL=ON
${VTK_MODULE_SETTINGS}
-DVTK_RENDERING_BACKEND:STRING=OpenGL2
-DVTK_WRAP_PYTHON:BOOL=OFF
-DVTK_OPENVR_OBJECT_FACTORY:BOOL=OFF
-DVTK_LEGACY_REMOVE:BOOL=ON
-DVTK_BUILD_TESTING:STRING=OFF
DEPENDENCIES ${VTK_DEPENDENCIES}
RELATIVE_INCLUDE_PATH ""
#VERBOSE
......