Use conanfile.txt to install dependencies before CMake configure

This commit is contained in:
Dan Paulat 2023-01-28 21:51:36 -06:00
parent 3893cf738c
commit d9de1c59d6
3 changed files with 52 additions and 22 deletions

View file

@ -32,6 +32,10 @@ jobs:
qt_version: 6.4.2 qt_version: 6.4.2
qt_arch: win64_msvc2019_64 qt_arch: win64_msvc2019_64
qt_tools: '' qt_tools: ''
conan_arch: x86_64
conan_compiler: Visual Studio
conan_compiler_version: 17
conan_compiler_runtime: MD
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
@ -60,9 +64,23 @@ jobs:
vsversion: ${{ matrix.msvc_version }} vsversion: ${{ matrix.msvc_version }}
- name: Setup Python Environment - name: Setup Python Environment
shell: pwsh
run: | run: |
pip install conan geopandas pip install geopandas
- name: Install Conan Packages
shell: pwsh
run: |
pip install conan
conan profile new default --detect conan profile new default --detect
conan install ./scwx/ `
--remote conancenter `
--build missing `
--settings arch=${{ matrix.conan_arch }} `
--settings build_type=${{ matrix.build_type }} `
--settings compiler=${{ matrix.conan_compiler }} `
--settings compiler.version=${{ matrix.conan_compiler_version }} `
--settings compiler.runtime=${{ matrix.conan_compiler_runtime }}
- name: Build Supercell Wx - name: Build Supercell Wx
shell: pwsh shell: pwsh

View file

@ -12,30 +12,14 @@ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
include(${PROJECT_SOURCE_DIR}/external/cmake-conan/conan.cmake) include(${PROJECT_SOURCE_DIR}/external/cmake-conan/conan.cmake)
conan_cmake_configure(REQUIRES boost/1.81.0 set_property(DIRECTORY
cpr/1.9.3 APPEND
freetype/2.12.1 PROPERTY CMAKE_CONFIGURE_DEPENDS
geographiclib/1.52 conanfile.txt)
glew/2.2.0
glm/cci.20220420
gtest/cci.20210126
libcurl/7.85.0
libxml2/2.10.3
openssl/1.1.1s
spdlog/1.11.0
sqlite3/3.40.1
vulkan-loader/1.3.236.0
zlib/1.2.13
GENERATORS cmake
cmake_find_package
cmake_paths
IMPORTS "bin, *.dll -> ./bin"
IMPORTS "lib, *.dylib -> ./bin"
OPTIONS openssl:shared=True)
conan_cmake_autodetect(settings) conan_cmake_autodetect(settings)
conan_cmake_install(PATH_OR_REFERENCE . conan_cmake_install(PATH_OR_REFERENCE ${PROJECT_SOURCE_DIR}
BUILD missing BUILD missing
REMOTE conancenter REMOTE conancenter
SETTINGS ${settings}) SETTINGS ${settings})

28
conanfile.txt Normal file
View file

@ -0,0 +1,28 @@
[requires]
boost/1.81.0
cpr/1.9.3
freetype/2.12.1
geographiclib/1.52
glew/2.2.0
glm/cci.20220420
gtest/cci.20210126
libcurl/7.85.0
libxml2/2.10.3
openssl/1.1.1s
spdlog/1.11.0
sqlite3/3.40.1
vulkan-loader/1.3.236.0
zlib/1.2.13
[generators]
cmake
cmake_find_package
cmake_paths
[options]
openssl:shared=True
[imports]
bin, *.dll -> ./bin
lib, *.dylib -> ./bin
., license* -> ./licenses @ folder=True, ignore_case=True