summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-09-23 15:13:59 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2022-09-23 15:47:25 +0200
commit683fd757007ade08aebe9c81e089f121d7ec3ec2 (patch)
treeb9cc2cf5518dee265370fe78d6632333e228a674
parentTranslated using Weblate (Russian) (diff)
downloadnheko-683fd757007ade08aebe9c81e089f121d7ec3ec2.tar.xz
More granular automoc
-rw-r--r--CMakeLists.txt8
-rw-r--r--third_party/SingleApplication-3.3.2/CMakeLists.txt3
2 files changed, 6 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c734b6a3..135b967e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,7 +21,6 @@ set(
 set(CMAKE_CXX_STANDARD 20 CACHE STRING "C++ standard")
 set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL "Require C++ standard to be supported")
 set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "compile as PIC by default")
-set(CMAKE_AUTOMOC ON)
 
 option(HUNTER_ENABLED "Enable Hunter package manager" OFF)
 include("cmake/HunterGate.cmake")
@@ -664,6 +663,11 @@ else()
 	endif()
 endif()
 
+set_target_properties(nheko
+	PROPERTIES
+		CMAKE_SKIP_INSTALL_RPATH TRUE
+		AUTOMOC ON)
+
 if(APPLE)
 	target_link_libraries (nheko PRIVATE Qt5::MacExtras)
 elseif(WIN32)
@@ -757,8 +761,6 @@ if(MAN)
 	add_subdirectory(man)
 endif()
 
-set_target_properties(nheko PROPERTIES CMAKE_SKIP_INSTALL_RPATH TRUE)
-
 if(UNIX AND NOT APPLE)
 	if(FLATPAK)
 		set(APPID "io.github.NhekoReborn.Nheko")
diff --git a/third_party/SingleApplication-3.3.2/CMakeLists.txt b/third_party/SingleApplication-3.3.2/CMakeLists.txt
index ae1b1439..0dc8d3e1 100644
--- a/third_party/SingleApplication-3.3.2/CMakeLists.txt
+++ b/third_party/SingleApplication-3.3.2/CMakeLists.txt
@@ -2,13 +2,12 @@ cmake_minimum_required(VERSION 3.7.0)
 
 project(SingleApplication LANGUAGES CXX)
 
-set(CMAKE_AUTOMOC ON)
-
 add_library(${PROJECT_NAME} STATIC
     singleapplication.cpp
     singleapplication_p.cpp
 )
 add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
+set_target_properties(${PROJECT_NAME} PROPERTIES AUTOMOC ON)
 
 if(NOT QT_DEFAULT_MAJOR_VERSION)
     set(QT_DEFAULT_MAJOR_VERSION 5 CACHE STRING "Qt version to use (5 or 6), defaults to 5")