Open Petross404 opened 5 years ago
This patch helped but still, is there a better way?
From 62b06474c31f9d0674f5139e584711e21f4fb702 Mon Sep 17 00:00:00 2001
From: Petros Siligkounas <petross404@gmail.com>
Date: Wed, 13 Feb 2019 20:48:13 +0200
Subject: [PATCH] Rename moc target as moc-ng, so it doesn't overwrite Qt's moc
---
src/CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e38fbd1..bcf57ea 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -98,6 +98,10 @@ configure_file(embedded_includes.h.in embedded_includes.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include("GNUInstallDirs")
+#Installing moc under /usr/bin will erase Qt's moc
+if(${CMAKE_BUILD_TYPE} MATCHES "Gentoo")
+ set_target_properties(moc PROPERTIES OUTPUT_NAME "moc-ng")
+endif()
install(TARGETS moc mocng_plugin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
The idea is to overwrite Qt's moc so it is used instead, as it is supposed to be a drop-in replacement.
I admit not everybody wants that, but if we give it another name, it makes it harder to use.
I am thinking about another idea. Maybe moc-ng
could be installed in some other directory like /usr/lib/moc-ng/moc
and a symlink as /usr/bin/moc
could point either to moc-ng or /usr/lib64/qt5/.../moc.
This has to be supported from the distribution and Qt's packaging so I don't hold my breath. Thank you anyway. Feel free to close this issue is there is nothing to be done (at least now).
Trying to install moc-ng with Portage gives me this :