PROJECT(XercesBin) INCLUDE (Dart) # Because of new "INSTALL" syntax CMAKE_MINIMUM_REQUIRED(VERSION 2.4) # # 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(XERCES_BIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/windows64 CACHE PATH "Platform subdirectory name") ELSE(${CMAKE_SIZEOF_VOID_P} MATCHES 8) SET(XERCES_BIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/windows32 CACHE PATH "Platform subdirectory name") ENDIF(${CMAKE_SIZEOF_VOID_P} MATCHES 8) ELSE(WIN32) IF(APPLE) SET(XERCES_BIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/mac CACHE PATH "Platform subdirectory name") ELSE(APPLE) IF(${CMAKE_SIZEOF_VOID_P} MATCHES 8) SET(XERCES_BIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/linux64 CACHE PATH "Platform subdirectory name") ELSE(${CMAKE_SIZEOF_VOID_P} MATCHES 8) SET(XERCES_BIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/linux32 CACHE PATH "Platform subdirectory name") ENDIF(${CMAKE_SIZEOF_VOID_P} MATCHES 8) ENDIF(APPLE) ENDIF(WIN32) INSTALL(DIRECTORY ${XERCES_BIN_SOURCE_DIR}/ DESTINATION "${SimTK_INSTALL_PREFIX}/xerces" PATTERN ".svn" EXCLUDE ) ADD_SUBDIRECTORY(tests)