Updating README-CONAN.md for webready and static builds with Visual Studio.

v0.27.3
clanmills 7 years ago committed by Luis Díaz Más
parent a72782932c
commit 29339190bb

@ -36,6 +36,7 @@ To build Exiv2 with conan, you will also need to install CMake. https://cmake.o
2. [Build dependencies and install conan artefacts in your build directory](#4-2) 2. [Build dependencies and install conan artefacts in your build directory](#4-2)
3. [Execute cmake to generate build files for your environment](#4-3) 3. [Execute cmake to generate build files for your environment](#4-3)
4. [Build Exiv2 and link Adobe XMPsdk library](#4-4) 4. [Build Exiv2 and link Adobe XMPsdk library](#4-4)
5. [Webready Support](#5)
<name id="1"></a> <name id="1"></a>
---- ----
@ -120,7 +121,6 @@ $ cmake --build . --config Release
``` ```
[TOC](#TOC) [TOC](#TOC)
<name id="2"></a> <name id="2"></a>
## 2) Platform Notes ## 2) Platform Notes
@ -174,6 +174,7 @@ distributions might set that definition to 0 by default. In case you get linking
algorithms when bringing the Exiv2 dependencies with conan, this might indicate a mismatch between the value set in algorithms when bringing the Exiv2 dependencies with conan, this might indicate a mismatch between the value set in
**compiler.libcxx** and the default values used in your distribution. **compiler.libcxx** and the default values used in your distribution.
[TOC](#TOC)
<name id="2-2"></a> <name id="2-2"></a>
### 2.2) Visual Studio Notes ### 2.2) Visual Studio Notes
@ -218,7 +219,6 @@ CMake provides 4 Generators. The 64 and 32 bit Generators have different names:
### Recommended settings for Visual Studio ### Recommended settings for Visual Studio
##### 64 bit Release Build ##### 64 bit Release Build
| | Visual Studio 2015 | Visual Studio 2017| | | Visual Studio 2015 | Visual Studio 2017|
@ -253,22 +253,27 @@ CMake provides 4 Generators. The 64 and 32 bit Generators have different names:
| _**profile**_ | arch=x86 | arch=x86 | | _**profile**_ | arch=x86 | arch=x86 |
| | arch_build=x86 | arch_build=x86 | | | arch_build=x86 | arch_build=x86 |
### Modifying build settings in the Visual Studio IDE ##### Static Builds
The default (and recommended) builds of Exiv2 and sample applications build and use DLLs. If you wish to build static applications and libraries, you will need to set the correct "C" run-time library to be linked both to your code and dependencies being built/downloaded by conan.
**CAUTION** You can change the runtime library in Visual Studio once you open the | Static Release | Static Debug |
solution generated by CMake. If you have generated a project to use the dynamic run-time library |:---------|:-------------------|
with the profile setting `compiler.runtime=MD` (or MDd), Visual Studio allows you to change that setting. | compiler.runtime=MT | compiler.runtime=MTd |
However the libraries (provided by conan) to which you link are tied
to a specific configuration and you will obtain linking errors.
If you want to work with the static runtime library `MT` (or `MTd`), set up the profiles and build in a different directory such as build-static. Additionally, you will have to use the cmake option -DBUILD\_SHARED\_LIBS=Off to
```
$ cmake -DBUILD_SHARED_LIBS=Off ..
```
### Changing profile settings with the conan command ### Changing profile settings with the conan command
It is recommended that you create 8 profiles for msvc{2017|2015}{Release|Debug}{64|32}. It is recommended that you create 8 profiles for msvc{2017|2015}{Release|Debug}{64|32}.
You can modify profile settings on the command line. You can modify profile settings on the command line.
The following example demonstrates making substantial changes to profile settings by performing a 32 bit build using Visual Studio 2015 with a 2017 profile! The following example demonstrates making substantial changes to profile settings by performing a 32 bit build using Visual Studio 2015 with a 2017 profile! This example is not considered good practice, it is an illustration to some conan flexibility which be useful when your build environment is automated.
```bash ```bash
$ conan install .. --profile msvc2017Release64 -s arch_build=x86 -s arch=x86 -s compiler.version=14 $ conan install .. --profile msvc2017Release64 -s arch_build=x86 -s arch=x86 -s compiler.version=14
@ -284,10 +289,13 @@ compiler header search path. FindIntl is a prime suspect and I believe this iss
I recommend that you disable Natural Language Support when building with Visual Studio: I recommend that you disable Natural Language Support when building with Visual Studio:
```
$ cmake .. -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Release -DEXIV2_ENABLE_NLS=Off $ cmake .. -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Release -DEXIV2_ENABLE_NLS=Off
```
If necessary, temporarily rename c:\\cygwin64\\usr\\include as c:\\cygwin64\\usr\\uncle to hide those files when working with CMake. If necessary, temporarily rename c:\\cygwin64\\usr\\include as c:\\cygwin64\\usr\\uncle to hide those files when working with CMake.
[TOC](#TOC)
<name id="2-3"></a> <name id="2-3"></a>
### 2.3) Cygwin Notes ### 2.3) Cygwin Notes
@ -301,7 +309,6 @@ Team Exiv2 supports MinGW msys/2. Team Exiv2 does not support MinGW msys/1.0.
As with Cygwin, we recommend installing or building dependencies with platform tools dependencies and using CMake to build Exiv2. As with Cygwin, we recommend installing or building dependencies with platform tools dependencies and using CMake to build Exiv2.
[TOC](#TOC) [TOC](#TOC)
<name id="3"> <name id="3">
## 3 Conan Architecture ## 3 Conan Architecture
@ -316,6 +323,7 @@ For example, **zlib**:
self.requires('self.requires('zlib/1.2.11@conan/stable')') self.requires('self.requires('zlib/1.2.11@conan/stable')')
``` ```
[TOC](#TOC)
<name id="3-2"> <name id="3-2">
##### 3.2) Conan _**Recipes**_ ##### 3.2) Conan _**Recipes**_
@ -364,6 +372,7 @@ Existing packages for recipe zlib/1.2.11@conan/stable:
``` ```
[TOC](#TOC)
<name id="3-3"> <name id="3-3">
##### 3.3) Conan server search path ##### 3.3) Conan server search path
@ -379,6 +388,7 @@ You can add servers to the conan server search path:
$ conan remote add conan-piponazo https://api.bintray.com/conan/piponazo/piponazo $ conan remote add conan-piponazo https://api.bintray.com/conan/piponazo/piponazo
``` ```
[TOC](#TOC)
<name id="3-4"> <name id="3-4">
##### 3.4) Configuring conan on your machine ##### 3.4) Configuring conan on your machine
@ -391,6 +401,7 @@ $HOME/.conan/profiles Configuration files for compilers/platforms
$HOME/.conan/data Dependencies are built/stored in this directory $HOME/.conan/data Dependencies are built/stored in this directory
``` ```
[TOC](#TOC)
<name id="3-5"> <name id="3-5">
##### 3.5) Running `conan install` for the first time ##### 3.5) Running `conan install` for the first time
@ -515,7 +526,6 @@ PROJECT imports(): Copied 5 '.dll' files
Indicating that the packages were found in the local cache. Indicating that the packages were found in the local cache.
[TOC](#TOC) [TOC](#TOC)
<name id="4"> <name id="4">
## 4 Building Exiv2 with Adobe XMPsdk 2016 ## 4 Building Exiv2 with Adobe XMPsdk 2016
@ -563,4 +573,18 @@ $ cmake .. -DEXIV2_ENABLE_EXTERNAL_XMP=On -G Xcode
```bash ```bash
$ cmake --build . --config Release $ cmake --build . --config Release
``` ```
[TOC](#TOC)
<name id="5">
## 5 Webready Support
Exiv2 can perform I/O using internet protocols such as https, https, ftp and ssh.
The feature is disabled by default. You will need to instruct conan to build/download necessary libraries (curl, openssl and libssh) and tell CMake to link to the libraries.
```
$ conan install .. --options webready=True
$ cmake -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_CURL=ON -DEXIV2_ENABLE_SSH=ON ..
```
[TOC](#TOC) [TOC](#TOC)

Loading…
Cancel
Save