Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to QtCreator v12.0.1 #46

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
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
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@ cmake_minimum_required(VERSION 3.1)
project(qmlfmt)

cmake_policy(SET CMP0022 NEW)
cmake_policy(SET CMP0071 OLD)

set_property(GLOBAL PROPERTY USE_FOLDERS On)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC true)
set(CMAKE_INCLUDE_CURRENT_DIR true)

include(qt-creator/cmake/QtCreatorIDEBranding.cmake)

set(QMLFMT_VERSION "" CACHE STRING "Version of qmlfmt")
set(QMLFMT_COMMIT "" CACHE STRING "Commit hash of qmlfmt")

Expand All @@ -57,6 +56,9 @@ ENDIF(NOT CMAKE_BUILD_TYPE)

find_package(Qt6 REQUIRED Core)

include(qt-creator/cmake/QtCreatorIDEBranding.cmake)
include(qt-creator/cmake/QtCreatorAPI.cmake)

add_subdirectory(diff_match_patch)
add_subdirectory(qmljs)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ brew install martindelille/tap/qmlfmt
## Build instructions
Requires
- CMake 3.1 or later
- Qt 6.4.2 or later.
- Qt 6.2 or later.
- Tested with Visual Studio 2019 and GCC 9.4. May work with Clang as well.
- Tested on Windows, Linux. May work on Mac OS as well.

Expand Down
8 changes: 4 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 1.0.{build}
configuration: Release
platform: x64
image:
- Ubuntu2004
- Ubuntu2204
- Visual Studio 2019
environment:
CTEST_OUTPUT_ON_FAILURE: 1
Expand All @@ -11,8 +11,8 @@ install:
- sh: sudo apt-get -y install libgl1-mesa-dev
- git submodule update --init qt-creator
before_build:
- cmd: 'cmake ./ -G "Visual Studio 16 2019" -A x64 -DCMAKE_PREFIX_PATH=C:/Qt/6.4/msvc2019_64 -DQMLFMT_VERSION:STRING=%APPVEYOR_REPO_TAG_NAME% -DQMLFMT_COMMIT:STRING=%APPVEYOR_REPO_COMMIT%'
- sh: 'cmake ./ -DCMAKE_BUILD_TYPE=$Configuration -DCMAKE_PREFIX_PATH=$HOME/Qt/6.4/gcc_64 -DQMLFMT_VERSION:STRING=%APPVEYOR_REPO_TAG_NAME% -DQMLFMT_COMMIT:STRING=%APPVEYOR_REPO_COMMIT%'
- cmd: 'cmake ./ -G "Visual Studio 16 2019" -A x64 -DCMAKE_PREFIX_PATH=C:/Qt/6.2/msvc2019_64 -DQMLFMT_VERSION:STRING=%APPVEYOR_REPO_TAG_NAME% -DQMLFMT_COMMIT:STRING=%APPVEYOR_REPO_COMMIT%'
- sh: 'cmake ./ -DCMAKE_BUILD_TYPE=$Configuration -DCMAKE_PREFIX_PATH=$HOME/Qt/6.2.4/gcc_64 -DQMLFMT_VERSION:STRING=%APPVEYOR_REPO_TAG_NAME% -DQMLFMT_COMMIT:STRING=%APPVEYOR_REPO_COMMIT%'
build_script:
- cmd: msbuild qmlfmt.sln /p:Configuration=Release -maxcpucount
- sh: make qmlfmt -j 2
Expand All @@ -21,7 +21,7 @@ after_build:
- sh: 7z a qmlfmt-linux.zip qmlfmt
test_script:
- cmd: >-
set PATH=C:\Qt\6.4\msvc2019_64\bin;%PATH%
set PATH=C:\Qt\6.2\msvc2019_64\bin;%PATH%

msbuild check.vcxproj
- sh: make check
Expand Down
18 changes: 13 additions & 5 deletions qmljs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ target_compile_definitions(languageutils PUBLIC "LANGUAGEUTILS_STATIC_LIBRARY")
# UTILS
file(GLOB_RECURSE utils_source
"${qt_creator_libs_src}/utils/*.cpp"
"${qt_creator_libs_src}/utils/*.h")
"${qt_creator_libs_src}/utils/*.h"
"${qt_creator_libs_src}/solutions/tasking/*.cpp"
"${qt_creator_libs_src}/solutions/tasking/*.h"
"${qt_creator_libs_src}/solutions/spinner/*.cpp"
"${qt_creator_libs_src}/solutions/spinner/*.h")

file(GLOB_RECURSE utils_source_apple
"${qt_creator_libs_src}/utils/*.mm"
Expand All @@ -74,13 +78,17 @@ else()
list(REMOVE_ITEM utils_source ${utils_source_apple})
endif()

add_subdirectory(${qt_creator_libs_src}/3rdparty/libptyqt libptyqt)

add_library(utils STATIC ${utils_source})
target_compile_definitions(utils PUBLIC UTILS_STATIC_LIBRARY RELATIVE_LIBEXEC_PATH=".")
target_include_directories(utils PRIVATE "${qt_creator_libs_src}" "${qt_creator_libs_src}/utils/" "${qt_creator_libs_src}/utils/mimetypes2/" ${Qt${QT_VERSION_MAJOR}Quick_PRIVATE_INCLUDE_DIRS})
target_link_libraries(utils PRIVATE Qt6::Widgets Qt6::Network Qt6::Concurrent Qt6::Qml Qt6::Xml Qt6::Core5Compat Qt6::CorePrivate)
target_include_directories(utils PRIVATE "${qt_creator_libs_src}" "${qt_creator_libs_src}/utils/" "${qt_creator_libs_src}/utils/mimetypes2/" ${Qt${QT_VERSION_MAJOR}Quick_PRIVATE_INCLUDE_DIRS} "${qt_creator_libs_src}/3rdparty/libptyqt/")
target_link_libraries(utils PRIVATE Qt6::Widgets Qt6::Network Qt6::Concurrent Qt6::Qml Qt6::Xml Qt6::Core5Compat Qt6::CorePrivate ptyqt)

if(WIN32)
target_link_libraries(utils PRIVATE user32 iphlpapi ws2_32 shell32 dbghelp)
add_subdirectory(${qt_creator_libs_src}/3rdparty/winpty winpty)
target_include_directories(utils PRIVATE "${qt_creator_libs_src}/3rdparty/winpty/")
target_link_libraries(utils PRIVATE user32 iphlpapi ws2_32 shell32 dbghelp winpty)
endif()

if (APPLE)
Expand Down Expand Up @@ -108,6 +116,6 @@ file(GLOB_RECURSE qmljs_source
"${qt_creator_libs_src}/qmljs/*.h")

add_library(qmljs STATIC ${qmljs_source})
target_link_libraries(qmljs PRIVATE utils languageutils cplusplus Qt6::Widgets Qt6::Xml Qt6::Core5Compat)
target_link_libraries(qmljs PRIVATE utils languageutils cplusplus Qt6::Widgets Qt6::Xml Qt6::Core5Compat Qt6::Concurrent)
target_compile_definitions(qmljs PUBLIC "QMLJS_STATIC_LIBRARY" "QT_CREATOR" "UTILS_STATIC_LIBRARY" "CPLUSPLUS_BUILD_STATIC_LIB" "LANGUAGEUTILS_STATIC_LIBRARY")
target_include_directories(qmljs PUBLIC "${qt_creator_libs_src}/3rdparty/" "${qt_creator_libs_src}/")
2 changes: 1 addition & 1 deletion qt-creator
Submodule qt-creator updated 8322 files