mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-24 12:08:50 +03:00
More granular automoc
This commit is contained in:
parent
3b99e3826e
commit
683fd75700
2 changed files with 6 additions and 5 deletions
|
@ -21,7 +21,6 @@ set(
|
||||||
set(CMAKE_CXX_STANDARD 20 CACHE STRING "C++ standard")
|
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_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_POSITION_INDEPENDENT_CODE ON CACHE BOOL "compile as PIC by default")
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
|
|
||||||
option(HUNTER_ENABLED "Enable Hunter package manager" OFF)
|
option(HUNTER_ENABLED "Enable Hunter package manager" OFF)
|
||||||
include("cmake/HunterGate.cmake")
|
include("cmake/HunterGate.cmake")
|
||||||
|
@ -664,6 +663,11 @@ else()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set_target_properties(nheko
|
||||||
|
PROPERTIES
|
||||||
|
CMAKE_SKIP_INSTALL_RPATH TRUE
|
||||||
|
AUTOMOC ON)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
target_link_libraries (nheko PRIVATE Qt5::MacExtras)
|
target_link_libraries (nheko PRIVATE Qt5::MacExtras)
|
||||||
elseif(WIN32)
|
elseif(WIN32)
|
||||||
|
@ -757,8 +761,6 @@ if(MAN)
|
||||||
add_subdirectory(man)
|
add_subdirectory(man)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_properties(nheko PROPERTIES CMAKE_SKIP_INSTALL_RPATH TRUE)
|
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
if(FLATPAK)
|
if(FLATPAK)
|
||||||
set(APPID "io.github.NhekoReborn.Nheko")
|
set(APPID "io.github.NhekoReborn.Nheko")
|
||||||
|
|
|
@ -2,13 +2,12 @@ cmake_minimum_required(VERSION 3.7.0)
|
||||||
|
|
||||||
project(SingleApplication LANGUAGES CXX)
|
project(SingleApplication LANGUAGES CXX)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
|
|
||||||
add_library(${PROJECT_NAME} STATIC
|
add_library(${PROJECT_NAME} STATIC
|
||||||
singleapplication.cpp
|
singleapplication.cpp
|
||||||
singleapplication_p.cpp
|
singleapplication_p.cpp
|
||||||
)
|
)
|
||||||
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
|
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
|
||||||
|
set_target_properties(${PROJECT_NAME} PROPERTIES AUTOMOC ON)
|
||||||
|
|
||||||
if(NOT QT_DEFAULT_MAJOR_VERSION)
|
if(NOT QT_DEFAULT_MAJOR_VERSION)
|
||||||
set(QT_DEFAULT_MAJOR_VERSION 5 CACHE STRING "Qt version to use (5 or 6), defaults to 5")
|
set(QT_DEFAULT_MAJOR_VERSION 5 CACHE STRING "Qt version to use (5 or 6), defaults to 5")
|
||||||
|
|
Loading…
Reference in a new issue