forked from pietern/goestools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
95 lines (79 loc) · 2.79 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
project(goesdec CXX C)
if("${CMAKE_GENERATOR_PLATFORM}" STREQUAL "x64")
include_directories(vcpkg/installed/x64-windows/include)
link_directories(vcpkg/installed/x64-windows/lib)
else()
include_directories(vcpkg/installed/x86-windows/include)
link_directories(vcpkg/installed/x86-windows/lib)
endif()
if(SANITIZE_ADDRESS OR SANITIZE_MEMORY OR
SANITIZE_THREAD OR SANITIZE_UNDEFINED)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/vendor/sanitizers-cmake/cmake ${CMAKE_MODULE_PATH})
find_package(Sanitizers)
else()
function(add_sanitizers)
endfunction()
endif()
# Force static build of libaec
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "" FORCE)
# Set a default build type if none was specified
set(default_build_type "Release")
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Defaulting build type to '${default_build_type}'")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel")
endif()
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNOMINMAX -DNOGDI")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOMINMAX -DNOGDI")
if("${CMAKE_BUILD_TYPE}" EQUAL "Release")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
endif()
add_subdirectory(vendor/libcorrect EXCLUDE_FROM_ALL)
include_directories(BEFORE SYSTEM ${PROJECT_BINARY_DIR}/include)
include_directories(BEFORE SYSTEM ${PROJECT_SOURCE_DIR}/vendor/libcorrect/include)
include_directories(BEFORE SYSTEM ${PROJECT_SOURCE_DIR}/vendor/tinytoml/include)
include_directories(${PROJECT_SOURCE_DIR}/src)
add_subdirectory(src/util)
add_subdirectory(src/lib)
add_subdirectory(src/lrit)
add_subdirectory(src/dcs)
add_subdirectory(src/decoder)
add_subdirectory(src/assembler)
option(BUILD_GOESRECV "Build goesrecv" ON)
if(${BUILD_GOESRECV})
add_subdirectory(src/goesrecv)
endif()
option(BUILD_GOESLRIT "Build goeslrit" ON)
if(${BUILD_GOESLRIT})
add_subdirectory(src/goeslrit)
endif()
# Legacy - Building Anyway
option(BUILD_GOESEMWIN "Build goesemwin" ON)
if(${BUILD_GOESEMWIN})
add_subdirectory(src/goesemwin)
endif()
option(BUILD_GOESPROC "Build goesproc" ON)
if(${BUILD_GOESPROC})
add_subdirectory(src/goesproc)
# Install contrast curve and false color LUT
install(
DIRECTORY share/wxstar
DESTINATION share/goestools
COMPONENT goestools)
# Install Natural Earth GeoJSON files for map overlays
install(
DIRECTORY share/ne
DESTINATION share/goestools
COMPONENT goestools)
endif()
option(BUILD_GOESPACKETS "Build goespackets" ON)
if(${BUILD_GOESPACKETS})
add_subdirectory(src/goespackets)
endif()