diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index afc6472a..90c31612 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,12 +33,8 @@ jobs: qt_arch_dir: msvc2022_64 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_libcxx: '' conan_package_manager: '' + conan_profile: scwx-win64_msvc2022 artifact_suffix: windows-x64 - name: linux64_gcc os: ubuntu-22.04 @@ -51,12 +47,8 @@ jobs: qt_arch_dir: gcc_64 qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport qt_tools: '' - conan_arch: x86_64 - conan_compiler: gcc - conan_compiler_version: 11 - 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 + conan_profile: scwx-linux_gcc-11 artifact_suffix: linux-x64 compiler_packages: '' - name: linux64_clang @@ -70,12 +62,8 @@ jobs: qt_arch_dir: gcc_64 qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport qt_tools: '' - conan_arch: x86_64 - conan_compiler: clang - conan_compiler_version: 17 - 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 + conan_profile: scwx-linux_clang-17 artifact_suffix: linux-clang-x64 compiler_packages: clang-17 name: ${{ matrix.name }} @@ -128,28 +116,33 @@ jobs: - name: Install Conan Packages shell: pwsh run: | - pip install "conan<2.0" - conan profile new default --detect - conan install ./source/ ` + pip install conan + conan profile detect -e + conan config install ` + ./source/tools/conan/profiles/${{ matrix.conan_profile }} ` + -tf profiles + mkdir build + cd build + mkdir conan + conan install ../source/ ` --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 }} ` - ${{ matrix.conan_compiler_libcxx }} ` - ${{ matrix.conan_compiler_runtime }} ` + --profile:all ${{ matrix.conan_profile }} ` + --settings:all build_type=${{ matrix.build_type }} ` + --output-folder ./conan/ ` ${{ matrix.conan_package_manager }} - name: Build Supercell Wx shell: pwsh run: | - mkdir build cd build cmake ../source/ ` -G Ninja ` -DCMAKE_BUILD_TYPE="${{ matrix.build_type }}" ` - -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/supercell-wx" + -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="${{ github.workspace }}/source/external/cmake-conan/conan_provider.cmake" ` + -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/supercell-wx" ` + -DCONAN_HOST_PROFILE="${{ matrix.conan_profile }}" ` + -DCONAN_BUILD_PROFILE="${{ matrix.conan_profile }}" ninja supercell-wx wxtest - name: Separate Debug Symbols (Linux) @@ -157,6 +150,7 @@ jobs: shell: bash run: | cd build/ + cd Release/ cd bin/ objcopy --only-keep-debug supercell-wx supercell-wx.debug objcopy --strip-debug --strip-unneeded supercell-wx @@ -201,7 +195,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: supercell-wx-debug-${{ matrix.artifact_suffix }} - path: ${{ github.workspace }}/build/bin/*.pdb + path: ${{ github.workspace }}/build/Release/bin/*.pdb - name: Upload Artifacts (Linux) if: ${{ startsWith(matrix.os, 'ubuntu') }} @@ -216,8 +210,8 @@ jobs: with: name: supercell-wx-debug-${{ matrix.artifact_suffix }} path: | - ${{ github.workspace }}/build/bin/*.debug - ${{ github.workspace }}/build/lib/*.debug + ${{ github.workspace }}/build/Release/bin/*.debug + ${{ github.workspace }}/build/Release/lib/*.debug - name: Build Installer (Windows) if: matrix.os == 'windows-2022' diff --git a/.github/workflows/clang-tidy-review.yml b/.github/workflows/clang-tidy-review.yml index 0182e383..e2a1d57d 100644 --- a/.github/workflows/clang-tidy-review.yml +++ b/.github/workflows/clang-tidy-review.yml @@ -24,12 +24,8 @@ jobs: qt_arch_aqt: linux_gcc_64 qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport qt_tools: '' - conan_arch: x86_64 - conan_compiler: clang - conan_compiler_version: 17 - 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 + conan_profile: scwx-linux_clang-17 compiler_packages: clang-17 clang-tidy-17 name: ${{ matrix.name }} runs-on: ${{ matrix.os }} @@ -78,28 +74,33 @@ jobs: - name: Install Conan Packages shell: pwsh run: | - pip install "conan<2.0" - conan profile new default --detect - conan install ./source/ ` + pip install conan + conan profile detect -e + conan config install ` + ./source/tools/conan/profiles/${{ matrix.conan_profile }} ` + -tf profiles + mkdir build + cd build + mkdir conan + conan install ../source/ ` --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 }} ` - ${{ matrix.conan_compiler_libcxx }} ` - ${{ matrix.conan_compiler_runtime }} ` + --profile:all ${{ matrix.conan_profile }} ` + --settings:all build_type=${{ matrix.build_type }} ` + --output-folder ./conan/ ` ${{ matrix.conan_package_manager }} - name: Autogenerate shell: pwsh run: | - mkdir build cd build cmake ../source/ ` -G Ninja ` -DCMAKE_BUILD_TYPE="${{ matrix.build_type }}" ` + -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="${{ github.workspace }}/source/external/cmake-conan/conan_provider.cmake" ` -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/supercell-wx" ` + -DCONAN_HOST_PROFILE="${{ matrix.conan_profile }}" ` + -DCONAN_BUILD_PROFILE="${{ matrix.conan_profile }}" ` -DCMAKE_EXPORT_COMPILE_COMMANDS=on ninja scwx-qt_generate_counties_db ` scwx-qt_generate_versions ` diff --git a/.gitignore b/.gitignore index 9e6da487..7002668a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ CMakeLists.txt.user CMakeCache.txt CMakeFiles CMakeScripts +CMakeUserPresets.json Testing cmake_install.cmake install_manifest.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 48c1d9ed..3df5ba4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.24) set(PROJECT_NAME supercell-wx) project(${PROJECT_NAME} VERSION 0.4.7 @@ -11,36 +11,19 @@ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) set(CMAKE_POLICY_DEFAULT_CMP0079 NEW) set(CMAKE_POLICY_DEFAULT_CMP0148 OLD) # aws-sdk-cpp uses FindPythonInterp +include(tools/scwx_config.cmake) + +scwx_output_dirs_setup() + 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) -# Don't use RelWithDebInfo Conan packages -if (${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo") - set(conan_build_type "Release") -else() - set(conan_build_type ${CMAKE_BUILD_TYPE}) -endif() - -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}) diff --git a/conanfile.py b/conanfile.py index 888f09c7..12a0d058 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,17 +1,21 @@ -from conans import ConanFile +from conan import ConanFile +from conan.tools.cmake import CMake +from conan.tools.files import copy +import os class SupercellWxConan(ConanFile): settings = ("os", "compiler", "build_type", "arch") requires = ("boost/1.86.0", "cpr/1.11.0", "fontconfig/2.15.0", - "freetype/2.13.3", + "freetype/2.13.2", "geographiclib/2.4", "geos/3.13.0", "glew/2.2.0", "glm/cci.20230113", "gtest/1.15.0", "libcurl/8.10.1", + "libpng/1.6.44", "libxml2/2.12.7", "openssl/3.3.2", "re2/20240702", @@ -19,19 +23,33 @@ 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): + build_folder = os.path.join(self.build_folder, + "..", + str(self.settings.build_type), + self.cpp_info.bindirs[0]) + + for dep in self.dependencies.values(): + if dep.cpp_info.bindirs: + copy(self, "*.dll", dep.cpp_info.bindirs[0], build_folder) + if dep.cpp_info.libdirs: + copy(self, "*.dylib", dep.cpp_info.libdirs[0], build_folder) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 5ef39ddc..2137ae62 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.20) +cmake_minimum_required(VERSION 3.24) set(PROJECT_NAME scwx-external) set_property(DIRECTORY diff --git a/external/aws-sdk-cpp b/external/aws-sdk-cpp index d5eb42fe..c95e71a9 160000 --- a/external/aws-sdk-cpp +++ b/external/aws-sdk-cpp @@ -1 +1 @@ -Subproject commit d5eb42fe7c632868d4535b454ee2e5ba0e349b7f +Subproject commit c95e71a9d23bba0c2f6c6a7bc37ae63b7351e8b7 diff --git a/external/aws-sdk-cpp.cmake b/external/aws-sdk-cpp.cmake index 1ba641db..f88df9ca 100644 --- a/external/aws-sdk-cpp.cmake +++ b/external/aws-sdk-cpp.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.20) +cmake_minimum_required(VERSION 3.24) set(PROJECT_NAME scwx-aws-sdk-cpp) set(AWS_SDK_WARNINGS_ARE_ERRORS OFF) @@ -21,6 +21,10 @@ set(MINIMIZE_SIZE OFF CACHE BOOL "If enabled, the SDK will be built via # Save off ${CMAKE_CXX_FLAGS} before modifying compiler settings set(CMAKE_CXX_FLAGS_PREV "${CMAKE_CXX_FLAGS}") +# Configure OpenSSL crypto library +find_package(OpenSSL) +add_library(crypto ALIAS OpenSSL::Crypto) + # Fix CMake errors for internal variables not set include(aws-sdk-cpp/cmake/compiler_settings.cmake) set_msvc_warnings() diff --git a/external/cmake-conan b/external/cmake-conan index b240c809..c22bbf0a 160000 --- a/external/cmake-conan +++ b/external/cmake-conan @@ -1 +1 @@ -Subproject commit b240c809b5ea097077fc8222cad71d2329288e48 +Subproject commit c22bbf0af0b73d5f0def24a9cdf4ce503ae79e5d diff --git a/external/date.cmake b/external/date.cmake index a804f68c..7fce7ffc 100644 --- a/external/date.cmake +++ b/external/date.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.20) +cmake_minimum_required(VERSION 3.24) set(PROJECT_NAME scwx-date) set(USE_SYSTEM_TZ_DB ON) diff --git a/external/hsluv-c.cmake b/external/hsluv-c.cmake index 0129d39d..eec8f0f2 100644 --- a/external/hsluv-c.cmake +++ b/external/hsluv-c.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.20) +cmake_minimum_required(VERSION 3.24) set(PROJECT_NAME scwx-hsluv-c) set(HSLUV_C_TESTS OFF) diff --git a/external/imgui.cmake b/external/imgui.cmake index 443817ef..c16049fb 100644 --- a/external/imgui.cmake +++ b/external/imgui.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.20) +cmake_minimum_required(VERSION 3.24) set(PROJECT_NAME scwx-imgui) find_package(QT NAMES Qt6 diff --git a/external/maplibre-native-qt.cmake b/external/maplibre-native-qt.cmake index 49c37bc1..736c6049 100644 --- a/external/maplibre-native-qt.cmake +++ b/external/maplibre-native-qt.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.20) +cmake_minimum_required(VERSION 3.24) set(PROJECT_NAME scwx-mln) set(gtest_disable_pthreads ON) diff --git a/external/stb.cmake b/external/stb.cmake index c26bedaf..570af425 100644 --- a/external/stb.cmake +++ b/external/stb.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.20) +cmake_minimum_required(VERSION 3.24) set(PROJECT_NAME scwx-stb) set(STB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/stb PARENT_SCOPE) diff --git a/external/textflowcpp.cmake b/external/textflowcpp.cmake index 1e36da18..31020665 100644 --- a/external/textflowcpp.cmake +++ b/external/textflowcpp.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.20) +cmake_minimum_required(VERSION 3.24) set(PROJECT_NAME scwx-textflowcpp) set(TEXTFLOWCPP_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/textflowcpp PARENT_SCOPE) diff --git a/external/units.cmake b/external/units.cmake index d037ae54..cc70ac1c 100644 --- a/external/units.cmake +++ b/external/units.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.20) +cmake_minimum_required(VERSION 3.24) set(PROJECT_NAME scwx-units) add_subdirectory(units) diff --git a/scwx-qt/CMakeLists.txt b/scwx-qt/CMakeLists.txt index f4e636e7..e47bc3fb 100644 --- a/scwx-qt/CMakeLists.txt +++ b/scwx-qt/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.24) set_property(DIRECTORY APPEND diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake index 2b395246..1c654b0e 100644 --- a/scwx-qt/scwx-qt.cmake +++ b/scwx-qt/scwx-qt.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.24) project(scwx-qt LANGUAGES CXX) diff --git a/setup-debug.bat b/setup-debug.bat index 14e4f870..f082a0cc 100644 --- a/setup-debug.bat +++ b/setup-debug.bat @@ -2,12 +2,24 @@ call tools\setup-common.bat set build_dir=build-debug set build_type=Debug +set conan_profile=scwx-win64_msvc2022 set qt_version=6.8.0 set qt_arch=msvc2022_64 +conan config install tools/conan/profiles/%conan_profile% -tf profiles +conan install . ^ + --remote conancenter ^ + --build missing ^ + --profile:all %conan_profile% ^ + --settings:all build_type=%build_type% ^ + --output-folder %build_dir%/conan + 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 ^ + -DCONAN_HOST_PROFILE=%conan_profile% ^ + -DCONAN_BUILD_PROFILE=%conan_profile% pause diff --git a/setup-debug.sh b/setup-debug.sh index 4f9e72ea..0abb4696 100755 --- a/setup-debug.sh +++ b/setup-debug.sh @@ -3,14 +3,26 @@ build_dir=${1:-build-debug} build_type=Debug +conan_profile=${2:-scwx-linux_gcc-11} qt_version=6.8.0 qt_arch=gcc_64 script_dir="$(dirname "$(readlink -f "$0")")" +conan config install tools/conan/profiles/${conan_profile} -tf profiles +conan install . \ + --remote conancenter \ + --build missing \ + --profile:all ${conan_profile} \ + --settings:all build_type=${build_type} \ + --output-folder ${build_dir}/conan + mkdir -p ${build_dir} cmake -B ${build_dir} -S . \ -DCMAKE_BUILD_TYPE=${build_type} \ -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 \ + -DCONAN_HOST_PROFILE=${conan_profile} \ + -DCONAN_BUILD_PROFILE=${conan_profile} \ -G Ninja diff --git a/setup-multi.bat b/setup-multi.bat new file mode 100644 index 00000000..b12a0c06 --- /dev/null +++ b/setup-multi.bat @@ -0,0 +1,28 @@ +call tools\setup-common.bat + +set build_dir=build +set conan_profile=scwx-win64_msvc2022 +set qt_version=6.8.0 +set qt_arch=msvc2022_64 + +conan config install tools/conan/profiles/%conan_profile% -tf profiles +conan install . ^ + --remote conancenter ^ + --build missing ^ + --profile:all %conan_profile% ^ + --settings:all build_type=Debug ^ + --output-folder %build_dir%/conan +conan install . ^ + --remote conancenter ^ + --build missing ^ + --profile:all %conan_profile% ^ + --settings:all build_type=Release ^ + --output-folder %build_dir%/conan + +mkdir %build_dir% +cmake -B %build_dir% -S . ^ + -DCMAKE_PREFIX_PATH=C:/Qt/%qt_version%/%qt_arch% ^ + -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=external/cmake-conan/conan_provider.cmake ^ + -DCONAN_HOST_PROFILE=%conan_profile% ^ + -DCONAN_BUILD_PROFILE=%conan_profile% +pause diff --git a/setup-release.bat b/setup-release.bat index cfcbd3c9..404ebdcd 100644 --- a/setup-release.bat +++ b/setup-release.bat @@ -2,12 +2,24 @@ call tools\setup-common.bat set build_dir=build-release set build_type=Release +set conan_profile=scwx-win64_msvc2022 set qt_version=6.8.0 set qt_arch=msvc2022_64 +conan config install tools/conan/profiles/%conan_profile% -tf profiles +conan install . ^ + --remote conancenter ^ + --build missing ^ + --profile:all %conan_profile% ^ + --settings:all build_type=%build_type% ^ + --output-folder %build_dir%/conan + 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 ^ + -DCONAN_HOST_PROFILE=%conan_profile% ^ + -DCONAN_BUILD_PROFILE=%conan_profile% pause diff --git a/setup-release.sh b/setup-release.sh index 63f52ef6..9b4f2779 100755 --- a/setup-release.sh +++ b/setup-release.sh @@ -3,14 +3,26 @@ build_dir=${1:-build-release} build_type=Release +conan_profile=${2:-scwx-linux_gcc-11} qt_version=6.8.0 qt_arch=gcc_64 script_dir="$(dirname "$(readlink -f "$0")")" +conan config install tools/conan/profiles/${conan_profile} -tf profiles +conan install . \ + --remote conancenter \ + --build missing \ + --profile:all ${conan_profile} \ + --settings:all build_type=${build_type} \ + --output-folder ${build_dir}/conan + mkdir -p ${build_dir} cmake -B ${build_dir} -S . \ -DCMAKE_BUILD_TYPE=${build_type} \ -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 \ + -DCONAN_HOST_PROFILE=${conan_profile} \ + -DCONAN_BUILD_PROFILE=${conan_profile} \ -G Ninja diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d1db7851..b5428d86 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.20) +cmake_minimum_required(VERSION 3.24) set_property(DIRECTORY APPEND diff --git a/test/test.cmake b/test/test.cmake index 5ce56cfb..3ec6ef19 100644 --- a/test/test.cmake +++ b/test/test.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.20) +cmake_minimum_required(VERSION 3.24) project(scwx-test CXX) include(GoogleTest) diff --git a/tools/conan/profiles/scwx-linux_clang-17 b/tools/conan/profiles/scwx-linux_clang-17 new file mode 100644 index 00000000..1ee9f30a --- /dev/null +++ b/tools/conan/profiles/scwx-linux_clang-17 @@ -0,0 +1,8 @@ +[settings] +arch=x86_64 +build_type=Release +compiler=clang +compiler.cppstd=20 +compiler.libcxx=libstdc++11 +compiler.version=17 +os=Linux \ No newline at end of file diff --git a/tools/conan/profiles/scwx-linux_gcc-11 b/tools/conan/profiles/scwx-linux_gcc-11 new file mode 100644 index 00000000..cc41b528 --- /dev/null +++ b/tools/conan/profiles/scwx-linux_gcc-11 @@ -0,0 +1,8 @@ +[settings] +arch=x86_64 +build_type=Release +compiler=gcc +compiler.cppstd=20 +compiler.libcxx=libstdc++11 +compiler.version=11 +os=Linux \ No newline at end of file diff --git a/tools/conan/profiles/scwx-linux_gcc-12 b/tools/conan/profiles/scwx-linux_gcc-12 new file mode 100644 index 00000000..a7db9371 --- /dev/null +++ b/tools/conan/profiles/scwx-linux_gcc-12 @@ -0,0 +1,8 @@ +[settings] +arch=x86_64 +build_type=Release +compiler=gcc +compiler.cppstd=20 +compiler.libcxx=libstdc++11 +compiler.version=12 +os=Linux \ No newline at end of file diff --git a/tools/conan/profiles/scwx-linux_gcc-13 b/tools/conan/profiles/scwx-linux_gcc-13 new file mode 100644 index 00000000..ef3ef064 --- /dev/null +++ b/tools/conan/profiles/scwx-linux_gcc-13 @@ -0,0 +1,8 @@ +[settings] +arch=x86_64 +build_type=Release +compiler=gcc +compiler.cppstd=20 +compiler.libcxx=libstdc++11 +compiler.version=13 +os=Linux \ No newline at end of file diff --git a/tools/conan/profiles/scwx-linux_gcc-14 b/tools/conan/profiles/scwx-linux_gcc-14 new file mode 100644 index 00000000..94220e3e --- /dev/null +++ b/tools/conan/profiles/scwx-linux_gcc-14 @@ -0,0 +1,8 @@ +[settings] +arch=x86_64 +build_type=Release +compiler=gcc +compiler.cppstd=20 +compiler.libcxx=libstdc++11 +compiler.version=14 +os=Linux \ No newline at end of file diff --git a/tools/conan/profiles/scwx-win64_msvc2022 b/tools/conan/profiles/scwx-win64_msvc2022 new file mode 100644 index 00000000..0c4513d8 --- /dev/null +++ b/tools/conan/profiles/scwx-win64_msvc2022 @@ -0,0 +1,8 @@ +[settings] +arch=x86_64 +build_type=Release +compiler=msvc +compiler.cppstd=20 +compiler.runtime=dynamic +compiler.version=194 +os=Windows \ No newline at end of file diff --git a/tools/scwx_config.cmake b/tools/scwx_config.cmake new file mode 100644 index 00000000..0919b22e --- /dev/null +++ b/tools/scwx_config.cmake @@ -0,0 +1,19 @@ +macro(scwx_output_dirs_setup) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/Release/bin) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/bin) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_CURRENT_BINARY_DIR}/MinSizeRel/bin) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/Debug/bin) + + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/Release/lib) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/lib) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_CURRENT_BINARY_DIR}/MinSizeRel/lib) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/Debug/lib) + + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR}/Release/lib) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/lib) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_CURRENT_BINARY_DIR}/MinSizeRel/lib) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/Debug/lib) +endmacro() diff --git a/tools/setup-common.bat b/tools/setup-common.bat index 8362be70..bada34ed 100644 --- a/tools/setup-common.bat +++ b/tools/setup-common.bat @@ -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 +conan profile detect -e diff --git a/tools/setup-common.sh b/tools/setup-common.sh index d2c61d5a..2533d6ec 100755 --- a/tools/setup-common.sh +++ b/tools/setup-common.sh @@ -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 +conan profile detect -e diff --git a/wxdata/CMakeLists.txt b/wxdata/CMakeLists.txt index 845ab381..c5d91595 100644 --- a/wxdata/CMakeLists.txt +++ b/wxdata/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.20) +cmake_minimum_required(VERSION 3.24) set_property(DIRECTORY APPEND diff --git a/wxdata/wxdata.cmake b/wxdata/wxdata.cmake index 434fc415..ddd998f1 100644 --- a/wxdata/wxdata.cmake +++ b/wxdata/wxdata.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.20) +cmake_minimum_required(VERSION 3.24) project(scwx-data)