forked from warhawkreborn/connector_cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
54 lines (30 loc) · 957 Bytes
/
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
cmake_minimum_required( VERSION 3.6.3 )
project( WarHawkReborn )
option( USE_SYSTEM_CURL "Use the system CURL (not the built-in one)." OFF )
if ( NOT CMAKE_BUILD_TYPE )
set( CMAKE_BUILD_TYPE Debug )
endif( )
message( "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}" )
if ( APPLE )
# C++17
add_definitions( -std=c++17 )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.10" )
set( CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -lc++" )
# Standard library.
add_definitions( -stdlib=libc++ )
# Warnings as errors.
# add_definitions( -Werror )
set( USE_SYSTEM_CURL ON )
elseif ( MSVC )
add_definitions( /std:c++17 /Zc:__cplusplus )
set( USE_SYSTEM_CURL OFF )
else( )
# C++17
add_definitions( -std=c++17 )
set( USE_SYSTEM_CURL ON )
endif( )
if ( NOT USE_SYSTEM_CURL )
# Build the library but don't install any of it's targets.
add_subdirectory( libs/curl EXCLUDE_FROM_ALL )
endif( )
add_subdirectory( src )