CMakeLists.txt 1.81 KB
Newer Older
1 2 3
 
project(Cosmo)

Dave Partyka's avatar
Dave Partyka committed
4

5
#SET(Cosmo_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
6 7
SET(Cosmo_LIBS)
IF(VTK_USE_MPI)
8 9 10 11 12
  IF(MPI_EXTRA_LIBRARY)
    SET(Cosmo_LIBS ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
  ELSE(MPI_EXTRA_LIBRARY)
    SET(Cosmo_LIBS ${MPI_LIBRARY})
  ENDIF(MPI_EXTRA_LIBRARY)
13
ELSE(VTK_USE_MPI)
14
  ADD_DEFINITIONS("-DUSE_SERIAL_COSMO")
15
ENDIF(VTK_USE_MPI)
16 17 18 19 20
# Needed for mpich 2
ADD_DEFINITIONS("-DMPICH_IGNORE_CXX_SEEK")

CONFIGURE_FILE (${Cosmo_SOURCE_DIR}/CosmoDefinition.h.in
                ${Cosmo_BINARY_DIR}/CosmoDefinition.h)
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
 
SET(Cosmo_SOURCES
  Partition.cxx
  ParticleDistribute.cxx
  ParticleExchange.cxx
  Message.cxx
  CosmoHaloFinder.cxx
  CosmoHaloFinderP.cxx
  FOFHaloProperties.cxx
  ChainingMesh.cxx
)

INCLUDE_DIRECTORIES (${Cosmo_SOURCE_DIR} ${Cosmo_BINARY_DIR})

ADD_LIBRARY(Cosmo ${Cosmo_SOURCES})
36
TARGET_LINK_LIBRARIES(Cosmo vtksys vtkCommon ${Cosmo_LIBS})
37 38 39 40 41 42 43 44 45 46

IF(NOT VTK_INSTALL_NO_LIBRARIES)
  INSTALL(TARGETS Cosmo
    RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
    LIBRARY DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
    ARCHIVE DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)

IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
  INSTALL(FILES
47 48 49 50 51 52 53 54 55 56 57 58
    ${Cosmo_SOURCE_DIR}/BasicDefinition.h
    ${Cosmo_SOURCE_DIR}/ChainingMesh.h
    ${Cosmo_SOURCE_DIR}/CosmoHalo.h
    ${Cosmo_SOURCE_DIR}/CosmoHaloFinder.h
    ${Cosmo_SOURCE_DIR}/CosmoHaloFinderP.h
    ${Cosmo_SOURCE_DIR}/FOFHaloProperties.h
    ${Cosmo_SOURCE_DIR}/Message.h
    ${Cosmo_SOURCE_DIR}/ParticleDistribute.h
    ${Cosmo_SOURCE_DIR}/ParticleExchange.h
    ${Cosmo_SOURCE_DIR}/Partition.h
    ${Cosmo_SOURCE_DIR}/winDirent.h
    ${Cosmo_BINARY_DIR}/CosmoDefinition.h
59 60 61
    DESTINATION ${VTK_INSTALL_INCLUDE_DIR_CM24}/Cosmo
    COMPONENT Development)
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)