-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
50 lines (44 loc) · 1.23 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
cmake_minimum_required(VERSION 3.12)
project(IdiaVrServer)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include_directories(${CMAKE_SOURCE_DIR}/third-party/cxxopts/include)
find_package(fmt CONFIG REQUIRED)
find_package(spdlog CONFIG REQUIRED)
find_package(zfp CONFIG REQUIRED)
find_package(Boost REQUIRED)
IF (WIN32)
find_package(unofficial-cfitsio CONFIG REQUIRED)
add_compile_options(/wd4251)
ELSE ()
find_package(CFITSIO QUIET)
if (CFITSIO_FOUND)
message(STATUS "Found cfitsio using find_package")
else ()
find_package(PkgConfig REQUIRED)
pkg_search_module(CFITSIO REQUIRED cfitsio)
if (CFITSIO_FOUND)
message(STATUS "Found cfitsio using pkg-config")
else ()
message(FATAL_ERROR "Could not find cfitsio")
endif ()
endif()
ENDIF ()
add_executable(IdiaVrServer
src/Image.cc
src/FitsImage.cc
src/FileBrowserService.cc
src/Main.cc
src/Util.cc
src/Compression.cc
src/Timer/Timer.cc
)
target_link_libraries(IdiaVrServer
PRIVATE
protolib
PUBLIC
fmt::fmt
zfp::zfp
cfitsio
)
add_subdirectory(../Protobuf proto)