diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index cd9848d..374bbe5 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -21,7 +21,7 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v4 with: - version: "6.8.2" + version: "6.10.1" host: linux target: desktop arch: linux_gcc_64 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 80de5b1..bc97327 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -24,7 +24,7 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v4 with: - version: "6.8.2" + version: "6.10.1" host: mac target: desktop arch: clang_64 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f4390ed..87c4a16 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -21,7 +21,7 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v4 with: - version: "6.8.2" + version: "6.10.1" host: windows target: desktop arch: win64_msvc2022_64 diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ad08bd..f28410d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v1.3.2 + +- Update CMake configuration to use GNUInstallDirs for standard installation paths. +- Update export and install commands to use project namespace. +- Fix compatibility with Qt6 < 6.4. + ## v1.3.1 - Remove `#pragma region` and `#pragma endregion` comments. diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e4e07e..ecfe322 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") # Set project information. project("QtAppInstanceManager" LANGUAGES CXX - VERSION 1.3.1.0 + VERSION 1.3.2.0 DESCRIPTION "A tool to communicate between the instances of your Qt application." HOMEPAGE_URL "https://github.com/oclero/QtAppInstanceManager" ) @@ -26,9 +26,20 @@ if(NOT CMAKE_OSX_DEPLOYMENT_TARGET) endif() set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") +# Include GNUInstallDirs for standard installation paths. +include(GNUInstallDirs) + # Find Qt. find_package(Qt6 REQUIRED COMPONENTS Core Network) -qt_standard_project_setup() + +# qt_standard_project_setup() is only available in Qt >= 6.3. +if(COMMAND qt_standard_project_setup) + qt_standard_project_setup() +else() + set(CMAKE_AUTOMOC ON) + set(CMAKE_AUTOUIC ON) + set(CMAKE_AUTORCC ON) +endif() # The library. add_subdirectory(src) diff --git a/CMakePresets.json b/CMakePresets.json index 447a464..4c6610a 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -63,9 +63,7 @@ "displayName": "macOS", "configurePreset": "macos", "description": "Release build for macOS", - "targets": [ - "QtAppInstanceManager" - ], + "targets": ["QtAppInstanceManager"], "configuration": "Release", "condition": { "type": "equals", @@ -78,9 +76,7 @@ "displayName": "Tests for macOS", "configurePreset": "macos", "description": "Tests release build for macOS", - "targets": [ - "QtAppInstanceManagerTests" - ], + "targets": ["QtAppInstanceManagerTests"], "configuration": "Release", "condition": { "type": "equals", @@ -93,9 +89,7 @@ "displayName": "Windows", "configurePreset": "windows", "description": "Release build for Windows", - "targets": [ - "QtAppInstanceManager" - ], + "targets": ["QtAppInstanceManager"], "configuration": "Release", "condition": { "type": "equals", @@ -108,9 +102,7 @@ "displayName": "Tests for Windows", "configurePreset": "windows", "description": "Tests release build for Windows", - "targets": [ - "QtAppInstanceManagerTests" - ], + "targets": ["QtAppInstanceManagerTests"], "configuration": "Release", "condition": { "type": "equals", @@ -123,9 +115,7 @@ "displayName": "Linux", "configurePreset": "linux", "description": "Release build for Linux", - "targets": [ - "QtAppInstanceManager" - ], + "targets": ["QtAppInstanceManager"], "configuration": "Release", "condition": { "type": "equals", @@ -138,9 +128,7 @@ "displayName": "Tests for Linux", "configurePreset": "linux", "description": "Tests release build for Linux", - "targets": [ - "QtAppInstanceManagerTests" - ], + "targets": ["QtAppInstanceManagerTests"], "configuration": "Release", "condition": { "type": "equals", @@ -159,8 +147,7 @@ }, "execution": { "noTestsAction": "error", - "stopOnFailure": false, - "rerun-failed": true + "stopOnFailure": false }, "condition": { "type": "equals", @@ -177,8 +164,7 @@ }, "execution": { "noTestsAction": "error", - "stopOnFailure": false, - "rerun-failed": true + "stopOnFailure": false }, "condition": { "type": "equals", @@ -195,8 +181,7 @@ }, "execution": { "noTestsAction": "error", - "stopOnFailure": false, - "rerun-failed": true + "stopOnFailure": false }, "condition": { "type": "equals", diff --git a/cmake/config.cmake.in b/cmake/config.cmake.in index 9425122..0d0b0a7 100644 --- a/cmake/config.cmake.in +++ b/cmake/config.cmake.in @@ -3,6 +3,6 @@ include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") include(CMakeFindDependencyMacro) -find_dependency(Qt6 REQUIRED COMPONENTS Core Widgets Svg) +find_dependency(Qt6 REQUIRED COMPONENTS Core Network) check_required_components(@PROJECT_NAME@) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 26b57cf..a4fc263 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -88,7 +88,7 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/" install(EXPORT "${PROJECT_NAME}Targets" FILE "${PROJECT_NAME}Targets.cmake" - NAMESPACE ${PROJECT_NAME}:: + NAMESPACE ${PROJECT_NAMESPACE}:: DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" ) @@ -100,5 +100,5 @@ install(FILES export(EXPORT "${PROJECT_NAME}Targets" FILE "${CMAKE_BINARY_DIR}/cmake/${PROJECT_NAME}Targets.cmake" - NAMESPACE ${PROJECT_NAME}:: + NAMESPACE ${PROJECT_NAMESPACE}:: )