mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-29 23:10:06 +00:00
Initial updates for Conan 2.x
This commit is contained in:
parent
9ab9d6b2d0
commit
75a8f7f351
11 changed files with 40 additions and 35 deletions
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
|
|
@ -34,9 +34,10 @@ jobs:
|
|||
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
|
||||
qt_tools: ''
|
||||
conan_arch: x86_64
|
||||
conan_compiler: Visual Studio
|
||||
conan_compiler_version: 17
|
||||
conan_compiler_runtime: --settings compiler.runtime=MD
|
||||
conan_compiler: msvc
|
||||
conan_compiler_version: 193
|
||||
conan_compiler_cppstd: 20
|
||||
conan_compiler_runtime: --settings compiler.runtime=dynamic
|
||||
conan_compiler_libcxx: ''
|
||||
conan_package_manager: ''
|
||||
artifact_suffix: windows-x64
|
||||
|
|
@ -54,6 +55,7 @@ jobs:
|
|||
conan_arch: x86_64
|
||||
conan_compiler: gcc
|
||||
conan_compiler_version: 11
|
||||
conan_compiler_cppstd: 20
|
||||
conan_compiler_libcxx: --settings compiler.libcxx=libstdc++
|
||||
conan_compiler_runtime: ''
|
||||
conan_package_manager: --conf tools.system.package_manager:mode=install --conf tools.system.package_manager:sudo=True
|
||||
|
|
@ -73,6 +75,7 @@ jobs:
|
|||
conan_arch: x86_64
|
||||
conan_compiler: clang
|
||||
conan_compiler_version: 17
|
||||
conan_compiler_cppstd: 20
|
||||
conan_compiler_libcxx: --settings compiler.libcxx=libstdc++11
|
||||
conan_compiler_runtime: ''
|
||||
conan_package_manager: --conf tools.system.package_manager:mode=install --conf tools.system.package_manager:sudo=True
|
||||
|
|
@ -128,7 +131,7 @@ jobs:
|
|||
- name: Install Conan Packages
|
||||
shell: pwsh
|
||||
run: |
|
||||
pip install "conan<2.0"
|
||||
pip install conan
|
||||
conan profile new default --detect
|
||||
conan install ./source/ `
|
||||
--remote conancenter `
|
||||
|
|
@ -137,6 +140,7 @@ jobs:
|
|||
--settings build_type=${{ matrix.build_type }} `
|
||||
--settings compiler="${{ matrix.conan_compiler }}" `
|
||||
--settings compiler.version=${{ matrix.conan_compiler_version }} `
|
||||
--settings compiler.cppstd=${{ matrix.conan_compiler_cppstd }} `
|
||||
${{ matrix.conan_compiler_libcxx }} `
|
||||
${{ matrix.conan_compiler_runtime }} `
|
||||
${{ matrix.conan_package_manager }}
|
||||
|
|
|
|||
|
|
@ -15,25 +15,11 @@ enable_testing()
|
|||
|
||||
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
||||
|
||||
include(${PROJECT_SOURCE_DIR}/external/cmake-conan/conan.cmake)
|
||||
|
||||
set_property(DIRECTORY
|
||||
APPEND
|
||||
PROPERTY CMAKE_CONFIGURE_DEPENDS
|
||||
conanfile.py)
|
||||
|
||||
conan_cmake_autodetect(settings
|
||||
BUILD_TYPE ${conan_build_type})
|
||||
|
||||
conan_cmake_install(PATH_OR_REFERENCE ${PROJECT_SOURCE_DIR}
|
||||
BUILD missing
|
||||
REMOTE conancenter
|
||||
SETTINGS ${settings})
|
||||
|
||||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||
include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
|
||||
conan_basic_setup(TARGETS)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_ALL_NO_LIB")
|
||||
|
||||
set(SCWX_DIR ${PROJECT_SOURCE_DIR})
|
||||
|
|
|
|||
24
conanfile.py
24
conanfile.py
|
|
@ -1,4 +1,5 @@
|
|||
from conans import ConanFile
|
||||
from conan import ConanFile
|
||||
from conan.tools.files import copy
|
||||
|
||||
class SupercellWxConan(ConanFile):
|
||||
settings = ("os", "compiler", "build_type", "arch")
|
||||
|
|
@ -19,19 +20,18 @@ class SupercellWxConan(ConanFile):
|
|||
"sqlite3/3.46.1",
|
||||
"vulkan-loader/1.3.243.0",
|
||||
"zlib/1.3.1")
|
||||
generators = ("cmake",
|
||||
"cmake_find_package",
|
||||
"cmake_paths")
|
||||
default_options = {"geos:shared" : True,
|
||||
"libiconv:shared" : True,
|
||||
"openssl:no_module": True,
|
||||
"openssl:shared" : True}
|
||||
generators = ("CMakeDeps")
|
||||
default_options = {"geos/*:shared" : True,
|
||||
"libiconv/*:shared" : True,
|
||||
"openssl/*:no_module": True,
|
||||
"openssl/*:shared" : True}
|
||||
|
||||
def requirements(self):
|
||||
if self.settings.os == "Linux":
|
||||
self.requires("onetbb/2021.12.0")
|
||||
|
||||
def imports(self):
|
||||
self.copy("*.dll", dst="bin", src="bin")
|
||||
self.copy("*.dylib", dst="bin", src="lib")
|
||||
self.copy("license*", dst="licenses", src=".", folder=True, ignore_case=True)
|
||||
def generate(self):
|
||||
for dep in self.dependencies.values():
|
||||
if dep.cpp_info.libdirs:
|
||||
copy(self, "*.dll", dep.cpp_info.libdirs[0], self.build_folder)
|
||||
copy(self, "*.dylib", dep.cpp_info.libdirs[0], self.build_folder)
|
||||
|
|
|
|||
2
external/cmake-conan
vendored
2
external/cmake-conan
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit b240c809b5ea097077fc8222cad71d2329288e48
|
||||
Subproject commit c53fbf58e4afe7cb93cb32e730d6647fc47a5dce
|
||||
|
|
@ -9,5 +9,6 @@ mkdir %build_dir%
|
|||
cmake -B %build_dir% -S . ^
|
||||
-DCMAKE_BUILD_TYPE=%build_type% ^
|
||||
-DCMAKE_CONFIGURATION_TYPES=%build_type% ^
|
||||
-DCMAKE_PREFIX_PATH=C:/Qt/%qt_version%/%qt_arch%
|
||||
-DCMAKE_PREFIX_PATH=C:/Qt/%qt_version%/%qt_arch% ^
|
||||
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=external/cmake-conan/conan_provider.cmake
|
||||
pause
|
||||
|
|
|
|||
|
|
@ -13,4 +13,5 @@ cmake -B ${build_dir} -S . \
|
|||
-DCMAKE_CONFIGURATION_TYPES=${build_type} \
|
||||
-DCMAKE_INSTALL_PREFIX=${build_dir}/${build_type}/supercell-wx \
|
||||
-DCMAKE_PREFIX_PATH=/opt/Qt/${qt_version}/${qt_arch} \
|
||||
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=${script_dir}/external/cmake-conan/conan_provider.cmake \
|
||||
-G Ninja
|
||||
|
|
|
|||
11
setup-multi.bat
Normal file
11
setup-multi.bat
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
call tools\setup-common.bat
|
||||
|
||||
set build_dir=build-debug
|
||||
set build_type=Debug
|
||||
set qt_version=6.7.1
|
||||
|
||||
mkdir %build_dir%
|
||||
cmake -B %build_dir% -S . ^
|
||||
-DCMAKE_PREFIX_PATH=C:/Qt/%qt_version%/msvc2019_64 ^
|
||||
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=external/cmake-conan/conan_provider.cmake
|
||||
pause
|
||||
|
|
@ -9,5 +9,6 @@ mkdir %build_dir%
|
|||
cmake -B %build_dir% -S . ^
|
||||
-DCMAKE_BUILD_TYPE=%build_type% ^
|
||||
-DCMAKE_CONFIGURATION_TYPES=%build_type% ^
|
||||
-DCMAKE_PREFIX_PATH=C:/Qt/%qt_version%/%qt_arch%
|
||||
-DCMAKE_PREFIX_PATH=C:/Qt/%qt_version%/%qt_arch% ^
|
||||
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=external/cmake-conan/conan_provider.cmake
|
||||
pause
|
||||
|
|
|
|||
|
|
@ -13,4 +13,5 @@ cmake -B ${build_dir} -S . \
|
|||
-DCMAKE_CONFIGURATION_TYPES=${build_type} \
|
||||
-DCMAKE_INSTALL_PREFIX=${build_dir}/${build_type}/supercell-wx \
|
||||
-DCMAKE_PREFIX_PATH=/opt/Qt/${qt_version}/${qt_arch} \
|
||||
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=${script_dir}/external/cmake-conan/conan_provider.cmake \
|
||||
-G Ninja
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
pip install --upgrade "conan<2.0"
|
||||
pip install --upgrade conan
|
||||
pip install --upgrade geopandas
|
||||
pip install --upgrade GitPython
|
||||
conan profile new default --detect
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
pip install --upgrade --user "conan<2.0"
|
||||
pip install --upgrade --user conan
|
||||
pip install --upgrade --user geopandas
|
||||
pip install --upgrade --user GitPython
|
||||
conan profile new default --detect
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue