CMakeLists.txt 3.14 KB
Newer Older
Jørgen Lind's avatar
Jørgen Lind committed
1
set(SOURCE_FILES
Jørgen Lind's avatar
Jørgen Lind committed
2
  OpenVDS.cpp
3
4
5
6
  IO/File.cpp
  IO/Linux_File.cpp
  IO/Win_File.cpp
  IO/S3_Downloader.cpp
Jørgen Lind's avatar
Jørgen Lind committed
7
8
  IO/IOManager.cpp
  IO/IOManagerAWS.cpp
9
  VDS/VolumeDataPartition.cpp
10
11
12
13
  VDS/VolumeDataLayer.cpp
  VDS/VolumeDataLayout.cpp
  VDS/VolumeDataRegion.cpp
  VDS/VolumeDataHash.cpp
14
  VDS/VolumeDataPageAccessorImpl.cpp
15
  VDS/VolumeDataAccessManagerImpl.cpp
16
  VDS/VolumeDataPageImpl.cpp
17
  VDS/DimensionGroup.cpp
Jørgen Lind's avatar
Jørgen Lind committed
18
  VDS/ParseVDSJson.cpp
19
  VDS/MetadataManager.cpp
Jørgen Lind's avatar
Jørgen Lind committed
20
21
  VDS/Base64.cpp
  VDS/VolumeDataStore.cpp)
Jørgen Lind's avatar
Jørgen Lind committed
22
23

set (PRIVATE_HEADER_FILES
24
25
  IO/File.h
  IO/S3_Downloader.h
Jørgen Lind's avatar
Jørgen Lind committed
26
27
  IO/IOManager.h
  IO/IOManagerAWS.h
28
  VDS/VolumeDataPartition.h
29
30
31
32
33
  VDS/VolumeDataLayer.h
  VDS/VolumeDataLayout.h
  VDS/VolumeDataChunk.h
  VDS/VolumeDataRegion.h
  VDS/VolumeDataHash.h
34
  VDS/VolumeDataPageAccessorImpl.h
35
  VDS/VolumeDataAccessManagerImpl.h
36
  VDS/VolumeDataPageImpl.h
37
38
39
  VDS/DimensionGroup.h
  VDS/Hash.h
  Math/Vector.h
40
  VDS/Bitmask.h
Jørgen Lind's avatar
Jørgen Lind committed
41
  VDS/ParseVDSJson.h
42
  VDS/MetadataManager.h
43
  VDS/IntrusiveList.h
Jørgen Lind's avatar
Jørgen Lind committed
44
45
  VDS/Base64.h
  VDS/VolumeDataStore.h)
Jørgen Lind's avatar
Jørgen Lind committed
46
47

set (EXPORTED_HEADER_FILES
Jørgen Lind's avatar
Jørgen Lind committed
48
  OpenVDS/OpenVDS.h
49
  OpenVDS/KnownMetadata.h
50
  OpenVDS/Metadata.h
Jørgen Lind's avatar
Jørgen Lind committed
51
  OpenVDS/VolumeData.h
52
53
54
55
56
  OpenVDS/VolumeDataLayoutDescriptor.h
  OpenVDS/VolumeDataChannelMapping.h
  OpenVDS/VolumeDataChannelDescriptor.h
  OpenVDS/VolumeDataAxisDescriptor.h
  OpenVDS/VolumeDataAccess.h
Jørgen Lind's avatar
Jørgen Lind committed
57
  OpenVDS/openvds_export.h)
Jørgen Lind's avatar
Jørgen Lind committed
58

59
add_library(openvds_objects OBJECT
Jørgen Lind's avatar
Jørgen Lind committed
60
61
62
  ${PRIVATE_HEADER_FILES}
  ${EXPORTED_HEADER_FILES}
  ${SOURCE_FILES})
Jørgen Lind's avatar
Jørgen Lind committed
63

64
65
66
67
68
69
70
71

add_dependencies(openvds_objects aws-cpp-sdk)
target_include_directories(openvds_objects PRIVATE "${aws-cpp-sdk_INCLUDE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}")
target_compile_definitions(openvds_objects PRIVATE openvds_EXPORTS)

target_link_libraries(openvds_objects Threads::Threads)
target_link_libraries(openvds_objects jsoncpp_lib_static)
target_link_libraries(openvds_objects ${aws-cpp-sdk_EXTERNAL_LIBS} ${aws-cpp-sdk_LIBS})
Jørgen Lind's avatar
Jørgen Lind committed
72

Jørgen Lind's avatar
Jørgen Lind committed
73
if (WIN32)
74
  set_source_files_properties(IO/Linux_File.cpp PROPERTIES HEADER_FILE_ONLY TRUE)
Jørgen Lind's avatar
Jørgen Lind committed
75
elseif (UNIX)
76
  set_source_files_properties(IO/Win_File.cpp PROPERTIES HEADER_FILE_ONLY TRUE)
Jørgen Lind's avatar
Jørgen Lind committed
77
endif()
Jørgen Lind's avatar
Jørgen Lind committed
78
79

if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
Jørgen Lind's avatar
Jørgen Lind committed
80
  set(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR}/Dist/OpenVDS CACHE STRING "" FORCE)
Jørgen Lind's avatar
Jørgen Lind committed
81
82
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)

83
84
add_library(openvds SHARED $<TARGET_OBJECTS:openvds_objects>)
target_link_libraries(openvds openvds_objects)
Jørgen Lind's avatar
Jørgen Lind committed
85
set_target_properties(openvds
Jørgen Lind's avatar
Jørgen Lind committed
86
87
88
89
90
91
92
  PROPERTIES
  FRAMEWORK ON
  SOVERSION 0
  VERSION 0.1.0
  PUBLIC_HEADER "${EXPORTED_HEADER_FILES}"
  PRIVATE_HEADER "${PRIVATE_HEADER_FILES}"
  #OUTPUT_NAME ${PROJECT_NAME}
Jørgen Lind's avatar
Jørgen Lind committed
93
94
95
)

if (${MSVC_TOOLSET_VERSION})
Jørgen Lind's avatar
Jørgen Lind committed
96
  set(LIB_TOOLSET_DIR "/msvc_${MSVC_TOOLSET_VERSION}")
Jørgen Lind's avatar
Jørgen Lind committed
97
98
99
endif()

install(TARGETS openvds
Jørgen Lind's avatar
Jørgen Lind committed
100
101
102
103
104
105
  ARCHIVE
    DESTINATION lib${LIB_TOOLSET_DIR}
  LIBRARY
    DESTINATION lib${LIB_TOOLSET_DIR}
  RUNTIME
    DESTINATION bin${LIB_TOOLSET_DIR}
Jørgen Lind's avatar
Jørgen Lind committed
106
107
  FRAMEWORK
    DESTINATION framework
Jørgen Lind's avatar
Jørgen Lind committed
108
109
110
111
  PUBLIC_HEADER
    DESTINATION include/OpenVDS
  PRIVATE_HEADER
    DESTINATION include/OpenVDS/private)
Jørgen Lind's avatar
Jørgen Lind committed
112

Jørgen Lind's avatar
Jørgen Lind committed
113
114
115
116
117
118
119
  install(FILES ${aws-cpp-sdk_LIBS}
    DESTINATION lib${LIB_TOOLSET_DIR})
  if (aws-cpp-sdk_RUNTIME)
    install(FILES ${aws-cpp-sdk_RUNTIME}
      DESTINATION bin${LIB_TOOLSET_DIR})
  endif()

Jørgen Lind's avatar
Jørgen Lind committed
120
add_subdirectory(SEG-Y)