-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
69 lines (53 loc) · 1.55 KB
/
CMakeLists.txt
File metadata and controls
69 lines (53 loc) · 1.55 KB
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
cmake_minimum_required(VERSION 3.1)
project(SSXTools CXX)
include(CheckCXXSourceCompiles)
find_package(Threads)
option(SSXTOOLS_DISABLE_QT "Disable building the graphical user interface of SSXTools" OFF)
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus")
endif()
# Detect the particular C++ standard library if it's not cached.
if(NOT DEFINED CACHE{SSXTOOLS_STDLIB})
message(STATUS "Detecting C++ standard library")
set(CMAKE_REQUIRED_QUIET ON)
check_cxx_source_compiles(
"#include <ciso646>
#if !defined(__GLIBCXX__)
#error \"not libstdc++\"
#endif
int main() {}"
__LIBRARY_LIBSTDCXX)
check_cxx_source_compiles(
"#include <ciso646>
#if !defined(_LIBCPP_VERSION)
#error \"not libc++\"
#endif
int main() {}"
__LIBRARY_LIBCXX)
check_cxx_source_compiles(
"#include <ciso646>
#if !defined(_MSVC_STL_VERSION)
#error \"not MSVC\"
#endif
int main() {}"
__LIBRARY_MSVC)
if(__LIBRARY_LIBSTDCXX)
set(STANDARD_LIBRARY "libstdc++")
elseif(__LIBRARY_LIBCXX)
set(STANDARD_LIBRARY "libc++")
elseif(__LIBRARY_MSVC)
set(STANDARD_LIBRARY "msvc")
else()
message(FATAL_ERROR "Can't find which C++ runtime is in use")
endif()
set(SSXTOOLS_STDLIB ${STANDARD_LIBRARY} CACHE STRING "The C++ standard library in use; possible values: libstdc++, libc++, msvc")
message(STATUS "Detected ${EAGLE_STDLIB}")
endif()
set(BIGFILE_ENABLE_EXAMPLES OFF)
add_subdirectory(vendor/bigfile)
set(MCOMMON_DO_NOT_INSTALL ON)
add_subdirectory(vendor/mcommon)
add_subdirectory(src/shps)
if(NOT SSXTOOLS_DISABLE_QT)
add_subdirectory(src/gui)
endif()