Trying to fix windows
This commit is contained in:
parent
48719412f2
commit
db3f6287fe
|
@ -35,10 +35,18 @@ jobs:
|
||||||
args: install pkgconfiglite --checksum e87b5ea3c9142256af60f2d5b917aa63b571e6a0 --checksum-type sha1
|
args: install pkgconfiglite --checksum e87b5ea3c9142256af60f2d5b917aa63b571e6a0 --checksum-type sha1
|
||||||
|
|
||||||
- name: Build Qtk
|
- name: Build Qtk
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cmake -B build/ ${{ matrix.cmake }} -DQTK_UPDATE_SUBMODULES=ON
|
cmake -B build/ ${{ matrix.cmake }} -DQTK_UPDATE_SUBMODULES=ON -DQTK_DEBUG=OFF
|
||||||
cmake --build build/ -- -j $(nproc)
|
cmake --build build/ --config Release
|
||||||
|
|
||||||
|
- name: Build Qtk
|
||||||
|
if: matrix.os != 'windows-latest'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cmake -B build/ ${{ matrix.cmake }} -DQTK_UPDATE_SUBMODULES=ON -DQTK_DEBUG=OFF
|
||||||
|
cmake --build build/ --config Release -- -j $(nproc)
|
||||||
|
|
||||||
- name: Install Qtk
|
- name: Install Qtk
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -52,10 +60,18 @@ jobs:
|
||||||
path: install/*
|
path: install/*
|
||||||
|
|
||||||
- name: Package Qtk
|
- name: Package Qtk
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd build/
|
cd build/
|
||||||
cmake --build . --target package -- -j $(nproc)
|
cmake --build . --target package --config Release
|
||||||
|
|
||||||
|
- name: Package Qtk
|
||||||
|
if: matrix.os != 'windows-latest'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd build/
|
||||||
|
cmake --build . --target package --config Release -- -j $(nproc)
|
||||||
|
|
||||||
# - name: Package Qtk Sources
|
# - name: Package Qtk Sources
|
||||||
# if: matrix.os != 'macos-latest'
|
# if: matrix.os != 'macos-latest'
|
||||||
|
@ -104,9 +120,18 @@ jobs:
|
||||||
sudo apt install libassimp-dev
|
sudo apt install libassimp-dev
|
||||||
|
|
||||||
- name: Build Qtk
|
- name: Build Qtk
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cmake -B build/ ${{ matrix.cmake }} && cmake --build build/ -- -j $(nproc)
|
cmake -B build/ ${{ matrix.cmake }} -DQTK_DEBUG=OFF
|
||||||
|
cmake --build build/ --config Release
|
||||||
|
|
||||||
|
- name: Build Qtk
|
||||||
|
if: matrix.os != 'windows-latest'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cmake -B build/ ${{ matrix.cmake }} -DQTK_DEBUG=OFF
|
||||||
|
cmake --build build/ --config Release -- -j $(nproc)
|
||||||
|
|
||||||
# TODO: Enable with tag only when done testing
|
# TODO: Enable with tag only when done testing
|
||||||
# Release-Qtk:
|
# Release-Qtk:
|
||||||
|
|
|
@ -25,7 +25,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
#set(CMAKE_MACOSX_BUNDLE ON)
|
#set(CMAKE_MACOSX_BUNDLE ON)
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
|
|
||||||
if(MSVC)
|
if(WIN32)
|
||||||
set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
|
set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
|
||||||
add_compile_options(-warnnotaserror)
|
add_compile_options(-warnnotaserror)
|
||||||
add_compile_options(/wd4131 /wd4127)
|
add_compile_options(/wd4131 /wd4127)
|
||||||
|
@ -58,6 +58,12 @@ option(
|
||||||
OFF
|
OFF
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(NOT QTK_DEBUG)
|
||||||
|
set(CMAKE_BUILD_TYPE Release)
|
||||||
|
else()
|
||||||
|
set(CMAKE_BUILD_TYPE Debug)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(QT_DIR "$ENV{HOME}/Qt/" CACHE PATH "Path to Qt6")
|
set(QT_DIR "$ENV{HOME}/Qt/" CACHE PATH "Path to Qt6")
|
||||||
|
|
||||||
# Qt Designer will look in different locations if WIN / Unix.
|
# Qt Designer will look in different locations if WIN / Unix.
|
||||||
|
@ -116,12 +122,13 @@ if(NOT Qt6_FOUND)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Find Assimp
|
# Find Assimp
|
||||||
set(ASSIMP_BUILD_TESTS OFF)
|
set(ASSIMP_BUILD_TESTS OFF CACHE STRING "Do not build assimp tests." FORCE)
|
||||||
if(QTK_UPDATE_SUBMODULES)
|
if(QTK_UPDATE_SUBMODULES)
|
||||||
message(STATUS "[Qtk] Updating submodules...")
|
message(STATUS "[Qtk] Updating submodules...")
|
||||||
set(ASSIMP_INSTALL OFF)
|
set(ASSIMP_INSTALL OFF CACHE STRING "Use assimp as a submodule." FORCE)
|
||||||
|
set(ASSIMP_WARNINGS_AS_ERRORS OFF CACHE STRING "No warnings as errors." FORCE)
|
||||||
submodule_update("${CMAKE_CURRENT_SOURCE_DIR}/extern/assimp/assimp/")
|
submodule_update("${CMAKE_CURRENT_SOURCE_DIR}/extern/assimp/assimp/")
|
||||||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/extern/assimp/assimp/")
|
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/extern/assimp/assimp/" EXCLUDE_FROM_ALL)
|
||||||
else()
|
else()
|
||||||
find_package(assimp REQUIRED)
|
find_package(assimp REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -123,36 +123,37 @@ qt_generate_deploy_app_script(
|
||||||
)
|
)
|
||||||
install(SCRIPT ${QTK_DEPLOY_SCRIPT})
|
install(SCRIPT ${QTK_DEPLOY_SCRIPT})
|
||||||
|
|
||||||
if(WIN32)
|
|
||||||
get_target_property(_qt6_qmake_location Qt6::qmake IMPORTED_LOCATION)
|
|
||||||
execute_process(
|
|
||||||
COMMAND "${_qt6_qmake_location}" -query QT_INSTALL_PREFIX
|
|
||||||
RESULT_VARIABLE return_code
|
|
||||||
OUTPUT_VARIABLE qt6_install_prefix
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
||||||
)
|
|
||||||
file(TO_NATIVE_PATH "${qt6_install_prefix}/bin" qt6_install_prefix)
|
|
||||||
|
|
||||||
if(TARGET Qt6::windeployqt)
|
#if(WIN32)
|
||||||
add_custom_command(
|
# get_target_property(_qt6_qmake_location Qt6::qmake IMPORTED_LOCATION)
|
||||||
TARGET qtk_main
|
# execute_process(
|
||||||
POST_BUILD
|
# COMMAND "${_qt6_qmake_location}" -query QT_INSTALL_PREFIX
|
||||||
COMMAND set PATH=%PATH%$<SEMICOLON>${qt6_install_prefix}
|
# RESULT_VARIABLE return_code
|
||||||
COMMAND Qt6::windeployqt --dir "${CMAKE_BINARY_DIR}/windeployqt" "$<TARGET_FILE_DIR:qtk_main>/$<TARGET_FILE_NAME:qtk_main>"
|
# OUTPUT_VARIABLE qt6_install_prefix
|
||||||
)
|
# OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
install(DIRECTORY "${CMAKE_BINARY_DIR}/windeployqt/" DESTINATION bin)
|
# )
|
||||||
endif()
|
# file(TO_NATIVE_PATH "${qt6_install_prefix}/bin" qt6_install_prefix)
|
||||||
|
#
|
||||||
if(MSVC AND TARGET Qt6::qmake)
|
# if(TARGET Qt6::windeployqt)
|
||||||
set(VSUSER_FILE "${CMAKE_CURRENT_BINARY_DIR}/qtk_main.vcxproj.user")
|
# add_custom_command(
|
||||||
file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/extern/assimp/assimp/bin" assimp_bin)
|
# TARGET qtk_main
|
||||||
file(WRITE ${VSUSER_FILE} "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n")
|
# POST_BUILD
|
||||||
file(APPEND ${VSUSER_FILE} "<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n")
|
# COMMAND set PATH=%PATH%$<SEMICOLON>${qt6_install_prefix}
|
||||||
file(APPEND ${VSUSER_FILE} " <PropertyGroup>\n")
|
# COMMAND Qt6::windeployqt --dir "${CMAKE_BINARY_DIR}/windeployqt" "$<TARGET_FILE_DIR:qtk_main>/$<TARGET_FILE_NAME:qtk_main>"
|
||||||
file(APPEND ${VSUSER_FILE} " <LocalDebuggerEnvironment>Path=$(SolutionDir)\\lib\\$(Configuration);${qt6_install_prefix};${assimp_bin};$(Path)\n")
|
# )
|
||||||
file(APPEND ${VSUSER_FILE} "$(LocalDebuggerEnvironment)</LocalDebuggerEnvironment>\n")
|
# install(DIRECTORY "${CMAKE_BINARY_DIR}/windeployqt/" DESTINATION bin)
|
||||||
file(APPEND ${VSUSER_FILE} " <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>\n")
|
# endif()
|
||||||
file(APPEND ${VSUSER_FILE} " </PropertyGroup>\n")
|
#
|
||||||
file(APPEND ${VSUSER_FILE} "</Project>\n")
|
# if(MSVC AND TARGET Qt6::qmake)
|
||||||
endif()
|
# set(VSUSER_FILE "${CMAKE_CURRENT_BINARY_DIR}/qtk_main.vcxproj.user")
|
||||||
endif()
|
# file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/extern/assimp/assimp/bin" assimp_bin)
|
||||||
|
# file(WRITE ${VSUSER_FILE} "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n")
|
||||||
|
# file(APPEND ${VSUSER_FILE} "<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n")
|
||||||
|
# file(APPEND ${VSUSER_FILE} " <PropertyGroup>\n")
|
||||||
|
# file(APPEND ${VSUSER_FILE} " <LocalDebuggerEnvironment>Path=$(SolutionDir)\\lib\\$(Configuration);${qt6_install_prefix};${assimp_bin};$(Path)\n")
|
||||||
|
# file(APPEND ${VSUSER_FILE} "$(LocalDebuggerEnvironment)</LocalDebuggerEnvironment>\n")
|
||||||
|
# file(APPEND ${VSUSER_FILE} " <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>\n")
|
||||||
|
# file(APPEND ${VSUSER_FILE} " </PropertyGroup>\n")
|
||||||
|
# file(APPEND ${VSUSER_FILE} "</Project>\n")
|
||||||
|
# endif()
|
||||||
|
#endif()
|
||||||
|
|
|
@ -42,9 +42,7 @@ QtkWidget::QtkWidget(QWidget * parent, const QString & name, Scene * scene) :
|
||||||
// Set the size of the depth bufer for glEnable(GL_DEPTH_TEST)
|
// Set the size of the depth bufer for glEnable(GL_DEPTH_TEST)
|
||||||
format.setDepthBufferSize(16);
|
format.setDepthBufferSize(16);
|
||||||
// If QTK_DEBUG is set, enable debug context
|
// If QTK_DEBUG is set, enable debug context
|
||||||
#ifdef QTK_DEBUG
|
|
||||||
format.setOption(QSurfaceFormat::DebugContext);
|
format.setOption(QSurfaceFormat::DebugContext);
|
||||||
#endif
|
|
||||||
setFormat(format);
|
setFormat(format);
|
||||||
setFocusPolicy(Qt::ClickFocus);
|
setFocusPolicy(Qt::ClickFocus);
|
||||||
}
|
}
|
||||||
|
@ -73,7 +71,6 @@ void QtkWidget::initializeGL() {
|
||||||
connect(this, SIGNAL(frameSwapped()), this, SLOT(update()));
|
connect(this, SIGNAL(frameSwapped()), this, SLOT(update()));
|
||||||
|
|
||||||
// Initialize OpenGL debug context
|
// Initialize OpenGL debug context
|
||||||
#ifdef QTK_DEBUG
|
|
||||||
mDebugLogger = new QOpenGLDebugLogger(this);
|
mDebugLogger = new QOpenGLDebugLogger(this);
|
||||||
if(mDebugLogger->initialize()) {
|
if(mDebugLogger->initialize()) {
|
||||||
qDebug() << "GL_DEBUG Debug Logger" << mDebugLogger << "\n";
|
qDebug() << "GL_DEBUG Debug Logger" << mDebugLogger << "\n";
|
||||||
|
@ -82,7 +79,6 @@ void QtkWidget::initializeGL() {
|
||||||
SLOT(messageLogged(QOpenGLDebugMessage)));
|
SLOT(messageLogged(QOpenGLDebugMessage)));
|
||||||
mDebugLogger->startLogging();
|
mDebugLogger->startLogging();
|
||||||
}
|
}
|
||||||
#endif // QTK_DEBUG
|
|
||||||
|
|
||||||
printContextInformation();
|
printContextInformation();
|
||||||
|
|
||||||
|
|
|
@ -156,7 +156,6 @@ namespace Qtk {
|
||||||
*/
|
*/
|
||||||
void update();
|
void update();
|
||||||
|
|
||||||
#ifdef QTK_DEBUG
|
|
||||||
/**
|
/**
|
||||||
* Called when the `messageLogged` signal is caught.
|
* Called when the `messageLogged` signal is caught.
|
||||||
* See definition of initializeGL()
|
* See definition of initializeGL()
|
||||||
|
@ -164,7 +163,6 @@ namespace Qtk {
|
||||||
* @param msg The message logged.
|
* @param msg The message logged.
|
||||||
*/
|
*/
|
||||||
void messageLogged(const QOpenGLDebugMessage & msg);
|
void messageLogged(const QOpenGLDebugMessage & msg);
|
||||||
#endif
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
|
@ -181,20 +179,16 @@ namespace Qtk {
|
||||||
*/
|
*/
|
||||||
static void updateCameraInput();
|
static void updateCameraInput();
|
||||||
|
|
||||||
#ifdef QTK_DEBUG
|
|
||||||
/**
|
/**
|
||||||
* Prints OpenGL context information at start of debug session.
|
* Prints OpenGL context information at start of debug session.
|
||||||
*/
|
*/
|
||||||
void printContextInformation();
|
void printContextInformation();
|
||||||
#endif
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* Private Members
|
* Private Members
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
#ifdef QTK_DEBUG
|
|
||||||
QOpenGLDebugLogger * mDebugLogger;
|
QOpenGLDebugLogger * mDebugLogger;
|
||||||
#endif
|
|
||||||
Qtk::Scene * mScene;
|
Qtk::Scene * mScene;
|
||||||
Qtk::DebugConsole * mConsole;
|
Qtk::DebugConsole * mConsole;
|
||||||
bool mConsoleActive = false;
|
bool mConsoleActive = false;
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace Ui {
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Qtk {
|
namespace Qtk {
|
||||||
class QDESIGNER_WIDGET_EXPORT ToolBox : public QDockWidget {
|
class ToolBox : public QDockWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace Ui {
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Qtk {
|
namespace Qtk {
|
||||||
class QDESIGNER_WIDGET_EXPORT TreeView : public QDockWidget {
|
class TreeView : public QDockWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue