PROJECT(VTKbin) INCLUDE (Dart) # Because of new "INSTALL" syntax CMAKE_MINIMUM_REQUIRED(VERSION 2.8) # # Make sure "sandbox" input & output directories are set. During # SimTK Core build, the build system will set them. Otherwise, we'll # set them to sensible local values. # If SimTK_INSTALL_PREFIX is set then # it is a sandbox installation area, otherwise we want to install # in /usr/local/SimTK or c:\program files\SimTK. Similarly, SimTK_SDK # tells us where to find other SimTK Core modules on which this one # depends. If it is not set, we'll look in /usr/local/SimTK or # c:\program files\SimTK *regardless* of SimTK_INSTALL_PREFIX. # IF(NOT SimTK_INSTALL_PREFIX) IF(SimTK_SDK) SET(SimTK_INSTALL_PREFIX ${SimTK_SDK} CACHE PATH "Where to install SimTK core components") ELSE(SimTK_SDK) IF(${CMAKE_C_COMPILER} MATCHES "gcc") SET(SimTK_INSTALL_PREFIX "/usr/local/SimTK" CACHE PATH "Where to install SimTK core components") ELSE(${CMAKE_C_COMPILER} MATCHES "gcc") SET(SimTK_INSTALL_PREFIX "C:/Program Files/SimTK" CACHE PATH "Where to install SimTK core components") ENDIF(${CMAKE_C_COMPILER} MATCHES "gcc") ENDIF(SimTK_SDK) ENDIF(NOT SimTK_INSTALL_PREFIX) # Sniff current platform IF(WIN32) IF(${CMAKE_SIZEOF_VOID_P} MATCHES 8) SET(VTK_BIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/windows64 CACHE PATH "Platform subdirectory name") ELSE(${CMAKE_SIZEOF_VOID_P} MATCHES 8) SET(VTK_BIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/windows32 CACHE PATH "Platform subdirectory name") ENDIF(${CMAKE_SIZEOF_VOID_P} MATCHES 8) ELSE(WIN32) IF(APPLE) # VTK universal binaries prior to VTK 5.0.5 do not work on both ppc and intel # architectures. IF(${CMAKE_OSX_ARCHITECTURES} MATCHES "ppc") # powerpc mac - TODO - either get universal binaries to work, or create # true platform dependent binaries MESSAGE("Using powerpc binaries") SET(VTK_BIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/mac_ppc CACHE PATH "Platform subdirectory name") ELSE(${CMAKE_OSX_ARCHITECTURES} MATCHES "ppc") # intel mac MESSAGE("Using intel binaries") SET(VTK_BIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/mac CACHE PATH "Platform subdirectory name") ENDIF(${CMAKE_OSX_ARCHITECTURES} MATCHES "ppc") ELSE(APPLE) IF(${CMAKE_SIZEOF_VOID_P} MATCHES 8) SET(VTK_BIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/linux64 CACHE PATH "Platform subdirectory name") ELSE(${CMAKE_SIZEOF_VOID_P} MATCHES 8) SET(VTK_BIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/linux32 CACHE PATH "Platform subdirectory name") ENDIF(${CMAKE_SIZEOF_VOID_P} MATCHES 8) ENDIF(APPLE) ENDIF(WIN32) # VTK_INSTALL_DIR variable is needed by java subdirectory cmakelists.txt rules SET(VTK_INSTALL_DIR "${SimTK_INSTALL_PREFIX}") INSTALL(DIRECTORY ${VTK_BIN_SOURCE_DIR}/ DESTINATION "${VTK_INSTALL_DIR}" USE_SOURCE_PERMISSIONS PATTERN ".svn" EXCLUDE ) # Elide building of java jar file. Not needed for simtk core. # ADD_SUBDIRECTORY(java) # ADD_SUBDIRECTORY(tests)