Skip to content

Commit 6e010d3

Browse files
committed
AsteroidCMakeSettings.cmake: Fix default INSTALL_QML_IMPORT_DIR
Defaulting to e.g. /usr/lib/qml is wrong on Arch/Void/Alpine/Chimera (and likely elsewhere) and everyone had to configure with -DINSTALL_QML_IMPORT_DIR=/usr/lib/qt*/qml which is now avoided. To be seen if this causes issues anywhere, e.g. for local test runs.
1 parent 9d6d744 commit 6e010d3

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,6 @@ if (WITH_CMAKE_MODULES)
3434
# Install CMake modules
3535
file(GLOB installAsteroidModuleFiles LIST_DIRECTORIES FALSE ${CMAKE_SOURCE_DIR}/cmake/*[^~])
3636
install(FILES ${installAsteroidModuleFiles} DESTINATION ${ASTEROID_MODULES_INSTALL_DIR})
37-
else()
38-
get_target_property(REAL_QMAKE_EXECUTABLE Qt::qmake IMPORTED_LOCATION)
39-
40-
if (NOT QT_INSTALL_QML)
41-
execute_process(COMMAND "${REAL_QMAKE_EXECUTABLE}" -query QT_INSTALL_QML
42-
OUTPUT_VARIABLE QT_INSTALL_QML
43-
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
44-
endif()
45-
set(INSTALL_QML_IMPORT_DIR ${QT_INSTALL_QML})
4637
endif()
4738

4839
add_subdirectory(src)

cmake/AsteroidCMakeSettings.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if (NOT ASTEROID_SKIP_BUILD_SETTINGS)
3131
# Since CMake 3.0
3232
set(CMAKE_AUTORCC ON)
3333

34-
set(INSTALL_QML_IMPORT_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/qml"
34+
set(INSTALL_QML_IMPORT_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/qt${QT_VERSION_MAJOR}/qml"
3535
CACHE PATH "Custom QML import installation directory")
3636

3737
set(QT_MIN_VERSION "5.12.0")

0 commit comments

Comments
 (0)