SingleApplication_inc = include_directories('SingleApplication.git') SingleApplication_moc = qt5.preprocess( moc_headers: ['SingleApplication.git/singleapplication.h', 'SingleApplication.git/singleapplication_p.h'], dependencies: dep_qt5 ) SingleApplication_lib = static_library('SingleApplication', ['SingleApplication.git/singleapplication.cpp', 'SingleApplication.git/singleapplication_p.cpp'], cpp_args : '-DQAPPLICATION_CLASS=QApplication', dependencies: dep_qt5 ) dep_SingleApplication = declare_dependency( include_directories: SingleApplication_inc, link_with: SingleApplication_lib ) # target_include_directories(['SingleApplication', 'PUBLIC', 'SingleApplication.git']) # target_link_libraries(['SingleApplication', 'Qt5::Core', 'Qt5::Network', 'Qt5::Widgets']) # target_compile_definitions(['SingleApplication', 'PRIVATE', 'QAPPLICATION_CLASS=QApplication']) #if cmake_system_name, 'MATCHES', 'Windows' # target_link_libraries(['SingleApplication', 'Advapi32']) #endif