diff options
author | Brent Cook <busterb@gmail.com> | 2020-05-01 11:02:09 -0500 |
---|---|---|
committer | Brent Cook <busterb@gmail.com> | 2020-05-01 11:02:09 -0500 |
commit | 1b2044f355884e330eb5578e6edab8476bd88828 (patch) | |
tree | 0a0dd164e57747c8f86ce160dbd39595e64979db | |
parent | af8529257557b3b9d23c47c1e4a6203c44bcfaeb (diff) | |
parent | 012014df35b7ff951363b4127c0bcaf9ad555bfe (diff) | |
download | portable-1b2044f355884e330eb5578e6edab8476bd88828.tar.gz portable-1b2044f355884e330eb5578e6edab8476bd88828.tar.bz2 portable-1b2044f355884e330eb5578e6edab8476bd88828.zip |
Land #578, add support for use of static MSVC runtimes
-rw-r--r-- | CMakeLists.txt | 10 | ||||
-rw-r--r-- | appveyor.yml | 29 |
2 files changed, 26 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e198f7c..515b3fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -1,4 +1,9 @@ | |||
1 | if(MSVC) | ||
2 | cmake_minimum_required (VERSION 3.16.4) | ||
3 | cmake_policy(SET CMP0091 NEW) | ||
4 | else() | ||
1 | cmake_minimum_required (VERSION 3.0) | 5 | cmake_minimum_required (VERSION 3.0) |
6 | endif() | ||
2 | include(CheckFunctionExists) | 7 | include(CheckFunctionExists) |
3 | include(CheckSymbolExists) | 8 | include(CheckSymbolExists) |
4 | include(CheckLibraryExists) | 9 | include(CheckLibraryExists) |
@@ -36,6 +41,11 @@ option(ENABLE_EXTRATESTS "Enable extra tests that may be unreliable on some plat | |||
36 | option(ENABLE_NC "Enable installing TLS-enabled nc(1)" OFF) | 41 | option(ENABLE_NC "Enable installing TLS-enabled nc(1)" OFF) |
37 | set(OPENSSLDIR ${OPENSSLDIR} CACHE PATH "Set the default openssl directory" FORCE) | 42 | set(OPENSSLDIR ${OPENSSLDIR} CACHE PATH "Set the default openssl directory" FORCE) |
38 | 43 | ||
44 | option(USE_STATIC_MSVC_RUNTIMES "Use /MT instead of /MD in MSVC" OFF) | ||
45 | if(USE_STATIC_MSVC_RUNTIMES) | ||
46 | set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") | ||
47 | endif() | ||
48 | |||
39 | if(NOT LIBRESSL_SKIP_INSTALL) | 49 | if(NOT LIBRESSL_SKIP_INSTALL) |
40 | set( ENABLE_LIBRESSL_INSTALL ON ) | 50 | set( ENABLE_LIBRESSL_INSTALL ON ) |
41 | endif(NOT LIBRESSL_SKIP_INSTALL) | 51 | endif(NOT LIBRESSL_SKIP_INSTALL) |
diff --git a/appveyor.yml b/appveyor.yml index 8ac2045..4e0b488 100644 --- a/appveyor.yml +++ b/appveyor.yml | |||
@@ -1,25 +1,28 @@ | |||
1 | image: | 1 | image: |
2 | - Visual Studio 2015 | 2 | - Visual Studio 2019 |
3 | #- Visual Studio 2017 | ||
4 | 3 | ||
5 | environment: | 4 | environment: |
6 | PATH: C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\Windows\System32;C:\Windows;%PATH% | 5 | PATH: C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\Windows\System32;C:\Windows;%PATH% |
7 | 6 | ||
8 | matrix: | 7 | matrix: |
9 | - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 | 8 | - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 |
10 | GENERATOR: Visual Studio 14 2015 Win64 | 9 | GENERATOR: Visual Studio 16 2019 |
10 | ARCHITECTURE: Win32 | ||
11 | CONFIG: Release | 11 | CONFIG: Release |
12 | SHARED_LIBS: ON | 12 | SHARED_LIBS: ON |
13 | - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 | 13 | - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 |
14 | GENERATOR: Visual Studio 14 2015 | 14 | GENERATOR: Visual Studio 16 2019 |
15 | CONFIG: Release | 15 | ARCHITECTURE: Win32 |
16 | SHARED_LIBS: ON | ||
17 | - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 | ||
18 | GENERATOR: Visual Studio 14 2015 Win64 | ||
19 | CONFIG: Release | 16 | CONFIG: Release |
20 | SHARED_LIBS: OFF | 17 | SHARED_LIBS: OFF |
21 | - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 | 18 | - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 |
22 | GENERATOR: Visual Studio 14 2015 | 19 | GENERATOR: Visual Studio 16 2019 |
20 | ARCHITECTURE: x64 | ||
21 | CONFIG: Release | ||
22 | SHARED_LIBS: ON | ||
23 | - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 | ||
24 | GENERATOR: Visual Studio 16 2019 | ||
25 | ARCHITECTURE: x64 | ||
23 | CONFIG: Release | 26 | CONFIG: Release |
24 | SHARED_LIBS: OFF | 27 | SHARED_LIBS: OFF |
25 | 28 | ||
@@ -34,7 +37,7 @@ before_build: | |||
34 | - bash autogen.sh | 37 | - bash autogen.sh |
35 | - mkdir build | 38 | - mkdir build |
36 | - cd build | 39 | - cd build |
37 | - cmake .. -G "%GENERATOR%" -DBUILD_SHARED_LIBS=%SHARED_LIBS% -DCMAKE_INSTALL_PREFIX=../local | 40 | - cmake .. -G "%GENERATOR%" -A "%ARCHITECTURE%" -DBUILD_SHARED_LIBS=%SHARED_LIBS% -DCMAKE_INSTALL_PREFIX=../local |
38 | 41 | ||
39 | build_script: | 42 | build_script: |
40 | - cmake --build . --config %CONFIG% | 43 | - cmake --build . --config %CONFIG% |