Validated conan v2 migration
This commit is contained in:
parent
d302d7ebd5
commit
0c8282ab5d
1
.gitignore
vendored
1
.gitignore
vendored
@ -75,3 +75,4 @@ install_manifest.txt
|
||||
compile_commands.json
|
||||
CTestTestfile.cmake
|
||||
_deps
|
||||
CMakeUserPresets.json
|
||||
|
49
README.md
49
README.md
@ -44,45 +44,26 @@ Due to issue with copyrights, I can't provide samples... You need to extract HMT
|
||||
|
||||
Necessary libs (provided only in windows release) for running and for compiling.
|
||||
|
||||
- libpng (1.6.37)
|
||||
- [zlib](https://www.zlib.net/) (1.2.13)
|
||||
- [libpng](http://www.libpng.org/pub/png/libpng.html) (1.6.40)
|
||||
|
||||
### Compiling
|
||||
|
||||
You can compile on both Windows (MinGW) or native Linux system thanks to CMake, you only need to adjust your dependencies on Windows or use Conan packages manager (https://conan.io).
|
||||
libpng16-dev distrib package can be used on debian/ubuntu.
|
||||
|
||||
To compile, just clone and launch cmake:
|
||||
I've a preference for compiling libraries by hand, mainly for backward compatibility, but I recommend using Conan packages manager (https://conan.io) for simplicity.
|
||||
|
||||
```shell
|
||||
cmake .
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
On Windows system, I can suggest you to use Conan support to help you with dependencies:
|
||||
|
||||
```shell
|
||||
mkdir build
|
||||
conan install -of build . --build=missing -pr:b=default -pr:h=default
|
||||
cd build
|
||||
conan install .. --build=missing
|
||||
cmake .. -G "MinGW Makefiles"
|
||||
make
|
||||
```
|
||||
|
||||
If you want to do it manually without Conan support, you will probably need to specify the dependency flags for CMake. Ex:
|
||||
|
||||
`cmake.exe -D"ZLIB_INCLUDE_DIR=zlib/1.2.12/include" -D"ZLIB_LIBRARY=zlib/1.2.12/lib/libzlib.dll.a" -D"PNG_PNG_INCLUDE_DIR=libpng/1.6.37/include" -D"PNG_LIBRARY=libpng/1.6.37/lib/libpng.dll.a" . -G "MinGW Makefiles"`
|
||||
|
||||
We can also use cross-compilation (after installing `mingw64` and `cmake` packages on your distrib):
|
||||
|
||||
```shell
|
||||
mkdir build && cd build
|
||||
cmake -DGNU_HOST=x86_64-w64-mingw32 \
|
||||
-DCMAKE_TOOLCHAIN_FILE=../mingw_cross_toolchain.cmake \
|
||||
-D"ZLIB_INCLUDE_DIR=zlib/1.2.12/include" \
|
||||
-D"ZLIB_LIBRARY=zlib/1.2.12/lib/libzlib.dll.a" \
|
||||
-D"PNG_PNG_INCLUDE_DIR=libpng/1.6.37/include" \
|
||||
-D"PNG_LIBRARY=libpng/1.6.37/lib/libpng.dll.a" \
|
||||
..
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles"
|
||||
cmake --build .
|
||||
```
|
||||
|
||||
On Windows environment, you can use MinGW `-G "MinGW Makefiles"` or Ninja `-G "Ninja"` as CMake generator.
|
||||
|
||||
### Compiling (HARDCORE)
|
||||
|
||||
If you want to do it manually without Conan, you will probably need to specify the dependency flags for CMake. Ex:
|
||||
|
||||
`cmake.exe -D"ZLIB_INCLUDE_DIR=zlib/1.2.13/include" -D"ZLIB_LIBRARY=zlib/1.2.13/lib/libzlib.dll.a" -D"PNG_PNG_INCLUDE_DIR=libpng/1.6.40/include" -D"PNG_LIBRARY=libpng/1.6.40/lib/libpng.dll.a" . -G "MinGW Makefiles"`
|
||||
|
||||
I've tested cross-compilation too, but since I want to check that Conan is working properly at each release, I've integrated it into the Jenkins flow using Conan for the cross-abstraction.
|
||||
|
Loading…
x
Reference in New Issue
Block a user