mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 16:30:05 +00:00
Merge pull request #457 from dpaulat/feature/setup-cleanup
CMake Setup, CMakePresets and Python Virtual Environments
This commit is contained in:
commit
4425c53c8e
38 changed files with 841 additions and 153 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
|
@ -20,7 +20,7 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: win64_msvc2022
|
- name: windows_msvc2022_x64
|
||||||
os: windows-2022
|
os: windows-2022
|
||||||
build_type: Release
|
build_type: Release
|
||||||
env_cc: ''
|
env_cc: ''
|
||||||
|
|
@ -34,7 +34,7 @@ jobs:
|
||||||
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
|
qt_modules: qtimageformats qtmultimedia qtpositioning qtserialport
|
||||||
qt_tools: ''
|
qt_tools: ''
|
||||||
conan_package_manager: ''
|
conan_package_manager: ''
|
||||||
conan_profile: scwx-win64_msvc2022
|
conan_profile: scwx-windows_msvc2022_x64
|
||||||
appimage_arch: ''
|
appimage_arch: ''
|
||||||
artifact_suffix: windows-x64
|
artifact_suffix: windows-x64
|
||||||
- name: linux_gcc_x64
|
- name: linux_gcc_x64
|
||||||
|
|
|
||||||
10
.gitignore
vendored
10
.gitignore
vendored
|
|
@ -12,3 +12,13 @@ install_manifest.txt
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
CTestTestfile.cmake
|
CTestTestfile.cmake
|
||||||
_deps
|
_deps
|
||||||
|
|
||||||
|
# Editor directories
|
||||||
|
.idea/
|
||||||
|
.vs/
|
||||||
|
|
||||||
|
# Python Virtual Environment
|
||||||
|
.venv/
|
||||||
|
|
||||||
|
# Specific excludes for Supercell Wx
|
||||||
|
tools/lib/user-setup.sh
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
cmake_minimum_required(VERSION 3.24)
|
cmake_minimum_required(VERSION 3.24)
|
||||||
set(PROJECT_NAME supercell-wx)
|
set(PROJECT_NAME supercell-wx)
|
||||||
|
|
||||||
|
include(tools/scwx_config.cmake)
|
||||||
|
|
||||||
|
scwx_python_setup()
|
||||||
|
|
||||||
project(${PROJECT_NAME}
|
project(${PROJECT_NAME}
|
||||||
VERSION 0.4.9
|
VERSION 0.4.9
|
||||||
DESCRIPTION "Supercell Wx is a free, open source advanced weather radar viewer."
|
DESCRIPTION "Supercell Wx is a free, open source advanced weather radar viewer."
|
||||||
|
|
@ -11,8 +16,6 @@ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
||||||
set(CMAKE_POLICY_DEFAULT_CMP0079 NEW)
|
set(CMAKE_POLICY_DEFAULT_CMP0079 NEW)
|
||||||
set(CMAKE_POLICY_DEFAULT_CMP0148 OLD) # aws-sdk-cpp uses FindPythonInterp
|
set(CMAKE_POLICY_DEFAULT_CMP0148 OLD) # aws-sdk-cpp uses FindPythonInterp
|
||||||
|
|
||||||
include(tools/scwx_config.cmake)
|
|
||||||
|
|
||||||
scwx_output_dirs_setup()
|
scwx_output_dirs_setup()
|
||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
|
||||||
267
CMakePresets.json
Normal file
267
CMakePresets.json
Normal file
|
|
@ -0,0 +1,267 @@
|
||||||
|
{
|
||||||
|
"version": 5,
|
||||||
|
"cmakeMinimumRequired": {
|
||||||
|
"major": 3,
|
||||||
|
"minor": 24,
|
||||||
|
"patch": 0
|
||||||
|
},
|
||||||
|
"configurePresets": [
|
||||||
|
{
|
||||||
|
"name": "base",
|
||||||
|
"hidden": true,
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_PROJECT_TOP_LEVEL_INCLUDES": "${sourceDir}/external/cmake-conan/conan_provider.cmake",
|
||||||
|
"SCWX_VIRTUAL_ENV": "${sourceDir}/.venv"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows-base",
|
||||||
|
"inherits": "base",
|
||||||
|
"hidden": true,
|
||||||
|
"generator": "Visual Studio 17 2022",
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Windows"
|
||||||
|
},
|
||||||
|
"vendor": {
|
||||||
|
"microsoft.com/VisualStudioSettings/CMake/1.0": {
|
||||||
|
"hostOS": [
|
||||||
|
"Windows"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows-x64-base",
|
||||||
|
"inherits": "windows-base",
|
||||||
|
"hidden": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-base",
|
||||||
|
"inherits": "base",
|
||||||
|
"hidden": true,
|
||||||
|
"condition": {
|
||||||
|
"type": "equals",
|
||||||
|
"lhs": "${hostSystemName}",
|
||||||
|
"rhs": "Linux"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows-msvc2022-x64-base",
|
||||||
|
"inherits": "windows-x64-base",
|
||||||
|
"hidden": true,
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_PREFIX_PATH": "C:/Qt/6.8.3/msvc2022_64",
|
||||||
|
"CONAN_HOST_PROFILE": "scwx-windows_msvc2022_x64",
|
||||||
|
"CONAN_BUILD_PROFILE": "scwx-windows_msvc2022_x64"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows-msvc2022-x64-ninja-base",
|
||||||
|
"inherits": "windows-msvc2022-x64-base",
|
||||||
|
"hidden": true,
|
||||||
|
"generator": "Ninja",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_PREFIX_PATH": "C:/Qt/6.8.3/msvc2022_64",
|
||||||
|
"CONAN_HOST_PROFILE": "scwx-windows_msvc2022_x64",
|
||||||
|
"CONAN_BUILD_PROFILE": "scwx-windows_msvc2022_x64"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-base",
|
||||||
|
"inherits": "linux-base",
|
||||||
|
"hidden": true,
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_PREFIX_PATH": "/opt/Qt/6.8.3/gcc_64",
|
||||||
|
"CONAN_HOST_PROFILE": "scwx-linux_gcc-11",
|
||||||
|
"CONAN_BUILD_PROFILE": "scwx-linux_gcc-11"
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"CC": "gcc-11",
|
||||||
|
"CXX": "g++-11"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows-msvc2022-x64-debug",
|
||||||
|
"inherits": "windows-msvc2022-x64-base",
|
||||||
|
"displayName": "Windows MSVC 2022 x64 Debug",
|
||||||
|
"architecture": {
|
||||||
|
"value": "x64",
|
||||||
|
"strategy": "external"
|
||||||
|
},
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows-msvc2022-x64-release",
|
||||||
|
"inherits": "windows-msvc2022-x64-base",
|
||||||
|
"displayName": "Windows MSVC 2022 x64 Release",
|
||||||
|
"architecture": {
|
||||||
|
"value": "x64",
|
||||||
|
"strategy": "external"
|
||||||
|
},
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows-msvc2022-x64-ninja-debug",
|
||||||
|
"inherits": "windows-msvc2022-x64-ninja-base",
|
||||||
|
"displayName": "Windows MSVC 2022 x64 Ninja Debug",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows-msvc2022-x64-ninja-release",
|
||||||
|
"inherits": "windows-msvc2022-x64-ninja-base",
|
||||||
|
"displayName": "Windows MSVC 2022 x64 Ninja Release",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-debug",
|
||||||
|
"inherits": "linux-gcc-base",
|
||||||
|
"displayName": "Linux GCC Debug",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/${presetName}/Debug/supercell-wx"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-release",
|
||||||
|
"inherits": "linux-gcc-base",
|
||||||
|
"displayName": "Linux GCC Release",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/${presetName}/Release/supercell-wx"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-debug-asan",
|
||||||
|
"inherits": "linux-gcc-base",
|
||||||
|
"displayName": "Linux GCC Debug Address Sanitizer",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Debug",
|
||||||
|
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/${presetName}/Debug/supercell-wx",
|
||||||
|
"SCWX_ADDRESS_SANITIZER": {
|
||||||
|
"type": "BOOL",
|
||||||
|
"value": "ON"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-release-asan",
|
||||||
|
"inherits": "linux-gcc-base",
|
||||||
|
"displayName": "Linux GCC Release Address Sanitizer",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/${presetName}/Release/supercell-wx",
|
||||||
|
"SCWX_ADDRESS_SANITIZER": {
|
||||||
|
"type": "BOOL",
|
||||||
|
"value": "ON"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-linux-gcc14",
|
||||||
|
"inherits": "linux-gcc-base",
|
||||||
|
"displayName": "CI Linux GCC 14",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"CONAN_HOST_PROFILE": "scwx-linux_gcc-14",
|
||||||
|
"CONAN_BUILD_PROFILE": "scwx-linux_gcc-14"
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"CC": "gcc-14",
|
||||||
|
"CXX": "g++-14"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-linux-clang17",
|
||||||
|
"inherits": "linux-gcc-base",
|
||||||
|
"displayName": "CI Linux Clang 17",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"CONAN_HOST_PROFILE": "scwx-linux_clang-17",
|
||||||
|
"CONAN_BUILD_PROFILE": "scwx-linux_clang-17"
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"CC": "clang-17",
|
||||||
|
"CXX": "clang++-17"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ci-linux-gcc-arm64",
|
||||||
|
"inherits": "linux-gcc-base",
|
||||||
|
"displayName": "CI Linux GCC ARM64",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"CONAN_HOST_PROFILE": "scwx-linux_gcc-11_armv8",
|
||||||
|
"CONAN_BUILD_PROFILE": "scwx-linux_gcc-11_armv8",
|
||||||
|
"CMAKE_PREFIX_PATH": "/opt/Qt/6.8.3/gcc_arm64"
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"CC": "gcc-11",
|
||||||
|
"CXX": "g++-11"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"buildPresets": [
|
||||||
|
{
|
||||||
|
"name": "windows-msvc2022-x64-debug",
|
||||||
|
"configurePreset": "windows-msvc2022-x64-debug",
|
||||||
|
"displayName": "Windows MSVC 2022 x64 Debug",
|
||||||
|
"configuration": "Debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows-msvc2022-x64-release",
|
||||||
|
"configurePreset": "windows-msvc2022-x64-release",
|
||||||
|
"displayName": "Windows MSVC 2022 x64 Release",
|
||||||
|
"configuration": "Release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-debug",
|
||||||
|
"configurePreset": "linux-gcc-debug",
|
||||||
|
"displayName": "Linux GCC Debug",
|
||||||
|
"configuration": "Debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-release",
|
||||||
|
"configurePreset": "linux-gcc-release",
|
||||||
|
"displayName": "Linux GCC Release",
|
||||||
|
"configuration": "Release"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testPresets": [
|
||||||
|
{
|
||||||
|
"name": "windows-msvc2022-x64-debug",
|
||||||
|
"configurePreset": "windows-msvc2022-x64-debug",
|
||||||
|
"displayName": "Windows MSVC 2022 x64 Debug",
|
||||||
|
"configuration": "Debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "windows-msvc2022-x64-release",
|
||||||
|
"configurePreset": "windows-msvc2022-x64-release",
|
||||||
|
"displayName": "Windows MSVC 2022 x64 Release",
|
||||||
|
"configuration": "Release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-debug",
|
||||||
|
"configurePreset": "linux-gcc-debug",
|
||||||
|
"displayName": "Linux GCC Debug",
|
||||||
|
"configuration": "Debug"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "linux-gcc-release",
|
||||||
|
"configurePreset": "linux-gcc-release",
|
||||||
|
"displayName": "Linux GCC Release",
|
||||||
|
"configuration": "Release"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2021-2024 Dan Paulat
|
Copyright (c) 2021-2025 Dan Paulat
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,6 @@ class SupercellWxConan(ConanFile):
|
||||||
self.options["libcurl"].ca_path = "none"
|
self.options["libcurl"].ca_path = "none"
|
||||||
|
|
||||||
def requirements(self):
|
def requirements(self):
|
||||||
self.requires("abseil/20250127.0", override=True)
|
|
||||||
|
|
||||||
if self.settings.os == "Linux":
|
if self.settings.os == "Linux":
|
||||||
self.requires("onetbb/2022.0.0")
|
self.requires("onetbb/2022.0.0")
|
||||||
|
|
||||||
|
|
|
||||||
2
external/qt6ct.cmake
vendored
2
external/qt6ct.cmake
vendored
|
|
@ -46,7 +46,7 @@ target_compile_definitions(qt6ct-common PRIVATE QT6CT_LIBRARY)
|
||||||
|
|
||||||
add_library(qt6ct-widgets STATIC ${qt6ct-widgets-source})
|
add_library(qt6ct-widgets STATIC ${qt6ct-widgets-source})
|
||||||
set_target_properties(qt6ct-widgets PROPERTIES VERSION ${QT6CT_VERSION})
|
set_target_properties(qt6ct-widgets PROPERTIES VERSION ${QT6CT_VERSION})
|
||||||
target_link_libraries(qt6ct-widgets PRIVATE Qt6::Widgets Qt6::WidgetsPrivate qt6ct-common)
|
target_link_libraries(qt6ct-widgets PRIVATE Qt6::Widgets qt6ct-common)
|
||||||
target_compile_definitions(qt6ct-widgets PRIVATE QT6CT_LIBRARY)
|
target_compile_definitions(qt6ct-widgets PRIVATE QT6CT_LIBRARY)
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
|
|
|
||||||
3
requirements.txt
Normal file
3
requirements.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
conan
|
||||||
|
geopandas
|
||||||
|
GitPython
|
||||||
|
|
@ -6,7 +6,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
set(CMAKE_AUTOUIC ON)
|
set(CMAKE_AUTOUIC ON)
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC OFF)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
@ -483,11 +483,12 @@ set(PROJECT_SOURCES ${HDR_MAIN}
|
||||||
${SRC_VIEW}
|
${SRC_VIEW}
|
||||||
${SHADER_FILES}
|
${SHADER_FILES}
|
||||||
${JSON_FILES}
|
${JSON_FILES}
|
||||||
${RESOURCE_FILES}
|
|
||||||
${TS_FILES}
|
${TS_FILES}
|
||||||
${CMAKE_FILES})
|
${CMAKE_FILES})
|
||||||
set(EXECUTABLE_SOURCES ${SRC_EXE_MAIN})
|
set(EXECUTABLE_SOURCES ${SRC_EXE_MAIN})
|
||||||
|
|
||||||
|
qt_add_resources(PROJECT_SOURCES ${RESOURCE_FILES})
|
||||||
|
|
||||||
source_group("Header Files\\main" FILES ${HDR_MAIN})
|
source_group("Header Files\\main" FILES ${HDR_MAIN})
|
||||||
source_group("Source Files\\main" FILES ${SRC_MAIN})
|
source_group("Source Files\\main" FILES ${SRC_MAIN})
|
||||||
source_group("Header Files\\config" FILES ${HDR_CONFIG})
|
source_group("Header Files\\config" FILES ${HDR_CONFIG})
|
||||||
|
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
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.3
|
|
||||||
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_PROJECT_TOP_LEVEL_INCLUDES=external/cmake-conan/conan_provider.cmake ^
|
|
||||||
-DCONAN_HOST_PROFILE=%conan_profile% ^
|
|
||||||
-DCONAN_BUILD_PROFILE=%conan_profile%
|
|
||||||
pause
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
./tools/setup-common.sh
|
|
||||||
|
|
||||||
build_dir=${1:-build-debug}
|
|
||||||
build_type=Debug
|
|
||||||
conan_profile=${2:-scwx-linux_gcc-11}
|
|
||||||
qt_version=6.8.3
|
|
||||||
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
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
call tools\setup-common.bat
|
|
||||||
|
|
||||||
set build_dir=build
|
|
||||||
set conan_profile=scwx-win64_msvc2022
|
|
||||||
set qt_version=6.8.3
|
|
||||||
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
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
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.3
|
|
||||||
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_PROJECT_TOP_LEVEL_INCLUDES=external/cmake-conan/conan_provider.cmake ^
|
|
||||||
-DCONAN_HOST_PROFILE=%conan_profile% ^
|
|
||||||
-DCONAN_BUILD_PROFILE=%conan_profile%
|
|
||||||
pause
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
./tools/setup-common.sh
|
|
||||||
|
|
||||||
build_dir=${1:-build-release}
|
|
||||||
build_type=Release
|
|
||||||
conan_profile=${2:-scwx-linux_gcc-11}
|
|
||||||
qt_version=6.8.3
|
|
||||||
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
|
|
||||||
45
tools/configure-environment.bat
Normal file
45
tools/configure-environment.bat
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
@setlocal enabledelayedexpansion
|
||||||
|
|
||||||
|
@set script_dir=%~dp0
|
||||||
|
@set venv_path=%script_dir%\..\.venv
|
||||||
|
|
||||||
|
:: Assign user-specified Python Virtual Environment
|
||||||
|
@if not "%~1"=="" (
|
||||||
|
if /i "%~1"=="none" (
|
||||||
|
set venv_path=
|
||||||
|
) else (
|
||||||
|
set venv_path=%~f1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Activate Python Virtual Environment
|
||||||
|
@if defined venv_path (
|
||||||
|
echo Activating Python Virtual Environment: %venv_path%
|
||||||
|
python -m venv %venv_path%
|
||||||
|
call %venv_path%\Scripts\activate.bat
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Install Python packages
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install --upgrade -r "%script_dir%\..\requirements.txt"
|
||||||
|
|
||||||
|
:: Configure default Conan profile
|
||||||
|
@conan profile detect -e
|
||||||
|
|
||||||
|
:: Conan profiles
|
||||||
|
@set profile_count=1
|
||||||
|
@set /a last_profile=profile_count - 1
|
||||||
|
@set conan_profile[0]=scwx-windows_msvc2022_x64
|
||||||
|
|
||||||
|
:: Install Conan profiles
|
||||||
|
@for /L %%i in (0,1,!last_profile!) do @(
|
||||||
|
set "profile_name=!conan_profile[%%i]!"
|
||||||
|
conan config install "%script_dir%\conan\profiles\!profile_name!" -tf profiles
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Deactivate Python Virtual Environment
|
||||||
|
@if defined venv_path (
|
||||||
|
call %venv_path%\Scripts\deactivate.bat
|
||||||
|
)
|
||||||
|
|
||||||
|
@pause
|
||||||
60
tools/configure-environment.sh
Executable file
60
tools/configure-environment.sh
Executable file
|
|
@ -0,0 +1,60 @@
|
||||||
|
#!/bin/bash
|
||||||
|
script_dir="$(dirname "$(readlink -f "$0")")"
|
||||||
|
|
||||||
|
# Assign user-specified Python Virtual Environment
|
||||||
|
[ "${1:-}" = "none" ] && unset venv_path || export venv_path="$(readlink -f "${1:-${script_dir}/../.venv}")"
|
||||||
|
|
||||||
|
# Load custom build settings
|
||||||
|
if [ -f "${script_dir}/lib/user-setup.sh" ]; then
|
||||||
|
source "${script_dir}/lib/user-setup.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Activate Python Virtual Environment
|
||||||
|
if [ -n "${venv_path:-}" ]; then
|
||||||
|
python -m venv "${venv_path}"
|
||||||
|
source "${venv_path}/bin/activate"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Detect if a Python Virtual Environment was specified above, or elsewhere
|
||||||
|
IN_VENV=$(python -c 'import sys; print(sys.prefix != getattr(sys, "base_prefix", sys.prefix))')
|
||||||
|
|
||||||
|
if [ "${IN_VENV}" = "True" ]; then
|
||||||
|
# In a virtual environment, don't use --user
|
||||||
|
PIP_FLAGS="--upgrade"
|
||||||
|
else
|
||||||
|
# Not in a virtual environment, use --user
|
||||||
|
PIP_FLAGS="--upgrade --user"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install Python packages
|
||||||
|
python -m pip install ${PIP_FLAGS} --upgrade pip
|
||||||
|
pip install ${PIP_FLAGS} -r "${script_dir}/../requirements.txt"
|
||||||
|
|
||||||
|
# Configure default Conan profile
|
||||||
|
conan profile detect -e
|
||||||
|
|
||||||
|
# Conan profiles
|
||||||
|
conan_profiles=(
|
||||||
|
"scwx-linux_clang-17"
|
||||||
|
"scwx-linux_clang-17_armv8"
|
||||||
|
"scwx-linux_clang-18"
|
||||||
|
"scwx-linux_clang-18_armv8"
|
||||||
|
"scwx-linux_gcc-11"
|
||||||
|
"scwx-linux_gcc-11_armv8"
|
||||||
|
"scwx-linux_gcc-12"
|
||||||
|
"scwx-linux_gcc-12_armv8"
|
||||||
|
"scwx-linux_gcc-13"
|
||||||
|
"scwx-linux_gcc-13_armv8"
|
||||||
|
"scwx-linux_gcc-14"
|
||||||
|
"scwx-linux_gcc-14_armv8"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Install Conan profiles
|
||||||
|
for profile_name in "${conan_profiles[@]}"; do
|
||||||
|
conan config install "${script_dir}/conan/profiles/${profile_name}" -tf profiles
|
||||||
|
done
|
||||||
|
|
||||||
|
# Deactivate Python Virtual Environment
|
||||||
|
if [ -n "${venv_path:-}" ]; then
|
||||||
|
deactivate
|
||||||
|
fi
|
||||||
1
tools/lib/common-paths.bat
Normal file
1
tools/lib/common-paths.bat
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
@set qt_version=6.8.3
|
||||||
2
tools/lib/common-paths.sh
Executable file
2
tools/lib/common-paths.sh
Executable file
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
export qt_version=6.8.3
|
||||||
24
tools/lib/run-cmake-configure.bat
Normal file
24
tools/lib/run-cmake-configure.bat
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
@set script_dir=%~dp0
|
||||||
|
|
||||||
|
@set cmake_args=-B "%build_dir%" -S "%script_dir%\..\.." ^
|
||||||
|
-G "%generator%" ^
|
||||||
|
-DCMAKE_PREFIX_PATH="%qt_base%/%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% ^
|
||||||
|
-DSCWX_VIRTUAL_ENV=%venv_path% ^
|
||||||
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=on
|
||||||
|
|
||||||
|
@if defined build_type (
|
||||||
|
set cmake_args=%cmake_args% ^
|
||||||
|
-DCMAKE_BUILD_TYPE=%build_type% ^
|
||||||
|
-DCMAKE_CONFIGURATION_TYPES=%build_type%
|
||||||
|
) else (
|
||||||
|
:: CMAKE_BUILD_TYPE isn't used to build, but is required by the Conan CMakeDeps generator
|
||||||
|
set cmake_args=%cmake_args% ^
|
||||||
|
-DCMAKE_BUILD_TYPE=Release ^
|
||||||
|
-DCMAKE_CONFIGURATION_TYPES=Debug;Release
|
||||||
|
)
|
||||||
|
|
||||||
|
@mkdir "%build_dir%"
|
||||||
|
cmake %cmake_args%
|
||||||
42
tools/lib/run-cmake-configure.sh
Executable file
42
tools/lib/run-cmake-configure.sh
Executable file
|
|
@ -0,0 +1,42 @@
|
||||||
|
#!/bin/bash
|
||||||
|
script_dir="$(dirname "$(readlink -f "$0")")"
|
||||||
|
|
||||||
|
cmake_args=(
|
||||||
|
-B "${build_dir}"
|
||||||
|
-S "${script_dir}/../.."
|
||||||
|
-G "${generator}"
|
||||||
|
-DCMAKE_PREFIX_PATH="${qt_base}/${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}"
|
||||||
|
-DSCWX_VIRTUAL_ENV="${venv_path}"
|
||||||
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
||||||
|
)
|
||||||
|
|
||||||
|
if [[ -n "${build_type}" ]]; then
|
||||||
|
cmake_args+=(
|
||||||
|
-DCMAKE_BUILD_TYPE="${build_type}"
|
||||||
|
-DCMAKE_CONFIGURATION_TYPES="${build_type}"
|
||||||
|
-DCMAKE_INSTALL_PREFIX="${build_dir}/${build_type}/supercell-wx"
|
||||||
|
)
|
||||||
|
else
|
||||||
|
# CMAKE_BUILD_TYPE isn't used to build, but is required by the Conan CMakeDeps generator
|
||||||
|
cmake_args+=(
|
||||||
|
-DCMAKE_BUILD_TYPE="Release"
|
||||||
|
-DCMAKE_CONFIGURATION_TYPES="Debug;Release"
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Toggle address sanitizer based on argument
|
||||||
|
if [ "${address_sanitizer}" != "disabled" ]; then
|
||||||
|
cmake_args+=(
|
||||||
|
-DSCWX_ADDRESS_SANITIZER=ON
|
||||||
|
)
|
||||||
|
else
|
||||||
|
cmake_args+=(
|
||||||
|
-DSCWX_ADDRESS_SANITIZER=OFF
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "${build_dir}"
|
||||||
|
cmake "${cmake_args[@]}"
|
||||||
39
tools/lib/setup-common.bat
Normal file
39
tools/lib/setup-common.bat
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
@set script_dir=%~dp0
|
||||||
|
|
||||||
|
:: Import common paths
|
||||||
|
@call %script_dir%\common-paths.bat
|
||||||
|
|
||||||
|
:: Activate Python Virtual Environment
|
||||||
|
@if defined venv_path (
|
||||||
|
echo Activating Python Virtual Environment: %venv_path%
|
||||||
|
python -m venv %venv_path%
|
||||||
|
call %venv_path%\Scripts\activate.bat
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Install Python packages
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install --upgrade -r "%script_dir%\..\..\requirements.txt"
|
||||||
|
|
||||||
|
@if defined build_type (
|
||||||
|
:: Install Conan profile and packages
|
||||||
|
call %script_dir%\setup-conan.bat
|
||||||
|
) else (
|
||||||
|
:: Install Conan profile and debug packages
|
||||||
|
set build_type=Debug
|
||||||
|
call %script_dir%\setup-conan.bat
|
||||||
|
|
||||||
|
:: Install Conan profile and release packages
|
||||||
|
set build_type=Release
|
||||||
|
call %script_dir%\setup-conan.bat
|
||||||
|
|
||||||
|
:: Unset build_type
|
||||||
|
set build_type=
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Run CMake Configure
|
||||||
|
@call %script_dir%\run-cmake-configure.bat
|
||||||
|
|
||||||
|
:: Deactivate Python Virtual Environment
|
||||||
|
@if defined venv_path (
|
||||||
|
call %venv_path%\Scripts\deactivate.bat
|
||||||
|
)
|
||||||
55
tools/lib/setup-common.sh
Executable file
55
tools/lib/setup-common.sh
Executable file
|
|
@ -0,0 +1,55 @@
|
||||||
|
#!/bin/bash
|
||||||
|
script_dir="$(dirname "$(readlink -f "$0")")"
|
||||||
|
|
||||||
|
# Import common paths
|
||||||
|
source "${script_dir}/common-paths.sh"
|
||||||
|
|
||||||
|
# Load custom build settings
|
||||||
|
if [ -f "${script_dir}/user-setup.sh" ]; then
|
||||||
|
source "${script_dir}/user-setup.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Activate Python Virtual Environment
|
||||||
|
if [ -n "${venv_path:-}" ]; then
|
||||||
|
python -m venv "${venv_path}"
|
||||||
|
source "${venv_path}/bin/activate"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Detect if a Python Virtual Environment was specified above, or elsewhere
|
||||||
|
IN_VENV=$(python -c 'import sys; print(sys.prefix != getattr(sys, "base_prefix", sys.prefix))')
|
||||||
|
|
||||||
|
if [ "${IN_VENV}" = "True" ]; then
|
||||||
|
# In a virtual environment, don't use --user
|
||||||
|
PIP_FLAGS="--upgrade"
|
||||||
|
else
|
||||||
|
# Not in a virtual environment, use --user
|
||||||
|
PIP_FLAGS="--upgrade --user"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install Python packages
|
||||||
|
python -m pip install ${PIP_FLAGS} pip
|
||||||
|
pip install ${PIP_FLAGS} -r "${script_dir}/../../requirements.txt"
|
||||||
|
|
||||||
|
if [[ -n "${build_type}" ]]; then
|
||||||
|
# Install Conan profile and packages
|
||||||
|
"${script_dir}/setup-conan.sh"
|
||||||
|
else
|
||||||
|
# Install Conan profile and debug packages
|
||||||
|
export build_type=Debug
|
||||||
|
"${script_dir}/setup-conan.sh"
|
||||||
|
|
||||||
|
# Install Conan profile and release packages
|
||||||
|
export build_type=Release
|
||||||
|
"${script_dir}/setup-conan.sh"
|
||||||
|
|
||||||
|
# Unset build_type
|
||||||
|
unset build_type
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Run CMake Configure
|
||||||
|
"${script_dir}/run-cmake-configure.sh"
|
||||||
|
|
||||||
|
# Deactivate Python Virtual Environment
|
||||||
|
if [ -n "${venv_path:-}" ]; then
|
||||||
|
deactivate
|
||||||
|
fi
|
||||||
15
tools/lib/setup-conan.bat
Normal file
15
tools/lib/setup-conan.bat
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
@set script_dir=%~dp0
|
||||||
|
|
||||||
|
:: Configure default Conan profile
|
||||||
|
conan profile detect -e
|
||||||
|
|
||||||
|
:: Install selected Conan profile
|
||||||
|
conan config install "%script_dir%\..\conan\profiles\%conan_profile%" -tf profiles
|
||||||
|
|
||||||
|
:: Install Conan packages
|
||||||
|
conan install "%script_dir%\..\.." ^
|
||||||
|
--remote conancenter ^
|
||||||
|
--build missing ^
|
||||||
|
--profile:all %conan_profile% ^
|
||||||
|
--settings:all build_type=%build_type% ^
|
||||||
|
--output-folder "%build_dir%\conan"
|
||||||
16
tools/lib/setup-conan.sh
Executable file
16
tools/lib/setup-conan.sh
Executable file
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
script_dir="$(dirname "$(readlink -f "$0")")"
|
||||||
|
|
||||||
|
# Configure default Conan profile
|
||||||
|
conan profile detect -e
|
||||||
|
|
||||||
|
# Install selected Conan profile
|
||||||
|
conan config install "${script_dir}/../conan/profiles/${conan_profile}" -tf profiles
|
||||||
|
|
||||||
|
# Install Conan packages
|
||||||
|
conan install "${script_dir}/../.." \
|
||||||
|
--remote conancenter \
|
||||||
|
--build missing \
|
||||||
|
--profile:all ${conan_profile} \
|
||||||
|
--settings:all build_type=${build_type} \
|
||||||
|
--output-folder "${build_dir}/conan"
|
||||||
10
tools/lib/user-setup.example.sh
Normal file
10
tools/lib/user-setup.example.sh
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Example user setup script. Copy as user-setup.sh and modify as required.
|
||||||
|
|
||||||
|
# gcc-13 is not the default gcc version
|
||||||
|
export CC=/usr/bin/gcc-13
|
||||||
|
export CXX=/usr/bin/c++-13
|
||||||
|
|
||||||
|
# Override conan profile to be gcc-13
|
||||||
|
export conan_profile=scwx-linux_gcc-13
|
||||||
|
|
@ -17,3 +17,39 @@ macro(scwx_output_dirs_setup)
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_CURRENT_BINARY_DIR}/MinSizeRel/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)
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}/Debug/lib)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
macro(scwx_python_setup)
|
||||||
|
set(SCWX_VIRTUAL_ENV "" CACHE STRING "Python Virtual Environment")
|
||||||
|
|
||||||
|
# Use a Python Virtual Environment
|
||||||
|
if (SCWX_VIRTUAL_ENV)
|
||||||
|
set(ENV{VIRTUAL_ENV} "${SCWX_VIRTUAL_ENV}")
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
set(Python3_EXECUTABLE "$ENV{VIRTUAL_ENV}/Scripts/python.exe")
|
||||||
|
else()
|
||||||
|
set(Python3_EXECUTABLE "$ENV{VIRTUAL_ENV}/bin/python")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "Using virtual environment: $ENV{VIRTUAL_ENV}")
|
||||||
|
else()
|
||||||
|
message(STATUS "Python virtual environment undefined")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Find Python
|
||||||
|
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||||
|
|
||||||
|
# Verify we're using the right Python
|
||||||
|
message(STATUS "Python executable: ${Python3_EXECUTABLE}")
|
||||||
|
message(STATUS "Python version: ${Python3_VERSION}")
|
||||||
|
|
||||||
|
# Only if we are in an application defined virtual environment
|
||||||
|
if (SCWX_VIRTUAL_ENV)
|
||||||
|
# Setup pip
|
||||||
|
set(PIP_ARGS install --upgrade -r "${CMAKE_SOURCE_DIR}/requirements.txt")
|
||||||
|
|
||||||
|
# Install requirements
|
||||||
|
execute_process(COMMAND ${Python3_EXECUTABLE} -m pip ${PIP_ARGS}
|
||||||
|
RESULT_VARIABLE PIP_RESULT)
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
pip install --upgrade conan
|
|
||||||
pip install --upgrade geopandas
|
|
||||||
pip install --upgrade GitPython
|
|
||||||
conan profile detect -e
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
pip install --upgrade --user conan
|
|
||||||
pip install --upgrade --user geopandas
|
|
||||||
pip install --upgrade --user GitPython
|
|
||||||
conan profile detect -e
|
|
||||||
26
tools/setup-debug-msvc2022.bat
Normal file
26
tools/setup-debug-msvc2022.bat
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
@set script_dir=%~dp0
|
||||||
|
|
||||||
|
@set build_dir=%script_dir%\..\build-debug-msvc2022
|
||||||
|
@set build_type=Debug
|
||||||
|
@set conan_profile=scwx-windows_msvc2022_x64
|
||||||
|
@set generator=Visual Studio 17 2022
|
||||||
|
@set qt_base=C:/Qt
|
||||||
|
@set qt_arch=msvc2022_64
|
||||||
|
@set venv_path=%script_dir%\..\.venv
|
||||||
|
|
||||||
|
:: Assign user-specified build directory
|
||||||
|
@if not "%~1"=="" set build_dir=%~f1
|
||||||
|
|
||||||
|
:: Assign user-specified Python Virtual Environment
|
||||||
|
@if not "%~2"=="" (
|
||||||
|
if /i "%~2"=="none" (
|
||||||
|
set venv_path=
|
||||||
|
) else (
|
||||||
|
set venv_path=%~f2
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Perform common setup
|
||||||
|
@call %script_dir%\lib\setup-common.bat
|
||||||
|
|
||||||
|
@pause
|
||||||
26
tools/setup-debug-ninja.bat
Normal file
26
tools/setup-debug-ninja.bat
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
@set script_dir=%~dp0
|
||||||
|
|
||||||
|
@set build_dir=%script_dir%\..\build-debug-ninja
|
||||||
|
@set build_type=Debug
|
||||||
|
@set conan_profile=scwx-windows_msvc2022_x64
|
||||||
|
@set generator=Ninja
|
||||||
|
@set qt_base=C:/Qt
|
||||||
|
@set qt_arch=msvc2022_64
|
||||||
|
@set venv_path=%script_dir%\..\.venv
|
||||||
|
|
||||||
|
:: Assign user-specified build directory
|
||||||
|
@if not "%~1"=="" set build_dir=%~f1
|
||||||
|
|
||||||
|
:: Assign user-specified Python Virtual Environment
|
||||||
|
@if not "%~2"=="" (
|
||||||
|
if /i "%~2"=="none" (
|
||||||
|
set venv_path=
|
||||||
|
) else (
|
||||||
|
set venv_path=%~f2
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Perform common setup
|
||||||
|
@call %script_dir%\lib\setup-common.bat
|
||||||
|
|
||||||
|
@pause
|
||||||
16
tools/setup-debug.sh
Executable file
16
tools/setup-debug.sh
Executable file
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
script_dir="$(dirname "$(readlink -f "$0")")"
|
||||||
|
|
||||||
|
export build_dir="$(readlink -f "${1:-${script_dir}/../build-debug}")"
|
||||||
|
export build_type=Debug
|
||||||
|
export conan_profile=${2:-scwx-linux_gcc-11}
|
||||||
|
export generator=Ninja
|
||||||
|
export qt_base=/opt/Qt
|
||||||
|
export qt_arch=gcc_64
|
||||||
|
export address_sanitizer=${4:-disabled}
|
||||||
|
|
||||||
|
# Assign user-specified Python Virtual Environment
|
||||||
|
[ "${3:-}" = "none" ] && unset venv_path || export venv_path="$(readlink -f "${3:-${script_dir}/../.venv}")"
|
||||||
|
|
||||||
|
# Perform common setup
|
||||||
|
"${script_dir}/lib/setup-common.sh"
|
||||||
25
tools/setup-multi-msvc2022.bat
Normal file
25
tools/setup-multi-msvc2022.bat
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
@set script_dir=%~dp0
|
||||||
|
|
||||||
|
@set build_dir=%script_dir%\..\build-msvc2022
|
||||||
|
@set conan_profile=scwx-windows_msvc2022_x64
|
||||||
|
@set generator=Visual Studio 17 2022
|
||||||
|
@set qt_base=C:/Qt
|
||||||
|
@set qt_arch=msvc2022_64
|
||||||
|
@set venv_path=%script_dir%\..\.venv
|
||||||
|
|
||||||
|
:: Assign user-specified build directory
|
||||||
|
@if not "%~1"=="" set build_dir=%~f1
|
||||||
|
|
||||||
|
:: Assign user-specified Python Virtual Environment
|
||||||
|
@if not "%~2"=="" (
|
||||||
|
if /i "%~2"=="none" (
|
||||||
|
set venv_path=
|
||||||
|
) else (
|
||||||
|
set venv_path=%~f2
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Perform common setup
|
||||||
|
@call %script_dir%\lib\setup-common.bat
|
||||||
|
|
||||||
|
@pause
|
||||||
25
tools/setup-multi-ninja.bat
Normal file
25
tools/setup-multi-ninja.bat
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
@set script_dir=%~dp0
|
||||||
|
|
||||||
|
@set build_dir=%script_dir%\..\build-ninja
|
||||||
|
@set conan_profile=scwx-windows_msvc2022_x64
|
||||||
|
@set generator=Ninja Multi-Config
|
||||||
|
@set qt_base=C:/Qt
|
||||||
|
@set qt_arch=msvc2022_64
|
||||||
|
@set venv_path=%script_dir%\..\.venv
|
||||||
|
|
||||||
|
:: Assign user-specified build directory
|
||||||
|
@if not "%~1"=="" set build_dir=%~f1
|
||||||
|
|
||||||
|
:: Assign user-specified Python Virtual Environment
|
||||||
|
@if not "%~2"=="" (
|
||||||
|
if /i "%~2"=="none" (
|
||||||
|
set venv_path=
|
||||||
|
) else (
|
||||||
|
set venv_path=%~f2
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Perform common setup
|
||||||
|
@call %script_dir%\lib\setup-common.bat
|
||||||
|
|
||||||
|
@pause
|
||||||
18
tools/setup-multi.sh
Executable file
18
tools/setup-multi.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
script_dir="$(dirname "$(readlink -f "$0")")"
|
||||||
|
|
||||||
|
export build_dir="$(readlink -f "${1:-${script_dir}/../build-debug}")"
|
||||||
|
export conan_profile=${2:-scwx-linux_gcc-11}
|
||||||
|
export generator="Ninja Multi-Config"
|
||||||
|
export qt_base=/opt/Qt
|
||||||
|
export qt_arch=gcc_64
|
||||||
|
|
||||||
|
# Assign user-specified Python Virtual Environment
|
||||||
|
[ "${3:-}" = "none" ] && unset venv_path || export venv_path="$(readlink -f "${3:-${script_dir}/../.venv}")"
|
||||||
|
|
||||||
|
# FIXME: aws-sdk-cpp fails to configure using Ninja Multi-Config
|
||||||
|
echo "Ninja Multi-Config is not supported in Linux"
|
||||||
|
read -p "Press Enter to continue..."
|
||||||
|
|
||||||
|
# Perform common setup
|
||||||
|
# "${script_dir}/lib/setup-common.sh"
|
||||||
26
tools/setup-release-msvc2022.bat
Normal file
26
tools/setup-release-msvc2022.bat
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
@set script_dir=%~dp0
|
||||||
|
|
||||||
|
@set build_dir=%script_dir%\..\build-release-msvc2022
|
||||||
|
@set build_type=Release
|
||||||
|
@set conan_profile=scwx-windows_msvc2022_x64
|
||||||
|
@set generator=Visual Studio 17 2022
|
||||||
|
@set qt_base=C:/Qt
|
||||||
|
@set qt_arch=msvc2022_64
|
||||||
|
@set venv_path=%script_dir%\..\.venv
|
||||||
|
|
||||||
|
:: Assign user-specified build directory
|
||||||
|
@if not "%~1"=="" set build_dir=%~f1
|
||||||
|
|
||||||
|
:: Assign user-specified Python Virtual Environment
|
||||||
|
@if not "%~2"=="" (
|
||||||
|
if /i "%~2"=="none" (
|
||||||
|
set venv_path=
|
||||||
|
) else (
|
||||||
|
set venv_path=%~f2
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Perform common setup
|
||||||
|
@call %script_dir%\lib\setup-common.bat
|
||||||
|
|
||||||
|
@pause
|
||||||
26
tools/setup-release-ninja.bat
Normal file
26
tools/setup-release-ninja.bat
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
@set script_dir=%~dp0
|
||||||
|
|
||||||
|
@set build_dir=%script_dir%\..\build-release-ninja
|
||||||
|
@set build_type=Release
|
||||||
|
@set conan_profile=scwx-windows_msvc2022_x64
|
||||||
|
@set generator=Ninja
|
||||||
|
@set qt_base=C:/Qt
|
||||||
|
@set qt_arch=msvc2022_64
|
||||||
|
@set venv_path=%script_dir%\..\.venv
|
||||||
|
|
||||||
|
:: Assign user-specified build directory
|
||||||
|
@if not "%~1"=="" set build_dir=%~f1
|
||||||
|
|
||||||
|
:: Assign user-specified Python Virtual Environment
|
||||||
|
@if not "%~2"=="" (
|
||||||
|
if /i "%~2"=="none" (
|
||||||
|
set venv_path=
|
||||||
|
) else (
|
||||||
|
set venv_path=%~f2
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Perform common setup
|
||||||
|
@call %script_dir%\lib\setup-common.bat
|
||||||
|
|
||||||
|
@pause
|
||||||
16
tools/setup-release.sh
Executable file
16
tools/setup-release.sh
Executable file
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
script_dir="$(dirname "$(readlink -f "$0")")"
|
||||||
|
|
||||||
|
export build_dir="$(readlink -f "${1:-${script_dir}/../build-release}")"
|
||||||
|
export build_type=Release
|
||||||
|
export conan_profile=${2:-scwx-linux_gcc-11}
|
||||||
|
export generator=Ninja
|
||||||
|
export qt_base=/opt/Qt
|
||||||
|
export qt_arch=gcc_64
|
||||||
|
export address_sanitizer=${4:-disabled}
|
||||||
|
|
||||||
|
# Assign user-specified Python Virtual Environment
|
||||||
|
[ "${3:-}" = "none" ] && unset venv_path || export venv_path="$(readlink -f "${3:-${script_dir}/../.venv}")"
|
||||||
|
|
||||||
|
# Perform common setup
|
||||||
|
"${script_dir}/lib/setup-common.sh"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue