mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 01:40:05 +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_modules: qtimageformats qtmultimedia qtpositioning qtserialport
|
||||||
qt_tools: ''
|
qt_tools: ''
|
||||||
conan_arch: x86_64
|
conan_arch: x86_64
|
||||||
conan_compiler: Visual Studio
|
conan_compiler: msvc
|
||||||
conan_compiler_version: 17
|
conan_compiler_version: 193
|
||||||
conan_compiler_runtime: --settings compiler.runtime=MD
|
conan_compiler_cppstd: 20
|
||||||
|
conan_compiler_runtime: --settings compiler.runtime=dynamic
|
||||||
conan_compiler_libcxx: ''
|
conan_compiler_libcxx: ''
|
||||||
conan_package_manager: ''
|
conan_package_manager: ''
|
||||||
artifact_suffix: windows-x64
|
artifact_suffix: windows-x64
|
||||||
|
|
@ -54,6 +55,7 @@ jobs:
|
||||||
conan_arch: x86_64
|
conan_arch: x86_64
|
||||||
conan_compiler: gcc
|
conan_compiler: gcc
|
||||||
conan_compiler_version: 11
|
conan_compiler_version: 11
|
||||||
|
conan_compiler_cppstd: 20
|
||||||
conan_compiler_libcxx: --settings compiler.libcxx=libstdc++
|
conan_compiler_libcxx: --settings compiler.libcxx=libstdc++
|
||||||
conan_compiler_runtime: ''
|
conan_compiler_runtime: ''
|
||||||
conan_package_manager: --conf tools.system.package_manager:mode=install --conf tools.system.package_manager:sudo=True
|
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_arch: x86_64
|
||||||
conan_compiler: clang
|
conan_compiler: clang
|
||||||
conan_compiler_version: 17
|
conan_compiler_version: 17
|
||||||
|
conan_compiler_cppstd: 20
|
||||||
conan_compiler_libcxx: --settings compiler.libcxx=libstdc++11
|
conan_compiler_libcxx: --settings compiler.libcxx=libstdc++11
|
||||||
conan_compiler_runtime: ''
|
conan_compiler_runtime: ''
|
||||||
conan_package_manager: --conf tools.system.package_manager:mode=install --conf tools.system.package_manager:sudo=True
|
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
|
- name: Install Conan Packages
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
pip install "conan<2.0"
|
pip install conan
|
||||||
conan profile new default --detect
|
conan profile new default --detect
|
||||||
conan install ./source/ `
|
conan install ./source/ `
|
||||||
--remote conancenter `
|
--remote conancenter `
|
||||||
|
|
@ -137,6 +140,7 @@ jobs:
|
||||||
--settings build_type=${{ matrix.build_type }} `
|
--settings build_type=${{ matrix.build_type }} `
|
||||||
--settings compiler="${{ matrix.conan_compiler }}" `
|
--settings compiler="${{ matrix.conan_compiler }}" `
|
||||||
--settings compiler.version=${{ matrix.conan_compiler_version }} `
|
--settings compiler.version=${{ matrix.conan_compiler_version }} `
|
||||||
|
--settings compiler.cppstd=${{ matrix.conan_compiler_cppstd }} `
|
||||||
${{ matrix.conan_compiler_libcxx }} `
|
${{ matrix.conan_compiler_libcxx }} `
|
||||||
${{ matrix.conan_compiler_runtime }} `
|
${{ matrix.conan_compiler_runtime }} `
|
||||||
${{ matrix.conan_package_manager }}
|
${{ matrix.conan_package_manager }}
|
||||||
|
|
|
||||||
|
|
@ -15,25 +15,11 @@ enable_testing()
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
||||||
|
|
||||||
include(${PROJECT_SOURCE_DIR}/external/cmake-conan/conan.cmake)
|
|
||||||
|
|
||||||
set_property(DIRECTORY
|
set_property(DIRECTORY
|
||||||
APPEND
|
APPEND
|
||||||
PROPERTY CMAKE_CONFIGURE_DEPENDS
|
PROPERTY CMAKE_CONFIGURE_DEPENDS
|
||||||
conanfile.py)
|
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(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_ALL_NO_LIB")
|
||||||
|
|
||||||
set(SCWX_DIR ${PROJECT_SOURCE_DIR})
|
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):
|
class SupercellWxConan(ConanFile):
|
||||||
settings = ("os", "compiler", "build_type", "arch")
|
settings = ("os", "compiler", "build_type", "arch")
|
||||||
|
|
@ -19,19 +20,18 @@ class SupercellWxConan(ConanFile):
|
||||||
"sqlite3/3.46.1",
|
"sqlite3/3.46.1",
|
||||||
"vulkan-loader/1.3.243.0",
|
"vulkan-loader/1.3.243.0",
|
||||||
"zlib/1.3.1")
|
"zlib/1.3.1")
|
||||||
generators = ("cmake",
|
generators = ("CMakeDeps")
|
||||||
"cmake_find_package",
|
default_options = {"geos/*:shared" : True,
|
||||||
"cmake_paths")
|
"libiconv/*:shared" : True,
|
||||||
default_options = {"geos:shared" : True,
|
"openssl/*:no_module": True,
|
||||||
"libiconv:shared" : True,
|
"openssl/*:shared" : True}
|
||||||
"openssl:no_module": True,
|
|
||||||
"openssl:shared" : True}
|
|
||||||
|
|
||||||
def requirements(self):
|
def requirements(self):
|
||||||
if self.settings.os == "Linux":
|
if self.settings.os == "Linux":
|
||||||
self.requires("onetbb/2021.12.0")
|
self.requires("onetbb/2021.12.0")
|
||||||
|
|
||||||
def imports(self):
|
def generate(self):
|
||||||
self.copy("*.dll", dst="bin", src="bin")
|
for dep in self.dependencies.values():
|
||||||
self.copy("*.dylib", dst="bin", src="lib")
|
if dep.cpp_info.libdirs:
|
||||||
self.copy("license*", dst="licenses", src=".", folder=True, ignore_case=True)
|
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 . ^
|
cmake -B %build_dir% -S . ^
|
||||||
-DCMAKE_BUILD_TYPE=%build_type% ^
|
-DCMAKE_BUILD_TYPE=%build_type% ^
|
||||||
-DCMAKE_CONFIGURATION_TYPES=%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
|
pause
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,5 @@ cmake -B ${build_dir} -S . \
|
||||||
-DCMAKE_CONFIGURATION_TYPES=${build_type} \
|
-DCMAKE_CONFIGURATION_TYPES=${build_type} \
|
||||||
-DCMAKE_INSTALL_PREFIX=${build_dir}/${build_type}/supercell-wx \
|
-DCMAKE_INSTALL_PREFIX=${build_dir}/${build_type}/supercell-wx \
|
||||||
-DCMAKE_PREFIX_PATH=/opt/Qt/${qt_version}/${qt_arch} \
|
-DCMAKE_PREFIX_PATH=/opt/Qt/${qt_version}/${qt_arch} \
|
||||||
|
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=${script_dir}/external/cmake-conan/conan_provider.cmake \
|
||||||
-G Ninja
|
-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 . ^
|
cmake -B %build_dir% -S . ^
|
||||||
-DCMAKE_BUILD_TYPE=%build_type% ^
|
-DCMAKE_BUILD_TYPE=%build_type% ^
|
||||||
-DCMAKE_CONFIGURATION_TYPES=%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
|
pause
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,5 @@ cmake -B ${build_dir} -S . \
|
||||||
-DCMAKE_CONFIGURATION_TYPES=${build_type} \
|
-DCMAKE_CONFIGURATION_TYPES=${build_type} \
|
||||||
-DCMAKE_INSTALL_PREFIX=${build_dir}/${build_type}/supercell-wx \
|
-DCMAKE_INSTALL_PREFIX=${build_dir}/${build_type}/supercell-wx \
|
||||||
-DCMAKE_PREFIX_PATH=/opt/Qt/${qt_version}/${qt_arch} \
|
-DCMAKE_PREFIX_PATH=/opt/Qt/${qt_version}/${qt_arch} \
|
||||||
|
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=${script_dir}/external/cmake-conan/conan_provider.cmake \
|
||||||
-G Ninja
|
-G Ninja
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
pip install --upgrade "conan<2.0"
|
pip install --upgrade conan
|
||||||
pip install --upgrade geopandas
|
pip install --upgrade geopandas
|
||||||
pip install --upgrade GitPython
|
pip install --upgrade GitPython
|
||||||
conan profile new default --detect
|
conan profile new default --detect
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
pip install --upgrade --user "conan<2.0"
|
pip install --upgrade --user conan
|
||||||
pip install --upgrade --user geopandas
|
pip install --upgrade --user geopandas
|
||||||
pip install --upgrade --user GitPython
|
pip install --upgrade --user GitPython
|
||||||
conan profile new default --detect
|
conan profile new default --detect
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue