Skip to content

Commit

Permalink
fix: changes for new submodules.. lets see if this builds..
Browse files Browse the repository at this point in the history
  • Loading branch information
jd28 committed Apr 4, 2024
1 parent bb207a7 commit 00af5f8
Show file tree
Hide file tree
Showing 16 changed files with 44 additions and 237 deletions.
29 changes: 3 additions & 26 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ jobs:
build:
env:
buildDir: "${{ github.workspace }}/build/"
vcpkg-tag: "2022.09.27"
VCPKG_ROOT: "${{ github.workspace }}/vcpkg/"
VCPKG_DEFAULT_BINARY_CACHE: "${{ github.workspace }}/vcpkg/.cache"
CCACHE_DIR: "${{ github.workspace }}/ccache/"
CCACHE_BASEDIR: "${{ github.workspace }}/ccache/"
SCCACHE_DIR: "${{ github.workspace }}/ccache/"
Expand Down Expand Up @@ -64,42 +61,22 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.3.2
version: 6.7.0
cache: true

- name: download vcpkg
run: |
git clone https://github.com/microsoft/vcpkg ${{ github.workspace }}/vcpkg || true
pushd vcpkg
git checkout --force ${{ env.vcpkg-tag }}
./bootstrap-vcpkg.sh
popd
- name: cache vcpkg
id: cache-vcpkg
- name: cache ccache
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/vcpkg/.cache
${{ github.workspace }}/ccache
key: ${{ runner.os }}-build-${{ env.vcpkg-tag }}-${{ env.DATE }}-${{ hashFiles('vcpkg.json') }}
key: ${{ runner.os }}-build-${{ env.DATE }} }}
restore-keys: |
${{ runner.os }}-build-
- name: Make cache dir
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
run: mkdir -p "${{ github.workspace }}/vcpkg/.cache"

- name: Configure & Build
run: |
./scripts/dist_linux.sh
- uses: actions/upload-artifact@v2
if: failure()
with:
name: vcpkg-logs
path: ${{env.VCPKG_ROOT}}/buildtrees/**/*.log

- uses: actions/upload-artifact@v2
with:
name: arclight-linux-x64
Expand Down
29 changes: 3 additions & 26 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ jobs:
build:
env:
buildDir: "${{ github.workspace }}/build/"
vcpkg-tag: "2022.09.27"
VCPKG_ROOT: "${{ github.workspace }}/vcpkg/"
VCPKG_DEFAULT_BINARY_CACHE: "${{ github.workspace }}/vcpkg/.cache"
MACOSX_DEPLOYMENT_TARGET: "10.15"
CCACHE_DIR: "${{ github.workspace }}/ccache/"
CCACHE_BASEDIR: "${{ github.workspace }}/ccache/"
Expand Down Expand Up @@ -57,42 +54,22 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.3.2
version: 6.7.0
cache: true

- name: download vcpkg
run: |
git clone https://github.com/microsoft/vcpkg ${{ github.workspace }}/vcpkg || true
pushd vcpkg
git checkout --force ${{ env.vcpkg-tag }}
./bootstrap-vcpkg.sh
popd
- name: cache vcpkg
id: cache-vcpkg
- name: cache ccache
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/vcpkg/.cache
${{ github.workspace }}/ccache
key: ${{ runner.os }}-build-${{ env.vcpkg-tag }}-${{ env.DATE }}-${{ hashFiles('vcpkg.json') }}
key: ${{ runner.os }}-build-${{ env.DATE }}
restore-keys: |
${{ runner.os }}-build-
- name: Make cache dir
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
run: mkdir -p "${{ github.workspace }}/vcpkg/.cache"

- name: Configure & Build
run: |
./scripts/dist_mac.sh
- uses: actions/upload-artifact@v2
if: failure()
with:
name: vcpkg-logs
path: ${{env.VCPKG_ROOT}}/buildtrees/**/*.log

- uses: actions/upload-artifact@v2
with:
name: arclight-macOS-x64
Expand Down
25 changes: 3 additions & 22 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ jobs:
build:
env:
buildDir: "${{ github.workspace }}/build/"
vcpkg-tag: "2022.09.27"
VCPKG_ROOT: "c:/vcpkg_root/"
VCPKG_DEFAULT_BINARY_CACHE: "c:/vcpkg_root/.cache"
CCACHE_DIR: "${{ github.workspace }}/ccache/"
CCACHE_BASEDIR: "${{ github.workspace }}/ccache/"
SCCACHE_DIR: "${{ github.workspace }}/ccache/"
Expand Down Expand Up @@ -50,25 +47,15 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.3.2
version: 6.7.0
cache: true

- name: download vcpkg
run: |
git clone https://github.com/microsoft/vcpkg c:/vcpkg_root
pushd c:/vcpkg_root
git checkout --force ${{ env.vcpkg-tag }}
./bootstrap-vcpkg.bat
popd
- name: cache vcpkg
id: cache-vcpkg
- name: cache ccache
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/vcpkg/.cache
${{ github.workspace }}/ccache
key: ${{ runner.os }}-build-${{ env.vcpkg-tag }}-${{ env.DATE }}-${{ hashFiles('vcpkg.json') }}
key: ${{ runner.os }}-build-${{ env.DATE }}
restore-keys: |
${{ runner.os }}-build-
Expand All @@ -78,12 +65,6 @@ jobs:
- name: Configure & Build
run: .\scripts\dist_win.bat

- uses: actions/upload-artifact@v2
if: failure()
with:
name: vcpkg-logs
path: ${{env.VCPKG_ROOT}}/buildtrees/**/*.log

- uses: actions/upload-artifact@v2
with:
name: arclight-windows-x64
Expand Down
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.21)
project(arclight VERSION 1.0.0 LANGUAGES CXX C)
set (CMAKE_CXX_STANDARD 20)

if(POLICY CMP0091)
cmake_policy(SET CMP0091 NEW)
endif()

include(cmake/PreventInSourceBuilds.cmake)
include(cmake/ProjectSettings.cmake)

Expand All @@ -16,8 +20,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GN
endif()

if(MSVC)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_RELEASE} /MTd")
elseif(UNIX AND NOT APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-sized-deallocation")
endif()
Expand Down
27 changes: 11 additions & 16 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@
"binaryDir": "${sourceDir}/build",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": {
"value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"type": "FILEPATH"
"CMAKE_RUNTIME_OUTPUT_DIRECTORY": "${sourceDir}/bin",
"ROLLNW_BUILD_BENCHMARKS": {
"type": "BOOL",
"value": "OFF"
},
"CMAKE_RUNTIME_OUTPUT_DIRECTORY": "${sourceDir}/bin"
"BUILD_TESTING": {
"type": "BOOL",
"value": "OFF"
}
}
},
{
"name": "windows-default",
"name": "windows",
"inherits": "default",
"generator": "NMake Makefiles",
"generator": "Ninja",
"displayName": "Windows-only configuration",
"description": "This build is only available on Windows",
"binaryDir": "${sourceDir}/build",
Expand All @@ -37,16 +41,7 @@
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_RUNTIME_OUTPUT_DIRECTORY": "${sourceDir}/bin",
"CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG": "${sourceDir}/bin",
"CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE": "${sourceDir}/bin",
"CMAKE_LIBRARY_OUTPUT_DIRECTORY": "${sourceDir}/bin",
"CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG": "${sourceDir}/bin",
"CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE": "${sourceDir}/bin",
"VCPKG_TARGET_TRIPLET": "x64-windows-static",
"VCPKG_HOST_TRIPLET": "x64-windows-static",
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreaded$<$<CONFIG:Debug>:Debug>"
"CMAKE_BUILD_TYPE": "Release"
}
},
{
Expand Down
5 changes: 0 additions & 5 deletions scripts/dist_linux.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/bin/bash

if [[ -z "${VCPKG_ROOT}" ]]; then
echo "Environment variable VCPKG_ROOT not set, do you have vcpkg installed?"
exit 1
fi

if [[ -z "${Qt6_DIR}" ]]; then
echo "Environment variable Qt6_DIR not set, do you have Qt installed?"
exit 1
Expand Down
5 changes: 0 additions & 5 deletions scripts/dist_mac.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/bin/sh

if [[ -z "${VCPKG_ROOT}" ]]; then
echo "Environment variable VCPKG_ROOT not set, do you have vcpkg installed?"
exit 1
fi

if [[ -z "${Qt6_DIR}" ]]; then
echo "Environment variable Qt6_DIR not set, do you have Qt installed?"
exit 1
Expand Down
4 changes: 1 addition & 3 deletions scripts/dist_win.bat
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
@echo off

IF "%VCPKG_ROOT%"=="" ECHO Environment variable VCPKG_ROOT not set, do you have vcpkg installed?

IF "%Qt6_DIR%"=="" ECHO Environment variable Qt6_DIR not set, do you have Qt installed?

echo "Configuring..."
cmake --preset windows-default
cmake --preset windows

echo "Building..."
cmake --build --preset default
Expand Down
3 changes: 1 addition & 2 deletions src/erfherder/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Widgets)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
find_package(Qt6 REQUIRED COMPONENTS Widgets)

set(SRC_FILES
main.cpp
Expand Down
1 change: 0 additions & 1 deletion src/erfherder/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ int main(int argc, char* argv[])

// FA6 Free
ZFontIcon::addFont(":/fa6/" + Fa6::FA6_TTF_FILE_FREE_SOLID);
ZFontIcon::addFont(":/fa6/" + Fa6::FA6_TTF_FILE_FREE_REGULAR);

MainWindow main;

Expand Down
98 changes: 0 additions & 98 deletions src/widgets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,104 +6,6 @@ endif()
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core Widgets)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)

# # Use provided python interpreter if given.
# if(NOT python_interpreter)
# find_program(python_interpreter NAMES python3 python)
# endif()
# message(STATUS "Using python interpreter: ${python_interpreter}")


# # Macro to get various pyside / python include / link flags.
# macro(pyside_config option output_var)
# if(${ARGC} GREATER 2)
# set(is_list ${ARGV2})
# else()
# set(is_list "")
# endif()

# execute_process(
# COMMAND ${python_interpreter} "${CMAKE_SOURCE_DIR}/src/widgets/pyside_config.py"
# ${option}
# OUTPUT_VARIABLE ${output_var}
# OUTPUT_STRIP_TRAILING_WHITESPACE)

# if ("${${output_var}}" STREQUAL "")
# message(FATAL_ERROR "Error: Calling pyside_config.py ${option} returned no output.")
# endif()
# if(is_list)
# string (REPLACE " " ";" ${output_var} "${${output_var}}")
# endif()
# endmacro()

# # Query for the shiboken6-generator path, PySide6 path, Python path, include paths and linker flags.
# pyside_config(--shiboken-module-path SHIBOKEN_MODULE_PATH)
# pyside_config(--shiboken-generator-path SHIBOKEN_GENERATOR_PATH)
# pyside_config(--pyside-path PYSIDE_PATH)

# pyside_config(--python-include-path PYTHON_INCLUDE_DIR)
# pyside_config(--shiboken-generator-include-path SHIBOKEN_GENERATOR_INCLUDE_DIR 1)
# pyside_config(--pyside-include-path PYSIDE_INCLUDE_DIR 1)

# pyside_config(--python-link-flags-cmake PYTHON_LINKING_DATA 0)
# pyside_config(--shiboken-module-shared-libraries-cmake SHIBOKEN_MODULE_SHARED_LIBRARIES 0)
# pyside_config(--pyside-shared-libraries-cmake PYSIDE_SHARED_LIBRARIES 0)

# set(SHIBOKEN_PATH "${SHIBOKEN_GENERATOR_PATH}/shiboken6${CMAKE_EXECUTABLE_SUFFIX}")

# if(NOT EXISTS ${SHIBOKEN_PATH})
# message(FATAL_ERROR "Shiboken executable not found at path: ${SHIBOKEN_PATH}")
# endif()


# # Get all relevant Qt include dirs, to pass them on to shiboken.
# get_property(QT_WIDGETS_INCLUDE_DIRS TARGET Qt6::Widgets PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
# set(INCLUDES "")
# foreach(INCLUDE_DIR ${QT_WIDGETS_INCLUDE_DIRS})
# list(APPEND INCLUDES "-I${INCLUDE_DIR}")
# endforeach()

# # On macOS, check if Qt is a framework build. This affects how include paths should be handled.
# get_target_property(QtCore_is_framework Qt6::Core FRAMEWORK)
# if (QtCore_is_framework)
# get_target_property(qt_core_library_location Qt6::Core LOCATION)
# # PYSIDE-623: We move up until the directory contains all the frameworks.
# # This is "lib" in ".../lib/QtCore.framework/Versions/A/QtCore".
# get_filename_component(lib_dir "${qt_core_library_location}/../../../.." ABSOLUTE)
# list(APPEND INCLUDES "--framework-include-paths=${lib_dir}")
# endif()

# # Set up the options to pass to shiboken.
# set(WRAPPED_HEADER ${CMAKE_SOURCE_DIR}/global.h)
# set(TYPESYSTEM_FILE ${CMAKE_CURRENT_SOURCE_DIR}/arclight_typesystem.xml)

# set(SHIBOKEN_OPTIONS --generator-set=shiboken --enable-parent-ctor-heuristic
# --enable-pyside-extensions --enable-return-value-heuristic --use-isnull-as-nb_nonzero
# --avoid-protected-hack
# ${INCLUDES}
# -I${CMAKE_SOURCE_DIR}
# -T${CMAKE_SOURCE_DIR}
# -T${PYSIDE_PATH}/typesystems
# --output-directory=${CMAKE_CURRENT_BINARY_DIR}
# )

# # Specify which sources will be generated by shiboken, and their dependencies.
# set(GENERATED_SOURCES
# ${CMAKE_CURRENT_BINARY_DIR}/AppLib/applib_module_wrapper.cpp
# ${CMAKE_CURRENT_BINARY_DIR}/AppLib/mainwindow_wrapper.cpp)

# set(GENERATED_SOURCES_DEPENDENCIES
# ${WRAPPED_HEADER}
# ${TYPESYSTEM_FILE}
# )

# # Add custom target to run shiboken.
# add_custom_command(OUTPUT ${GENERATED_SOURCES}
# COMMAND ${SHIBOKEN_PATH}
# ${SHIBOKEN_OPTIONS} ${WRAPPED_HEADER} ${TYPESYSTEM_FILE}
# DEPENDS ${GENERATED_SOURCES_DEPENDENCIES}
# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
# COMMENT "Running generator for ${TYPESYSTEM_FILE}.")

add_library(arclight-widgets STATIC
ContainerModel.cpp
ContainerModel.hpp
Expand Down
Loading

0 comments on commit 00af5f8

Please sign in to comment.