Skip to content

Commit

Permalink
update build system to make it compile on Qt6
Browse files Browse the repository at this point in the history
  • Loading branch information
mhogomchungu committed Jun 7, 2024
1 parent 9f6d8b5 commit c9eace2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
6 changes: 5 additions & 1 deletion external_libraries/tcplay/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
cmake_minimum_required (VERSION 3.0.2)
if(${CMAKE_VERSION} VERSION_GREATER "3.26")
cmake_minimum_required(VERSION 3.5.0)
else()
cmake_minimum_required(VERSION 3.0.2)
endif()

project (tcplay)
set (VERSION_MAJOR 3)
Expand Down
16 changes: 13 additions & 3 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,20 @@ endif()
set( CMAKE_CXX_STANDARD_REQUIRED ON )
set( CMAKE_CXX_EXTENSIONS OFF)

QT5_WRAP_UI( UI mainwindow.ui )
QT5_WRAP_CPP( MOC mainwindow.h )
if(BUILD_WITH_QT6)

add_library( plugin STATIC ${MOC} ${UI} mainwindow.cpp )
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

add_library( plugin STATIC mainwindow.h UI mainwindow.ui mainwindow.cpp )
else()
QT5_WRAP_UI( UI mainwindow.ui )
QT5_WRAP_CPP( MOC mainwindow.h )

add_library( plugin STATIC ${MOC} ${UI} mainwindow.cpp )
endif()

set_target_properties( plugin PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -Wextra -Wall -s -fPIC -pthread -pedantic " )

Expand Down

0 comments on commit c9eace2

Please sign in to comment.