[calamares] Fix up multiple-moc of KDSAG

- was getting multiple definitions of moc-related code due to automoc
  combined with KDSAG having its own #include moc, comment-out the include.
- while here, simplify the CMake bits for building KDSAG
This commit is contained in:
Adriaan de Groot 2020-08-10 16:10:16 +02:00
parent 01f0367459
commit 3a0155b69d
2 changed files with 10 additions and 9 deletions

View File

@ -1119,7 +1119,7 @@ void KDSingleApplicationGuard::Private::poll() {
} }
} }
#include "moc_kdsingleapplicationguard.cpp" // #include "moc_kdsingleapplicationguard.cpp"
#ifdef KDTOOLSCORE_UNITTESTS #ifdef KDTOOLSCORE_UNITTESTS

View File

@ -11,15 +11,12 @@ set( calamaresSources
) )
if( NOT WITH_KF5DBus ) if( NOT WITH_KF5DBus )
set( kdsagSources "" ) set( kdsagSources
foreach( _s ${CMAKE_SOURCE_DIR}/3rdparty/kdsingleapplicationguard/kdsingleapplicationguard.cpp
kdsingleapplicationguard/kdsingleapplicationguard.cpp ${CMAKE_SOURCE_DIR}/3rdparty/kdsingleapplicationguard/kdsharedmemorylocker.cpp
kdsingleapplicationguard/kdsharedmemorylocker.cpp ${CMAKE_SOURCE_DIR}/3rdparty/kdsingleapplicationguard/kdtoolsglobal.cpp
kdsingleapplicationguard/kdtoolsglobal.cpp ${CMAKE_SOURCE_DIR}/3rdparty/kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp
kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp
) )
list( APPEND kdsagSources ${CMAKE_SOURCE_DIR}/3rdparty/${_s} )
endforeach()
mark_thirdparty_code( ${kdsagSources} ) mark_thirdparty_code( ${kdsagSources} )
list( APPEND calamaresSources ${kdsagSources} ) list( APPEND calamaresSources ${kdsagSources} )
endif() endif()
@ -46,6 +43,10 @@ calamares_automoc( calamares_bin )
calamares_autouic( calamares_bin ) calamares_autouic( calamares_bin )
calamares_autorcc( calamares_bin ) calamares_autorcc( calamares_bin )
if( kdsagSources )
set_source_files_properties( ${kdsagSources} PROPERTIES AUTOMOC OFF )
endif()
target_link_libraries( calamares_bin target_link_libraries( calamares_bin
PRIVATE PRIVATE
calamares calamares