forked from ngageoint/six-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
47 lines (40 loc) · 1.46 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
cmake_minimum_required(VERSION 3.14)
project(six-library)
set(CMAKE_CXX_STANDARD 11)
if (${CMAKE_PROJECT_NAME} STREQUAL six-library)
# we are the top-level project and are responsible for configuration
# set up warnings
if (MSVC)
# set warning level to /W3
string(REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE "/W[0-4]" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
add_compile_options(/W3 /wd4290 /wd4512)
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS)
elseif (UNIX)
add_compile_options(
-Wno-deprecated
-Wno-unused-value
-Wno-unused-but-set-variable
)
endif()
if (EXISTS "${CMAKE_BINARY_DIR}/conan_paths.cmake")
# use pre-built dependencies from conan packages
include("${CMAKE_BINARY_DIR}/conan_paths.cmake")
find_package(coda-oss REQUIRED)
find_package(nitro REQUIRED)
include(CodaBuild)
coda_initialize_build()
else()
# build dependencies ourselves
list(APPEND CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/externals/coda-oss/cmake")
include(CodaBuild)
coda_initialize_build()
add_subdirectory("externals")
endif()
endif()
# needed to run some unit tests from the build directory
file(COPY "croppedNitfs"
DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
add_subdirectory(six)
coda_generate_package_config()