Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/build-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
env:
CONFIGURATION: ${{ matrix.configuration }}
COMPILER: gcc-9
ENABLE_QTFRED: OFF
run: $GITHUB_WORKSPACE/ci/linux/configure_cmake.sh
- name: Compile
working-directory: ./build
Expand Down Expand Up @@ -139,7 +138,8 @@ jobs:
cmake -DCMAKE_INSTALL_PREFIX="$(pwd)/install" -DFSO_USE_SPEECH=ON \
-DFSO_USE_VOICEREC=ON -DFORCED_SIMD_INSTRUCTIONS="$SIMD" \
-DFSO_BUILD_TESTS=ON -DFSO_INSTALL_DEBUG_FILES=ON -A "$ARCHITECTURE" \
-G "Visual Studio 17 2022" -T "v143" -DCMAKE_BUILD_TYPE=$CONFIGURATION ..
-DQT_USE_PRECOMPILED=ON -G "Visual Studio 17 2022" -T "v143" \
-DCMAKE_BUILD_TYPE=$CONFIGURATION ..
- name: Compile
working-directory: ./build
env:
Expand Down Expand Up @@ -260,7 +260,6 @@ jobs:
COMPILER: ${{ matrix.compiler }}
ARCHITECTURE: ${{ matrix.arch }}
JOB_CMAKE_OPTIONS: ${{ matrix.cmake_options }}
ENABLE_QTFRED: OFF
run: $GITHUB_WORKSPACE/ci/linux/configure_cmake.sh
- name: Compile
working-directory: ./build
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ jobs:
env:
CONFIGURATION: ${{ matrix.configuration }}
COMPILER: gcc-9
ENABLE_QTFRED: OFF
run: $GITHUB_WORKSPACE/ci/linux/configure_cmake.sh
- name: Compile
working-directory: ./build
Expand Down Expand Up @@ -194,7 +193,8 @@ jobs:
cmake -DCMAKE_INSTALL_PREFIX="$(pwd)/install" -DFSO_USE_SPEECH=ON \
-DFSO_USE_VOICEREC=ON -DFORCED_SIMD_INSTRUCTIONS="$SIMD" \
-DFSO_BUILD_TESTS=ON -DFSO_INSTALL_DEBUG_FILES=ON -A "$ARCHITECTURE" \
-G "Visual Studio 17 2022" -T "v143" -DCMAKE_BUILD_TYPE=$CONFIGURATION ..
-DQT_USE_PRECOMPILED=ON -G "Visual Studio 17 2022" -T "v143" \
-DCMAKE_BUILD_TYPE=$CONFIGURATION ..
- name: Compile
working-directory: ./build
env:
Expand Down Expand Up @@ -332,7 +332,6 @@ jobs:
COMPILER: ${{ matrix.compiler }}
ARCHITECTURE: ${{ matrix.arch }}
JOB_CMAKE_OPTIONS: ${{ matrix.cmake_options }}
ENABLE_QTFRED: OFF
run: $GITHUB_WORKSPACE/ci/linux/configure_cmake.sh
- name: Compile
working-directory: ./build
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
env:
CONFIGURATION: ${{ matrix.configuration }}
COMPILER: gcc-9
ENABLE_QTFRED: OFF
run: $GITHUB_WORKSPACE/ci/linux/configure_cmake.sh
- name: Compile
working-directory: ./build
Expand Down Expand Up @@ -152,7 +151,8 @@ jobs:
cmake -DCMAKE_INSTALL_PREFIX="$(pwd)/install" -DFSO_USE_SPEECH=ON \
-DFSO_USE_VOICEREC=ON -DFORCED_SIMD_INSTRUCTIONS="$SIMD" \
-DFSO_BUILD_TESTS=ON -DFSO_INSTALL_DEBUG_FILES=ON -A "$ARCHITECTURE" \
-G "Visual Studio 17 2022" -T "v143" -DCMAKE_BUILD_TYPE=$CONFIGURATION ..
-DQT_USE_PRECOMPILED=ON -G "Visual Studio 17 2022" -T "v143" \
-DCMAKE_BUILD_TYPE=$CONFIGURATION ..
- name: Compile
working-directory: ./build
env:
Expand Down Expand Up @@ -273,7 +273,6 @@ jobs:
CONFIGURATION: ${{ matrix.configuration }}
COMPILER: ${{ matrix.compiler }}
ARCHITECTURE: ${{ matrix.arch }}
ENABLE_QTFRED: OFF
run: $GITHUB_WORKSPACE/ci/linux/configure_cmake.sh
- name: Compile
working-directory: ./build
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/cache-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ jobs:
COMPILER: ${{ matrix.compiler }}
JOB_CMAKE_OPTIONS: ${{ matrix.cmake_options }}
CCACHE_PATH: /usr/local/bin/ccache
ENABLE_QTFRED: OFF
run: $GITHUB_WORKSPACE/ci/linux/configure_cmake.sh
- name: Compile
working-directory: ./build
Expand Down Expand Up @@ -87,7 +86,6 @@ jobs:
COMPILER: ${{ matrix.compiler }}
JOB_CMAKE_OPTIONS: ${{ matrix.cmake_options }}
CCACHE_PATH: /usr/local/bin/ccache
ENABLE_QTFRED: OFF
run: $GITHUB_WORKSPACE/ci/linux/configure_cmake.sh
- name: Compile
working-directory: ./build
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/test-pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
COMPILER: ${{ matrix.compiler }}
JOB_CMAKE_OPTIONS: ${{ matrix.cmake_options }}
CCACHE_PATH: /usr/local/bin/ccache
ENABLE_QTFRED: OFF
run: $GITHUB_WORKSPACE/ci/linux/configure_cmake.sh
- name: Compile
working-directory: ./build
Expand Down Expand Up @@ -102,11 +101,11 @@ jobs:

if [ "$COMPILER" = "MinGW" ]; then
cmake -DFSO_USE_SPEECH=OFF -DFSO_FATAL_WARNINGS=ON -DFSO_USE_VOICEREC=OFF -DFSO_BUILD_TESTS=ON \
-DFSO_BUILD_FRED2=OFF -DCMAKE_BUILD_TYPE=$CONFIGURATION -G "Ninja" ..
-DFSO_BUILD_FRED2=OFF -DQT_USE_PRECOMPILED=ON -DCMAKE_BUILD_TYPE=$CONFIGURATION -G "Ninja" ..
else
cmake -DFSO_USE_SPEECH=ON -DFSO_FATAL_WARNINGS=ON -DFSO_USE_VOICEREC=OFF -DFSO_BUILD_TESTS=ON \
-DFORCED_SIMD_INSTRUCTIONS=SSE2 -G "Visual Studio 17 2022" -T "v143" -A "$ARCHITECTURE" \
-DCMAKE_BUILD_TYPE=$CONFIGURATION ..
-DQT_USE_PRECOMPILED=ON -DCMAKE_BUILD_TYPE=$CONFIGURATION ..
fi
- name: Compile
working-directory: ./build
Expand Down Expand Up @@ -165,7 +164,6 @@ jobs:
ARCHITECTURE: ${{ matrix.arch }}
JOB_CMAKE_OPTIONS: ${{ matrix.cmake_options }}
CCACHE_PATH: /usr/local/bin/ccache
ENABLE_QTFRED: OFF
run: $GITHUB_WORKSPACE/ci/linux/configure_cmake.sh
- name: Compile
working-directory: ./build
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/weekly-coverity-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ jobs:
env:
CONFIGURATION: Release
COMPILER: gcc-9
ENABLE_QTFRED: OFF
run: $GITHUB_WORKSPACE/ci/linux/configure_cmake.sh

- name: Build FSO with Coverity Wrapper
Expand Down
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/finder")
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/external/rpavlik-cmake-modules")
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/external/cotire")

# this must be set before include(toolchain)
if(WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
set(FSO_BUILD_QTFRED OFF CACHE INTERNAL "" FORCE)
else()
OPTION(FSO_BUILD_QTFRED "Build qtFRED2 binary" ON)
endif()

INCLUDE(globals)
INCLUDE(toolchain)
include(embed_file)
Expand Down Expand Up @@ -94,8 +101,6 @@ OPTION(FSO_BUILD_TESTS "Build unit tests" OFF)

OPTION(FSO_DEVELOPMENT_MODE "Generate binaries in development mode, only use if you know what you're doing!" OFF)

OPTION(FSO_BUILD_QTFRED "Build qtFRED2 binary" OFF)

IF(WIN32 OR APPLE)
# On windows and mac the default should be to always build the included libraries
SET(FSO_BUILD_INCLUDED_LIBS_DEFAULT ON)
Expand Down
8 changes: 6 additions & 2 deletions ci/linux/configure_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ if [ ! "$CCACHE_PATH" = "" ]; then
fi
fi

if [ -n "${ENABLE_QTFRED:-}" ]; then
CMAKE_OPTIONS="$CMAKE_OPTIONS -DFSO_BUILD_QTFRED=${ENABLE_QTFRED}"
fi

mkdir build
cd build

Expand All @@ -56,6 +60,6 @@ fi
# we have some build rules that do not play nice with parallel invocation and that fixes these issues

cmake -G Ninja -DFSO_FATAL_WARNINGS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON $CMAKE_OPTIONS $PLATFORM_CMAKE_OPTIONS \
-DCMAKE_INSTALL_PREFIX="$(pwd)/install" -DCMAKE_BUILD_TYPE=$CONFIGURATION \
-DCMAKE_INSTALL_PREFIX="$(pwd)/install" -DCMAKE_BUILD_TYPE=$CONFIGURATION -DQT_USE_PRECOMPILED=ON \
-DFFMPEG_USE_PRECOMPILED=ON -DFSO_BUILD_TESTS=ON -DFSO_BUILD_INCLUDED_LIBS=ON \
-DFSO_BUILD_QTFRED=${ENABLE_QTFRED:-OFF} -DCMAKE_JOB_POOLS=link=1 -DCMAKE_JOB_POOL_LINK=link ..
-DCMAKE_JOB_POOLS=link=1 -DCMAKE_JOB_POOL_LINK=link ..
9 changes: 6 additions & 3 deletions lib/prebuilt.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@

set(PREBUILT_VERSION_NAME "21d0b52")
# NOTE: These variables must be cached to allow QtFRED to use Qt6 prebuilt libs
# without setting Qt6 up project wide

set(PREBUILT_VERSION_NAME "62c89ef6" CACHE INTERNAL "")

set(FSO_PREBUILT_OVERRIDE "" CACHE PATH "Path to the prebuilt binaries, if empty the binaries will be downloaded.")
set(PREBUILT_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/prebuilt")
set(CURRENT_ROOT "${CMAKE_CURRENT_BINARY_DIR}")
set(PREBUILT_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/prebuilt" CACHE INTERNAL "")
set(CURRENT_ROOT "${CMAKE_CURRENT_BINARY_DIR}" CACHE INTERNAL "")

function(get_prebuilt_path OUT_VAR)
if (NOT "${FSO_PREBUILT_OVERRIDE}" STREQUAL "" AND IS_DIRECTORY "${FSO_PREBUILT_OVERRIDE}")
Expand Down
21 changes: 19 additions & 2 deletions qtfred/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ if(QT_USE_PRECOMPILED)
else()
SET(QT6_INSTALL_ROOT "" CACHE PATH
"The path to the Qt6 installation root. May be necessary on windows if the standard find_package fails to find the Qt installation.")
message(STATUS "Using system Qt libraries. Don't distribute these FSO binaries if these are the GPL libraries/plugins!")
endif()

if(QT6_INSTALL_ROOT)
list(PREPEND CMAKE_PREFIX_PATH "${QT6_INSTALL_ROOT}")
endif()

# Must be set before find_package -- CMake snapshots this into each imported target's
# MAP_IMPORTED_CONFIG_FASTDEBUG property at target-creation time, not at link time.
# The list entries are tried in order:
Expand All @@ -33,7 +33,24 @@ endif()
# Qt5::uic configuration FastDebug".
set(CMAKE_MAP_IMPORTED_CONFIG_FASTDEBUG Debug Release "")

find_package(Qt6 REQUIRED COMPONENTS Core Widgets OpenGL Help)
find_package(Qt6 COMPONENTS Core Widgets OpenGL Help)

# fall back to precompiled version if system install not found
if(Qt6_FOUND AND NOT QT_USE_PRECOMPILED)
message(STATUS "Using system Qt libraries. Don't distribute these FSO binaries if these are the GPL libraries/plugins!")
elseif(NOT Qt6_FOUND)
if(NOT QT_USE_PRECOMPILED)
message(STATUS "Qt6 libraries could not be found. Using prebuilt version...")

get_prebuilt_path(PREBUILT_PATH)
list(PREPEND CMAKE_PREFIX_PATH "${PREBUILT_PATH}/Qt6")

find_package(Qt6 REQUIRED COMPONENTS Core Widgets OpenGL Help)
else()
message(FATAL_ERROR "Required Qt6 libraries were not found!")
endif()
endif()

include(source_groups.cmake)
qt_standard_project_setup()
add_compile_definitions(QT_DISABLE_DEPRECATED_UP_TO=0x050F00)
Expand Down
2 changes: 1 addition & 1 deletion qtfred/src/ui/widgets/CampaignMissionGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class CampaignMissionGraph final : public QGraphicsView {
public:
explicit CampaignMissionGraph(QWidget* parent = nullptr);

bool eventFilter(QObject* watched, QEvent* event);
bool eventFilter(QObject* watched, QEvent* event) override;

// Hook up the working campaign data
void setModel(fso::fred::dialogs::CampaignEditorDialogModel* model);
Expand Down
Loading